mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into DisMemberments
This commit is contained in:
@@ -33,9 +33,6 @@
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0 || wall_mounted) return 1
|
||||
return (!density)
|
||||
@@ -212,7 +209,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, E.pad, 0)
|
||||
@@ -239,7 +236,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, L)
|
||||
|
||||
@@ -141,4 +141,3 @@
|
||||
new /obj/item/clothing/suit/storage/paramedic(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/key/ambulance(src)
|
||||
|
||||
@@ -245,8 +245,9 @@
|
||||
..()
|
||||
new /obj/item/clothing/suit/space/eva/paramedic(src)
|
||||
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
|
||||
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
|
||||
new /obj/item/device/sensor_device(src)
|
||||
new /obj/item/key/ambulance(src)
|
||||
new /obj/item/weapon/pinpointer/crew(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/reagents
|
||||
name = "chemical storage closet"
|
||||
|
||||
@@ -234,6 +234,7 @@
|
||||
..()
|
||||
new /obj/item/weapon/storage/briefcase(src)
|
||||
new /obj/item/weapon/storage/firstaid/adv(src)
|
||||
new /obj/item/weapon/pinpointer/crew(src)
|
||||
new /obj/item/weapon/storage/belt/security/sec(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/device/flash(src)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi(src)
|
||||
new /obj/item/weapon/tank/jetpack/oxygen/harness(src)
|
||||
new /obj/item/clothing/shoes/magboots/syndie(src)
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party.."
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(L.electrocute_act(17, src))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 2
|
||||
@@ -115,7 +115,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, E.pad, 0)
|
||||
@@ -139,7 +139,7 @@
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_teleport(src, L)
|
||||
@@ -217,7 +217,7 @@
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
if(L.electrocute_act(17, src))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/curtain/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/curtain/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth(loc, 2)
|
||||
new /obj/item/stack/sheet/plastic(loc, 2)
|
||||
new /obj/item/stack/rods(loc, 1)
|
||||
|
||||
@@ -1,331 +1,298 @@
|
||||
/obj/structure/door_assembly
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
|
||||
name = "Airlock Assembly"
|
||||
icon_state = "door_as_0"
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/state = 0
|
||||
var/base_icon_state = ""
|
||||
var/base_name = "Airlock"
|
||||
name = "airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/public.dmi'
|
||||
icon_state = "construction"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
var/mineral = null
|
||||
var/base_name = "airlock"
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/airlock_type = "" //the type path of the airlock once completed
|
||||
var/glass_type = "/glass"
|
||||
var/glass = 0 // 0 = glass can be installed. -1 = glass can't be installed. 1 = glass is already installed. Text = mineral plating is installed instead.
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/glass = 0 // 0 = glass can be installed. 1 = glass is already installed.
|
||||
var/created_name = null
|
||||
var/heat_proof_finished = 0 //whether to heat-proof the finished airlock
|
||||
var/previous_assembly = /obj/structure/door_assembly
|
||||
var/noglass = FALSE //airlocks with no glass version, also cannot be modified with sheets
|
||||
var/material_type = /obj/item/stack/sheet/metal
|
||||
var/material_amt = 4
|
||||
|
||||
/obj/structure/door_assembly/New()
|
||||
update_state()
|
||||
update_icon()
|
||||
update_name()
|
||||
..()
|
||||
|
||||
/obj/structure/door_assembly/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
return ..()
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com
|
||||
base_icon_state = "com"
|
||||
base_name = "Command Airlock"
|
||||
glass_type = "/glass_command"
|
||||
airlock_type = "/command"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sec
|
||||
base_icon_state = "sec"
|
||||
base_name = "Security Airlock"
|
||||
glass_type = "/glass_security"
|
||||
airlock_type = "/security"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng
|
||||
base_icon_state = "eng"
|
||||
base_name = "Engineering Airlock"
|
||||
glass_type = "/glass_engineering"
|
||||
airlock_type = "/engineering"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min
|
||||
base_icon_state = "min"
|
||||
base_name = "Mining Airlock"
|
||||
glass_type = "/glass_mining"
|
||||
airlock_type = "/mining"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo
|
||||
base_icon_state = "atmo"
|
||||
base_name = "Atmospherics Airlock"
|
||||
glass_type = "/glass_atmos"
|
||||
airlock_type = "/atmos"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research
|
||||
base_icon_state = "res"
|
||||
base_name = "Research Airlock"
|
||||
glass_type = "/glass_research"
|
||||
airlock_type = "/research"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science
|
||||
base_icon_state = "sci"
|
||||
base_name = "Science Airlock"
|
||||
glass_type = "/glass_science"
|
||||
airlock_type = "/science"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med
|
||||
base_icon_state = "med"
|
||||
base_name = "Medical Airlock"
|
||||
glass_type = "/glass_medical"
|
||||
airlock_type = "/medical"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai
|
||||
base_icon_state = "mai"
|
||||
base_name = "Maintenance Airlock"
|
||||
airlock_type = "/maintenance"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext
|
||||
base_icon_state = "ext"
|
||||
base_name = "External Airlock"
|
||||
airlock_type = "/external"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_fre
|
||||
base_icon_state = "fre"
|
||||
base_name = "Freezer Airlock"
|
||||
airlock_type = "/freezer"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
base_icon_state = "hatch"
|
||||
base_name = "Airtight Hatch"
|
||||
airlock_type = "/hatch"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mhatch
|
||||
base_icon_state = "mhatch"
|
||||
base_name = "Maintenance Hatch"
|
||||
airlock_type = "/maintenance_hatch"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
|
||||
base_icon_state = "highsec"
|
||||
base_name = "High Security Airlock"
|
||||
airlock_type = "/highsecurity"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
base_icon_state = "shuttle"
|
||||
base_name = "Shuttle Airlock"
|
||||
airlock_type = "/shuttle"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/multi_tile
|
||||
icon = 'icons/obj/doors/door_assembly2x1.dmi'
|
||||
dir = EAST
|
||||
var/width = 1
|
||||
base_icon_state = "g" //Remember to delete this line when reverting "glass" var to 1.
|
||||
airlock_type = "/multi_tile/glass"
|
||||
glass = -1 //To prevent bugs in deconstruction process.
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/New()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
/obj/structure/door_assembly/examine(mob/user)
|
||||
..()
|
||||
var/doorname = ""
|
||||
if(created_name)
|
||||
doorname = ", written on it is '[created_name]'"
|
||||
switch(state)
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>")
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
to_chat(user, "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>")
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>The circuit is <b>connected loosely</b> to its slot, but the maintenance panel is <i>unscrewed and open</i>.</span>")
|
||||
if(!mineral && !glass && !noglass)
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows and mineral covers.</span>")
|
||||
else if(!mineral && glass && !noglass)
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for mineral covers.</span>")
|
||||
else if(mineral && !glass && !noglass)
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows.</span>")
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
update_state()
|
||||
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>")
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Move()
|
||||
. = ..()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult
|
||||
icon = 'icons/obj/doors/Doorcult.dmi'
|
||||
base_icon_state = "construction"
|
||||
base_name = "engraved airlock"
|
||||
airlock_type = "/cult"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cultruned
|
||||
icon = 'icons/obj/doors/Doorcultruned.dmi'
|
||||
base_icon_state = "construction"
|
||||
base_name = "runed airlock"
|
||||
airlock_type = "/cult/runed"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", name, created_name),1,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
|
||||
else if(iswelder(W) && (mineral || glass || !anchored ))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(istext(glass))
|
||||
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
user.visible_message("[user] welds the [mineral] plating off the airlock assembly.", "You start to weld the [mineral] plating off the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
|
||||
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
|
||||
new M(src.loc, 2)
|
||||
glass = 0
|
||||
else if(glass == 1)
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the [mineral] plating off.</span>")
|
||||
new mineral_path(loc, 2)
|
||||
var/obj/structure/door_assembly/PA = new previous_assembly(loc)
|
||||
transfer_assembly_vars(src, PA)
|
||||
|
||||
else if(glass)
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the glass panel out.</span>")
|
||||
if(heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
heat_proof_finished = 0
|
||||
heat_proof_finished = FALSE
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = 0
|
||||
glass = FALSE
|
||||
else if(!anchored)
|
||||
user.visible_message("[user] disassembles the airlock assembly.", "You start to disassemble the airlock assembly.")
|
||||
user.visible_message("<span class='warning'>[user] disassembles the airlock assembly.</span>", \
|
||||
"You start to disassemble the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
|
||||
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||
qdel(src)
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
else if(iswrench(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor...")
|
||||
else
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secured the airlock assembly!</span>")
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure the airlock assembly.</span>")
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
else if(iscoil(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES && anchored)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
|
||||
if (coil.amount < 1)
|
||||
to_chat(user, "<span class='warning'>You need one length of cable to wire the airlock assembly!</span>")
|
||||
return
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly...")
|
||||
if(do_after(user, 40 * coil.toolspeed, target = src))
|
||||
if(!src) return
|
||||
if(coil.amount < 1 || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
coil.use(1)
|
||||
src.state = 1
|
||||
to_chat(user, "<span class='notice'>You wire the Airlock!</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
else if(iswirecutter(W) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You cut the airlock's wires!</span>")
|
||||
if(state == 1)
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the airlock assembly.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS && W.icon_state != "door_electronics_smoked")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You installed the airlock electronics!</span>")
|
||||
src.state = 2
|
||||
src.name = "Near finished Airlock Assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
W.loc = src.loc
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER
|
||||
name = "near finished airlock assembly"
|
||||
electronics = W
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
else if(iscrowbar(W) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
|
||||
src.state = 1
|
||||
src.name = "Wired Airlock Assembly"
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
name = "wired airlock assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
ae = new/obj/item/weapon/airlock_electronics(loc)
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
ae.forceMove(loc)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet) && !glass)
|
||||
else if(istype(W, /obj/item/stack/sheet) && (!glass || !mineral))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(S)
|
||||
if(S.amount>=1)
|
||||
if(istype(S, /obj/item/stack/sheet/rglass) || istype(S, /obj/item/stack/sheet/glass))
|
||||
playsound(src.loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
if(S.type == /obj/item/stack/sheet/rglass)
|
||||
to_chat(user, "<span class='notice'>You install reinforced glass windows into the airlock assembly.</span>")
|
||||
heat_proof_finished = 1 //reinforced glass makes the airlock heat-proof
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You install regular glass windows into the airlock assembly.</span>")
|
||||
S.use(1)
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(S.amount>=2)
|
||||
playsound(src.loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You installed [M] plating into the airlock assembly!</span>")
|
||||
S.use(2)
|
||||
glass = "[M]"
|
||||
if(!noglass)
|
||||
if(!glass)
|
||||
if(istype(S, /obj/item/stack/sheet/rglass) || istype(S, /obj/item/stack/sheet/glass))
|
||||
playsound(loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly...")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
if(S.amount < 1 || glass)
|
||||
return
|
||||
if(S.type == /obj/item/stack/sheet/rglass)
|
||||
to_chat(user, "<span class='notice'>You install reinforced glass windows into the airlock assembly.</span>")
|
||||
heat_proof_finished = TRUE //reinforced glass makes the airlock heat-proof
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You install regular glass windows into the airlock assembly.</span>")
|
||||
S.use(1)
|
||||
glass = TRUE
|
||||
if(!mineral)
|
||||
if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(S.amount>=2)
|
||||
playsound(loc, S.usesound, 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly...")
|
||||
if(do_after(user, 40 * S.toolspeed, target = src))
|
||||
if(S.amount < 2 || mineral)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You install [M] plating into the airlock assembly.</span>")
|
||||
S.use(2)
|
||||
var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
|
||||
var/obj/structure/door_assembly/MA = new mineralassembly(loc)
|
||||
transfer_assembly_vars(src, MA, TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets add a mineral cover!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot add [S] to [src]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot add [S] to [src]!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
|
||||
else if(isscrewdriver(W) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] finishes the airlock.", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src) return
|
||||
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
|
||||
var/path
|
||||
if(istext(glass))
|
||||
path = text2path("/obj/machinery/door/airlock/[glass]")
|
||||
else if(glass == 1)
|
||||
path = text2path("/obj/machinery/door/airlock[glass_type]")
|
||||
else
|
||||
path = text2path("/obj/machinery/door/airlock[airlock_type]")
|
||||
var/obj/machinery/door/airlock/door = new path(src.loc)
|
||||
door.setDir(dir)
|
||||
door.assembly_type = type
|
||||
door.electronics = src.electronics
|
||||
door.heat_proof = heat_proof_finished
|
||||
if(src.electronics.one_access)
|
||||
door.req_access = null
|
||||
door.req_one_access = src.electronics.conf_access
|
||||
else
|
||||
door.req_access = src.electronics.conf_access
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
else
|
||||
door.name = "[istext(glass) ? "[glass] airlock" : base_name]"
|
||||
src.electronics.loc = door
|
||||
qdel(src)
|
||||
if(loc && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>You finish the airlock.</span>")
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(glass)
|
||||
door = new glass_type(loc)
|
||||
else
|
||||
door = new airlock_type(loc)
|
||||
door.setDir(dir)
|
||||
door.electronics = electronics
|
||||
door.heat_proof = heat_proof_finished
|
||||
if(electronics.one_access)
|
||||
door.req_access = null
|
||||
door.req_one_access = electronics.conf_access
|
||||
else
|
||||
door.req_access = electronics.conf_access
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
else
|
||||
door.name = base_name
|
||||
door.previous_airlock = previous_assembly
|
||||
electronics.forceMove(door)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
update_state()
|
||||
update_name()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/proc/update_state()
|
||||
icon_state = "door_as_[glass == 1 ? "g" : ""][istext(glass) ? glass : base_icon_state][state]"
|
||||
/obj/structure/door_assembly/update_icon()
|
||||
overlays.Cut()
|
||||
if(!glass)
|
||||
overlays += get_airlock_overlay("fill_construction", icon)
|
||||
else if(glass)
|
||||
overlays += get_airlock_overlay("glass_construction", overlays_file)
|
||||
overlays += get_airlock_overlay("panel_c[state+1]", overlays_file)
|
||||
|
||||
/obj/structure/door_assembly/proc/update_name()
|
||||
name = ""
|
||||
switch(state)
|
||||
if(0)
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
if(anchored)
|
||||
name = "Secured "
|
||||
if(1)
|
||||
name = "Wired "
|
||||
if(2)
|
||||
name = "Near Finished "
|
||||
name += "[heat_proof_finished ? "Heat-Proofed " : ""][glass == 1 ? "Window " : ""][istext(glass) ? "[glass] Airlock" : base_name] Assembly"
|
||||
name = "secured "
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
name = "wired "
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
name = "near finished "
|
||||
name += "[heat_proof_finished ? "heat-proofed " : ""][glass ? "window " : ""][base_name] assembly"
|
||||
|
||||
/obj/structure/door_assembly/proc/transfer_assembly_vars(obj/structure/door_assembly/source, obj/structure/door_assembly/target, previous = FALSE)
|
||||
target.glass = source.glass
|
||||
target.heat_proof_finished = source.heat_proof_finished
|
||||
target.created_name = source.created_name
|
||||
target.state = source.state
|
||||
target.anchored = source.anchored
|
||||
if(previous)
|
||||
target.previous_assembly = source.type
|
||||
if(electronics)
|
||||
target.electronics = source.electronics
|
||||
source.electronics.forceMove(target)
|
||||
target.update_icon()
|
||||
target.update_name()
|
||||
qdel(source)
|
||||
|
||||
/obj/structure/door_assembly/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!disassembled)
|
||||
material_amt = rand(2,4)
|
||||
new material_type(T, material_amt)
|
||||
if(glass)
|
||||
if(disassembled)
|
||||
if(heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(T)
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(T)
|
||||
else
|
||||
new /obj/item/weapon/shard(T)
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
new mineral_path(T, 2)
|
||||
qdel(src)
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
/obj/structure/door_assembly/door_assembly_public
|
||||
name = "public airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station2/glass.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station2/overlays.dmi'
|
||||
glass_type = /obj/machinery/door/airlock/public/glass
|
||||
airlock_type = /obj/machinery/door/airlock/public
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com
|
||||
name = "command airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/command.dmi'
|
||||
base_name = "command airlock"
|
||||
glass_type = /obj/machinery/door/airlock/command/glass
|
||||
airlock_type = /obj/machinery/door/airlock/command
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sec
|
||||
name = "security airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/security.dmi'
|
||||
base_name = "security airlock"
|
||||
glass_type = /obj/machinery/door/airlock/security/glass
|
||||
airlock_type = /obj/machinery/door/airlock/security
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng
|
||||
name = "engineering airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/engineering.dmi'
|
||||
base_name = "engineering airlock"
|
||||
glass_type = /obj/machinery/door/airlock/engineering/glass
|
||||
airlock_type = /obj/machinery/door/airlock/engineering
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min
|
||||
name = "mining airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/mining.dmi'
|
||||
base_name = "mining airlock"
|
||||
glass_type = /obj/machinery/door/airlock/mining/glass
|
||||
airlock_type = /obj/machinery/door/airlock/mining
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo
|
||||
name = "atmospherics airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/atmos.dmi'
|
||||
base_name = "atmospherics airlock"
|
||||
glass_type = /obj/machinery/door/airlock/atmos/glass
|
||||
airlock_type = /obj/machinery/door/airlock/atmos
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research
|
||||
name = "research airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/research.dmi'
|
||||
base_name = "research airlock"
|
||||
glass_type = /obj/machinery/door/airlock/research/glass
|
||||
airlock_type = /obj/machinery/door/airlock/research
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science
|
||||
name = "science airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/science.dmi'
|
||||
base_name = "science airlock"
|
||||
glass_type = /obj/machinery/door/airlock/science/glass
|
||||
airlock_type = /obj/machinery/door/airlock/science
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med
|
||||
name = "medical airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/medical.dmi'
|
||||
base_name = "medical airlock"
|
||||
glass_type = /obj/machinery/door/airlock/medical/glass
|
||||
airlock_type = /obj/machinery/door/airlock/medical
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai
|
||||
name = "maintenance airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
|
||||
base_name = "maintenance airlock"
|
||||
glass_type = /obj/machinery/door/airlock/maintenance/glass
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_extmai
|
||||
name = "external maintenance airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenanceexternal.dmi'
|
||||
base_name = "external maintenance airlock"
|
||||
glass_type = /obj/machinery/door/airlock/maintenance/external/glass
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance/external
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext
|
||||
name = "external airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/external/external.dmi'
|
||||
base_name = "external airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/external/overlays.dmi'
|
||||
glass_type = /obj/machinery/door/airlock/external/glass
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_fre
|
||||
name = "freezer airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/freezer.dmi'
|
||||
base_name = "freezer airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/freezer
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
name = "airtight hatch assembly"
|
||||
icon = 'icons/obj/doors/airlocks/hatch/centcom.dmi'
|
||||
base_name = "airtight hatch"
|
||||
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/hatch
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mhatch
|
||||
name = "maintenance hatch assembly"
|
||||
icon = 'icons/obj/doors/airlocks/hatch/maintenance.dmi'
|
||||
base_name = "maintenance hatch"
|
||||
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_highsecurity
|
||||
name = "high security airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/highsec/highsec.dmi'
|
||||
base_name = "high security airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/highsec/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/highsecurity
|
||||
noglass = TRUE
|
||||
material_type = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_vault
|
||||
name = "vault door assembly"
|
||||
icon = 'icons/obj/doors/airlocks/vault/vault.dmi'
|
||||
base_name = "vault door"
|
||||
overlays_file = 'icons/obj/doors/airlocks/vault/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/vault
|
||||
noglass = TRUE
|
||||
material_type = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
name = "shuttle airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/shuttle/shuttle.dmi'
|
||||
base_name = "shuttle airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/shuttle/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/shuttle
|
||||
glass_type = /obj/machinery/door/airlock/shuttle/glass
|
||||
|
||||
/obj/structure/door_assembly/multi_tile
|
||||
name = "large airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/glass_large/glass_large.dmi'
|
||||
base_name = "large airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/glass_large/overlays.dmi'
|
||||
dir = EAST
|
||||
var/width = 1
|
||||
airlock_type = /obj/machinery/door/airlock/multi_tile
|
||||
glass_type = /obj/machinery/door/airlock/multi_tile/glass
|
||||
material_amt = 8
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/New()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Move()
|
||||
. = ..()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult
|
||||
name = "cult airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi'
|
||||
base_name = "cult airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/cult
|
||||
glass_type = /obj/machinery/door/airlock/cult/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult/unruned
|
||||
icon = 'icons/obj/doors/airlocks/cult/unruned/cult.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/unruned/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/cult/unruned
|
||||
glass_type = /obj/machinery/door/airlock/cult/unruned/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_centcom
|
||||
icon = 'icons/obj/doors/airlocks/centcom/centcom.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/centcom/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/centcom
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_gold
|
||||
name = "gold airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/gold.dmi'
|
||||
base_name = "gold airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
mineral = "gold"
|
||||
glass_type = /obj/machinery/door/airlock/gold/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_silver
|
||||
name = "silver airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/silver.dmi'
|
||||
base_name = "silver airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
mineral = "silver"
|
||||
glass_type = /obj/machinery/door/airlock/silver/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_diamond
|
||||
name = "diamond airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/diamond.dmi'
|
||||
base_name = "diamond airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
mineral = "diamond"
|
||||
glass_type = /obj/machinery/door/airlock/diamond/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_uranium
|
||||
name = "uranium airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/uranium.dmi'
|
||||
base_name = "uranium airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
mineral = "uranium"
|
||||
glass_type = /obj/machinery/door/airlock/uranium/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_plasma
|
||||
name = "plasma airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/plasma.dmi'
|
||||
base_name = "plasma airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
mineral = "plasma"
|
||||
glass_type = /obj/machinery/door/airlock/plasma/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_bananium
|
||||
name = "bananium airlock assembly"
|
||||
desc = "Honk."
|
||||
icon = 'icons/obj/doors/airlocks/station/bananium.dmi'
|
||||
base_name = "bananium airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/bananium
|
||||
mineral = "bananium"
|
||||
glass_type = /obj/machinery/door/airlock/bananium/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_tranquillite
|
||||
name = "tranquillite airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/freezer.dmi'
|
||||
base_name = "tranquillite airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/tranquillite
|
||||
mineral = "tranquillite"
|
||||
noglass = TRUE
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sandstone
|
||||
name = "sandstone airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/sandstone.dmi'
|
||||
base_name = "sandstone airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
mineral = "sandstone"
|
||||
glass_type = /obj/machinery/door/airlock/sandstone/glass
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_wood
|
||||
name = "wooden airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/wood.dmi'
|
||||
base_name = "wooden airlock"
|
||||
airlock_type = /obj/machinery/door/airlock/wood
|
||||
mineral = "wood"
|
||||
glass_type = /obj/machinery/door/airlock/wood/glass
|
||||
@@ -72,7 +72,7 @@
|
||||
A.updateicon()
|
||||
|
||||
flick("echair_shock", src)
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='danger'>You hear a deep sharp shock!</span>")
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
anchored = 1
|
||||
icon = 'icons/turf/walls/wall.dmi'
|
||||
icon_state = "wall"
|
||||
var/mineral = "metal"
|
||||
var/walltype = "metal"
|
||||
var/opening = 0
|
||||
@@ -164,7 +165,7 @@
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon = 'icons/turf/walls/uranium_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "uranium"
|
||||
mineral = "uranium"
|
||||
walltype = "uranium"
|
||||
var/active = null
|
||||
@@ -199,7 +200,7 @@
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon = 'icons/turf/walls/gold_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "gold"
|
||||
mineral = "gold"
|
||||
walltype = "gold"
|
||||
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
|
||||
@@ -208,7 +209,7 @@
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny."
|
||||
icon = 'icons/turf/walls/silver_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "silver"
|
||||
mineral = "silver"
|
||||
walltype = "silver"
|
||||
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
|
||||
@@ -217,7 +218,7 @@
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon = 'icons/turf/walls/diamond_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "diamond"
|
||||
mineral = "diamond"
|
||||
walltype = "diamond"
|
||||
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
|
||||
@@ -227,7 +228,7 @@
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "plasma"
|
||||
mineral = "plasma"
|
||||
walltype = "plasma"
|
||||
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
|
||||
@@ -236,6 +237,7 @@
|
||||
if(is_hot(W) > 300)
|
||||
message_admins("Plasma falsewall ignited by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma falsewall ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
burnbabyburn()
|
||||
return
|
||||
..()
|
||||
@@ -254,7 +256,7 @@
|
||||
name = "alien wall"
|
||||
desc = "A strange-looking alien wall."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "plasma"
|
||||
mineral = "alien"
|
||||
walltype = "alien"
|
||||
canSmoothWith = list(/obj/structure/falsewall/alien, /turf/simulated/wall/mineral/alien)
|
||||
@@ -264,7 +266,7 @@
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon = 'icons/turf/walls/bananium_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "bananium"
|
||||
mineral = "clown"
|
||||
walltype = "clown"
|
||||
canSmoothWith = list(/obj/structure/falsewall/bananium, /turf/simulated/wall/mineral/bananium)
|
||||
@@ -272,7 +274,7 @@
|
||||
/obj/structure/falsewall/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon_state = ""
|
||||
icon_state = "sandstone"
|
||||
mineral = "sandstone"
|
||||
walltype = "sandstone"
|
||||
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/simulated/wall/mineral/sandstone)
|
||||
@@ -281,7 +283,7 @@
|
||||
name = "wooden wall"
|
||||
desc = "A wall with wooden plating. Stiff."
|
||||
icon = 'icons/turf/walls/wood_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "wood"
|
||||
mineral = "wood"
|
||||
walltype = "wood"
|
||||
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
|
||||
@@ -290,7 +292,7 @@
|
||||
name = "rough metal wall"
|
||||
desc = "A wall with rough metal plating."
|
||||
icon = 'icons/turf/walls/iron_wall.dmi'
|
||||
icon_state = ""
|
||||
icon_state = "iron"
|
||||
mineral = "metal"
|
||||
walltype = "iron"
|
||||
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
icon_state = "plasmawindow"
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
health = 120
|
||||
health = 240
|
||||
|
||||
/obj/structure/window/full/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 32000)
|
||||
@@ -59,7 +59,7 @@
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
glasstype = /obj/item/stack/sheet/plasmaglass
|
||||
reinf = 1
|
||||
health = 160
|
||||
health = 320
|
||||
|
||||
/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
@@ -69,7 +69,7 @@
|
||||
desc = "It looks rather strong. Might take a few good hits to shatter it."
|
||||
icon_state = "rwindow"
|
||||
basestate = "rwindow"
|
||||
health = 40
|
||||
health = 80
|
||||
reinf = 1
|
||||
|
||||
/obj/structure/window/full/reinforced/tinted
|
||||
@@ -84,7 +84,7 @@
|
||||
desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
|
||||
icon_state = "fwindow"
|
||||
basestate = "fwindow"
|
||||
health = 30
|
||||
health = 60
|
||||
|
||||
/obj/structure/window/full/shuttle
|
||||
name = "shuttle window"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
var/health = 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/can_deconstruct = TRUE
|
||||
|
||||
/obj/structure/girder/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -42,7 +41,7 @@
|
||||
take_damage(rand(25, 75))
|
||||
return
|
||||
|
||||
/obj/structure/girder/proc/take_damage(amount)
|
||||
/obj/structure/girder/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
@@ -369,7 +368,7 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/girder/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/girder/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
level = 3
|
||||
var/health = 10
|
||||
var/broken = 0
|
||||
var/can_deconstruct = TRUE
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
@@ -159,65 +158,82 @@
|
||||
|
||||
//window placing begin
|
||||
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass))
|
||||
if(!broken)
|
||||
var/obj/item/stack/ST = W
|
||||
if (ST.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
var/dir_to_set = NORTH
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
|
||||
return
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions.
|
||||
if(x == user.x)
|
||||
if(y > user.y)
|
||||
dir_to_set = SOUTH
|
||||
else
|
||||
dir_to_set = NORTH
|
||||
else if(y == user.y)
|
||||
if(x > user.x)
|
||||
dir_to_set = WEST
|
||||
else
|
||||
dir_to_set = EAST
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't reach.</span>")
|
||||
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start placing the window...</span>")
|
||||
if(do_after(user, 20 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored) //Grille destroyed or unanchored while waiting
|
||||
return
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
|
||||
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
|
||||
else
|
||||
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
|
||||
WD.setDir(dir_to_set)
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
ST.use(1)
|
||||
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
|
||||
WD.update_icon()
|
||||
return
|
||||
build_window(W, user)
|
||||
return
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
|
||||
return attacked_by(W, user)
|
||||
|
||||
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
|
||||
if(!istype(S) || !user)
|
||||
return
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>You must repair or replace [src] first!</span>")
|
||||
return
|
||||
if(S.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
|
||||
return
|
||||
if(!getRelativeDirection(src, user) && (user.loc != loc)) //essentially a cardinal direction adjacent or sharing same loc check
|
||||
to_chat(user, "<span class='warning'>You can't reach.</span>")
|
||||
return
|
||||
if(/obj/structure/window/full in loc) //check for a full window already present (blocks the whole tile)
|
||||
to_chat(user, "<span class='warning'>There is already a full window there.</span>")
|
||||
return
|
||||
var/selection = alert(user, "What type of window would you like to place?", "Window Construction", "One Direction", "Full", "Cancel")
|
||||
if(selection == "Cancel")
|
||||
return
|
||||
if(selection == "Full")
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets of glass for that!</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = src)) //glass doesn't have a toolspeed, so no multiplier
|
||||
if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists!
|
||||
return
|
||||
if(S.get_amount() < 2) //make sure we still have enough for this!
|
||||
return
|
||||
if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location
|
||||
return
|
||||
var/obj/structure/window/W = new S.full_window(get_turf(src))
|
||||
S.use(2)
|
||||
W.anchored = 0
|
||||
W.state = 0
|
||||
to_chat(user, "<span class='notice'>You place [W] on [src].</span>")
|
||||
W.update_icon()
|
||||
return
|
||||
if(selection == "One Direction")
|
||||
var/dir_selection = input("Which direction will this window face?", "Direction") as null|anything in list("north", "east", "south", "west")
|
||||
if(!dir_selection)
|
||||
return
|
||||
var/temp_dir = text2dir(dir_selection)
|
||||
for(var/obj/structure/window/W in loc)
|
||||
if(istype(W, /obj/structure/window/full)) //double checking in case a full window was created while selecting direction
|
||||
to_chat(user, "<span class='warning'>There is already a full window there.</span>")
|
||||
return
|
||||
if(W.dir == temp_dir) //to avoid building a window on top of an existing window
|
||||
to_chat(user, "<span class='warning'>There is already a window facing this direction there.</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = src))
|
||||
if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists!
|
||||
return
|
||||
if(S.get_amount() < 1) //make sure we still have enough fir this!
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
|
||||
return
|
||||
if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location
|
||||
return
|
||||
var/obj/structure/window/W = new S.created_window(get_turf(src))
|
||||
S.use(1)
|
||||
W.setDir(temp_dir)
|
||||
W.ini_dir = temp_dir
|
||||
W.anchored = 0
|
||||
W.state = 0
|
||||
to_chat(user, "<span class='notice'>You place [W] on [src].</span>")
|
||||
W.update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/grille/proc/attacked_by(obj/item/I, mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
@@ -226,7 +242,17 @@
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>")
|
||||
take_damage(I.force * 0.3, I.damtype)
|
||||
|
||||
/obj/structure/grille/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 80, 1)
|
||||
|
||||
/obj/structure/grille/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(can_deconstruct)
|
||||
@@ -241,20 +267,10 @@
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
if(sound_effect)
|
||||
play_attack_sound(damage_amount, damage_type, damage_flag)
|
||||
health -= damage_amount
|
||||
if(health <= 0)
|
||||
if(!broken)
|
||||
obj_break()
|
||||
@@ -276,7 +292,7 @@
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if(electrocute_mob(user, C, src))
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
/obj/structure/mineral_door/attack_animal(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
|
||||
/obj/structure/mineral_door/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
SwitchState()
|
||||
@@ -68,11 +68,11 @@
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates)
|
||||
if(isSwitchingStates)
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
@@ -101,7 +101,7 @@
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
|
||||
if(close_delay != -1)
|
||||
spawn(close_delay)
|
||||
Close()
|
||||
@@ -157,7 +157,7 @@
|
||||
if(hardness <= 0)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/mineral_door/proc/deconstruct(disassembled = TRUE)
|
||||
/obj/structure/mineral_door/deconstruct(disassembled = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
if(sheetType)
|
||||
if(disassembled)
|
||||
@@ -223,6 +223,7 @@
|
||||
if(is_hot(W))
|
||||
message_admins("Plasma mineral door ignited by [key_name_admin(user)] in ([x], [y], [z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", 0, 1)
|
||||
log_game("Plasma mineral door ignited by [key_name(user)] in ([x], [y], [z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
TemperatureAct(100)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
|
||||
playsound(user.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(user.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(user.loc,user,'icons/mob/mob.dmi',,"phasein",,user.dir)
|
||||
|
||||
new /obj/effect/temp_visual/dir_setting/ninja/phase(get_turf(user), user.dir)
|
||||
to_chat(user, "<span class='boldnotice'>VOID-Shift</span> translocation successful")
|
||||
|
||||
if("No")
|
||||
|
||||
@@ -92,10 +92,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/morgue/alter_health()
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
@@ -290,10 +286,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/alter_health()
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
if(cremating)
|
||||
to_chat(usr, "<span class='warning'>It's locked.</span>")
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/obj/structure/plasticflaps
|
||||
name = "plastic flaps"
|
||||
desc = "Completely impassable - or are they?"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone,
|
||||
/mob/living/simple_animal/bot/mulebot
|
||||
)
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(PLASTIC_FLAPS_NORMAL)
|
||||
to_chat(user, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
|
||||
if(PLASTIC_FLAPS_DETACHED)
|
||||
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>")
|
||||
|
||||
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 180*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_NORMAL)
|
||||
return
|
||||
state = PLASTIC_FLAPS_DETACHED
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
||||
else if(iswelder(W))
|
||||
if(state == PLASTIC_FLAPS_DETACHED)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] slices apart [src].</span>", "<span class='notice'>You start to slice apart [src].</span>", "You hear welding.")
|
||||
if(do_after(user, 120*WT.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
var/obj/item/stack/sheet/plastic/five/P = new(loc)
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/stool/bed/B = A
|
||||
if(istype(A, /obj/structure/stool/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/closet/cardboard))
|
||||
var/obj/structure/closet/cardboard/C = A
|
||||
if(C.move_delay)
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
var/mob/living/M = A
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
if(istype(A, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.is_small)
|
||||
return ..()
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
|
||||
if(istype(caller, /mob/living))
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(caller, mob_type))
|
||||
return 1
|
||||
|
||||
var/mob/living/M = caller
|
||||
if(!M.ventcrawler && M.mob_size > MOB_SIZE_SMALL)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
new /obj/item/stack/sheet/plastic/five(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
/obj/structure/plasticflaps/mining/initialize()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
/obj/structure/plasticflaps/mining/Destroy()
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/mining/CanAtmosPass(turf/T)
|
||||
return 0
|
||||
@@ -184,6 +184,7 @@
|
||||
if(Proj.firer)
|
||||
message_admins("Plasma statue ignited by [key_name_admin(Proj.firer)](<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [key_name(Proj.firer)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(Proj.firer)]","atmos")
|
||||
else
|
||||
message_admins("Plasma statue ignited by [Proj]. No known firer.(<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [Proj] in ([x],[y],[z]). No known firer.")
|
||||
@@ -193,6 +194,7 @@
|
||||
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
||||
message_admins("Plasma statue ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
ignite(is_hot(W))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/* Table Frames
|
||||
* Contains:
|
||||
* Frames
|
||||
* Wooden Frames
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Normal Frames
|
||||
*/
|
||||
|
||||
/obj/structure/table_frame
|
||||
name = "table frame"
|
||||
desc = "Four metal legs with four framing rods for a table. You could easily pass through this."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table_frame"
|
||||
density = FALSE
|
||||
anchored = FALSE
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
max_integrity = 100
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/framestackamount = 2
|
||||
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I))
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE)
|
||||
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
var/obj/item/stack/sheet/plasteel/P = I
|
||||
if(P.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one plasteel sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [P] to [src]...</span>")
|
||||
if(do_after(user, 50, target = src) && P.use(1))
|
||||
make_new_table(/obj/structure/table/reinforced)
|
||||
else if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one metal sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [M] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && M.use(1))
|
||||
make_new_table(/obj/structure/table)
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one glass sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && G.use(1))
|
||||
make_new_table(/obj/structure/table/glass)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet/black))
|
||||
var/obj/item/stack/tile/carpet/black/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one black carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy/black)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/proc/make_new_table(table_type) //makes sure the new table made retains what we had as a frame
|
||||
var/obj/structure/table/T = new table_type(loc)
|
||||
T.frame = type
|
||||
T.framestack = framestack
|
||||
T.framestackamount = framestackamount
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/deconstruct(disassembled = TRUE)
|
||||
new framestack(get_turf(src), framestackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/narsie_act()
|
||||
new /obj/structure/table_frame/wood(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/ratvar_act()
|
||||
new /obj/structure/table_frame/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Wooden Frames
|
||||
*/
|
||||
|
||||
/obj/structure/table_frame/wood
|
||||
name = "wooden table frame"
|
||||
desc = "Four wooden legs with four framing wooden rods for a wooden table. You could easily pass through this."
|
||||
icon_state = "wood_frame"
|
||||
framestack = /obj/item/stack/sheet/wood
|
||||
framestackamount = 2
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/sheet/wood))
|
||||
var/obj/item/stack/sheet/wood/W = I
|
||||
if(W.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one wood sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [W] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && W.use(1))
|
||||
make_new_table(/obj/structure/table/wood)
|
||||
return
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/poker)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/brass
|
||||
name = "brass table frame"
|
||||
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
|
||||
icon_state = "brass_frame"
|
||||
burn_state = FIRE_PROOF
|
||||
framestack = /obj/item/stack/tile/brass
|
||||
framestackamount = 1
|
||||
|
||||
/obj/structure/table_frame/brass/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/tile/brass))
|
||||
var/obj/item/stack/tile/brass/W = I
|
||||
if(W.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one brass sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [W] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && W.use(1))
|
||||
make_new_table(/obj/structure/table/reinforced/brass)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/brass/narsie_act()
|
||||
..()
|
||||
if(src) //do we still exist?
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
@@ -1,49 +1,51 @@
|
||||
/* Tables and Racks
|
||||
* Contains:
|
||||
* Tables
|
||||
* Wooden tables
|
||||
* Reinforced tables
|
||||
* Glass Tables
|
||||
* Wooden Tables
|
||||
* Reinforced Tables
|
||||
* Racks
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Tables
|
||||
*/
|
||||
|
||||
/obj/structure/table
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/smooth_structures/table.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
layer = TABLE_LAYER
|
||||
pass_flags = LETPASSTHROW
|
||||
climbable = 1
|
||||
|
||||
var/parts = /obj/item/weapon/table_parts
|
||||
var/flipped = 0
|
||||
var/health = 100
|
||||
var/busy = 0
|
||||
climbable = TRUE
|
||||
max_integrity = 100
|
||||
integrity_failure = 30
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
|
||||
var/frame = /obj/structure/table_frame
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/buildstack = /obj/item/stack/sheet/metal
|
||||
var/busy = FALSE
|
||||
var/buildstackamount = 1
|
||||
var/framestackamount = 2
|
||||
var/deconstruction_ready = TRUE
|
||||
var/flipped = 0
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in src.loc)
|
||||
if(T != src)
|
||||
qdel(T)
|
||||
if(flipped)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/table/proc/destroy()
|
||||
new parts(loc)
|
||||
density = 0
|
||||
qdel(src)
|
||||
/obj/structure/table/examine(mob/user)
|
||||
..()
|
||||
deconstruction_hints(user)
|
||||
|
||||
/obj/structure/table/narsie_act()
|
||||
if(prob(20))
|
||||
new /obj/structure/table/woodentable(loc)
|
||||
/obj/structure/table/proc/deconstruction_hints(mob/user)
|
||||
to_chat(user, "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>")
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
if(smooth && !flipped)
|
||||
@@ -63,7 +65,7 @@
|
||||
if(type == 1)
|
||||
subtype = direction == turn(dir,90) ? "-" : "+"
|
||||
var/base = "table"
|
||||
if(istype(src, /obj/structure/table/woodentable))
|
||||
if(istype(src, /obj/structure/table/wood))
|
||||
base = "wood"
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
base = "rtable"
|
||||
@@ -72,51 +74,57 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/narsie_act()
|
||||
new /obj/structure/table/wood(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/ratvar_act()
|
||||
new /obj/structure/table/reinforced/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(3)
|
||||
if(prob(25))
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/blob_act()
|
||||
if(prob(75))
|
||||
destroy()
|
||||
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
if(HULK in user.mutations)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
playsound(loc, 'sound/effects/bang.ogg', 50, 1)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
else
|
||||
..()
|
||||
if(climber)
|
||||
@@ -171,17 +179,17 @@
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
health -= P.damage/2
|
||||
if(health > 0)
|
||||
obj_integrity -= P.damage/2
|
||||
if(obj_integrity > 0)
|
||||
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
visible_message("<span class='warning'>[src] breaks down!</span>")
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
/obj/structure/table/CheckExit(atom/movable/O, turf/target)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(flipped)
|
||||
@@ -191,7 +199,7 @@
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
/obj/structure/table/MouseDrop_T(obj/O, mob/user)
|
||||
..()
|
||||
if((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
@@ -223,58 +231,74 @@
|
||||
return 1
|
||||
qdel(I)
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
tablepush(W, user)
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
tablepush(I, user)
|
||||
return
|
||||
if(can_deconstruct)
|
||||
if(isscrewdriver(I) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
user.visible_message("<span class='notice'>[user] is disassembling \a [src].</span>", "<span class='notice'>You start disassembling \the [src].</span>")
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
destroy()
|
||||
return
|
||||
if(iswrench(I) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE, 1)
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
if(istype(I, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("<span class='notice'>The [src] was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear [src] coming apart.</span>", 2)
|
||||
destroy()
|
||||
deconstruct(FALSE)
|
||||
return
|
||||
|
||||
if(!(W.flags & ABSTRACT))
|
||||
if(!(I.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
W.Move(loc)
|
||||
I.Move(loc)
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
W.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
W.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(var/direction)
|
||||
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
var/turf/T = get_turf(src)
|
||||
new buildstack(T, buildstackamount)
|
||||
if(!wrench_disassembly)
|
||||
new frame(T)
|
||||
else
|
||||
new framestack(T, framestackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(direction)
|
||||
var/obj/structure/table/T
|
||||
for(var/angle in list(-90,90))
|
||||
T = locate() in get_step(src.loc,turn(direction,angle))
|
||||
T = locate() in get_step(loc,turn(direction,angle))
|
||||
if(T && !T.flipped)
|
||||
return 0
|
||||
T = locate() in get_step(src.loc,direction)
|
||||
T = locate() in get_step(loc,direction)
|
||||
if(!T || T.flipped)
|
||||
return 1
|
||||
if(istype(T,/obj/structure/table/reinforced/))
|
||||
var/obj/structure/table/reinforced/R = T
|
||||
if(R.status == 2)
|
||||
if(!T.deconstruction_ready)
|
||||
return 0
|
||||
return T.straight_table_check(direction)
|
||||
|
||||
@@ -309,7 +333,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/proc/flip(var/direction)
|
||||
/obj/structure/table/proc/flip(direction)
|
||||
if(flipped)
|
||||
return 0
|
||||
|
||||
@@ -344,7 +368,7 @@
|
||||
return 0
|
||||
|
||||
var/can_flip = 1
|
||||
for(var/mob/A in oview(src,0))//src.loc)
|
||||
for(var/mob/A in oview(src,0))//loc)
|
||||
if(istype(A))
|
||||
can_flip = 0
|
||||
if(!can_flip)
|
||||
@@ -365,52 +389,111 @@
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/*
|
||||
* Glass Tables
|
||||
*/
|
||||
|
||||
/obj/structure/table/glass
|
||||
name = "glass table"
|
||||
desc = "Looks fragile. You should totally flip it. It is begging for it."
|
||||
icon = 'icons/obj/smooth_structures/glass_table.dmi'
|
||||
icon_state = "glass_table"
|
||||
buildstack = /obj/item/stack/sheet/glass
|
||||
max_integrity = 70
|
||||
canSmoothWith = null
|
||||
var/list/debris = list()
|
||||
|
||||
/obj/structure/table/glass/New()
|
||||
. = ..()
|
||||
debris += new frame
|
||||
debris += new /obj/item/weapon/shard
|
||||
|
||||
/obj/structure/table/glass/Destroy()
|
||||
for(var/i in debris)
|
||||
qdel(i)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/table/glass/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(!can_deconstruct)
|
||||
return
|
||||
if(!isliving(AM))
|
||||
return
|
||||
// Don't break if they're just flying past
|
||||
if(AM.throwing)
|
||||
addtimer(src, "throw_check", 5, FALSE, AM)
|
||||
else
|
||||
check_break(AM)
|
||||
|
||||
/obj/structure/table/glass/proc/throw_check(mob/living/M)
|
||||
if(M.loc == get_turf(src))
|
||||
check_break(M)
|
||||
|
||||
/obj/structure/table/glass/proc/check_break(mob/living/M)
|
||||
if(has_gravity(M) && M.mob_size > MOB_SIZE_SMALL)
|
||||
table_shatter(M)
|
||||
|
||||
/obj/structure/table/glass/flip(direction)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/table/glass/proc/table_shatter(mob/living/L)
|
||||
visible_message("<span class='warning'>[src] breaks!</span>",
|
||||
"<span class='danger'>You hear breaking glass.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, "shatter", 50, 1)
|
||||
for(var/I in debris)
|
||||
var/atom/movable/AM = I
|
||||
AM.forceMove(T)
|
||||
debris -= AM
|
||||
if(istype(AM, /obj/item/weapon/shard))
|
||||
AM.throw_impact(L)
|
||||
L.Weaken(5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
if(disassembled)
|
||||
..()
|
||||
return
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, "shatter", 50, 1)
|
||||
for(var/X in debris)
|
||||
var/atom/movable/AM = X
|
||||
AM.forceMove(T)
|
||||
debris -= AM
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Wooden tables
|
||||
*/
|
||||
/obj/structure/table/woodentable
|
||||
/obj/structure/table/wood
|
||||
name = "wooden table"
|
||||
desc = "Do not apply fire to this. Rumour says it burns easily."
|
||||
icon = 'icons/obj/smooth_structures/wood_table.dmi'
|
||||
icon_state = "wood_table"
|
||||
parts = /obj/item/weapon/table_parts/wood
|
||||
health = 50
|
||||
canSmoothWith = list(/obj/structure/table/woodentable, /obj/structure/table/woodentable/poker)
|
||||
frame = /obj/structure/table_frame/wood
|
||||
framestack = /obj/item/stack/sheet/wood
|
||||
buildstack = /obj/item/stack/sheet/wood
|
||||
max_integrity = 70
|
||||
canSmoothWith = list(/obj/structure/table/wood, /obj/structure/table/wood/poker)
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
var/canPokerize = 1
|
||||
|
||||
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(canPokerize && istype(I, /obj/item/stack/tile/grass))
|
||||
var/obj/item/stack/tile/grass/gr = I
|
||||
gr.use(1)
|
||||
new /obj/structure/table/woodentable/poker( src.loc )
|
||||
qdel(src)
|
||||
visible_message("<span class='notice'>[user] adds the grass to the wooden table</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/table/wood/narsie_act(total_override = TRUE)
|
||||
if(!total_override)
|
||||
..()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/table/woodentable/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
|
||||
/obj/structure/table/wood/poker //No specialties, Just a mapping object.
|
||||
name = "gambling table"
|
||||
desc = "A seedy table for seedy dealings in seedy places."
|
||||
icon = 'icons/obj/smooth_structures/poker_table.dmi'
|
||||
icon_state = "pokertable"
|
||||
canSmoothWith = list(/obj/structure/table/woodentable/poker, /obj/structure/table/woodentable)
|
||||
canPokerize = 0
|
||||
icon_state = "poker_table"
|
||||
buildstack = /obj/item/stack/tile/carpet
|
||||
|
||||
/obj/structure/table/woodentable/poker/destroy()
|
||||
new /obj/item/stack/tile/grass(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/poker/narsie_act()
|
||||
return
|
||||
/obj/structure/table/wood/poker/narsie_act()
|
||||
..(FALSE)
|
||||
|
||||
/*
|
||||
* Fancy Tables
|
||||
@@ -421,7 +504,9 @@
|
||||
desc = "A standard metal table frame covered with an amazingly fancy, patterned cloth."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "fancy_table"
|
||||
parts = /obj/item/weapon/table_parts/fancy
|
||||
frame = /obj/structure/table_frame
|
||||
framestack = /obj/item/stack/rods
|
||||
buildstack = /obj/item/stack/tile/carpet
|
||||
canSmoothWith = list(/obj/structure/table/wood/fancy, /obj/structure/table/wood/fancy/black)
|
||||
|
||||
/obj/structure/table/wood/fancy/New()
|
||||
@@ -430,123 +515,82 @@
|
||||
|
||||
/obj/structure/table/wood/fancy/black
|
||||
icon_state = "fancy_table_black"
|
||||
parts = /obj/item/weapon/table_parts/fancy/black
|
||||
buildstack = /obj/item/stack/tile/carpet/black
|
||||
|
||||
/obj/structure/table/wood/fancy/black/New()
|
||||
..()
|
||||
icon = 'icons/obj/smooth_structures/fancy_table_black.dmi' //so that the tables place correctly in the map editor
|
||||
|
||||
|
||||
/*
|
||||
* Glass Tables
|
||||
*/
|
||||
|
||||
/obj/structure/glasstable_frame
|
||||
name = "glass table frame"
|
||||
desc = "A metal frame for a glass table."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "glass_table_frame"
|
||||
density = 1
|
||||
|
||||
/obj/structure/glasstable_frame/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.amount >= 2)
|
||||
to_chat(user, "<span class='notice'>You start to add the glass to \the [src].</span>")
|
||||
if(do_after(user, 10 * G.toolspeed, target = src))
|
||||
G.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the glass to \the [src].</span>")
|
||||
playsound(get_turf(src), G.usesound, 50, 1)
|
||||
new /obj/structure/table/glass(loc)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You don't have enough glass! You need at least 2 sheets.</span>")
|
||||
return
|
||||
|
||||
if(iswrench(I))
|
||||
to_chat(user, "<span class='notice'>You start to deconstruct \the [src].</span>")
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
if(do_after(user, 10 * I.toolspeed, target = src))
|
||||
playsound(src.loc, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass
|
||||
name = "glass table"
|
||||
desc = "Looks fragile. You should totally flip it. It is begging for it."
|
||||
icon = 'icons/obj/smooth_structures/glass_table.dmi'
|
||||
icon_state = "glass_table"
|
||||
parts = /obj/item/weapon/table_parts/glass
|
||||
health = 10
|
||||
canSmoothWith = null
|
||||
|
||||
/obj/structure/table/glass/flip(var/direction)
|
||||
collapse()
|
||||
|
||||
/obj/structure/table/glass/proc/collapse() //glass table collapse is called twice in this code, more efficent to just have a proc
|
||||
src.visible_message("<span class='warning'>\The [src] shatters, and the frame collapses!</span>", "<span class='warning'>You hear metal collapsing and glass shattering.</span>")
|
||||
playsound(src.loc, "shatter", 50, 1)
|
||||
destroy(1)
|
||||
|
||||
/obj/structure/table/glass/destroy(dirty)
|
||||
if(dirty)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
new /obj/item/weapon/shard(loc)
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(loc, 2)
|
||||
..()
|
||||
|
||||
/obj/structure/table/glass/tablepush(obj/item/I, mob/user)
|
||||
if(..())
|
||||
collapse()
|
||||
|
||||
/*
|
||||
* Reinforced tables
|
||||
*/
|
||||
/obj/structure/table/reinforced
|
||||
name = "reinforced table"
|
||||
desc = "A version of the four legged table. It is stronger."
|
||||
desc = "A reinforced version of the four legged table."
|
||||
icon = 'icons/obj/smooth_structures/reinforced_table.dmi'
|
||||
icon_state = "r_table"
|
||||
health = 200
|
||||
var/status = 2
|
||||
parts = /obj/item/weapon/table_parts/reinforced
|
||||
deconstruction_ready = FALSE
|
||||
buildstack = /obj/item/stack/sheet/plasteel
|
||||
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
|
||||
/obj/structure/table/reinforced/flip(var/direction)
|
||||
if(status == 2)
|
||||
/obj/structure/table/reinforced/deconstruction_hints(mob/user)
|
||||
if(deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>The top cover has been <i>welded</i> loose and the main frame's <b>bolts</b> are exposed.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The top cover is firmly <b>welded</b> on.</span>")
|
||||
|
||||
/obj/structure/table/reinforced/flip(direction)
|
||||
if(!deconstruction_ready)
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
if(src.status == 2)
|
||||
to_chat(user, "<span class='notice'>Now weakening the reinforced table</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 50 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>Table weakened</span>")
|
||||
src.status = 1
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
|
||||
if (do_after(user, 50*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You strengthen the table.</span>")
|
||||
deconstruction_ready = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Now strengthening the reinforced table</span>")
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(do_after(user, 50 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
to_chat(user, "<span class='notice'>Table strengthened</span>")
|
||||
src.status = 2
|
||||
return
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
|
||||
if (do_after(user, 50*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weaken the table.</span>")
|
||||
deconstruction_ready = TRUE
|
||||
else
|
||||
. = ..()
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(src.status == 2)
|
||||
return
|
||||
/obj/structure/table/reinforced/brass
|
||||
name = "brass table"
|
||||
desc = "A solid, slightly beveled brass table."
|
||||
icon = 'icons/obj/smooth_structures/brass_table.dmi'
|
||||
icon_state = "brass_table"
|
||||
burn_state = FIRE_PROOF
|
||||
frame = /obj/structure/table_frame/brass
|
||||
framestack = /obj/item/stack/tile/brass
|
||||
buildstack = /obj/item/stack/tile/brass
|
||||
framestackamount = 1
|
||||
buildstackamount = 1
|
||||
canSmoothWith = list(/obj/structure/table/reinforced/brass)
|
||||
|
||||
..()
|
||||
/obj/structure/table/reinforced/brass/narsie_act()
|
||||
take_damage(rand(15, 45), BRUTE)
|
||||
if(src) //do we still exist?
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/table/reinforced/brass/ratvar_act()
|
||||
obj_integrity = max_integrity
|
||||
|
||||
/*
|
||||
* Racks
|
||||
@@ -556,42 +600,42 @@
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
layer = TABLE_LAYER
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
anchored = 1
|
||||
pass_flags = LETPASSTHROW
|
||||
var/parts = /obj/item/weapon/rack_parts
|
||||
var/health = 5
|
||||
max_integrity = 20
|
||||
|
||||
/obj/structure/rack/proc/destroy()
|
||||
new parts(loc)
|
||||
density = 0
|
||||
qdel(src)
|
||||
/obj/structure/rack/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
|
||||
|
||||
/obj/structure/rack/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2.0)
|
||||
if(2)
|
||||
qdel(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
if(3.0)
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
if(3)
|
||||
if(prob(25))
|
||||
qdel(src)
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
|
||||
/obj/structure/rack/blob_act()
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
return
|
||||
else if(prob(50))
|
||||
new /obj/item/weapon/rack_parts(src.loc)
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
if(height==0)
|
||||
return 1
|
||||
if(density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
@@ -606,7 +650,7 @@
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
/obj/structure/rack/MouseDrop_T(obj/O as obj, mob/user as mob)
|
||||
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
|
||||
if((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
@@ -615,13 +659,11 @@
|
||||
return
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
return
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/weapon/rack_parts( src.loc )
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
qdel(src)
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iswrench(W) && can_deconstruct)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
@@ -634,38 +676,47 @@
|
||||
if(HULK in user.mutations)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
destroy()
|
||||
deconstruct()
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='danger'>You kick [src].</span>")
|
||||
health -= rand(1,2)
|
||||
obj_integrity -= rand(1,2)
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/rack/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
destroy()
|
||||
if(obj_integrity <= 0)
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 40, 1)
|
||||
|
||||
/obj/structure/rack/skeletal_bar
|
||||
name = "skeletal minibar"
|
||||
@@ -678,3 +729,49 @@
|
||||
|
||||
/obj/structure/rack/skeletal_bar/right
|
||||
icon_state = "minibar_right"
|
||||
|
||||
/*
|
||||
* Rack destruction
|
||||
*/
|
||||
|
||||
/obj/structure/rack/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
density = FALSE
|
||||
var/obj/item/weapon/rack_parts/newparts = new(loc)
|
||||
transfer_fingerprints_to(newparts)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
/obj/item/weapon/rack_parts
|
||||
name = "rack parts"
|
||||
desc = "Parts of a rack."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rack_parts"
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=2000)
|
||||
var/building = FALSE
|
||||
|
||||
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iswrench(W))
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/rack_parts/attack_self(mob/user)
|
||||
if(building)
|
||||
return
|
||||
building = TRUE
|
||||
to_chat(user, "<span class='notice'>You start constructing a rack...</span>")
|
||||
if(do_after(user, 50, target = user, progress=TRUE))
|
||||
if(!user.drop_item(src))
|
||||
return
|
||||
var/obj/structure/rack/R = new /obj/structure/rack(user.loc)
|
||||
user.visible_message("<span class='notice'>[user] assembles \a [R].\
|
||||
</span>", "<span class='notice'>You assemble \a [R].</span>")
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
building = FALSE
|
||||
|
||||
@@ -252,8 +252,8 @@
|
||||
|
||||
/obj/machinery/shower/New(turf/T, newdir = SOUTH, building = FALSE)
|
||||
..()
|
||||
dir = newdir
|
||||
if(building)
|
||||
dir = newdir
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
switch(newdir)
|
||||
@@ -349,6 +349,8 @@
|
||||
qdel(mymist)
|
||||
ismist = 0
|
||||
return
|
||||
if(mymist)
|
||||
return
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else
|
||||
|
||||
@@ -180,7 +180,8 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
|
||||
|
||||
/obj/structure/window/attackby(obj/item/I as obj, mob/living/user as mob, params)
|
||||
if(!istype(I)) return//I really wish I did not need this
|
||||
if(!istype(I))
|
||||
return//I really wish I did not need this
|
||||
if(istype(I, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = I
|
||||
if(istype(G.affecting,/mob/living))
|
||||
@@ -209,67 +210,97 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
M.apply_damage(30)
|
||||
hit(75)
|
||||
return
|
||||
if(I.flags & NOBLUDGEON)
|
||||
return
|
||||
|
||||
if(I.flags & NOBLUDGEON) return
|
||||
if(handle_decon(I, user, is_fulltile()))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>"))
|
||||
else if(reinf && state == 0)
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
hit(I.force)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
..()
|
||||
|
||||
/obj/structure/window/proc/handle_decon(obj/item/weapon/W, mob/user, var/takes_time = FALSE)
|
||||
//screwdriver
|
||||
if(isscrewdriver(W))
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
if(reinf)
|
||||
if(state == 0)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You have [anchored? "fastened the frame to" : "unfastened the frame from"] the floor.</span>")
|
||||
if(state >= 1)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to [(state == 1) ? "fasten the window to" : "unfasten the window from"] the frame.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
state = 3 - state
|
||||
to_chat(user, "<span class='notice'>You have [(state == 1) ? "unfastened the window from" : "fastened the window to"] the frame.</span>")
|
||||
else
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unfasten the frame from" : "fasten the frame to"] the floor.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>"))
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>"))
|
||||
else if(istype(I, /obj/item/weapon/crowbar) && reinf && state <= 1)
|
||||
to_chat(user, "<span class='notice'>You have [anchored ? "fastened the window to" : "unfastened the window from"] the floor.</span>")
|
||||
return 1
|
||||
//crowbar
|
||||
if(iscrowbar(W))
|
||||
if(!reinf || state > 1)
|
||||
return 0
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to pry the window [state ? "out of" : "in to"] the frame.</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
state = 1 - state
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>"))
|
||||
else if(istype(I, /obj/item/weapon/wrench) && !anchored && health > 7) //Disassemble deconstructed window into parts
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
for(var/i=0;i<sheets;i++)
|
||||
var/obj/item/stack/sheet/glass/NG = new glasstype(src.loc)
|
||||
for(var/obj/item/stack/sheet/glass/G in src.loc) //Stack em up
|
||||
if(G==NG)
|
||||
to_chat(user, "<span class='notice'>You have pried the window [state ? "into" : "out of"] the frame.</span>")
|
||||
return 1
|
||||
//wrench
|
||||
if(iswrench(W))
|
||||
if(anchored)
|
||||
return 0
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(takes_time)
|
||||
to_chat(user, "<span class='notice'>You begin to disassemble [src]...</span>")
|
||||
if(!do_after(user, 20 * W.toolspeed, target = src))
|
||||
return 1
|
||||
for(var/i=0; i<sheets; i++)
|
||||
var/obj/item/stack/sheet/NS = new glasstype(get_turf(src)) //glass types don't share a base tye of /glass, so this didn't work for plasma glass
|
||||
for(var/obj/item/stack/sheet/S in loc) //Stack em up
|
||||
if(S == NS)
|
||||
continue
|
||||
if(G.amount>=G.max_amount)
|
||||
if(S.amount >= S.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user, params)
|
||||
S.attackby(NS, user)
|
||||
|
||||
if(reinf)
|
||||
var/obj/item/stack/rods/NR = new (src.loc)
|
||||
for(var/obj/item/stack/rods/R in src.loc)
|
||||
if(R==NR)
|
||||
var/obj/item/stack/rods/NR = new (get_turf(src))
|
||||
for(var/obj/item/stack/rods/R in loc)
|
||||
if(R == NR)
|
||||
continue
|
||||
if(R.amount>=R.max_amount)
|
||||
if(R.amount >= R.max_amount)
|
||||
continue
|
||||
R.attackby(NR, user, params)
|
||||
R.attackby(NR, user)
|
||||
|
||||
to_chat(user, "<span class='notice'>You have disassembled the window.</span>")
|
||||
to_chat(user, "<span class='notice'>You have disassembled [src].</span>")
|
||||
disassembled = 1
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
update_nearby_icons()
|
||||
qdel(src)
|
||||
else
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
hit(I.force)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
..()
|
||||
return
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/window/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
|
||||
Reference in New Issue
Block a user