mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-06 07:32:15 +00:00
* change da world
* compile, thanks
* Update cere.dmm
* Update cere.dmm
* ready for test
* use the proper name please
its CERE not ceres.
* stops shuttle from forcibly docking with podbay
* things are now different
Landmark update for job spawns.
More hardsuits in EVA, engi, and atmos.
Disaster counters properly added.
Vault is now more spooky.
Gamma armoury moved to below gulag shuttle.
Sleeping rooms replaced with arcade and swimming pool.
Captains ERP nest deleted.
Tcomms now looks like it was designed by a functional human being.
Mining doesn't need a weird glass box.
Shuffled docking ports at arrivals.
Windows are now reinforced windows.
Mr changs has arrived.
* disposals functions now
* now with 50% more air
* gamma armoury doesn't attempt to become one with gulag shuttle
* disposals net is airless, vault is enclosed in some rock
* standard number of escape pods
* slight fixes
* more bugfixes
* lighting fixes
* divided hallways, added psych office, more cams
* fire alarms, shutters, and fixes
* temporary DME edit to set cere as default map
* fixed shuttle runtime
* this compiles and runs locally, please CI
* fixes hidden double pipe
* more double pipes
* more vents and scrubbers, morgue body delivery
* tweaks to secbot pathing
* various QoL changes
* Medbay expansion, med+arrival maints expansion.
* the definitive air alarm update, and more!
* Departmental emergency EVA suits, signage, tweaks.
* 2 Cryodorms added (oops). Asteroid sound updates.
* Borg cryo, shutters correctly rotated.
* Supply shuttle edit. I like joining the map queue.
* minor fixes, grav gen isolation.
* minor fixes
* Disposal fixes, lighting adjustment
* SabreML feedback changes
* More minor fixes
* More fixes
* NSS Farragus
* (most) floors turn into asteroid sand, not spess
* reverted random file edit, fixed mr teeny
* minor fixes
* big bombs can breach asteroid areas
* Asteroid plating exists, did you know? I do now!
* camera network pass
* walls become sand too on destruction
* lighting pass
* implements feedback, dramatically reduces ores
* yeets ores entirely, sci break room added
* roundstart pads, more solars, bigger departures
* runtimes
* mining resistant rock
* variable names are important
* AoE KA doesnt affect rocks
* actually fix AoE stuff
* now with 1000% more bats
* no sandy cables, a brig exit chute, more head ssu
* mech drills are not pickaxes
* proc rename, perma window, faster sapce bridges
* Brig rework
* robotics changes
* More sci edits
* Rotayshun changes
* dme edit
* Delete cerestation.dm
begone, thot
* temp edit so it loads cere as default
* merge conflicts begone
* decal purge
* map repipe
* removes under-wall pipe adapters
* shuffled maint areas
* dirt purge
* longest bridge rework
* fixes
* PPI feedback
* kitchen does, in fact, need air
* permabrig tweaks
* restores cc changes
* merge part 2
* tag purge
* secret clown HQ got me shook
* SQUASHENING
* solar shuffle
* directional consoles
* remove TM edits due to rotation
* merge conflict part 2
* pod pilot deletion
* cold rock, window tint fixes, etc.
* further red rocks
* further tweaks
* more standardising
* robotics redo
* carpet time
* CI update for cere
* Apply suggestions from code review
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
* more squash, corridor cam removal, etc.
* light switches
* minor fixes
* temp cere default
* FOODCART!
* fixes
* no airless no more
* space_hall
* compat pass 1
* make it work
* more changes
* slimmening
* air alarm tweak
* TM commit
* ci tests
* final CI changes?
* squash. squeeze, optimise
* wall vent
* disposals fix, more squeezing
* bugfixes
* false walls
* bedroom culling
* edits and fixes
* tweaks
* changes
* det window
* further tweaks
* Revert "TM commit"
This reverts commit 9e8814937f.
* More TM only changes reverted
* fixes smoothing with falsewalls
* denth changes
* the airlockenning
* cicicici
* CICICICI
* further tweaks
* further tweaks
* reverts weird sand behaviour code from ages ago
* oops
* universal adapter my beloathed
* nanomap moment
* webmap
* cere nanomap
* feedback updates
* updates
* airlock tweaks
* vents and tweaks
* solars moment
* triple APC fix
* south of where?
* airlock helpers
* disposal flap purge
* outpost monitor with actual real networks?
* tweakeroni
* fixes
* fixes
* tweaks
* fixes
* medbay improvements
* power and flaps
* changes
* aa changes
* fixes
* more fixeronies
* fixes!
* reversed
* chemicals
* chem tweaks
* fixes
* shuttle fixes
* holopad pass
* editseditsedits
* lightslightslights
* door
* /obj/machinery/computer/security/telescreen/entertainment
* sonic underground
* actual sonic reference
* Apply suggestions from code review
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
* Tsrc
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com>
507 lines
18 KiB
Plaintext
507 lines
18 KiB
Plaintext
/obj/structure/girder
|
|
name = "girder"
|
|
icon_state = "girder"
|
|
anchored = TRUE
|
|
density = TRUE
|
|
layer = BELOW_OBJ_LAYER
|
|
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
|
|
rad_insulation = RAD_VERY_LIGHT_INSULATION
|
|
var/state = GIRDER_NORMAL
|
|
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
|
|
max_integrity = 200
|
|
var/can_displace = TRUE //If the girder can be moved around by crowbarring it
|
|
var/metalUsed = 2 //used to determine amount returned in deconstruction
|
|
var/metal_type = /obj/item/stack/sheet/metal
|
|
|
|
/obj/structure/girder/examine(mob/user)
|
|
. = ..()
|
|
switch(state)
|
|
if(GIRDER_REINF)
|
|
. += "<span class='notice'>The support struts are <b>screwed</b> in place.</span>"
|
|
if(GIRDER_REINF_STRUTS)
|
|
. += "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>"
|
|
if(GIRDER_NORMAL)
|
|
if(can_displace)
|
|
. += "<span class='notice'>The bolts are <b>lodged</b> in place.</span>"
|
|
if(GIRDER_DISPLACED)
|
|
. += "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>"
|
|
if(GIRDER_DISASSEMBLED)
|
|
. += "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>"
|
|
|
|
/obj/structure/girder/detailed_examine()
|
|
return "Use metal sheets on this to build a normal wall. Adding plasteel instead will make a reinforced wall.<br>\
|
|
A false wall can be made by using a crowbar on this girder, and then adding metal or plasteel.<br>\
|
|
You can dismantle the girder with a wrench."
|
|
|
|
/obj/structure/girder/proc/refundMetal(metalAmount) //refunds metal used in construction when deconstructed
|
|
for(var/i=0;i < metalAmount;i++)
|
|
new metal_type(get_turf(src))
|
|
|
|
/obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature)
|
|
..()
|
|
var/temp_check = exposed_temperature
|
|
if(temp_check >= GIRDER_MELTING_TEMP)
|
|
take_damage(10)
|
|
|
|
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
|
|
add_fingerprint(user)
|
|
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
|
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
|
if(do_after(user, 40 * W.toolspeed, target = src))
|
|
if(!src)
|
|
return
|
|
playsound(loc, W.usesound, 100, 1)
|
|
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
|
refundMetal(metalUsed)
|
|
qdel(src)
|
|
|
|
else if(istype(W, /obj/item/pickaxe/drill/diamonddrill))
|
|
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
|
|
refundMetal(metalUsed)
|
|
qdel(src)
|
|
|
|
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
|
playsound(loc, W.usesound, 100, 1)
|
|
to_chat(user, "<span class='notice'>You disintegrate the girder!</span>")
|
|
refundMetal(metalUsed)
|
|
qdel(src)
|
|
|
|
else if(istype(W, /obj/item/twohanded/required/pyro_claws))
|
|
playsound(loc, W.usesound, 100, 1)
|
|
to_chat(user, "<span class='notice'>You melt the girder!</span>")
|
|
refundMetal(metalUsed)
|
|
qdel(src)
|
|
|
|
else if(istype(W, /obj/item/stack))
|
|
if(iswallturf(loc))
|
|
to_chat(user, "<span class='warning'>There is already a wall present!</span>")
|
|
return
|
|
if(!isfloorturf(loc))
|
|
to_chat(user, "<span class='warning'>A floor must be present to build a false wall!</span>")
|
|
return
|
|
if (locate(/obj/structure/falsewall) in loc.contents)
|
|
to_chat(user, "<span class='warning'>There is already a false wall present!</span>")
|
|
return
|
|
if(istype(W, /obj/item/stack/sheet/runed_metal))
|
|
to_chat(user, "<span class='warning'>You can't seem to make the metal bend.</span>")
|
|
return
|
|
|
|
if(istype(W,/obj/item/stack/rods))
|
|
var/obj/item/stack/rods/S = W
|
|
if(state == GIRDER_DISPLACED)
|
|
if(S.get_amount() < 5)
|
|
to_chat(user, "<span class='warning'>You need at least five rods to create a false wall!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
|
if(do_after(user, 20, target = src))
|
|
if(!loc || !S || S.get_amount() < 5)
|
|
return
|
|
S.use(5)
|
|
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
|
var/obj/structure/falsewall/iron/FW = new (loc)
|
|
transfer_fingerprints_to(FW)
|
|
qdel(src)
|
|
else
|
|
if(S.get_amount() < 5)
|
|
to_chat(user, "<span class='warning'>You need at least five rods to add plating!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
|
if (do_after(user, 40, target = src))
|
|
if(!loc || !S || S.get_amount() < 5)
|
|
return
|
|
S.use(5)
|
|
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
|
var/turf/T = get_turf(src)
|
|
T.ChangeTurf(/turf/simulated/wall/mineral/iron)
|
|
transfer_fingerprints_to(T)
|
|
qdel(src)
|
|
return
|
|
|
|
if(istype(W, /obj/item/stack/ore/glass/basalt))
|
|
var/obj/item/stack/ore/glass/basalt/A = W
|
|
if(state == GIRDER_DISPLACED)
|
|
if(A.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need at least two [A] to create a false wall!</span>")
|
|
return
|
|
if(do_after(user, 2 SECONDS, target = src))
|
|
if(!loc || !A || A.get_amount() < 2)
|
|
return
|
|
A.use(2)
|
|
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
|
var/obj/structure/falsewall/rock_ancient/FW = new (loc)
|
|
transfer_fingerprints_to(FW)
|
|
qdel(src)
|
|
else
|
|
if(A.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need at least two [A] to add plating!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start adding [A]...</span>")
|
|
if(do_after(user, 4 SECONDS, target = src))
|
|
if(!src || !A || A.get_amount() < 2)
|
|
return
|
|
A.use(2)
|
|
to_chat(user, "<span class='notice'>You add [A].</span>")
|
|
var/turf/parent_turf = get_turf(src)
|
|
parent_turf.ChangeTurf(/turf/simulated/mineral/ancient)
|
|
for(var/turf/simulated/mineral/X in parent_turf.loc)
|
|
X.add_hiddenprint(usr)
|
|
qdel(src)
|
|
return
|
|
|
|
if(!istype(W,/obj/item/stack/sheet))
|
|
return
|
|
|
|
var/obj/item/stack/sheet/S = W
|
|
if(!S.wall_allowed)
|
|
to_chat(user, "<span class='warning'>You don't think that is good material for a wall!</span>")
|
|
return
|
|
|
|
if(istype(S, /obj/item/stack/sheet/wood))
|
|
if(state == GIRDER_DISPLACED)
|
|
if(S.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need two planks of wood to create a false wall!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
|
if(do_after(user, 20, target = src))
|
|
if(!loc || !S || S.get_amount() < 2)
|
|
return
|
|
S.use(2)
|
|
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
|
var/obj/structure/falsewall/wood/falsewood = new(loc)
|
|
transfer_fingerprints_to(falsewood)
|
|
qdel(src)
|
|
else
|
|
if(S.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need two planks of wood to finish a wall!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
|
if(do_after(user, 40 * W.toolspeed, target = src))
|
|
if(!src || !S || S.get_amount() < 2)
|
|
return
|
|
S.use(2)
|
|
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
|
var/turf/Tsrc = get_turf(src)
|
|
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/wood)
|
|
for(var/turf/simulated/wall/mineral/wood/X in Tsrc.loc)
|
|
if(X)
|
|
X.add_hiddenprint(usr)
|
|
qdel(src)
|
|
return
|
|
|
|
else if(istype(S, /obj/item/stack/sheet/metal))
|
|
if(state == GIRDER_DISPLACED)
|
|
if(S.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need two sheets of metal to create a false wall!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
|
if(do_after(user, 20, target = src))
|
|
if(!loc || !S || S.get_amount() < 2)
|
|
return
|
|
S.use(2)
|
|
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
|
var/obj/structure/falsewall/F = new(loc)
|
|
transfer_fingerprints_to(F)
|
|
qdel(src)
|
|
else
|
|
if(S.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need two sheets of metal to finish a wall!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
|
if(do_after(user, 40 * W.toolspeed, target = src))
|
|
if(!src || !S || S.get_amount() < 2)
|
|
return
|
|
S.use(2)
|
|
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
|
var/turf/Tsrc = get_turf(src)
|
|
Tsrc.ChangeTurf(/turf/simulated/wall)
|
|
for(var/turf/simulated/wall/X in Tsrc.loc)
|
|
if(X)
|
|
X.add_hiddenprint(usr)
|
|
qdel(src)
|
|
return
|
|
|
|
if(istype(S, /obj/item/stack/sheet/plasteel))
|
|
if(state == GIRDER_DISPLACED)
|
|
if(S.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
|
if(do_after(user, 20, target = src))
|
|
if(!loc || !S || S.get_amount() < 2)
|
|
return
|
|
S.use(2)
|
|
to_chat(user, "<span class='notice'>You create a reinforced false wall. Push on it to open or close the passage.</span>")
|
|
var/obj/structure/falsewall/reinforced/FW = new (loc)
|
|
transfer_fingerprints_to(FW)
|
|
qdel(src)
|
|
else
|
|
if(state == GIRDER_REINF)
|
|
if(S.get_amount() < 1)
|
|
return
|
|
to_chat(user, "<span class='notice'>You start finalizing the reinforced wall...</span>")
|
|
if(do_after(user, 50, target = src))
|
|
if(!src || !S || S.get_amount() < 1)
|
|
return
|
|
S.use(1)
|
|
to_chat(user, "<span class='notice'>You fully reinforce the wall.</span>")
|
|
var/turf/Tsrc = get_turf(src)
|
|
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
|
|
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
|
if(X)
|
|
X.add_hiddenprint(usr)
|
|
qdel(src)
|
|
return
|
|
else
|
|
if(S.get_amount() < 1)
|
|
return
|
|
to_chat(user, "<span class='notice'>You start reinforcing the girder...</span>")
|
|
if(do_after(user,60, target = src))
|
|
if(!src || !S || S.get_amount() < 1)
|
|
return
|
|
S.use(1)
|
|
to_chat(user, "<span class='notice'>You reinforce the girder.</span>")
|
|
var/obj/structure/girder/reinforced/R = new (loc)
|
|
transfer_fingerprints_to(R)
|
|
qdel(src)
|
|
return
|
|
|
|
if(S.sheettype)
|
|
var/M = S.sheettype
|
|
if(state == GIRDER_DISPLACED)
|
|
if(S.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
|
return
|
|
if(do_after(user, 20, target = src))
|
|
if(!loc || !S || S.get_amount() < 2)
|
|
return
|
|
S.use(2)
|
|
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
|
var/F = text2path("/obj/structure/falsewall/[M]")
|
|
var/obj/structure/FW = new F (loc)
|
|
transfer_fingerprints_to(FW)
|
|
qdel(src)
|
|
else
|
|
if(S.get_amount() < 2)
|
|
to_chat(user, "<span class='warning'>You need at least two sheets to add plating!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
|
if(do_after(user,40, target = src))
|
|
if(!src || !S || S.get_amount() < 2)
|
|
return
|
|
S.use(2)
|
|
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
|
var/turf/Tsrc = get_turf(src)
|
|
Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]"))
|
|
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
|
if(X)
|
|
X.add_hiddenprint(usr)
|
|
qdel(src)
|
|
return
|
|
|
|
add_hiddenprint(user)
|
|
|
|
else
|
|
return ..()
|
|
|
|
/obj/structure/girder/crowbar_act(mob/user, obj/item/I)
|
|
if(!can_displace || state != GIRDER_NORMAL)
|
|
return
|
|
. = TRUE
|
|
if(!I.tool_use_check(user, 0))
|
|
return
|
|
to_chat(user, "<span class='notice'>You start dislodging the girder...</span>")
|
|
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
|
return
|
|
to_chat(user, "<span class='notice'>You dislodge the girder.</span>")
|
|
var/obj/structure/girder/displaced/D = new (loc)
|
|
transfer_fingerprints_to(D)
|
|
qdel(src)
|
|
|
|
/obj/structure/girder/screwdriver_act(mob/user, obj/item/I)
|
|
if(state != GIRDER_DISPLACED && state != GIRDER_REINF && state != GIRDER_REINF_STRUTS)
|
|
return
|
|
. = TRUE
|
|
if(!I.tool_use_check(user, 0))
|
|
return
|
|
switch(state)
|
|
if(GIRDER_DISPLACED)
|
|
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
|
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
|
return
|
|
state = GIRDER_DISASSEMBLED
|
|
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
|
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
|
M.add_fingerprint(user)
|
|
qdel(src)
|
|
if(GIRDER_REINF)
|
|
to_chat(user, "<span class='notice'>You start unsecuring support struts...</span>")
|
|
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF)
|
|
return
|
|
to_chat(user, "<span class='notice'>You unsecure the support struts.</span>")
|
|
state = GIRDER_REINF_STRUTS
|
|
if(GIRDER_REINF_STRUTS)
|
|
to_chat(user, "<span class='notice'>You start securing support struts...</span>")
|
|
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
|
return
|
|
to_chat(user, "<span class='notice'>You secure the support struts.</span>")
|
|
state = GIRDER_REINF
|
|
|
|
/obj/structure/girder/wirecutter_act(mob/user, obj/item/I)
|
|
if(state != GIRDER_REINF_STRUTS)
|
|
return
|
|
. = TRUE
|
|
if(!I.tool_use_check(user, 0))
|
|
return
|
|
to_chat(user, "<span class='notice'>You start removing the inner grille...</span>")
|
|
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
|
return
|
|
to_chat(user, "<span class='notice'>You remove the inner grille.</span>")
|
|
new /obj/item/stack/sheet/plasteel(get_turf(src))
|
|
var/obj/structure/girder/G = new (loc)
|
|
transfer_fingerprints_to(G)
|
|
qdel(src)
|
|
|
|
/obj/structure/girder/wrench_act(mob/user, obj/item/I)
|
|
if(state != GIRDER_NORMAL && state != GIRDER_DISPLACED)
|
|
return
|
|
. = TRUE
|
|
if(!I.tool_use_check(user, 0))
|
|
return
|
|
if(state == GIRDER_NORMAL)
|
|
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
|
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
|
return
|
|
state = GIRDER_DISASSEMBLED
|
|
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
|
refundMetal(metalUsed)
|
|
qdel(src)
|
|
else
|
|
if(!isfloorturf(loc))
|
|
to_chat(user, "<span class='warning'>A floor must be present to secure the girder!</span>")
|
|
return
|
|
to_chat(user, "<span class='notice'>You start securing the girder...</span>")
|
|
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
|
return
|
|
to_chat(user, "<span class='notice'>You secure the girder.</span>")
|
|
var/obj/structure/girder/G = new(loc)
|
|
transfer_fingerprints_to(G)
|
|
qdel(src)
|
|
|
|
/obj/structure/girder/welder_act(mob/user, obj/item/I)
|
|
. = TRUE
|
|
if(!I.tool_use_check(user, 0))
|
|
return
|
|
WELDER_ATTEMPT_SLICING_MESSAGE
|
|
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
|
WELDER_SLICING_SUCCESS_MESSAGE
|
|
refundMetal(metalUsed)
|
|
qdel(src)
|
|
|
|
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0)
|
|
if(height==0)
|
|
return 1
|
|
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
|
return prob(girderpasschance)
|
|
else
|
|
if(istype(mover, /obj/item/projectile))
|
|
return prob(girderpasschance)
|
|
else
|
|
return 0
|
|
|
|
/obj/structure/girder/CanPathfindPass(obj/item/card/id/ID, dir, caller, no_id = FALSE)
|
|
. = !density
|
|
if(ismovable(caller))
|
|
var/atom/movable/mover = caller
|
|
. = . || mover.checkpass(PASSGRILLE)
|
|
|
|
/obj/structure/girder/deconstruct(disassembled = TRUE)
|
|
if(!(flags & NODECONSTRUCT))
|
|
var/remains = pick(/obj/item/stack/rods, /obj/item/stack/sheet/metal)
|
|
new remains(loc)
|
|
qdel(src)
|
|
|
|
/obj/structure/girder/narsie_act()
|
|
if(prob(25))
|
|
new /obj/structure/girder/cult(loc)
|
|
qdel(src)
|
|
|
|
/obj/structure/girder/displaced
|
|
name = "displaced girder"
|
|
icon_state = "displaced"
|
|
anchored = FALSE
|
|
state = GIRDER_DISPLACED
|
|
girderpasschance = 25
|
|
max_integrity = 120
|
|
|
|
/obj/structure/girder/reinforced
|
|
name = "reinforced girder"
|
|
icon_state = "reinforced"
|
|
state = GIRDER_REINF
|
|
girderpasschance = 0
|
|
max_integrity = 350
|
|
|
|
/obj/structure/girder/reinforced/detailed_examine()
|
|
return "Add another sheet of plasteel to finish."
|
|
|
|
/obj/structure/girder/cult
|
|
name = "runed girder"
|
|
desc = "Framework made of a strange and shockingly cold metal. It doesn't seem to have any bolts."
|
|
icon = 'icons/obj/cult.dmi'
|
|
icon_state = "cultgirder"
|
|
can_displace = FALSE
|
|
metalUsed = 1
|
|
metal_type = /obj/item/stack/sheet/runed_metal
|
|
|
|
/obj/structure/girder/cult/Initialize(mapload)
|
|
. = ..()
|
|
icon_state = SSticker.cultdat?.cult_girder_icon_state
|
|
|
|
/obj/structure/girder/cult/attackby(obj/item/W, mob/user, params)
|
|
add_fingerprint(user)
|
|
if(istype(W, /obj/item/melee/cultblade/dagger) && iscultist(user)) //Cultists can demolish cult girders instantly with their dagger
|
|
user.visible_message("<span class='warning'>[user] strikes [src] with [W]!</span>", "<span class='notice'>You demolish [src].</span>")
|
|
refundMetal(metalUsed)
|
|
qdel(src)
|
|
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
|
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
|
if(do_after(user, 40* W.toolspeed, target = src))
|
|
playsound(loc, W.usesound, 100, 1)
|
|
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
|
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
|
R.amount = 1
|
|
transfer_fingerprints_to(R)
|
|
qdel(src)
|
|
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
|
var/obj/item/pickaxe/drill/jackhammer/D = W
|
|
to_chat(user, "<span class='notice'>Your jackhammer smashes through the girder!</span>")
|
|
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
|
R.amount = 1
|
|
transfer_fingerprints_to(R)
|
|
D.playDigSound()
|
|
qdel(src)
|
|
|
|
else if(istype(W, /obj/item/stack/sheet/runed_metal))
|
|
var/obj/item/stack/sheet/runed_metal/R = W
|
|
if(R.get_amount() < 1)
|
|
to_chat(user, "<span class='warning'>You need at least one sheet of runed metal to construct a runed wall!</span>")
|
|
return 0
|
|
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
|
|
if(do_after(user, 10, target = src))
|
|
if(R.get_amount() < 1 || !R)
|
|
return
|
|
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
|
|
R.use(1)
|
|
var/turf/T = get_turf(src)
|
|
T.ChangeTurf(/turf/simulated/wall/cult)
|
|
qdel(src)
|
|
else
|
|
return ..()
|
|
|
|
/obj/structure/girder/cult/narsie_act()
|
|
return
|
|
|
|
/obj/structure/girder/cult/deconstruct(disassembled = TRUE)
|
|
if(!(flags & NODECONSTRUCT))
|
|
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
|
qdel(src)
|