mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +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
|
return
|
||||||
|
|
||||||
attackby(obj/item/W, mob/user)
|
attackby(obj/item/W, mob/user)
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
if (W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
W:welding = 2
|
if (WT.remove_fuel(0,user))
|
||||||
user << "\blue Now welding the vent."
|
user << "\blue Now welding the vent."
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||||
if(!welded)
|
if(!welded)
|
||||||
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
|
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.")
|
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
|
||||||
welded = 0
|
welded = 0
|
||||||
update_icon()
|
update_icon()
|
||||||
W:welding = 1
|
else
|
||||||
|
user << "\blue The welding tool needs to be on to start this task."
|
||||||
else
|
else
|
||||||
user << "\blue You need more welding fuel to complete this task."
|
user << "\blue You need more welding fuel to complete this task."
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -316,7 +316,8 @@
|
|||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W,/obj/item/weapon/weldingtool))
|
if(istype(W,/obj/item/weapon/weldingtool))
|
||||||
if(W:welding)
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.remove_fuel(0, user))
|
||||||
return TemperatureAct(100)
|
return TemperatureAct(100)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
else //weapons with subtypes
|
else //weapons with subtypes
|
||||||
if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
|
if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
|
||||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
if(W:welding) del src
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.remove_fuel(0, user)) del src
|
||||||
//TODO: add plant-b-gone
|
//TODO: add plant-b-gone
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -813,8 +813,9 @@ Auto Patrol: []"},
|
|||||||
src.item_state = "ed209_shell"
|
src.item_state = "ed209_shell"
|
||||||
src.icon_state = "ed209_shell"
|
src.icon_state = "ed209_shell"
|
||||||
del(W)
|
del(W)
|
||||||
else if((istype(W, /obj/item/weapon/weldingtool) && W:welding) && (src.build_step == 3))
|
else if((istype(W, /obj/item/weapon/weldingtool)) && (src.build_step == 3))
|
||||||
if (W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if (WT.remove_fuel(0,user))
|
||||||
src.build_step++
|
src.build_step++
|
||||||
src.name = "shielded frame assembly"
|
src.name = "shielded frame assembly"
|
||||||
user << "You welded the vest to [src]!"
|
user << "You welded the vest to [src]!"
|
||||||
|
|||||||
@@ -730,8 +730,9 @@ Auto Patrol: []"},
|
|||||||
|
|
||||||
/obj/item/weapon/secbot_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/weapon/secbot_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if((istype(W, /obj/item/weapon/weldingtool) && W:welding) && (!src.build_step))
|
if((istype(W, /obj/item/weapon/weldingtool)) && (!src.build_step))
|
||||||
if(W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.remove_fuel(0,user))
|
||||||
src.build_step++
|
src.build_step++
|
||||||
src.overlays += image('aibots.dmi', "hs_hole")
|
src.overlays += image('aibots.dmi', "hs_hole")
|
||||||
user << "You weld a hole in [src]!"
|
user << "You weld a hole in [src]!"
|
||||||
|
|||||||
@@ -20,13 +20,16 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
state = 1
|
state = 1
|
||||||
if(istype(P, /obj/item/weapon/weldingtool))
|
if(istype(P, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = P
|
||||||
|
if(!WT.isOn())
|
||||||
|
user << "The welder must be on for this task."
|
||||||
|
return
|
||||||
playsound(loc, 'Welder.ogg', 50, 1)
|
playsound(loc, 'Welder.ogg', 50, 1)
|
||||||
P:welding = 2
|
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
|
if(!src || !WT.remove_fuel(0, user)) return
|
||||||
user << "\blue You deconstruct the frame."
|
user << "\blue You deconstruct the frame."
|
||||||
new /obj/item/stack/sheet/plasteel( loc, 4)
|
new /obj/item/stack/sheet/plasteel( loc, 4)
|
||||||
del(src)
|
del(src)
|
||||||
P:welding = 1
|
|
||||||
if(1)
|
if(1)
|
||||||
if(istype(P, /obj/item/weapon/wrench))
|
if(istype(P, /obj/item/weapon/wrench))
|
||||||
playsound(loc, 'Ratchet.ogg', 50, 1)
|
playsound(loc, 'Ratchet.ogg', 50, 1)
|
||||||
|
|||||||
@@ -233,13 +233,16 @@
|
|||||||
src.anchored = 1
|
src.anchored = 1
|
||||||
src.state = 1
|
src.state = 1
|
||||||
if(istype(P, /obj/item/weapon/weldingtool))
|
if(istype(P, /obj/item/weapon/weldingtool))
|
||||||
P:welding = 2
|
var/obj/item/weapon/weldingtool/WT = P
|
||||||
|
if(!WT.remove_fuel(0, user))
|
||||||
|
user << "The welding tool must be on to complete this task."
|
||||||
|
return
|
||||||
playsound(src.loc, 'Welder.ogg', 50, 1)
|
playsound(src.loc, 'Welder.ogg', 50, 1)
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
user << "\blue You deconstruct the frame."
|
user << "\blue You deconstruct the frame."
|
||||||
new /obj/item/stack/sheet/metal( src.loc, 5 )
|
new /obj/item/stack/sheet/metal( src.loc, 5 )
|
||||||
del(src)
|
del(src)
|
||||||
P:welding = 1
|
|
||||||
if(1)
|
if(1)
|
||||||
if(istype(P, /obj/item/weapon/wrench))
|
if(istype(P, /obj/item/weapon/wrench))
|
||||||
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
playsound(src.loc, 'Ratchet.ogg', 50, 1)
|
||||||
|
|||||||
@@ -639,9 +639,15 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
return
|
return
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
if (W:remove_fuel(5,user)) // uses up 5 fuel.
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(!WT.isOn()) return
|
||||||
|
if (WT.get_fuel() < 5) // uses up 5 fuel.
|
||||||
|
user << "\red You need more fuel to complete this task."
|
||||||
|
return
|
||||||
|
|
||||||
playsound(src.loc, pick('Welder.ogg', 'Welder2.ogg'), 50, 1)
|
playsound(src.loc, pick('Welder.ogg', 'Welder2.ogg'), 50, 1)
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
|
if(!src || !WT.remove_fuel(5, user)) return
|
||||||
build_step = 1
|
build_step = 1
|
||||||
user << "You remove the turret's interior metal armor."
|
user << "You remove the turret's interior metal armor."
|
||||||
new /obj/item/stack/sheet/metal( loc, 2)
|
new /obj/item/stack/sheet/metal( loc, 2)
|
||||||
@@ -701,9 +707,14 @@ Neutralize All Unidentified Life Signs: []<BR>"},
|
|||||||
|
|
||||||
if(7)
|
if(7)
|
||||||
if(istype(W, /obj/item/weapon/weldingtool))
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
if (W:remove_fuel(5,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(!WT.isOn()) return
|
||||||
|
if (WT.get_fuel() < 5)
|
||||||
|
user << "\red You need more fuel to complete this task."
|
||||||
|
|
||||||
playsound(src.loc, pick('Welder.ogg', 'Welder2.ogg'), 50, 1)
|
playsound(src.loc, pick('Welder.ogg', 'Welder2.ogg'), 50, 1)
|
||||||
if(do_after(user, 30))
|
if(do_after(user, 30))
|
||||||
|
if(!src || !WT.remove_fuel(5, user)) return
|
||||||
build_step = 8
|
build_step = 8
|
||||||
user << "\blue You weld the turret's armor down."
|
user << "\blue You weld the turret's armor down."
|
||||||
|
|
||||||
|
|||||||
@@ -756,8 +756,9 @@
|
|||||||
user << "There's already a powercell installed."
|
user << "There's already a powercell installed."
|
||||||
return
|
return
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding && user.a_intent != "hurt")
|
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "hurt")
|
||||||
if (W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if (WT.remove_fuel(0,user))
|
||||||
if (hasInternalDamage(MECHA_INT_TANK_BREACH))
|
if (hasInternalDamage(MECHA_INT_TANK_BREACH))
|
||||||
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||||
user << "\blue You repair the damaged gas tank."
|
user << "\blue You repair the damaged gas tank."
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/datum/construction/mecha/custom_action(step, atom/used_atom, mob/user)
|
/datum/construction/mecha/custom_action(step, atom/used_atom, mob/user)
|
||||||
if(istype(used_atom, /obj/item/weapon/weldingtool))
|
if(istype(used_atom, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/W = used_atom
|
var/obj/item/weapon/weldingtool/W = used_atom
|
||||||
if (W:remove_fuel(0, user))
|
if (W.remove_fuel(0, user))
|
||||||
playsound(holder, 'Welder2.ogg', 50, 1)
|
playsound(holder, 'Welder2.ogg', 50, 1)
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
/datum/construction/reversible/mecha/custom_action(index as num, diff as num, atom/used_atom, mob/user as mob)
|
/datum/construction/reversible/mecha/custom_action(index as num, diff as num, atom/used_atom, mob/user as mob)
|
||||||
if(istype(used_atom, /obj/item/weapon/weldingtool))
|
if(istype(used_atom, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/W = used_atom
|
var/obj/item/weapon/weldingtool/W = used_atom
|
||||||
if (W:remove_fuel(0, user))
|
if (W.remove_fuel(0, user))
|
||||||
playsound(holder, 'Welder2.ogg', 50, 1)
|
playsound(holder, 'Welder2.ogg', 50, 1)
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -31,11 +31,12 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/effect/decal/mecha_wreckage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/effect/decal/mecha_wreckage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
if(salvage_num <= 0)
|
if(salvage_num <= 0)
|
||||||
user << "You don't see anything that can be cut with [W]."
|
user << "You don't see anything that can be cut with [W]."
|
||||||
return
|
return
|
||||||
if (!isemptylist(welder_salvage) && W:remove_fuel(0,user))
|
if (!isemptylist(welder_salvage) && WT.remove_fuel(0,user))
|
||||||
var/type = prob(70)?pick(welder_salvage):null
|
var/type = prob(70)?pick(welder_salvage):null
|
||||||
if(type)
|
if(type)
|
||||||
var/N = new type(get_turf(user))
|
var/N = new type(get_turf(user))
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
if(istype(W, /obj/item/weapon/weldingtool))
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/WT = W
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
|
||||||
if(WT.welding)
|
if(WT.remove_fuel(0, user))
|
||||||
damage = 15
|
damage = 15
|
||||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ Alien plants should do something if theres a lot of poison
|
|||||||
if(istype(W, /obj/item/weapon/weldingtool))
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/WT = W
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
|
||||||
if(WT.welding)
|
if(WT.remove_fuel(0, user))
|
||||||
damage = 15
|
damage = 15
|
||||||
playsound(loc, 'Welder.ogg', 100, 1)
|
playsound(loc, 'Welder.ogg', 100, 1)
|
||||||
|
|
||||||
|
|||||||
@@ -133,8 +133,9 @@
|
|||||||
if(istype(W, /obj/item/weapon/grab))
|
if(istype(W, /obj/item/weapon/grab))
|
||||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding )
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
if(!W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(!WT.remove_fuel(0,user))
|
||||||
user << "\blue You need more welding fuel to complete this task."
|
user << "\blue You need more welding fuel to complete this task."
|
||||||
return
|
return
|
||||||
new /obj/item/stack/sheet/metal(src.loc)
|
new /obj/item/stack/sheet/metal(src.loc)
|
||||||
@@ -153,8 +154,9 @@
|
|||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||||
return
|
return
|
||||||
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding )
|
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
if(!W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(!WT.remove_fuel(0,user))
|
||||||
user << "\blue You need more welding fuel to complete this task."
|
user << "\blue You need more welding fuel to complete this task."
|
||||||
return
|
return
|
||||||
src.welded =! src.welded
|
src.welded =! src.welded
|
||||||
|
|||||||
@@ -175,20 +175,19 @@ obj/structure/door_assembly
|
|||||||
glass = 1
|
glass = 1
|
||||||
|
|
||||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding && !anchored )
|
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||||
if (W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
W:welding = 2
|
if (WT.remove_fuel(0,user))
|
||||||
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
||||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||||
|
|
||||||
if(do_after(user, 40))
|
if(do_after(user, 40))
|
||||||
if(!src) return
|
if(!src || !WT.isOn()) return
|
||||||
user << "\blue You dissasembled the airlock assembly!"
|
user << "\blue You dissasembled the airlock assembly!"
|
||||||
new /obj/item/stack/sheet/metal(get_turf(src), 4)
|
new /obj/item/stack/sheet/metal(get_turf(src), 4)
|
||||||
if(src.glass==1)
|
if(src.glass==1)
|
||||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||||
del(src)
|
del(src)
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
|
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -495,17 +495,18 @@
|
|||||||
if (is_sharp(W))
|
if (is_sharp(W))
|
||||||
burst()
|
burst()
|
||||||
|
|
||||||
|
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
|
||||||
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
||||||
return ( \
|
return ( \
|
||||||
istype(W, /obj/item/weapon/screwdriver) || \
|
istype(W, /obj/item/weapon/screwdriver) || \
|
||||||
istype(W, /obj/item/weapon/pen) || \
|
istype(W, /obj/item/weapon/pen) || \
|
||||||
istype(W, /obj/item/weapon/weldingtool) && W:welding || \
|
istype(W, /obj/item/weapon/weldingtool) || \
|
||||||
istype(W, /obj/item/weapon/lighter/zippo) && W:lit || \
|
istype(W, /obj/item/weapon/lighter/zippo) || \
|
||||||
istype(W, /obj/item/weapon/match) && W:lit || \
|
istype(W, /obj/item/weapon/match) || \
|
||||||
istype(W, /obj/item/clothing/mask/cigarette) && W:lit || \
|
istype(W, /obj/item/clothing/mask/cigarette) || \
|
||||||
istype(W, /obj/item/weapon/wirecutters) || \
|
istype(W, /obj/item/weapon/wirecutters) || \
|
||||||
istype(W, /obj/item/weapon/circular_saw) || \
|
istype(W, /obj/item/weapon/circular_saw) || \
|
||||||
istype(W, /obj/item/weapon/melee/energy/sword) && W:active || \
|
istype(W, /obj/item/weapon/melee/energy/sword) || \
|
||||||
istype(W, /obj/item/weapon/melee/energy/blade) || \
|
istype(W, /obj/item/weapon/melee/energy/blade) || \
|
||||||
istype(W, /obj/item/weapon/shovel) || \
|
istype(W, /obj/item/weapon/shovel) || \
|
||||||
istype(W, /obj/item/weapon/kitchenknife) || \
|
istype(W, /obj/item/weapon/kitchenknife) || \
|
||||||
|
|||||||
@@ -27,13 +27,21 @@
|
|||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
|
||||||
light("\red [user] casually lights the [name] with [W], what a badass.")
|
light("\red [user] casually lights the [name] with [W], what a badass.")
|
||||||
else if(istype(W, /obj/item/weapon/lighter) && W:lit)
|
else if(istype(W, /obj/item/weapon/lighter))
|
||||||
|
var/obj/item/weapon/lighter/L = W
|
||||||
|
if(L.lit)
|
||||||
light()
|
light()
|
||||||
else if(istype(W, /obj/item/weapon/match) && W:lit)
|
else if(istype(W, /obj/item/weapon/match))
|
||||||
|
var/obj/item/weapon/match/M = W
|
||||||
|
if(M.lit)
|
||||||
light()
|
light()
|
||||||
else if(istype(W, /obj/item/candle) && W:lit)
|
else if(istype(W, /obj/item/candle))
|
||||||
|
var/obj/item/candle/C = W
|
||||||
|
if(C.lit)
|
||||||
light()
|
light()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -123,19 +123,29 @@ ZIPPO
|
|||||||
|
|
||||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
|
||||||
light("\red [user] casually lights the [name] with [W], what a badass.")
|
light("\red [user] casually lights the [name] with [W], what a badass.")
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/lighter/zippo) && (W:lit > 0))
|
else if(istype(W, /obj/item/weapon/lighter/zippo))
|
||||||
|
var/obj/item/weapon/lighter/zippo/Z = W
|
||||||
|
if(Z.lit > 0)
|
||||||
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
|
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/lighter) && (W:lit > 0))
|
else if(istype(W, /obj/item/weapon/lighter))
|
||||||
|
var/obj/item/weapon/lighter/L = W
|
||||||
|
if(L.lit > 0)
|
||||||
light("\red After some fiddling, [user] manages to light their [name] with [W].")
|
light("\red After some fiddling, [user] manages to light their [name] with [W].")
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/melee/energy/sword) && (W:active))
|
else if(istype(W, /obj/item/weapon/melee/energy/sword))
|
||||||
|
var/obj/item/weapon/melee/energy/sword/S = W
|
||||||
|
if(S.active)
|
||||||
light("\red [user] swings their [W], barely missing their nose. They light their [name] in the process.")
|
light("\red [user] swings their [W], barely missing their nose. They light their [name] in the process.")
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
|
else if(istype(W, /obj/item/weapon/match))
|
||||||
|
var/obj/item/weapon/match/M = W
|
||||||
|
if(M.lit > 0)
|
||||||
light("\red [user] lights their [name] with their [W].")
|
light("\red [user] lights their [name] with their [W].")
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -250,18 +260,25 @@ ZIPPO
|
|||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.isOn())
|
||||||
light("\red [user] casually lights the [name] with [W], what a badass.")
|
light("\red [user] casually lights the [name] with [W], what a badass.")
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/lighter/zippo) && (W:lit > 0))
|
else if(istype(W, /obj/item/weapon/lighter/zippo))
|
||||||
|
var/obj/item/weapon/lighter/zippo/Z = W
|
||||||
|
if(Z.lit > 0)
|
||||||
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
|
light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.")
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/lighter) && (W:lit > 0))
|
else if(istype(W, /obj/item/weapon/lighter))
|
||||||
|
var/obj/item/weapon/lighter/L = W
|
||||||
|
if(L.lit > 0)
|
||||||
light("\red After some fiddling, [user] manages to light their [name] with [W].")
|
light("\red After some fiddling, [user] manages to light their [name] with [W].")
|
||||||
|
|
||||||
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
|
else if(istype(W, /obj/item/weapon/match))
|
||||||
light("\red [user] lights \his [name] with \his [W].")
|
var/obj/item/weapon/match/M = W
|
||||||
return
|
if(M.lit > 0)
|
||||||
|
light("\red [user] lights their [name] with their [W].")
|
||||||
|
|
||||||
light(var/flavor_text = "[usr] lights the [name].")
|
light(var/flavor_text = "[usr] lights the [name].")
|
||||||
if(!src.lit)
|
if(!src.lit)
|
||||||
|
|||||||
@@ -71,41 +71,42 @@ WELDINGTOOOL
|
|||||||
icon_state = "welder"
|
icon_state = "welder"
|
||||||
flags = FPRINT | TABLEPASS| CONDUCT
|
flags = FPRINT | TABLEPASS| CONDUCT
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
|
|
||||||
|
//Amount of OUCH when it's thrown
|
||||||
force = 3.0
|
force = 3.0
|
||||||
throwforce = 5.0
|
throwforce = 5.0
|
||||||
throw_speed = 1
|
throw_speed = 1
|
||||||
throw_range = 5
|
throw_range = 5
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
|
|
||||||
|
//Cost to make in the autolathe
|
||||||
m_amt = 70
|
m_amt = 70
|
||||||
g_amt = 30
|
g_amt = 30
|
||||||
|
|
||||||
|
//R&D tech level
|
||||||
origin_tech = "engineering=1"
|
origin_tech = "engineering=1"
|
||||||
var/welding = 0
|
|
||||||
var/status = 1
|
|
||||||
var/max_fuel = 20
|
|
||||||
proc
|
|
||||||
get_fuel()
|
|
||||||
remove_fuel(var/amount = 1, var/mob/M = null)
|
|
||||||
check_status()
|
|
||||||
toggle(var/message = 0)
|
|
||||||
eyecheck(mob/user as mob)
|
|
||||||
|
|
||||||
|
//Welding tool specific stuff
|
||||||
|
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
|
||||||
|
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||||
|
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||||
|
|
||||||
New()
|
/obj/item/weapon/weldingtool/New()
|
||||||
var/random_fuel = min(rand(10,20),max_fuel)
|
// var/random_fuel = min(rand(10,20),max_fuel)
|
||||||
var/datum/reagents/R = new/datum/reagents(max_fuel)
|
var/datum/reagents/R = new/datum/reagents(max_fuel)
|
||||||
reagents = R
|
reagents = R
|
||||||
R.my_atom = src
|
R.my_atom = src
|
||||||
R.add_reagent("fuel", random_fuel)
|
R.add_reagent("fuel", max_fuel)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
examine()
|
/obj/item/weapon/weldingtool/examine()
|
||||||
set src in usr
|
set src in usr
|
||||||
usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
attackby(obj/item/W as obj, mob/user as mob)
|
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
if(istype(W,/obj/item/weapon/screwdriver))
|
if(istype(W,/obj/item/weapon/screwdriver))
|
||||||
if(welding)
|
if(welding)
|
||||||
user << "\red Stop welding first!"
|
user << "\red Stop welding first!"
|
||||||
@@ -143,19 +144,35 @@ WELDINGTOOOL
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
process()
|
/obj/item/weapon/weldingtool/process()
|
||||||
switch(welding)
|
switch(welding)
|
||||||
|
//If off
|
||||||
if(0)
|
if(0)
|
||||||
|
if(src.icon_state != "welder") //Check that the sprite is correct, if it isnt, it means toggle() was not called
|
||||||
|
src.force = 3
|
||||||
|
src.damtype = "brute"
|
||||||
|
src.icon_state = "welder"
|
||||||
|
src.welding = 0
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
return
|
return
|
||||||
|
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||||
if(1)
|
if(1)
|
||||||
if(prob(5))//Welders left on now use up fuel, but lets not have them run out quite that fast
|
if(src.icon_state != "welder1") //Check that the sprite is correct, if it isnt, it means toggle() was not called
|
||||||
|
src.force = 15
|
||||||
|
src.damtype = "fire"
|
||||||
|
src.icon_state = "welder1"
|
||||||
|
if(prob(5))
|
||||||
remove_fuel(1)
|
remove_fuel(1)
|
||||||
|
|
||||||
|
//If you're actually actively welding, use fuel faster.
|
||||||
|
//Is this actually used or set anywhere? - Nodrak
|
||||||
if(2)
|
if(2)
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
remove_fuel(1)
|
remove_fuel(1)
|
||||||
//if you're actually actively welding, use fuel faster.
|
|
||||||
|
|
||||||
|
|
||||||
|
//I'm not sure what this does. I assume it has to do with starting fires...
|
||||||
|
//...but it doesnt check to see if the welder is on or not.
|
||||||
var/turf/location = src.loc
|
var/turf/location = src.loc
|
||||||
if(istype(location, /mob/))
|
if(istype(location, /mob/))
|
||||||
var/mob/M = location
|
var/mob/M = location
|
||||||
@@ -165,7 +182,7 @@ WELDINGTOOOL
|
|||||||
location.hotspot_expose(700, 5)
|
location.hotspot_expose(700, 5)
|
||||||
|
|
||||||
|
|
||||||
afterattack(obj/O as obj, mob/user as mob)
|
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob)
|
||||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
|
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
|
||||||
O.reagents.trans_to(src, max_fuel)
|
O.reagents.trans_to(src, max_fuel)
|
||||||
user << "\blue Welder refueled"
|
user << "\blue Welder refueled"
|
||||||
@@ -187,45 +204,67 @@ WELDINGTOOOL
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/user as mob)
|
/obj/item/weapon/weldingtool/attack_self(mob/user as mob)
|
||||||
toggle()
|
toggle()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//Returns the amount of fuel in the welder
|
||||||
///GET prop for fuel
|
/obj/item/weapon/weldingtool/proc/get_fuel()
|
||||||
get_fuel()
|
|
||||||
return reagents.get_reagent_amount("fuel")
|
return reagents.get_reagent_amount("fuel")
|
||||||
|
|
||||||
|
|
||||||
///SET prop for fuel
|
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
|
||||||
///Will also turn it off if it is out of fuel
|
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
|
||||||
///The mob argument is not needed but if included will call eyecheck() on it if the welder is on.
|
if(!welding || !check_fuel())
|
||||||
remove_fuel(var/amount = 1, var/mob/M = null)
|
|
||||||
if(!welding || !check_status())
|
|
||||||
return 0
|
return 0
|
||||||
if(get_fuel() >= amount)
|
if(get_fuel() >= amount)
|
||||||
reagents.remove_reagent("fuel", amount)
|
reagents.remove_reagent("fuel", amount)
|
||||||
check_status()
|
check_fuel()
|
||||||
if(M)
|
if(M)
|
||||||
eyecheck(M)//TODO:eyecheck should really be in mob not here
|
eyecheck(M)
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
if(M)
|
if(M)
|
||||||
M << "\blue You need more welding fuel to complete this task."
|
M << "\blue You need more welding fuel to complete this task."
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
//Returns whether or not the welding tool is currently on.
|
||||||
|
/obj/item/weapon/weldingtool/proc/isOn()
|
||||||
|
return src.welding
|
||||||
|
|
||||||
///Quick check to see if we even have any fuel and should shut off
|
//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1)
|
||||||
///This could use a better name
|
//so that the welding tool updates accordingly
|
||||||
check_status()
|
/obj/item/weapon/weldingtool/proc/setWelding(var/temp_welding)
|
||||||
|
//If we're turning it on
|
||||||
|
if(temp_welding > 0)
|
||||||
|
if (remove_fuel(1))
|
||||||
|
usr << "\blue The [src] switches on."
|
||||||
|
src.force = 15
|
||||||
|
src.damtype = "fire"
|
||||||
|
src.icon_state = "welder1"
|
||||||
|
processing_objects.Add(src)
|
||||||
|
else
|
||||||
|
usr << "\blue Need more fuel!"
|
||||||
|
src.welding = 0
|
||||||
|
return
|
||||||
|
//Otherwise
|
||||||
|
else
|
||||||
|
usr << "\blue The [src] switches off."
|
||||||
|
src.force = 3
|
||||||
|
src.damtype = "brute"
|
||||||
|
src.icon_state = "welder"
|
||||||
|
src.welding = 0
|
||||||
|
|
||||||
|
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
|
||||||
|
/obj/item/weapon/weldingtool/proc/check_fuel()
|
||||||
if((get_fuel() <= 0) && welding)
|
if((get_fuel() <= 0) && welding)
|
||||||
toggle(1)
|
toggle(1)
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
//toggles the welder off and on
|
//Toggles the welder off and on
|
||||||
toggle(var/message = 0)
|
/obj/item/weapon/weldingtool/proc/toggle(var/message = 0)
|
||||||
if(!status) return
|
if(!status) return
|
||||||
src.welding = !( src.welding )
|
src.welding = !( src.welding )
|
||||||
if (src.welding)
|
if (src.welding)
|
||||||
@@ -249,9 +288,9 @@ WELDINGTOOOL
|
|||||||
src.icon_state = "welder"
|
src.icon_state = "welder"
|
||||||
src.welding = 0
|
src.welding = 0
|
||||||
|
|
||||||
|
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
|
||||||
eyecheck(mob/user as mob)
|
//Note: This should probably be moved to mob
|
||||||
//check eye protection
|
/obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob)
|
||||||
if(!iscarbon(user)) return 1
|
if(!iscarbon(user)) return 1
|
||||||
var/safety = user:eyecheck()
|
var/safety = user:eyecheck()
|
||||||
switch(safety)
|
switch(safety)
|
||||||
@@ -322,7 +361,7 @@ WELDINGTOOOL
|
|||||||
m_amt = 80
|
m_amt = 80
|
||||||
origin_tech = "materials=1;engineering=1"
|
origin_tech = "materials=1;engineering=1"
|
||||||
|
|
||||||
New()
|
/obj/item/weapon/wirecutters/New()
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
icon_state = "cutters-y"
|
icon_state = "cutters-y"
|
||||||
item_state = "cutters_yellow"
|
item_state = "cutters_yellow"
|
||||||
@@ -215,7 +215,8 @@
|
|||||||
|
|
||||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(istype(W,/obj/item/weapon/weldingtool))
|
if(istype(W,/obj/item/weapon/weldingtool))
|
||||||
if(W:welding)
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.remove_fuel(0, user))
|
||||||
TemperatureAct(100)
|
TemperatureAct(100)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,8 @@
|
|||||||
|
|
||||||
attackby(obj/item/W as obj, mob/user as mob)
|
attackby(obj/item/W as obj, mob/user as mob)
|
||||||
if (istype(W, /obj/item/weapon/weldingtool))
|
if (istype(W, /obj/item/weapon/weldingtool))
|
||||||
if(W:welding == 1)
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.remove_fuel(0, user))
|
||||||
overlays = null
|
overlays = null
|
||||||
usr << "You slice off [src]'s uneven chunks of aluminum and scorch marks."
|
usr << "You slice off [src]'s uneven chunks of aluminum and scorch marks."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -237,8 +237,9 @@ SHARDS
|
|||||||
|
|
||||||
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if ( istype(W, /obj/item/weapon/weldingtool) && W:welding )
|
if ( istype(W, /obj/item/weapon/weldingtool))
|
||||||
W:eyecheck(user)
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.remove_fuel(0, user))
|
||||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||||
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
for (var/obj/item/stack/sheet/glass/G in user.loc)
|
||||||
if(G==NG)
|
if(G==NG)
|
||||||
|
|||||||
@@ -12,11 +12,14 @@ FLOOR TILES
|
|||||||
|
|
||||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
..()
|
..()
|
||||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if (istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
|
||||||
if(amount < 2)
|
if(amount < 2)
|
||||||
user << "\red You need at least two rods to do this."
|
user << "\red You need at least two rods to do this."
|
||||||
return
|
return
|
||||||
if(W:remove_fuel(0,user))
|
|
||||||
|
if(WT.remove_fuel(0,user))
|
||||||
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
||||||
new_item.add_to_stacks(usr)
|
new_item.add_to_stacks(usr)
|
||||||
for (var/mob/M in viewers(src))
|
for (var/mob/M in viewers(src))
|
||||||
|
|||||||
@@ -253,9 +253,10 @@ obj/structure/meteorhit(obj/O as obj)
|
|||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
|
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
|
||||||
return
|
return
|
||||||
if (istype(C, /obj/item/weapon/weldingtool) && C:welding)
|
if (istype(C, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = C
|
||||||
|
if(WT.remove_fuel(0, user))
|
||||||
user << "\blue Slicing lattice joints ..."
|
user << "\blue Slicing lattice joints ..."
|
||||||
C:eyecheck(user)
|
|
||||||
new /obj/item/stack/rods(src.loc)
|
new /obj/item/stack/rods(src.loc)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|||||||
@@ -238,24 +238,22 @@ TABLE AND RACK OBJECT INTERATIONS
|
|||||||
return
|
return
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/weldingtool))
|
if (istype(W, /obj/item/weapon/weldingtool))
|
||||||
if(W:welding == 1)
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if(WT.remove_fuel(0, user))
|
||||||
if(src.status == 2)
|
if(src.status == 2)
|
||||||
W:welding = 2
|
|
||||||
W:eyecheck(user)
|
|
||||||
user << "\blue Now weakening the reinforced table"
|
user << "\blue Now weakening the reinforced table"
|
||||||
playsound(src.loc, 'Welder.ogg', 50, 1)
|
playsound(src.loc, 'Welder.ogg', 50, 1)
|
||||||
if (do_after(user, 50))
|
if (do_after(user, 50))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
user << "\blue Table weakened"
|
user << "\blue Table weakened"
|
||||||
src.status = 1
|
src.status = 1
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
W:welding = 2
|
|
||||||
user << "\blue Now strengthening the reinforced table"
|
user << "\blue Now strengthening the reinforced table"
|
||||||
playsound(src.loc, 'Welder.ogg', 50, 1)
|
playsound(src.loc, 'Welder.ogg', 50, 1)
|
||||||
if (do_after(user, 50))
|
if (do_after(user, 50))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
user << "\blue Table strengthened"
|
user << "\blue Table strengthened"
|
||||||
src.status = 2
|
src.status = 2
|
||||||
W:welding = 1
|
|
||||||
return
|
return
|
||||||
if(isrobot(user))
|
if(isrobot(user))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -81,9 +81,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
|||||||
src.menu_message += "<HR>"
|
src.menu_message += "<HR>"
|
||||||
return
|
return
|
||||||
|
|
||||||
Topic(href, href_list)
|
//If 'random' was selected
|
||||||
if (href_list["buy_item"])
|
proc/chooseRandomItem()
|
||||||
if(href_list["buy_item"] == "random")
|
|
||||||
var/list/randomItems = list()
|
var/list/randomItems = list()
|
||||||
|
|
||||||
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
|
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
|
||||||
@@ -149,9 +148,9 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
|||||||
del(randomItems)
|
del(randomItems)
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
href_list["buy_item"] = pick(randomItems)
|
var/buyItem = pick(randomItems)
|
||||||
|
|
||||||
switch(href_list["buy_item"]) //Ok, this gets a little messy, sorry.
|
switch(buyItem) //Ok, this gets a little messy, sorry.
|
||||||
if("/obj/item/weapon/circuitboard/teleporter")
|
if("/obj/item/weapon/circuitboard/teleporter")
|
||||||
uses -= 20
|
uses -= 20
|
||||||
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
|
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
|
||||||
@@ -172,12 +171,81 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
|||||||
uses -= 2
|
uses -= 2
|
||||||
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
|
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
|
||||||
uses -= 1
|
uses -= 1
|
||||||
|
|
||||||
del(randomItems)
|
del(randomItems)
|
||||||
|
return buyItem
|
||||||
|
|
||||||
|
proc/handleStatTracking(var/boughtItem)
|
||||||
|
//For stat tracking, sorry for making it so ugly
|
||||||
|
if(!boughtItem) return
|
||||||
|
|
||||||
|
switch(boughtItem)
|
||||||
|
if("/obj/item/weapon/circuitboard/teleporter")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","TP")
|
||||||
|
if("/obj/item/toy/syndicateballoon")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","BS")
|
||||||
|
if("/obj/item/weapon/storage/syndie_kit/imp_uplink")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","UI")
|
||||||
|
if("/obj/item/weapon/storage/box/syndicate")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","BU")
|
||||||
|
if("/obj/item/weapon/aiModule/syndicate")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","AI")
|
||||||
|
if("/obj/item/device/radio/beacon/syndicate")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","SB")
|
||||||
|
if("/obj/item/weapon/gun/projectile")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","RE")
|
||||||
|
if("/obj/item/weapon/gun/energy/crossbow")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","XB")
|
||||||
|
if("/obj/item/device/powersink")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","PS")
|
||||||
|
if("/obj/item/weapon/melee/energy/sword")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","ES")
|
||||||
|
if("/obj/item/clothing/mask/gas/voice")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","VC")
|
||||||
|
if("/obj/item/device/chameleon")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","CP")
|
||||||
|
if("/obj/item/weapon/storage/emp_kit")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","EM")
|
||||||
|
if("/obj/item/weapon/pen/paralysis")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","PP")
|
||||||
|
if("/obj/item/weapon/cartridge/syndicate")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","DC")
|
||||||
|
if("/obj/item/clothing/under/chameleon")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","CJ")
|
||||||
|
if("/obj/item/weapon/card/id/syndicate")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","AC")
|
||||||
|
if("/obj/item/weapon/card/emag")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","EC")
|
||||||
|
if("/obj/item/weapon/storage/syndie_kit/space")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","SS")
|
||||||
|
if("/obj/item/device/encryptionkey/binary")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","BT")
|
||||||
|
if("/obj/item/weapon/storage/syndie_kit/imp_freedom")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","FI")
|
||||||
|
if("/obj/item/clothing/glasses/thermal")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","TM")
|
||||||
|
if("/obj/item/ammo_magazine/a357")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","RA")
|
||||||
|
if("/obj/item/clothing/shoes/syndigaloshes")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","SH")
|
||||||
|
if("/obj/item/weapon/plastique")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","C4")
|
||||||
|
if("/obj/item/weapon/soap/syndie")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","SP")
|
||||||
|
if("/obj/item/weapon/storage/toolbox/syndicate")
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","ST")
|
||||||
|
|
||||||
|
Topic(href, href_list)
|
||||||
|
if (href_list["buy_item"])
|
||||||
|
if(href_list["buy_item"] == "random")
|
||||||
|
var/boughtItem = chooseRandomItem()
|
||||||
|
if(boughtItem)
|
||||||
|
href_list["buy_item"] = boughtItem
|
||||||
|
feedback_add_details("traitor_uplink_items_bought","RN")
|
||||||
return 1
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
|
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -186,7 +254,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
|||||||
//info.spawnlist += href_list["buy_item"]
|
//info.spawnlist += href_list["buy_item"]
|
||||||
|
|
||||||
uses -= text2num(href_list["cost"])
|
uses -= text2num(href_list["cost"])
|
||||||
|
handleStatTracking(href_list["buy_item"]) //Note: chooseRandomItem handles it's own stat tracking. This proc is not meant for 'random'.
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,22 +58,22 @@ obj/structure/windoor_assembly/Del()
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/structure/windoor_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
|
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||||
switch(state)
|
switch(state)
|
||||||
if("01")
|
if("01")
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding && !anchored )
|
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||||
if (W:remove_fuel(0,user))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
W:welding = 2
|
if (WT.remove_fuel(0,user))
|
||||||
user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.")
|
user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.")
|
||||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||||
|
|
||||||
if(do_after(user, 40))
|
if(do_after(user, 40))
|
||||||
if(!src) return
|
if(!src || !WT.isOn()) return
|
||||||
user << "\blue You dissasembled the windoor assembly!"
|
user << "\blue You dissasembled the windoor assembly!"
|
||||||
new /obj/item/stack/sheet/rglass(get_turf(src), 5)
|
new /obj/item/stack/sheet/rglass(get_turf(src), 5)
|
||||||
if(secure)
|
if(secure)
|
||||||
new /obj/item/stack/rods(get_turf(src), 4)
|
new /obj/item/stack/rods(get_turf(src), 4)
|
||||||
del(src)
|
del(src)
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
user << "\blue You need more welding fuel to dissassemble the windoor assembly."
|
user << "\blue You need more welding fuel to dissassemble the windoor assembly."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -432,14 +432,11 @@
|
|||||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||||
var/obj/item/weapon/weldingtool/WT = W
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
if( WT.remove_fuel(0,user) )
|
if( WT.remove_fuel(0,user) )
|
||||||
WT.welding = 2
|
|
||||||
|
|
||||||
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
||||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||||
|
|
||||||
sleep(100)
|
sleep(100)
|
||||||
if( !istype(src, /turf/simulated/wall) || !user || !WT || !T ) return
|
if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||||
WT.welding = 1
|
|
||||||
|
|
||||||
if( user.loc == T && user.equipped() == WT )
|
if( user.loc == T && user.equipped() == WT )
|
||||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||||
@@ -592,14 +589,12 @@
|
|||||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||||
var/obj/item/weapon/weldingtool/WT = W
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
if( WT.remove_fuel(0,user) )
|
if( WT.remove_fuel(0,user) )
|
||||||
WT.welding = 2
|
|
||||||
|
|
||||||
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
|
user << "<span class='notice'>You begin slicing through the metal cover.</span>"
|
||||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||||
|
|
||||||
sleep(60)
|
sleep(60)
|
||||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !T ) return
|
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||||
WT.welding = 1
|
|
||||||
|
|
||||||
if( d_state == 2 && user.loc == T && user.equipped() == WT )
|
if( d_state == 2 && user.loc == T && user.equipped() == WT )
|
||||||
src.d_state = 3
|
src.d_state = 3
|
||||||
@@ -657,14 +652,12 @@
|
|||||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||||
var/obj/item/weapon/weldingtool/WT = W
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
if( WT.remove_fuel(0,user) )
|
if( WT.remove_fuel(0,user) )
|
||||||
WT.welding = 2
|
|
||||||
|
|
||||||
user << "<span class='notice'>You begin slicing through the support rods.</span>"
|
user << "<span class='notice'>You begin slicing through the support rods.</span>"
|
||||||
playsound(src.loc, 'Welder.ogg', 100, 1)
|
playsound(src.loc, 'Welder.ogg', 100, 1)
|
||||||
|
|
||||||
sleep(100)
|
sleep(100)
|
||||||
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !T ) return
|
if( !istype(src, /turf/simulated/wall/r_wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||||
WT.welding = 1
|
|
||||||
|
|
||||||
if( d_state == 5 && user.loc == T && user.equipped() == WT )
|
if( d_state == 5 && user.loc == T && user.equipped() == WT )
|
||||||
src.d_state = 6
|
src.d_state = 6
|
||||||
@@ -1292,7 +1285,7 @@ turf/simulated/floor/return_siding_icon_state()
|
|||||||
|
|
||||||
if(istype(C, /obj/item/weapon/weldingtool))
|
if(istype(C, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/welder = C
|
var/obj/item/weapon/weldingtool/welder = C
|
||||||
if(welder.welding && (is_plating()))
|
if(welder.isOn() && (is_plating()))
|
||||||
if(broken || burnt)
|
if(broken || burnt)
|
||||||
if(welder.remove_fuel(0,user))
|
if(welder.remove_fuel(0,user))
|
||||||
user << "\red You fix some dents on the broken plating."
|
user << "\red You fix some dents on the broken plating."
|
||||||
|
|||||||
@@ -357,7 +357,7 @@
|
|||||||
return null
|
return null
|
||||||
|
|
||||||
update_canmove()
|
update_canmove()
|
||||||
if(sleeping || paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
|
if(stat || sleeping || paralysis || stunned || weakened || resting || buckled || (changeling && changeling.changeling_fakedeath))
|
||||||
canmove = 0
|
canmove = 0
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -369,8 +369,9 @@
|
|||||||
if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
if (istype(W, /obj/item/weapon/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||||
return
|
return
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if (istype(W, /obj/item/weapon/weldingtool))
|
||||||
if (W:remove_fuel(0))
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if (WT.remove_fuel(0))
|
||||||
adjustBruteLoss(-30)
|
adjustBruteLoss(-30)
|
||||||
updatehealth()
|
updatehealth()
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|||||||
@@ -364,16 +364,15 @@
|
|||||||
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
|
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
|
||||||
user << "\red You cannot put the board inside, the frame is damaged."
|
user << "\red You cannot put the board inside, the frame is damaged."
|
||||||
return
|
return
|
||||||
else if (istype(W, /obj/item/weapon/weldingtool) && W:welding && opened && has_electronics==0 && !terminal)
|
else if (istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics==0 && !terminal)
|
||||||
if (W:get_fuel() < 3)
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
|
if (WT.get_fuel() < 3)
|
||||||
user << "\blue You need more welding fuel to complete this task."
|
user << "\blue You need more welding fuel to complete this task."
|
||||||
return
|
return
|
||||||
user << "You start welding APC frame..."
|
user << "You start welding APC frame..."
|
||||||
if(W:remove_fuel(0,user))
|
|
||||||
W:welding = 2
|
|
||||||
playsound(src.loc, 'Welder.ogg', 50, 1)
|
playsound(src.loc, 'Welder.ogg', 50, 1)
|
||||||
if(do_after(user, 50))
|
if(do_after(user, 50))
|
||||||
|
if(!src || !WT.remove_fuel(3, user)) return
|
||||||
if (emagged || malfhack || (stat & BROKEN) || opened==2)
|
if (emagged || malfhack || (stat & BROKEN) || opened==2)
|
||||||
new /obj/item/stack/sheet/metal(loc)
|
new /obj/item/stack/sheet/metal(loc)
|
||||||
user.visible_message(\
|
user.visible_message(\
|
||||||
@@ -386,7 +385,6 @@
|
|||||||
"\red [src] has been cut from the wall by [user.name] with the weldingtool.",\
|
"\red [src] has been cut from the wall by [user.name] with the weldingtool.",\
|
||||||
"You cut APC frame from the wall.",\
|
"You cut APC frame from the wall.",\
|
||||||
"\red You hear welding.")
|
"\red You hear welding.")
|
||||||
W:welding = 1
|
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
else if (istype(W, /obj/item/apc_frame) && opened && emagged)
|
else if (istype(W, /obj/item/apc_frame) && opened && emagged)
|
||||||
|
|||||||
@@ -146,7 +146,8 @@
|
|||||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
if(active)
|
if(active)
|
||||||
user << "Turn off the [src] first."
|
user << "Turn off the [src] first."
|
||||||
return
|
return
|
||||||
@@ -154,29 +155,27 @@
|
|||||||
if(0)
|
if(0)
|
||||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||||
if(1)
|
if(1)
|
||||||
if (W:remove_fuel(0,user))
|
if (WT.remove_fuel(0,user))
|
||||||
W:welding = 2
|
|
||||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||||
"You start to weld the [src] to the floor.", \
|
"You start to weld the [src] to the floor.", \
|
||||||
"You hear welding")
|
"You hear welding")
|
||||||
if (do_after(user,20))
|
if (do_after(user,20))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
state = 2
|
state = 2
|
||||||
user << "You weld the [src] to the floor."
|
user << "You weld the [src] to the floor."
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
user << "\red You need more welding fuel to complete this task."
|
user << "\red You need more welding fuel to complete this task."
|
||||||
if(2)
|
if(2)
|
||||||
if (W:remove_fuel(0,user))
|
if (WT.remove_fuel(0,user))
|
||||||
W:welding = 2
|
|
||||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||||
"You start to cut the [src] free from the floor.", \
|
"You start to cut the [src] free from the floor.", \
|
||||||
"You hear welding")
|
"You hear welding")
|
||||||
if (do_after(user,20))
|
if (do_after(user,20))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
state = 1
|
state = 1
|
||||||
user << "You cut the [src] free from the floor."
|
user << "You cut the [src] free from the floor."
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
user << "\red You need more welding fuel to complete this task."
|
user << "\red You need more welding fuel to complete this task."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -118,35 +118,34 @@ field_generator power level display
|
|||||||
if(2)
|
if(2)
|
||||||
user << "\red The [src.name] needs to be unwelded from the floor."
|
user << "\red The [src.name] needs to be unwelded from the floor."
|
||||||
return
|
return
|
||||||
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding)
|
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
var/obj/item/weapon/weldingtool/WT = W
|
||||||
switch(state)
|
switch(state)
|
||||||
if(0)
|
if(0)
|
||||||
user << "\red The [src.name] needs to be wrenched to the floor."
|
user << "\red The [src.name] needs to be wrenched to the floor."
|
||||||
return
|
return
|
||||||
if(1)
|
if(1)
|
||||||
if (W:remove_fuel(0,user))
|
if (WT.remove_fuel(0,user))
|
||||||
W:welding = 2
|
|
||||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||||
"You start to weld the [src] to the floor.", \
|
"You start to weld the [src] to the floor.", \
|
||||||
"You hear welding")
|
"You hear welding")
|
||||||
if (do_after(user,20))
|
if (do_after(user,20))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
state = 2
|
state = 2
|
||||||
user << "You weld the field generator to the floor."
|
user << "You weld the field generator to the floor."
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
if(2)
|
if(2)
|
||||||
if (W:remove_fuel(0,user))
|
if (WT.remove_fuel(0,user))
|
||||||
W:welding = 2
|
|
||||||
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
playsound(src.loc, 'Welder2.ogg', 50, 1)
|
||||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||||
"You start to cut the [src] free from the floor.", \
|
"You start to cut the [src] free from the floor.", \
|
||||||
"You hear welding")
|
"You hear welding")
|
||||||
if (do_after(user,20))
|
if (do_after(user,20))
|
||||||
|
if(!src || !WT.isOn()) return
|
||||||
state = 1
|
state = 1
|
||||||
user << "You cut the [src] free from the floor."
|
user << "You cut the [src] free from the floor."
|
||||||
W:welding = 2
|
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -195,8 +195,8 @@
|
|||||||
if(W.remove_fuel(0,user))
|
if(W.remove_fuel(0,user))
|
||||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||||
user << "Welding the [nicetype] in place."
|
user << "Welding the [nicetype] in place."
|
||||||
W:welding = 2
|
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
|
if(!src || !W.isOn()) return
|
||||||
user << "The [nicetype] has been welded in place!"
|
user << "The [nicetype] has been welded in place!"
|
||||||
update() // TODO: Make this neat
|
update() // TODO: Make this neat
|
||||||
if(ispipe) // Pipe
|
if(ispipe) // Pipe
|
||||||
@@ -225,7 +225,6 @@
|
|||||||
|
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
user << "You need more welding fuel to complete this task."
|
user << "You need more welding fuel to complete this task."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -67,8 +67,9 @@
|
|||||||
if(W.remove_fuel(0,user))
|
if(W.remove_fuel(0,user))
|
||||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||||
user << "You start slicing the floorweld off the disposal unit."
|
user << "You start slicing the floorweld off the disposal unit."
|
||||||
W:welding = 2
|
|
||||||
if(do_after(user,20))
|
if(do_after(user,20))
|
||||||
|
if(!src || !W.isOn()) return
|
||||||
user << "You sliced the floorweld off the disposal unit."
|
user << "You sliced the floorweld off the disposal unit."
|
||||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||||
C.ptype = 6 // 6 = disposal unit
|
C.ptype = 6 // 6 = disposal unit
|
||||||
@@ -76,7 +77,6 @@
|
|||||||
C.density = 1
|
C.density = 1
|
||||||
C.update()
|
C.update()
|
||||||
del(src)
|
del(src)
|
||||||
W:welding = 1
|
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
user << "You need more welding fuel to complete this task."
|
user << "You need more welding fuel to complete this task."
|
||||||
@@ -813,20 +813,18 @@
|
|||||||
if(istype(I, /obj/item/weapon/weldingtool))
|
if(istype(I, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/W = I
|
var/obj/item/weapon/weldingtool/W = I
|
||||||
|
|
||||||
if(W.welding)
|
|
||||||
if(W.remove_fuel(0,user))
|
if(W.remove_fuel(0,user))
|
||||||
W:welding = 2
|
|
||||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||||
// check if anything changed over 2 seconds
|
// check if anything changed over 2 seconds
|
||||||
var/turf/uloc = user.loc
|
var/turf/uloc = user.loc
|
||||||
var/atom/wloc = W.loc
|
var/atom/wloc = W.loc
|
||||||
user << "Slicing the disposal pipe."
|
user << "Slicing the disposal pipe."
|
||||||
sleep(30)
|
sleep(30)
|
||||||
|
if(!W.isOn()) return
|
||||||
if(user.loc == uloc && wloc == W.loc)
|
if(user.loc == uloc && wloc == W.loc)
|
||||||
welded()
|
welded()
|
||||||
else
|
else
|
||||||
user << "You must stay still while welding the pipe."
|
user << "You must stay still while welding the pipe."
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
user << "You need more welding fuel to cut the pipe."
|
user << "You need more welding fuel to cut the pipe."
|
||||||
return
|
return
|
||||||
@@ -1109,20 +1107,18 @@
|
|||||||
if(istype(I, /obj/item/weapon/weldingtool))
|
if(istype(I, /obj/item/weapon/weldingtool))
|
||||||
var/obj/item/weapon/weldingtool/W = I
|
var/obj/item/weapon/weldingtool/W = I
|
||||||
|
|
||||||
if(W.welding)
|
|
||||||
if(W.remove_fuel(0,user))
|
if(W.remove_fuel(0,user))
|
||||||
W:welding = 2
|
|
||||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||||
// check if anything changed over 2 seconds
|
// check if anything changed over 2 seconds
|
||||||
var/turf/uloc = user.loc
|
var/turf/uloc = user.loc
|
||||||
var/atom/wloc = W.loc
|
var/atom/wloc = W.loc
|
||||||
user << "Slicing the disposal pipe."
|
user << "Slicing the disposal pipe."
|
||||||
sleep(30)
|
sleep(30)
|
||||||
|
if(!W.isOn()) return
|
||||||
if(user.loc == uloc && wloc == W.loc)
|
if(user.loc == uloc && wloc == W.loc)
|
||||||
welded()
|
welded()
|
||||||
else
|
else
|
||||||
user << "You must stay still while welding the pipe."
|
user << "You must stay still while welding the pipe."
|
||||||
W:welding = 1
|
|
||||||
else
|
else
|
||||||
user << "You need more welding fuel to cut the pipe."
|
user << "You need more welding fuel to cut the pipe."
|
||||||
return
|
return
|
||||||
@@ -1241,8 +1237,8 @@
|
|||||||
if(W.remove_fuel(0,user))
|
if(W.remove_fuel(0,user))
|
||||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||||
user << "You start slicing the floorweld off the disposal outlet."
|
user << "You start slicing the floorweld off the disposal outlet."
|
||||||
W:welding = 2
|
|
||||||
if(do_after(user,20))
|
if(do_after(user,20))
|
||||||
|
if(!src || !W.isOn()) return
|
||||||
user << "You sliced the floorweld off the disposal outlet."
|
user << "You sliced the floorweld off the disposal outlet."
|
||||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||||
C.ptype = 7 // 7 = outlet
|
C.ptype = 7 // 7 = outlet
|
||||||
@@ -1250,7 +1246,6 @@
|
|||||||
C.anchored = 1
|
C.anchored = 1
|
||||||
C.density = 1
|
C.density = 1
|
||||||
del(src)
|
del(src)
|
||||||
W:welding = 1
|
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
user << "You need more welding fuel to complete this task."
|
user << "You need more welding fuel to complete this task."
|
||||||
|
|||||||
@@ -288,8 +288,8 @@
|
|||||||
if(W.remove_fuel(0,user))
|
if(W.remove_fuel(0,user))
|
||||||
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
playsound(src.loc, 'Welder2.ogg', 100, 1)
|
||||||
user << "You start slicing the floorweld off the delivery chute."
|
user << "You start slicing the floorweld off the delivery chute."
|
||||||
W:welding = 2
|
|
||||||
if(do_after(user,20))
|
if(do_after(user,20))
|
||||||
|
if(!src || !W.isOn()) return
|
||||||
user << "You sliced the floorweld off the delivery chute."
|
user << "You sliced the floorweld off the delivery chute."
|
||||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||||
C.ptype = 8 // 8 = Delivery chute
|
C.ptype = 8 // 8 = Delivery chute
|
||||||
@@ -297,7 +297,6 @@
|
|||||||
C.anchored = 1
|
C.anchored = 1
|
||||||
C.density = 1
|
C.density = 1
|
||||||
del(src)
|
del(src)
|
||||||
W:welding = 1
|
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
user << "You need more welding fuel to complete this task."
|
user << "You need more welding fuel to complete this task."
|
||||||
|
|||||||
@@ -1,28 +1,2 @@
|
|||||||
quarxink - Game Master
|
nodrak - Game Master
|
||||||
tle - Game Master
|
carnwennan - Game Master
|
||||||
xsi - Game Master
|
|
||||||
sillazi - Game Master
|
|
||||||
herpa - Game Master
|
|
||||||
scaredofshadows - Game Master
|
|
||||||
chicagoted - Game Master
|
|
||||||
neofite - Game Master
|
|
||||||
uristmcdorf - Game Master
|
|
||||||
cinless - Game Master
|
|
||||||
trubblebass - Game Master
|
|
||||||
mport2004 - Game Admin
|
|
||||||
lj82 - Game Admin
|
|
||||||
fatmanfive - Game Admin
|
|
||||||
thickwillynilly - Game Admin
|
|
||||||
euronumbers - Game Admin
|
|
||||||
deuryn - Game Admin
|
|
||||||
rosenritter - Game Admin
|
|
||||||
lastwish - Game Admin
|
|
||||||
tashdurandel - Game Admin
|
|
||||||
mario90900 - Game Admin
|
|
||||||
atomictroop - Game Admin
|
|
||||||
fateweaver - Game Admin
|
|
||||||
agouri - Game Master
|
|
||||||
errorage - Game Master
|
|
||||||
uhangi - Game Master
|
|
||||||
superxpdude - Game Master
|
|
||||||
petethegoat - Game Master
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Nodrak/(Nodrak) unjobbanned Guest-784924112/(Brody Guess) from Cyborg
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
traitor
|
extended
|
||||||
|
|||||||
Reference in New Issue
Block a user