various questions and stuff

Freeform discussion about anything related to modding Transcendence.
relanat
Militia Captain
Militia Captain
Posts: 609
Joined: Tue Nov 05, 2013 9:56 am

Fri Nov 09, 2018 1:10 am

I'm looking to check if a weapon has the ability to mine. I'm fairly sure there is a way to do this but can't think what it is. Something to do with damage type?
ATM I'm checking for the attribute 'miningEquipment' but this won't work if a weapon can mine but doesn't have that attribute.

NMS
Militia Commander
Militia Commander
Posts: 475
Joined: Tue Mar 05, 2013 8:26 am

Fri Nov 09, 2018 7:23 am

I think you'd have to use XML functions to get the damage string and find "mining:" in it.

relanat
Militia Captain
Militia Captain
Posts: 609
Joined: Tue Nov 05, 2013 9:56 am

Sat Nov 24, 2018 11:32 am

Thanks. I spotted code to do just that in the Weapons Lab Beta mod shortly after I posted the question.
-----------------

A lot of events, especially in missions, use the 'switch' function with only one option. I was wondering if there is a coding reason for doing this instead of using 'if'. Possibly it is just to make expanding the code easier?

Post Reply