mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-28 11:02:08 +00:00
- 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
264 lines
7.0 KiB
Plaintext
264 lines
7.0 KiB
Plaintext
obj/structure
|
|
icon = 'structures.dmi'
|
|
|
|
obj/structure/blob_act()
|
|
if(prob(50))
|
|
del(src)
|
|
|
|
obj/structure/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
return
|
|
if(2.0)
|
|
if(prob(50))
|
|
del(src)
|
|
return
|
|
if(3.0)
|
|
return
|
|
|
|
obj/structure/meteorhit(obj/O as obj)
|
|
del(src)
|
|
|
|
|
|
|
|
/obj/structure/girder
|
|
icon_state = "girder"
|
|
anchored = 1
|
|
density = 1
|
|
layer = 2
|
|
var/state = 0
|
|
|
|
attackby(obj/item/W as obj, mob/user as mob)
|
|
if(istype(W, /obj/item/weapon/wrench) && state == 0 && anchored && !istype(src,/obj/structure/girder/displaced))
|
|
playsound(src.loc, 'Ratchet.ogg', 100, 1)
|
|
user << "\blue Now disassembling the girder"
|
|
if(do_after(user,40))
|
|
user << "\blue You dissasembled the girder!"
|
|
new /obj/item/stack/sheet/metal(get_turf(src))
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
|
user << "\blue Now slicing apart the girder"
|
|
if(do_after(user,30))
|
|
user << "\blue You slice apart the girder!"
|
|
new /obj/item/stack/sheet/metal(get_turf(src))
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
|
user << "\blue You drill through the girder!"
|
|
new /obj/item/stack/sheet/metal(get_turf(src))
|
|
del(src)
|
|
|
|
else if((istype(W, /obj/item/stack/sheet/metal)) && (W:amount >= 2) && istype(src,/obj/structure/girder/displaced))
|
|
W:use(2)
|
|
user << "\blue You create a false wall! Push on it to open or close the passage."
|
|
new /obj/structure/falsewall (src.loc)
|
|
add_hiddenprint(usr)
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/stack/sheet/plasteel) && istype(src,/obj/structure/girder/displaced))
|
|
W:use(2)
|
|
user << "\blue You create a false r wall! Push on it to open or close the passage."
|
|
new /obj/structure/falserwall (src.loc)
|
|
add_hiddenprint(usr)
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
|
|
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
|
user << "\blue Now unsecuring support struts"
|
|
if(do_after(user,40))
|
|
user << "\blue You unsecured the support struts!"
|
|
state = 1
|
|
|
|
else if(istype(W, /obj/item/weapon/wirecutters) && istype(src,/obj/structure/girder/reinforced) && state == 1)
|
|
playsound(src.loc, 'Wirecutter.ogg', 100, 1)
|
|
user << "\blue Now removing support struts"
|
|
if(do_after(user,40))
|
|
user << "\blue You removed the support struts!"
|
|
new/obj/structure/girder( src.loc )
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored )
|
|
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
|
user << "\blue Now dislodging the girder"
|
|
if(do_after(user, 40))
|
|
user << "\blue You dislodged the girder!"
|
|
new/obj/structure/girder/displaced( src.loc )
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/weapon/wrench) && state == 0 && !anchored )
|
|
playsound(src.loc, 'Ratchet.ogg', 100, 1)
|
|
user << "\blue Now securing the girder"
|
|
if(get_turf(user, 40))
|
|
user << "\blue You secured the girder!"
|
|
new/obj/structure/girder( src.loc )
|
|
del(src)
|
|
|
|
else if((istype(W, /obj/item/stack/sheet/metal)) && (W:amount >= 2))
|
|
user << "\blue Now adding plating..."
|
|
if (do_after(user,40))
|
|
user << "\blue You added the plating!"
|
|
var/turf/Tsrc = get_turf(src)
|
|
Tsrc.ReplaceWithWall()
|
|
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
|
P.layer = 1
|
|
for(var/turf/simulated/wall/X in Tsrc.loc)
|
|
if(X) X.add_hiddenprint(usr)
|
|
if (W) W:use(2)
|
|
del(src)
|
|
return
|
|
|
|
else if (istype(W, /obj/item/stack/sheet/plasteel))
|
|
if (src.icon_state == "reinforced") //Time to finalize!
|
|
user << "\blue Now finalising reinforced wall."
|
|
if(do_after(user, 50))
|
|
user << "\blue Wall fully reinforced!"
|
|
var/turf/Tsrc = get_turf(src)
|
|
Tsrc.ReplaceWithRWall()
|
|
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
|
|
P.layer = 1
|
|
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
|
if(X) X.add_hiddenprint(usr)
|
|
if (W)
|
|
W:use(1)
|
|
del(src)
|
|
return
|
|
else
|
|
user << "\blue Now reinforcing girders"
|
|
if (do_after(user,60))
|
|
user << "\blue Girders reinforced!"
|
|
W:use(1)
|
|
new/obj/structure/girder/reinforced( src.loc )
|
|
del(src)
|
|
return
|
|
else if(istype(W, /obj/item/pipe))
|
|
var/obj/item/pipe/P = W
|
|
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
|
|
user.drop_item()
|
|
P.loc = src.loc
|
|
user << "\blue You fit the pipe into the [src]!"
|
|
else
|
|
..()
|
|
|
|
|
|
blob_act()
|
|
if(prob(40))
|
|
del(src)
|
|
|
|
|
|
ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
return
|
|
if(2.0)
|
|
if (prob(30))
|
|
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
|
new remains(loc)
|
|
del(src)
|
|
return
|
|
if(3.0)
|
|
if (prob(5))
|
|
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
|
new remains(loc)
|
|
del(src)
|
|
return
|
|
else
|
|
return
|
|
|
|
|
|
/obj/structure/girder/displaced
|
|
icon_state = "displaced"
|
|
anchored = 0
|
|
|
|
/obj/structure/girder/reinforced
|
|
icon_state = "reinforced"
|
|
state = 2
|
|
|
|
/obj/structure/cultgirder
|
|
icon= 'cult.dmi'
|
|
icon_state= "cultgirder"
|
|
anchored = 1
|
|
density = 1
|
|
layer = 2
|
|
|
|
attackby(obj/item/W as obj, mob/user as mob)
|
|
if(istype(W, /obj/item/weapon/wrench))
|
|
playsound(src.loc, 'Ratchet.ogg', 100, 1)
|
|
user << "\blue Now disassembling the girder"
|
|
if(do_after(user,40))
|
|
user << "\blue You dissasembled the girder!"
|
|
new /obj/effect/decal/remains/human(get_turf(src))
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
|
|
user << "\blue Now slicing apart the girder"
|
|
if(do_after(user,30))
|
|
user << "\blue You slice apart the girder!"
|
|
new /obj/effect/decal/remains/human(get_turf(src))
|
|
del(src)
|
|
|
|
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
|
user << "\blue You drill through the girder!"
|
|
new /obj/effect/decal/remains/human(get_turf(src))
|
|
del(src)
|
|
|
|
blob_act()
|
|
if(prob(40))
|
|
del(src)
|
|
|
|
|
|
ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
return
|
|
if(2.0)
|
|
if (prob(30))
|
|
new /obj/effect/decal/remains/human(loc)
|
|
del(src)
|
|
return
|
|
if(3.0)
|
|
if (prob(5))
|
|
new /obj/effect/decal/remains/human(loc)
|
|
del(src)
|
|
return
|
|
else
|
|
return
|
|
|
|
// LATTICE
|
|
|
|
|
|
/obj/structure/lattice/blob_act()
|
|
del(src)
|
|
return
|
|
|
|
/obj/structure/lattice/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
return
|
|
if(2.0)
|
|
del(src)
|
|
return
|
|
if(3.0)
|
|
return
|
|
else
|
|
return
|
|
|
|
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
|
|
|
|
if (istype(C, /obj/item/stack/tile/plasteel))
|
|
var/turf/T = get_turf(src)
|
|
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
|
|
return
|
|
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 ..."
|
|
new /obj/item/stack/rods(src.loc)
|
|
del(src)
|
|
|
|
return
|