mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Welding tool: Mostly code-related, the players won't notice much.
- Welding tool code how has proper comments! Maybe not "proper" but at least I don't lie and say a proc is/does something that it doesn't actually do. - Welders now start full of fuel instead of some random amount between 10-20 - Someone decided it would be a good idea to set the welding tool's 'on/off' var in a ton of attackby() procs. These objects and turfs shouldnt even touch this variable. This is why people have been noticing their welding being on without the sprite or damagetype and amount reflecting that. - - I've removed a bunch of these instances but there are so many objects and turfs spread out through the code, there's no way to know if I've got them all (This is the majority of the files) - - I've created a new proc in welding tools that checks to see if they are turned on or not. "isOn()" - - Since I'm not sure if I've gotten every instance of this force-var-on, I've set the welding tool to update it's icon every process(). I hate adding checks like this to processes but it's necessary for now. - Added a setWelding() proc. If you HAVE to turn the welding tool on or off, use this, don't just change the var. In fact, dont even touch the 'welding' var anymore - Fixes issue 435 While changing the hundreds(literally) of cases of welding tool uses I've - Changed some :'s (object:varorproc) I've come across into .'s (object.varorproc) - Added checks to make sure the welding tool is actually on before using it (some attackby()'s didnt have this. Heck, some checked how much fuel you had, but didn't actually USE the fuel) - Added sanity checks after some do_after()s that were missing them Added traitor uplink items back to erro's stat tracker - Added 'random' with the tag "RN" - Added thermal meson glasses with the tag "TM" - Reorganized uplinks.dm a little by moving the 'random' item generation to its own proc - NOTE: I have absolutely no way to test this on my own, but it should work! I've tested a bunch of construction/deconstructions with the welding tool, but again I've probably missed a few things. If there are any problems, please let me know and I'll fix them asap. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3741 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -252,11 +252,12 @@
|
||||
return
|
||||
|
||||
attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
||||
if (W:remove_fuel(0,user))
|
||||
W:welding = 2
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user << "\blue Now welding the vent."
|
||||
if(do_after(user, 20))
|
||||
if(!src || !WT.isOn()) return
|
||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
|
||||
@@ -266,7 +267,8 @@
|
||||
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
|
||||
welded = 0
|
||||
update_icon()
|
||||
W:welding = 1
|
||||
else
|
||||
user << "\blue The welding tool needs to be on to start this task."
|
||||
else
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user