Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upPrevents tactical tonfa from disappearing when used to shock an enemy. #4267
Conversation
This comment has been minimized.
This comment has been minimized.
|
Why do we need to add a charge per use? Won't this burn charge everytime you try to switch the light on/off or zap something? If it needs to be there to keep it from disappearing, why don't we also add a charge plus one line to the start of the iuse block to cancel out the drain. |
This comment has been minimized.
This comment has been minimized.
|
No. I stopped it from removing any charges by using return 0;, which means it wont use a charge when used. It returns whatever the tazer2 function returns, which will drain 100 charge when used. A charge is removed based on the return value, not simply through activation. The charge per use somehow stops it eating itself without affecting anyone else. Nothing else will fix it without changing how objects are handled. |
This comment has been minimized.
This comment has been minimized.
|
Oh ok, good to know. Thanks for fixing this, I'm been taking a break from coding for a bit, so haven't been watching the forums as closely as I used to. |
This comment has been minimized.
This comment has been minimized.
|
Now we just need the tazer function to be less really stupid and actually use the charges the item says to use instead of only and always using 100. |
freezerbunny commentedNov 10, 2013
#4261