mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
File standardisation (#13131)
* Adds the check components * Adds in trailing newlines * Converts all CRLF to LF * Post merge EOF * Post merge line endings * Final commit
This commit is contained in:
@@ -1,334 +1,334 @@
|
||||
/* Alien shit!
|
||||
* Contains:
|
||||
* structure/alien
|
||||
* Resin
|
||||
* Weeds
|
||||
* Egg
|
||||
*/
|
||||
|
||||
#define WEED_NORTH_EDGING "north"
|
||||
#define WEED_SOUTH_EDGING "south"
|
||||
#define WEED_EAST_EDGING "east"
|
||||
#define WEED_WEST_EDGING "west"
|
||||
|
||||
/obj/structure/alien
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
max_integrity = 100
|
||||
|
||||
/obj/structure/alien/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee")
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
damage_amount *= 0.25
|
||||
if(BURN)
|
||||
damage_amount *= 2
|
||||
. = ..()
|
||||
|
||||
/obj/structure/alien/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/*
|
||||
* Resin
|
||||
*/
|
||||
/obj/structure/alien/resin
|
||||
name = "resin"
|
||||
desc = "Looks like some kind of thick resin."
|
||||
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
|
||||
icon_state = "resin"
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
anchored = TRUE
|
||||
canSmoothWith = list(/obj/structure/alien/resin)
|
||||
max_integrity = 200
|
||||
smooth = SMOOTH_TRUE
|
||||
var/resintype = null
|
||||
|
||||
/obj/structure/alien/resin/Initialize()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
/obj/structure/alien/resin/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
. = ..()
|
||||
T.air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/alien/resin/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/alien/resin/CanAtmosPass()
|
||||
return !density
|
||||
|
||||
/obj/structure/alien/resin/wall
|
||||
name = "resin wall"
|
||||
desc = "Thick resin solidified into a wall."
|
||||
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
|
||||
icon_state = "wall0" //same as resin, but consistency ho!
|
||||
resintype = "wall"
|
||||
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
|
||||
|
||||
/obj/structure/alien/resin/wall/BlockSuperconductivity()
|
||||
return 1
|
||||
|
||||
/obj/structure/alien/resin/wall/shadowling //For chrysalis
|
||||
name = "chrysalis wall"
|
||||
desc = "Some sort of purple substance in an egglike shape. It pulses and throbs from within and seems impenetrable."
|
||||
max_integrity = INFINITY
|
||||
|
||||
/obj/structure/alien/resin/membrane
|
||||
name = "resin membrane"
|
||||
desc = "Resin just thin enough to let light pass through."
|
||||
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
|
||||
icon_state = "membrane0"
|
||||
opacity = 0
|
||||
max_integrity = 160
|
||||
resintype = "membrane"
|
||||
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
|
||||
|
||||
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
|
||||
/*
|
||||
* Weeds
|
||||
*/
|
||||
|
||||
#define NODERANGE 3
|
||||
|
||||
/obj/structure/alien/weeds
|
||||
gender = PLURAL
|
||||
name = "resin floor"
|
||||
desc = "A thick resin surface covers the floor."
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = TURF_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
icon_state = "weeds"
|
||||
max_integrity = 15
|
||||
var/obj/structure/alien/weeds/node/linked_node = null
|
||||
var/static/list/weedImageCache
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/New(pos, node)
|
||||
..()
|
||||
linked_node = node
|
||||
if(istype(loc, /turf/space))
|
||||
qdel(src)
|
||||
return
|
||||
if(icon_state == "weeds")
|
||||
icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
fullUpdateWeedOverlays()
|
||||
spawn(rand(150, 200))
|
||||
if(src)
|
||||
Life()
|
||||
|
||||
/obj/structure/alien/weeds/Destroy()
|
||||
var/turf/T = loc
|
||||
for(var/obj/structure/alien/weeds/W in range(1,T))
|
||||
W.updateWeedOverlays()
|
||||
linked_node = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/alien/weeds/proc/Life()
|
||||
set background = BACKGROUND_ENABLED
|
||||
var/turf/U = get_turf(src)
|
||||
|
||||
if(istype(U, /turf/space))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!linked_node || get_dist(linked_node, src) > linked_node.node_range)
|
||||
return
|
||||
|
||||
for(var/turf/T in U.GetAtmosAdjacentTurfs())
|
||||
|
||||
if(locate(/obj/structure/alien/weeds) in T || istype(T, /turf/space))
|
||||
continue
|
||||
|
||||
new /obj/structure/alien/weeds(T, linked_node)
|
||||
|
||||
/obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/alien/weeds/proc/updateWeedOverlays()
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
if(!weedImageCache || !weedImageCache.len)
|
||||
weedImageCache = list()
|
||||
weedImageCache.len = 4
|
||||
weedImageCache[WEED_NORTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_n", layer=2.11, pixel_y = -32)
|
||||
weedImageCache[WEED_SOUTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_s", layer=2.11, pixel_y = 32)
|
||||
weedImageCache[WEED_EAST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_e", layer=2.11, pixel_x = -32)
|
||||
weedImageCache[WEED_WEST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_w", layer=2.11, pixel_x = 32)
|
||||
|
||||
var/turf/N = get_step(src, NORTH)
|
||||
var/turf/S = get_step(src, SOUTH)
|
||||
var/turf/E = get_step(src, EAST)
|
||||
var/turf/W = get_step(src, WEST)
|
||||
if(!locate(/obj/structure/alien) in N.contents)
|
||||
if(istype(N, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_SOUTH_EDGING]
|
||||
if(!locate(/obj/structure/alien) in S.contents)
|
||||
if(istype(S, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_NORTH_EDGING]
|
||||
if(!locate(/obj/structure/alien) in E.contents)
|
||||
if(istype(E, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_WEST_EDGING]
|
||||
if(!locate(/obj/structure/alien) in W.contents)
|
||||
if(istype(W, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_EAST_EDGING]
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
|
||||
for(var/obj/structure/alien/weeds/W in range(1,src))
|
||||
W.updateWeedOverlays()
|
||||
|
||||
//Weed nodes
|
||||
/obj/structure/alien/weeds/node
|
||||
name = "glowing resin"
|
||||
desc = "Blue bioluminescence shines from beneath the surface."
|
||||
icon_state = "weednode"
|
||||
light_range = 1
|
||||
var/node_range = NODERANGE
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/node/New()
|
||||
..(loc, src)
|
||||
|
||||
#undef NODERANGE
|
||||
|
||||
|
||||
/*
|
||||
* Egg
|
||||
*/
|
||||
|
||||
//for the status var
|
||||
#define BURST 0
|
||||
#define BURSTING 1
|
||||
#define GROWING 2
|
||||
#define GROWN 3
|
||||
#define MIN_GROWTH_TIME 1800 //time it takes to grow a hugger
|
||||
#define MAX_GROWTH_TIME 3000
|
||||
|
||||
/obj/structure/alien/egg
|
||||
name = "egg"
|
||||
desc = "A large mottled egg."
|
||||
icon_state = "egg_growing"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
max_integrity = 100
|
||||
integrity_failure = 5
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
layer = MOB_LAYER
|
||||
|
||||
/obj/structure/alien/egg/grown
|
||||
status = GROWN
|
||||
icon_state = "egg"
|
||||
|
||||
/obj/structure/alien/egg/burst
|
||||
status = BURST
|
||||
icon_state = "egg_hatched"
|
||||
|
||||
/obj/structure/alien/egg/New()
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
..()
|
||||
if(status == BURST)
|
||||
obj_integrity = integrity_failure
|
||||
else if(status != GROWN)
|
||||
spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
|
||||
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/alien/egg/attack_hand(mob/living/user)
|
||||
if(user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
to_chat(user, "<span class='notice'>You clear the hatched egg.</span>")
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(GROWING)
|
||||
to_chat(user, "<span class='notice'>The child is not developed yet.</span>")
|
||||
return
|
||||
if(GROWN)
|
||||
to_chat(user, "<span class='notice'>You retrieve the child.</span>")
|
||||
Burst(0)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It feels slimy.</span>")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
|
||||
/obj/structure/alien/egg/proc/GetFacehugger()
|
||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||
|
||||
/obj/structure/alien/egg/proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
|
||||
/obj/structure/alien/egg/proc/Burst(kill = TRUE) //drops and kills the hugger if any is remaining
|
||||
if(status == GROWN || status == GROWING)
|
||||
icon_state = "egg_hatched"
|
||||
flick("egg_opening", src)
|
||||
status = BURSTING
|
||||
spawn(15)
|
||||
status = BURST
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
if(child)
|
||||
child.loc = get_turf(src)
|
||||
if(kill && istype(child))
|
||||
child.Die()
|
||||
else
|
||||
for(var/mob/M in range(1,src))
|
||||
if(CanHug(M))
|
||||
child.Attach(M)
|
||||
break
|
||||
|
||||
/obj/structure/alien/egg/obj_break(damage_flag)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(status != BURST)
|
||||
Burst(kill = TRUE)
|
||||
|
||||
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 500)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/alien/egg/HasProximity(atom/movable/AM)
|
||||
if(status == GROWN)
|
||||
if(!CanHug(AM))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = AM
|
||||
if(C.stat == CONSCIOUS && C.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo))
|
||||
return
|
||||
|
||||
Burst(0)
|
||||
|
||||
#undef BURST
|
||||
#undef BURSTING
|
||||
#undef GROWING
|
||||
#undef GROWN
|
||||
#undef MIN_GROWTH_TIME
|
||||
#undef MAX_GROWTH_TIME
|
||||
|
||||
#undef WEED_NORTH_EDGING
|
||||
#undef WEED_SOUTH_EDGING
|
||||
#undef WEED_EAST_EDGING
|
||||
#undef WEED_WEST_EDGING
|
||||
/* Alien shit!
|
||||
* Contains:
|
||||
* structure/alien
|
||||
* Resin
|
||||
* Weeds
|
||||
* Egg
|
||||
*/
|
||||
|
||||
#define WEED_NORTH_EDGING "north"
|
||||
#define WEED_SOUTH_EDGING "south"
|
||||
#define WEED_EAST_EDGING "east"
|
||||
#define WEED_WEST_EDGING "west"
|
||||
|
||||
/obj/structure/alien
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
max_integrity = 100
|
||||
|
||||
/obj/structure/alien/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee")
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
damage_amount *= 0.25
|
||||
if(BURN)
|
||||
damage_amount *= 2
|
||||
. = ..()
|
||||
|
||||
/obj/structure/alien/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/*
|
||||
* Resin
|
||||
*/
|
||||
/obj/structure/alien/resin
|
||||
name = "resin"
|
||||
desc = "Looks like some kind of thick resin."
|
||||
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
|
||||
icon_state = "resin"
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
anchored = TRUE
|
||||
canSmoothWith = list(/obj/structure/alien/resin)
|
||||
max_integrity = 200
|
||||
smooth = SMOOTH_TRUE
|
||||
var/resintype = null
|
||||
|
||||
/obj/structure/alien/resin/Initialize()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
/obj/structure/alien/resin/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
. = ..()
|
||||
T.air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/alien/resin/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/alien/resin/CanAtmosPass()
|
||||
return !density
|
||||
|
||||
/obj/structure/alien/resin/wall
|
||||
name = "resin wall"
|
||||
desc = "Thick resin solidified into a wall."
|
||||
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
|
||||
icon_state = "wall0" //same as resin, but consistency ho!
|
||||
resintype = "wall"
|
||||
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
|
||||
|
||||
/obj/structure/alien/resin/wall/BlockSuperconductivity()
|
||||
return 1
|
||||
|
||||
/obj/structure/alien/resin/wall/shadowling //For chrysalis
|
||||
name = "chrysalis wall"
|
||||
desc = "Some sort of purple substance in an egglike shape. It pulses and throbs from within and seems impenetrable."
|
||||
max_integrity = INFINITY
|
||||
|
||||
/obj/structure/alien/resin/membrane
|
||||
name = "resin membrane"
|
||||
desc = "Resin just thin enough to let light pass through."
|
||||
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
|
||||
icon_state = "membrane0"
|
||||
opacity = 0
|
||||
max_integrity = 160
|
||||
resintype = "membrane"
|
||||
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
|
||||
|
||||
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
|
||||
/*
|
||||
* Weeds
|
||||
*/
|
||||
|
||||
#define NODERANGE 3
|
||||
|
||||
/obj/structure/alien/weeds
|
||||
gender = PLURAL
|
||||
name = "resin floor"
|
||||
desc = "A thick resin surface covers the floor."
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = TURF_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
icon_state = "weeds"
|
||||
max_integrity = 15
|
||||
var/obj/structure/alien/weeds/node/linked_node = null
|
||||
var/static/list/weedImageCache
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/New(pos, node)
|
||||
..()
|
||||
linked_node = node
|
||||
if(istype(loc, /turf/space))
|
||||
qdel(src)
|
||||
return
|
||||
if(icon_state == "weeds")
|
||||
icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
fullUpdateWeedOverlays()
|
||||
spawn(rand(150, 200))
|
||||
if(src)
|
||||
Life()
|
||||
|
||||
/obj/structure/alien/weeds/Destroy()
|
||||
var/turf/T = loc
|
||||
for(var/obj/structure/alien/weeds/W in range(1,T))
|
||||
W.updateWeedOverlays()
|
||||
linked_node = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/alien/weeds/proc/Life()
|
||||
set background = BACKGROUND_ENABLED
|
||||
var/turf/U = get_turf(src)
|
||||
|
||||
if(istype(U, /turf/space))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!linked_node || get_dist(linked_node, src) > linked_node.node_range)
|
||||
return
|
||||
|
||||
for(var/turf/T in U.GetAtmosAdjacentTurfs())
|
||||
|
||||
if(locate(/obj/structure/alien/weeds) in T || istype(T, /turf/space))
|
||||
continue
|
||||
|
||||
new /obj/structure/alien/weeds(T, linked_node)
|
||||
|
||||
/obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/alien/weeds/proc/updateWeedOverlays()
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
if(!weedImageCache || !weedImageCache.len)
|
||||
weedImageCache = list()
|
||||
weedImageCache.len = 4
|
||||
weedImageCache[WEED_NORTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_n", layer=2.11, pixel_y = -32)
|
||||
weedImageCache[WEED_SOUTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_s", layer=2.11, pixel_y = 32)
|
||||
weedImageCache[WEED_EAST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_e", layer=2.11, pixel_x = -32)
|
||||
weedImageCache[WEED_WEST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_w", layer=2.11, pixel_x = 32)
|
||||
|
||||
var/turf/N = get_step(src, NORTH)
|
||||
var/turf/S = get_step(src, SOUTH)
|
||||
var/turf/E = get_step(src, EAST)
|
||||
var/turf/W = get_step(src, WEST)
|
||||
if(!locate(/obj/structure/alien) in N.contents)
|
||||
if(istype(N, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_SOUTH_EDGING]
|
||||
if(!locate(/obj/structure/alien) in S.contents)
|
||||
if(istype(S, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_NORTH_EDGING]
|
||||
if(!locate(/obj/structure/alien) in E.contents)
|
||||
if(istype(E, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_WEST_EDGING]
|
||||
if(!locate(/obj/structure/alien) in W.contents)
|
||||
if(istype(W, /turf/simulated/floor))
|
||||
overlays += weedImageCache[WEED_EAST_EDGING]
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
|
||||
for(var/obj/structure/alien/weeds/W in range(1,src))
|
||||
W.updateWeedOverlays()
|
||||
|
||||
//Weed nodes
|
||||
/obj/structure/alien/weeds/node
|
||||
name = "glowing resin"
|
||||
desc = "Blue bioluminescence shines from beneath the surface."
|
||||
icon_state = "weednode"
|
||||
light_range = 1
|
||||
var/node_range = NODERANGE
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/node/New()
|
||||
..(loc, src)
|
||||
|
||||
#undef NODERANGE
|
||||
|
||||
|
||||
/*
|
||||
* Egg
|
||||
*/
|
||||
|
||||
//for the status var
|
||||
#define BURST 0
|
||||
#define BURSTING 1
|
||||
#define GROWING 2
|
||||
#define GROWN 3
|
||||
#define MIN_GROWTH_TIME 1800 //time it takes to grow a hugger
|
||||
#define MAX_GROWTH_TIME 3000
|
||||
|
||||
/obj/structure/alien/egg
|
||||
name = "egg"
|
||||
desc = "A large mottled egg."
|
||||
icon_state = "egg_growing"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
max_integrity = 100
|
||||
integrity_failure = 5
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
layer = MOB_LAYER
|
||||
|
||||
/obj/structure/alien/egg/grown
|
||||
status = GROWN
|
||||
icon_state = "egg"
|
||||
|
||||
/obj/structure/alien/egg/burst
|
||||
status = BURST
|
||||
icon_state = "egg_hatched"
|
||||
|
||||
/obj/structure/alien/egg/New()
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
..()
|
||||
if(status == BURST)
|
||||
obj_integrity = integrity_failure
|
||||
else if(status != GROWN)
|
||||
spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
|
||||
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/alien/egg/attack_hand(mob/living/user)
|
||||
if(user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
to_chat(user, "<span class='notice'>You clear the hatched egg.</span>")
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(GROWING)
|
||||
to_chat(user, "<span class='notice'>The child is not developed yet.</span>")
|
||||
return
|
||||
if(GROWN)
|
||||
to_chat(user, "<span class='notice'>You retrieve the child.</span>")
|
||||
Burst(0)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It feels slimy.</span>")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
|
||||
/obj/structure/alien/egg/proc/GetFacehugger()
|
||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||
|
||||
/obj/structure/alien/egg/proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
|
||||
/obj/structure/alien/egg/proc/Burst(kill = TRUE) //drops and kills the hugger if any is remaining
|
||||
if(status == GROWN || status == GROWING)
|
||||
icon_state = "egg_hatched"
|
||||
flick("egg_opening", src)
|
||||
status = BURSTING
|
||||
spawn(15)
|
||||
status = BURST
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
if(child)
|
||||
child.loc = get_turf(src)
|
||||
if(kill && istype(child))
|
||||
child.Die()
|
||||
else
|
||||
for(var/mob/M in range(1,src))
|
||||
if(CanHug(M))
|
||||
child.Attach(M)
|
||||
break
|
||||
|
||||
/obj/structure/alien/egg/obj_break(damage_flag)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(status != BURST)
|
||||
Burst(kill = TRUE)
|
||||
|
||||
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 500)
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/alien/egg/HasProximity(atom/movable/AM)
|
||||
if(status == GROWN)
|
||||
if(!CanHug(AM))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = AM
|
||||
if(C.stat == CONSCIOUS && C.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo))
|
||||
return
|
||||
|
||||
Burst(0)
|
||||
|
||||
#undef BURST
|
||||
#undef BURSTING
|
||||
#undef GROWING
|
||||
#undef GROWN
|
||||
#undef MIN_GROWTH_TIME
|
||||
#undef MAX_GROWTH_TIME
|
||||
|
||||
#undef WEED_NORTH_EDGING
|
||||
#undef WEED_SOUTH_EDGING
|
||||
#undef WEED_EAST_EDGING
|
||||
#undef WEED_WEST_EDGING
|
||||
|
||||
@@ -1,332 +1,332 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
BEDSHEETS
|
||||
LINEN BINS
|
||||
*/
|
||||
|
||||
/obj/item/bedsheet
|
||||
name = "bedsheet"
|
||||
desc = "A surprisingly soft linen bedsheet."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "sheet"
|
||||
item_state = "bedsheet"
|
||||
layer = 4.0
|
||||
throwforce = 1
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
item_color = "white"
|
||||
resistance_flags = FLAMMABLE
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
dog_fashion = /datum/dog_fashion/head/ghost
|
||||
var/list/dream_messages = list("white")
|
||||
var/list/nightmare_messages = list("black")
|
||||
var/comfort = 0.5
|
||||
|
||||
|
||||
|
||||
/obj/item/bedsheet/attack_self(mob/user as mob)
|
||||
user.drop_item()
|
||||
if(layer == initial(layer))
|
||||
layer = 5
|
||||
else
|
||||
layer = initial(layer)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
if(I.sharp)
|
||||
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
|
||||
transfer_fingerprints_to(C)
|
||||
C.add_fingerprint(user)
|
||||
qdel(src)
|
||||
to_chat(user, "<span class='notice'>You tear [src] up.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/bedsheet/blue
|
||||
icon_state = "sheetblue"
|
||||
item_color = "blue"
|
||||
dream_messages = list("blue")
|
||||
nightmare_messages = list("vox blood")
|
||||
|
||||
/obj/item/bedsheet/green
|
||||
icon_state = "sheetgreen"
|
||||
item_color = "green"
|
||||
dream_messages = list("green")
|
||||
nightmare_messages = list("unathi flesh")
|
||||
|
||||
/obj/item/bedsheet/orange
|
||||
icon_state = "sheetorange"
|
||||
item_color = "orange"
|
||||
dream_messages = list("orange")
|
||||
nightmare_messages = list("exploding fruit")
|
||||
|
||||
/obj/item/bedsheet/purple
|
||||
icon_state = "sheetpurple"
|
||||
item_color = "purple"
|
||||
dream_messages = list("purple")
|
||||
nightmare_messages = list("Grey blood")
|
||||
|
||||
/obj/item/bedsheet/patriot
|
||||
name = "patriotic bedsheet"
|
||||
desc = "You've never felt more free than when sleeping on this."
|
||||
icon_state = "sheetUSA"
|
||||
item_color = "sheetUSA"
|
||||
dream_messages = list("America", "freedom", "fireworks", "bald eagles")
|
||||
nightmare_messages = list("communism")
|
||||
|
||||
/obj/item/bedsheet/rainbow
|
||||
name = "rainbow bedsheet"
|
||||
desc = "A multi_colored blanket. It's actually several different sheets cut up and sewn together."
|
||||
icon_state = "sheetrainbow"
|
||||
item_color = "rainbow"
|
||||
dream_messages = list("red", "orange", "yellow", "green", "blue", "purple", "a rainbow")
|
||||
nightmare_messages = list("green", "a cluwne", "fLoOr ClUwNe")
|
||||
|
||||
/obj/item/bedsheet/red
|
||||
icon_state = "sheetred"
|
||||
item_color = "red"
|
||||
dream_messages = list("red")
|
||||
nightmare_messages = list("gibs")
|
||||
|
||||
/obj/item/bedsheet/yellow
|
||||
icon_state = "sheetyellow"
|
||||
item_color = "yellow"
|
||||
dream_messages = list("yellow")
|
||||
nightmare_messages = list("locker full of banana peels")
|
||||
|
||||
/obj/item/bedsheet/black
|
||||
icon_state = "sheetblack"
|
||||
item_color = "sheetblack"
|
||||
dream_messages = list("black")
|
||||
nightmare_messages = list("the void of space")
|
||||
|
||||
/obj/item/bedsheet/mime
|
||||
name = "mime's blanket"
|
||||
desc = "A very soothing striped blanket. All the noise just seems to fade out when you're under the covers in this."
|
||||
icon_state = "sheetmime"
|
||||
item_color = "mime"
|
||||
dream_messages = list("silence", "gestures", "a pale face", "a gaping mouth", "the mime")
|
||||
nightmare_messages = list("honk", "laughter", "a prank", "a joke", "a smiling face", "the clown")
|
||||
|
||||
/obj/item/bedsheet/clown
|
||||
name = "clown's blanket"
|
||||
desc = "A rainbow blanket with a clown mask woven in. It smells faintly of bananas."
|
||||
icon_state = "sheetclown"
|
||||
item_color = "clown"
|
||||
dream_messages = list("honk", "laughter", "a prank", "a joke", "a smiling face", "the clown")
|
||||
nightmare_messages = list("silence", "gestures", "a pale face", "a gaping mouth", "the mime")
|
||||
|
||||
/obj/item/bedsheet/captain
|
||||
name = "captain's bedsheet."
|
||||
desc = "It has a Nanotrasen symbol on it, and was woven with a revolutionary new kind of thread guaranteed to have 0.01% permeability for most non-chemical substances, popular among most modern captains."
|
||||
icon_state = "sheetcaptain"
|
||||
item_color = "captain"
|
||||
dream_messages = list("authority", "a golden ID", "sunglasses", "a green disc", "an antique gun", "the captain")
|
||||
nightmare_messages = list("comdom", "clown with all access", "the syndicate")
|
||||
|
||||
/obj/item/bedsheet/rd
|
||||
name = "research director's bedsheet"
|
||||
desc = "It appears to have a beaker emblem, and is made out of fire-resistant material, although it probably won't protect you in the event of fires you're familiar with every day."
|
||||
icon_state = "sheetrd"
|
||||
item_color = "director"
|
||||
dream_messages = list("authority", "a silvery ID", "a bomb", "a mech", "a facehugger", "maniacal laughter", "the research director")
|
||||
nightmare_messages = list("toxins full of plasma", "UPGRADE THE SLEEPERS", "rogue ai")
|
||||
|
||||
/obj/item/bedsheet/rd/royal_cape
|
||||
name = "Royal Cape of the Liberator"
|
||||
desc = "Majestic."
|
||||
dream_messages = list("mining", "stone", "a golem", "freedom", "doing whatever")
|
||||
|
||||
/obj/item/bedsheet/medical
|
||||
name = "medical blanket"
|
||||
desc = "It's a sterilized* blanket commonly used in the Medbay. *Sterilization is voided if a virologist is present onboard the station."
|
||||
icon_state = "sheetmedical"
|
||||
item_color = "medical"
|
||||
dream_messages = list("healing", "life", "surgery", "a doctor")
|
||||
nightmare_messages = list("death", "no cryox", "cryo is off")
|
||||
|
||||
/obj/item/bedsheet/cmo
|
||||
name = "chief medical officer's bedsheet"
|
||||
desc = "It's a sterilized blanket that has a cross emblem. There's some cat fur on it, likely from Runtime."
|
||||
icon_state = "sheetcmo"
|
||||
item_color = "cmo"
|
||||
dream_messages = list("authority", "a silvery ID", "healing", "life", "surgery", "a cat", "the chief medical officer")
|
||||
nightmare_messages = list("chemists making meth", "cryo it off", "where is the defib", "no biomass")
|
||||
|
||||
/obj/item/bedsheet/hos
|
||||
name = "head of security's bedsheet"
|
||||
desc = "It is decorated with a shield emblem. While crime doesn't sleep, you do, but you are still THE LAW!"
|
||||
icon_state = "sheethos"
|
||||
item_color = "hosred"
|
||||
dream_messages = list("authority", "a silvery ID", "handcuffs", "a baton", "a flashbang", "sunglasses", "the head of security")
|
||||
nightmare_messages = list("the clown", "a toolbox", "sHiTcUrItY", "why did you put them in for 50 minutes")
|
||||
|
||||
|
||||
/obj/item/bedsheet/hop
|
||||
name = "head of personnel's bedsheet"
|
||||
desc = "It is decorated with a key emblem. For those rare moments when you can rest and cuddle with Ian without someone screaming for you over the radio."
|
||||
icon_state = "sheethop"
|
||||
item_color = "hop"
|
||||
dream_messages = list("authority", "a silvery ID", "obligation", "a computer", "an ID", "a corgi", "the head of personnel")
|
||||
nightmare_messages = list("improper paperwork", "all access clown", "50 open clown slots", "dead ian")
|
||||
|
||||
/obj/item/bedsheet/ce
|
||||
name = "chief engineer's bedsheet"
|
||||
desc = "It is decorated with a wrench emblem. It's highly reflective and stain resistant, so you don't need to worry about ruining it with oil."
|
||||
icon_state = "sheetce"
|
||||
item_color = "chief"
|
||||
dream_messages = list("authority", "a silvery ID", "the engine", "power tools", "an APC", "a parrot", "the chief engineer")
|
||||
nightmare_messages = list("forced airlock", "syndicate bomb", "explosion in research chem", "iT's LoOsE")
|
||||
|
||||
/obj/item/bedsheet/qm
|
||||
name = "quartermaster's bedsheet"
|
||||
desc = "It is decorated with a crate emblem in silver lining. It's rather tough, and just the thing to lie on after a hard day of pushing paper."
|
||||
icon_state = "sheetqm"
|
||||
item_color = "qm"
|
||||
dream_messages = list("a grey ID", "a shuttle", "a crate", "a sloth", "the quartermaster")
|
||||
nightmare_messages = list("a bald person", "no points", "wheres the ore", "space carp")
|
||||
|
||||
/obj/item/bedsheet/brown
|
||||
icon_state = "sheetbrown"
|
||||
item_color = "cargo"
|
||||
dream_messages = list("brown")
|
||||
nightmare_messages = list("dead monkey")
|
||||
|
||||
/obj/item/bedsheet/centcom
|
||||
name = "centcom bedsheet"
|
||||
desc = "Woven with advanced nanothread for warmth as well as being very decorated, essential for all officials."
|
||||
icon_state = "sheetcentcom"
|
||||
item_color = "centcom"
|
||||
dream_messages = list("a unique ID", "authority", "artillery", "an ending")
|
||||
nightmare_messages = list("a butt fax")
|
||||
|
||||
/obj/item/bedsheet/syndie
|
||||
name = "syndicate bedsheet"
|
||||
desc = "It has a syndicate emblem and it has an aura of evil."
|
||||
icon_state = "sheetsyndie"
|
||||
item_color = "syndie"
|
||||
dream_messages = list("a green disc", "a red crystal", "a glowing blade", "a wire-covered ID")
|
||||
nightmare_messages = list("stunbaton", "taser", "lasers", "a toolbox")
|
||||
|
||||
/obj/item/bedsheet/cult
|
||||
name = "cultist's bedsheet"
|
||||
desc = "You might dream of Nar'Sie if you sleep with this. It seems rather tattered and glows of an eldritch presence."
|
||||
icon_state = "sheetcult"
|
||||
item_color = "cult"
|
||||
dream_messages = list("a tome", "a floating red crystal", "a glowing sword", "a bloody symbol", "a massive humanoid figure")
|
||||
nightmare_messages = list("a tome", "a floating red crystal", "a glowing sword", "a bloody symbol", "a massive humanoid figure")
|
||||
|
||||
|
||||
/obj/item/bedsheet/wiz
|
||||
name = "wizard's bedsheet"
|
||||
desc = "A special fabric enchanted with magic so you can have an enchanted night. It even glows!"
|
||||
icon_state = "sheetwiz"
|
||||
item_color = "wiz"
|
||||
dream_messages = list("a book", "an explosion", "lightning", "a staff", "a skeleton", "a robe", "magic")
|
||||
nightmare_messages = list("a toolbox", "solars")
|
||||
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin
|
||||
name = "linen bin"
|
||||
desc = "A linen bin. It looks rather cosy."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "linenbin-full"
|
||||
anchored = 1
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
var/amount = 20
|
||||
var/list/sheets = list()
|
||||
var/obj/item/hidden = null
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/examine(mob/user)
|
||||
. = ..()
|
||||
if(amount < 1)
|
||||
. += "There are no bed sheets in the bin."
|
||||
else if(amount == 1)
|
||||
. += "There is one bed sheet in the bin."
|
||||
else
|
||||
. += "There are [amount] bed sheets in the bin."
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/update_icon()
|
||||
switch(amount)
|
||||
if(0) icon_state = "linenbin-empty"
|
||||
if(1 to amount / 2) icon_state = "linenbin-half"
|
||||
else icon_state = "linenbin-full"
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
if(amount)
|
||||
amount = 0
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/structure/bedsheetbin/burn()
|
||||
amount = 0
|
||||
extinguish()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/bedsheet))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
sheets.Add(I)
|
||||
amount++
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
hidden = I
|
||||
to_chat(user, "<span class='notice'>You hide [I] among the sheets.</span>")
|
||||
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/bedsheet/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
|
||||
B.loc = user.loc
|
||||
user.put_in_hands(B)
|
||||
to_chat(user, "<span class='notice'>You take [B] out of [src].</span>")
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = user.loc
|
||||
to_chat(user, "<span class='notice'>[hidden] falls out of [B]!</span>")
|
||||
hidden = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_tk(mob/user as mob)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/bedsheet/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
|
||||
B.loc = loc
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
|
||||
update_icon()
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = loc
|
||||
hidden = null
|
||||
/*
|
||||
CONTAINS:
|
||||
BEDSHEETS
|
||||
LINEN BINS
|
||||
*/
|
||||
|
||||
/obj/item/bedsheet
|
||||
name = "bedsheet"
|
||||
desc = "A surprisingly soft linen bedsheet."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "sheet"
|
||||
item_state = "bedsheet"
|
||||
layer = 4.0
|
||||
throwforce = 1
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
item_color = "white"
|
||||
resistance_flags = FLAMMABLE
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
dog_fashion = /datum/dog_fashion/head/ghost
|
||||
var/list/dream_messages = list("white")
|
||||
var/list/nightmare_messages = list("black")
|
||||
var/comfort = 0.5
|
||||
|
||||
|
||||
|
||||
/obj/item/bedsheet/attack_self(mob/user as mob)
|
||||
user.drop_item()
|
||||
if(layer == initial(layer))
|
||||
layer = 5
|
||||
else
|
||||
layer = initial(layer)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
if(I.sharp)
|
||||
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
|
||||
transfer_fingerprints_to(C)
|
||||
C.add_fingerprint(user)
|
||||
qdel(src)
|
||||
to_chat(user, "<span class='notice'>You tear [src] up.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/bedsheet/blue
|
||||
icon_state = "sheetblue"
|
||||
item_color = "blue"
|
||||
dream_messages = list("blue")
|
||||
nightmare_messages = list("vox blood")
|
||||
|
||||
/obj/item/bedsheet/green
|
||||
icon_state = "sheetgreen"
|
||||
item_color = "green"
|
||||
dream_messages = list("green")
|
||||
nightmare_messages = list("unathi flesh")
|
||||
|
||||
/obj/item/bedsheet/orange
|
||||
icon_state = "sheetorange"
|
||||
item_color = "orange"
|
||||
dream_messages = list("orange")
|
||||
nightmare_messages = list("exploding fruit")
|
||||
|
||||
/obj/item/bedsheet/purple
|
||||
icon_state = "sheetpurple"
|
||||
item_color = "purple"
|
||||
dream_messages = list("purple")
|
||||
nightmare_messages = list("Grey blood")
|
||||
|
||||
/obj/item/bedsheet/patriot
|
||||
name = "patriotic bedsheet"
|
||||
desc = "You've never felt more free than when sleeping on this."
|
||||
icon_state = "sheetUSA"
|
||||
item_color = "sheetUSA"
|
||||
dream_messages = list("America", "freedom", "fireworks", "bald eagles")
|
||||
nightmare_messages = list("communism")
|
||||
|
||||
/obj/item/bedsheet/rainbow
|
||||
name = "rainbow bedsheet"
|
||||
desc = "A multi_colored blanket. It's actually several different sheets cut up and sewn together."
|
||||
icon_state = "sheetrainbow"
|
||||
item_color = "rainbow"
|
||||
dream_messages = list("red", "orange", "yellow", "green", "blue", "purple", "a rainbow")
|
||||
nightmare_messages = list("green", "a cluwne", "fLoOr ClUwNe")
|
||||
|
||||
/obj/item/bedsheet/red
|
||||
icon_state = "sheetred"
|
||||
item_color = "red"
|
||||
dream_messages = list("red")
|
||||
nightmare_messages = list("gibs")
|
||||
|
||||
/obj/item/bedsheet/yellow
|
||||
icon_state = "sheetyellow"
|
||||
item_color = "yellow"
|
||||
dream_messages = list("yellow")
|
||||
nightmare_messages = list("locker full of banana peels")
|
||||
|
||||
/obj/item/bedsheet/black
|
||||
icon_state = "sheetblack"
|
||||
item_color = "sheetblack"
|
||||
dream_messages = list("black")
|
||||
nightmare_messages = list("the void of space")
|
||||
|
||||
/obj/item/bedsheet/mime
|
||||
name = "mime's blanket"
|
||||
desc = "A very soothing striped blanket. All the noise just seems to fade out when you're under the covers in this."
|
||||
icon_state = "sheetmime"
|
||||
item_color = "mime"
|
||||
dream_messages = list("silence", "gestures", "a pale face", "a gaping mouth", "the mime")
|
||||
nightmare_messages = list("honk", "laughter", "a prank", "a joke", "a smiling face", "the clown")
|
||||
|
||||
/obj/item/bedsheet/clown
|
||||
name = "clown's blanket"
|
||||
desc = "A rainbow blanket with a clown mask woven in. It smells faintly of bananas."
|
||||
icon_state = "sheetclown"
|
||||
item_color = "clown"
|
||||
dream_messages = list("honk", "laughter", "a prank", "a joke", "a smiling face", "the clown")
|
||||
nightmare_messages = list("silence", "gestures", "a pale face", "a gaping mouth", "the mime")
|
||||
|
||||
/obj/item/bedsheet/captain
|
||||
name = "captain's bedsheet."
|
||||
desc = "It has a Nanotrasen symbol on it, and was woven with a revolutionary new kind of thread guaranteed to have 0.01% permeability for most non-chemical substances, popular among most modern captains."
|
||||
icon_state = "sheetcaptain"
|
||||
item_color = "captain"
|
||||
dream_messages = list("authority", "a golden ID", "sunglasses", "a green disc", "an antique gun", "the captain")
|
||||
nightmare_messages = list("comdom", "clown with all access", "the syndicate")
|
||||
|
||||
/obj/item/bedsheet/rd
|
||||
name = "research director's bedsheet"
|
||||
desc = "It appears to have a beaker emblem, and is made out of fire-resistant material, although it probably won't protect you in the event of fires you're familiar with every day."
|
||||
icon_state = "sheetrd"
|
||||
item_color = "director"
|
||||
dream_messages = list("authority", "a silvery ID", "a bomb", "a mech", "a facehugger", "maniacal laughter", "the research director")
|
||||
nightmare_messages = list("toxins full of plasma", "UPGRADE THE SLEEPERS", "rogue ai")
|
||||
|
||||
/obj/item/bedsheet/rd/royal_cape
|
||||
name = "Royal Cape of the Liberator"
|
||||
desc = "Majestic."
|
||||
dream_messages = list("mining", "stone", "a golem", "freedom", "doing whatever")
|
||||
|
||||
/obj/item/bedsheet/medical
|
||||
name = "medical blanket"
|
||||
desc = "It's a sterilized* blanket commonly used in the Medbay. *Sterilization is voided if a virologist is present onboard the station."
|
||||
icon_state = "sheetmedical"
|
||||
item_color = "medical"
|
||||
dream_messages = list("healing", "life", "surgery", "a doctor")
|
||||
nightmare_messages = list("death", "no cryox", "cryo is off")
|
||||
|
||||
/obj/item/bedsheet/cmo
|
||||
name = "chief medical officer's bedsheet"
|
||||
desc = "It's a sterilized blanket that has a cross emblem. There's some cat fur on it, likely from Runtime."
|
||||
icon_state = "sheetcmo"
|
||||
item_color = "cmo"
|
||||
dream_messages = list("authority", "a silvery ID", "healing", "life", "surgery", "a cat", "the chief medical officer")
|
||||
nightmare_messages = list("chemists making meth", "cryo it off", "where is the defib", "no biomass")
|
||||
|
||||
/obj/item/bedsheet/hos
|
||||
name = "head of security's bedsheet"
|
||||
desc = "It is decorated with a shield emblem. While crime doesn't sleep, you do, but you are still THE LAW!"
|
||||
icon_state = "sheethos"
|
||||
item_color = "hosred"
|
||||
dream_messages = list("authority", "a silvery ID", "handcuffs", "a baton", "a flashbang", "sunglasses", "the head of security")
|
||||
nightmare_messages = list("the clown", "a toolbox", "sHiTcUrItY", "why did you put them in for 50 minutes")
|
||||
|
||||
|
||||
/obj/item/bedsheet/hop
|
||||
name = "head of personnel's bedsheet"
|
||||
desc = "It is decorated with a key emblem. For those rare moments when you can rest and cuddle with Ian without someone screaming for you over the radio."
|
||||
icon_state = "sheethop"
|
||||
item_color = "hop"
|
||||
dream_messages = list("authority", "a silvery ID", "obligation", "a computer", "an ID", "a corgi", "the head of personnel")
|
||||
nightmare_messages = list("improper paperwork", "all access clown", "50 open clown slots", "dead ian")
|
||||
|
||||
/obj/item/bedsheet/ce
|
||||
name = "chief engineer's bedsheet"
|
||||
desc = "It is decorated with a wrench emblem. It's highly reflective and stain resistant, so you don't need to worry about ruining it with oil."
|
||||
icon_state = "sheetce"
|
||||
item_color = "chief"
|
||||
dream_messages = list("authority", "a silvery ID", "the engine", "power tools", "an APC", "a parrot", "the chief engineer")
|
||||
nightmare_messages = list("forced airlock", "syndicate bomb", "explosion in research chem", "iT's LoOsE")
|
||||
|
||||
/obj/item/bedsheet/qm
|
||||
name = "quartermaster's bedsheet"
|
||||
desc = "It is decorated with a crate emblem in silver lining. It's rather tough, and just the thing to lie on after a hard day of pushing paper."
|
||||
icon_state = "sheetqm"
|
||||
item_color = "qm"
|
||||
dream_messages = list("a grey ID", "a shuttle", "a crate", "a sloth", "the quartermaster")
|
||||
nightmare_messages = list("a bald person", "no points", "wheres the ore", "space carp")
|
||||
|
||||
/obj/item/bedsheet/brown
|
||||
icon_state = "sheetbrown"
|
||||
item_color = "cargo"
|
||||
dream_messages = list("brown")
|
||||
nightmare_messages = list("dead monkey")
|
||||
|
||||
/obj/item/bedsheet/centcom
|
||||
name = "centcom bedsheet"
|
||||
desc = "Woven with advanced nanothread for warmth as well as being very decorated, essential for all officials."
|
||||
icon_state = "sheetcentcom"
|
||||
item_color = "centcom"
|
||||
dream_messages = list("a unique ID", "authority", "artillery", "an ending")
|
||||
nightmare_messages = list("a butt fax")
|
||||
|
||||
/obj/item/bedsheet/syndie
|
||||
name = "syndicate bedsheet"
|
||||
desc = "It has a syndicate emblem and it has an aura of evil."
|
||||
icon_state = "sheetsyndie"
|
||||
item_color = "syndie"
|
||||
dream_messages = list("a green disc", "a red crystal", "a glowing blade", "a wire-covered ID")
|
||||
nightmare_messages = list("stunbaton", "taser", "lasers", "a toolbox")
|
||||
|
||||
/obj/item/bedsheet/cult
|
||||
name = "cultist's bedsheet"
|
||||
desc = "You might dream of Nar'Sie if you sleep with this. It seems rather tattered and glows of an eldritch presence."
|
||||
icon_state = "sheetcult"
|
||||
item_color = "cult"
|
||||
dream_messages = list("a tome", "a floating red crystal", "a glowing sword", "a bloody symbol", "a massive humanoid figure")
|
||||
nightmare_messages = list("a tome", "a floating red crystal", "a glowing sword", "a bloody symbol", "a massive humanoid figure")
|
||||
|
||||
|
||||
/obj/item/bedsheet/wiz
|
||||
name = "wizard's bedsheet"
|
||||
desc = "A special fabric enchanted with magic so you can have an enchanted night. It even glows!"
|
||||
icon_state = "sheetwiz"
|
||||
item_color = "wiz"
|
||||
dream_messages = list("a book", "an explosion", "lightning", "a staff", "a skeleton", "a robe", "magic")
|
||||
nightmare_messages = list("a toolbox", "solars")
|
||||
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin
|
||||
name = "linen bin"
|
||||
desc = "A linen bin. It looks rather cosy."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "linenbin-full"
|
||||
anchored = 1
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
var/amount = 20
|
||||
var/list/sheets = list()
|
||||
var/obj/item/hidden = null
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/examine(mob/user)
|
||||
. = ..()
|
||||
if(amount < 1)
|
||||
. += "There are no bed sheets in the bin."
|
||||
else if(amount == 1)
|
||||
. += "There is one bed sheet in the bin."
|
||||
else
|
||||
. += "There are [amount] bed sheets in the bin."
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/update_icon()
|
||||
switch(amount)
|
||||
if(0) icon_state = "linenbin-empty"
|
||||
if(1 to amount / 2) icon_state = "linenbin-half"
|
||||
else icon_state = "linenbin-full"
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
if(amount)
|
||||
amount = 0
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/structure/bedsheetbin/burn()
|
||||
amount = 0
|
||||
extinguish()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/bedsheet))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
sheets.Add(I)
|
||||
amount++
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else if(amount && !hidden && I.w_class < WEIGHT_CLASS_BULKY) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
hidden = I
|
||||
to_chat(user, "<span class='notice'>You hide [I] among the sheets.</span>")
|
||||
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user as mob)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/bedsheet/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
|
||||
B.loc = user.loc
|
||||
user.put_in_hands(B)
|
||||
to_chat(user, "<span class='notice'>You take [B] out of [src].</span>")
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = user.loc
|
||||
to_chat(user, "<span class='notice'>[hidden] falls out of [B]!</span>")
|
||||
hidden = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_tk(mob/user as mob)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/bedsheet/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
|
||||
B.loc = loc
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
|
||||
update_icon()
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = loc
|
||||
hidden = null
|
||||
|
||||
@@ -49,4 +49,4 @@
|
||||
if(istype(coat, /obj/item/clothing/suit/storage/labcoat/cmo))
|
||||
overlays += image(icon, icon_state = "coat_cmo")
|
||||
if(istype(coat, /obj/item/clothing/suit/storage/det_suit))
|
||||
overlays += image(icon, icon_state = "coat_det")
|
||||
overlays += image(icon, icon_state = "coat_det")
|
||||
|
||||
@@ -1,451 +1,451 @@
|
||||
/obj/structure/closet
|
||||
name = "closet"
|
||||
desc = "It's a basic storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "closed"
|
||||
density = 1
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/lastbang
|
||||
var/sound = 'sound/machines/click.ogg'
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
var/material_drop_amount = 2
|
||||
|
||||
/obj/structure/closet/New()
|
||||
..()
|
||||
spawn(1)
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
for(var/obj/item/I in loc)
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
I.forceMove(src)
|
||||
|
||||
// Fix for #383 - C4 deleting fridges with corpses
|
||||
/obj/structure/closet/Destroy()
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0 || wall_mounted)
|
||||
return TRUE
|
||||
return (!density)
|
||||
|
||||
/obj/structure/closet/proc/can_open()
|
||||
if(welded)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/can_close()
|
||||
for(var/obj/structure/closet/closet in get_turf(src))
|
||||
if(closet != src && closet.anchored != 1)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.forceMove(T)
|
||||
if(throwing) // you keep some momentum when getting out of a thrown closet
|
||||
step(AM, dir)
|
||||
if(throwing)
|
||||
throwing.finalize(FALSE)
|
||||
|
||||
/obj/structure/closet/proc/open()
|
||||
if(opened)
|
||||
return FALSE
|
||||
|
||||
if(!can_open())
|
||||
return FALSE
|
||||
|
||||
dump_contents()
|
||||
|
||||
icon_state = icon_opened
|
||||
opened = TRUE
|
||||
if(sound)
|
||||
playsound(loc, sound, 15, 1, -3)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 0
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/close()
|
||||
if(!opened)
|
||||
return FALSE
|
||||
if(!can_close())
|
||||
return FALSE
|
||||
|
||||
var/itemcount = 0
|
||||
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
AD.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(!I.anchored)
|
||||
I.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
for(var/mob/M in loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(istype(M, /mob/dead/observer))
|
||||
continue
|
||||
if(istype(M, /mob/living/simple_animal/bot/mulebot))
|
||||
continue
|
||||
if(M.buckled || M.anchored || M.has_buckled_mobs())
|
||||
continue
|
||||
if(isAI(M))
|
||||
continue
|
||||
|
||||
M.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
icon_state = icon_closed
|
||||
opened = FALSE
|
||||
if(sound)
|
||||
playsound(loc, sound, 15, 1, -3)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user)
|
||||
if(!(opened ? close() : open()))
|
||||
to_chat(user, "<span class='notice'>It won't budge!</span>")
|
||||
|
||||
/obj/structure/closet/proc/bust_open()
|
||||
welded = FALSE //applies to all lockers
|
||||
locked = FALSE //applies to critter crates and secure lockers only
|
||||
broken = TRUE //applies to secure lockers only
|
||||
open()
|
||||
|
||||
/obj/structure/closet/deconstruct(disassembled = TRUE)
|
||||
if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs) && !opened)
|
||||
if(user in contents) //to prevent self-teleporting.
|
||||
return
|
||||
var/obj/item/rcs/E = W
|
||||
if(E.rcell && (E.rcell.charge >= E.chargecost))
|
||||
if(!is_level_reachable(z))
|
||||
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
|
||||
return
|
||||
if(E.mode == 0)
|
||||
if(!E.teleporting)
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
for(var/obj/machinery/telepad_cargo/R in world)
|
||||
if(R.stage == 0)
|
||||
var/turf/T = get_turf(R)
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
var/desc = input("Please select a telepad.", "RCS") in L
|
||||
E.pad = L[desc]
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
|
||||
E.teleporting = 1
|
||||
if(!do_after(user, 50 * E.toolspeed, target = src))
|
||||
E.teleporting = 0
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(user in contents)
|
||||
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
|
||||
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, E.pad, 0)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
else
|
||||
E.rand_x = rand(50,200)
|
||||
E.rand_y = rand(50,200)
|
||||
var/L = locate(E.rand_x, E.rand_y, 6)
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
|
||||
E.teleporting = 1
|
||||
if(!do_after(user, 50, E.toolspeed, target = src))
|
||||
E.teleporting = 0
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(user in contents)
|
||||
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
|
||||
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, L)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Out of charges.</span>")
|
||||
return
|
||||
return
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return FALSE
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/stack/packageWrap))
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!opened && user.loc == src)
|
||||
to_chat(user, "<span class='warning'>You can't weld [src] from inside!</span>")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(opened)
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
else
|
||||
var/adjective = welded ? "open" : "shut"
|
||||
user.visible_message("<span class='notice'>[user] begins welding [src] [adjective]...</span>", "<span class='notice'>You begin welding [src] [adjective]...</span>", "<span class='warning'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 15, volume = I.tool_volume))
|
||||
if(opened)
|
||||
to_chat(user, "<span class='notice'>Keep [src] shut while doing that!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] welds [src] [adjective]!</span>", "<span class='notice'>You weld [src] [adjective]!</span>")
|
||||
welded = !welded
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
|
||||
..()
|
||||
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
|
||||
return
|
||||
if(O.loc == user)
|
||||
return
|
||||
if(user.restrained() || user.stat || user.IsWeakened() || user.stunned || user.paralysis || user.lying)
|
||||
return
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
|
||||
return
|
||||
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
|
||||
return
|
||||
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(!opened)
|
||||
return
|
||||
if(istype(O, /obj/structure/closet))
|
||||
return
|
||||
step_towards(O, loc)
|
||||
if(user != O)
|
||||
user.visible_message("<span class='danger'>[user] stuffs [O] into [src]!</span>", "<span class='danger'>You stuff [O] into [src]!</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/closet/attack_ai(mob/user)
|
||||
if(isrobot(user) && Adjacent(user)) //Robots can open/close it, but not the AI
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
|
||||
if(!open())
|
||||
to_chat(user, "<span class='notice'>It won't budge!</span>")
|
||||
if(!lastbang)
|
||||
lastbang = 1
|
||||
for(var/mob/M in hearers(src, null))
|
||||
to_chat(M, text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M))))
|
||||
spawn(30)
|
||||
lastbang = 0
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/closet/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
toggle(user)
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(!toggle())
|
||||
to_chat(usr, "<span class='notice'>It won't budge!</span>")
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
set category = null
|
||||
set name = "Toggle Open"
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
add_fingerprint(usr)
|
||||
toggle(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays.Cut()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
// Objects that try to exit a locker by stepping were doing so successfully,
|
||||
// and due to an oversight in turf/Enter() were going through walls. That
|
||||
// should be independently resolved, but this is also an interesting twist.
|
||||
/obj/structure/closet/Exit(atom/movable/AM)
|
||||
open()
|
||||
if(AM.loc == src)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/container_resist(var/mob/living/L)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
if(opened)
|
||||
if(L.loc == src)
|
||||
L.forceMove(get_turf(src)) // Let's just be safe here
|
||||
return //Door's open... wait, why are you in it's contents then?
|
||||
if(!welded)
|
||||
open() //for cardboard boxes
|
||||
return //closed but not welded...
|
||||
// else Meh, lets just keep it at 2 minutes for now
|
||||
// breakout_time++ //Harder to get out of welded lockers than locked lockers
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
L.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
L.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(L, "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>")
|
||||
for(var/mob/O in viewers(usr.loc))
|
||||
O.show_message("<span class='danger'>The [src] begins to shake violently!</span>", 1)
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(L,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!src || !L || L.stat != CONSCIOUS || L.loc != src || opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!welded)
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
welded = FALSE
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='warning'>You successfully break out!</span>")
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("<span class='danger'>\the [usr] successfully broke out of \the [src]!</span>", 1)
|
||||
if(istype(loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
|
||||
var/obj/structure/bigDelivery/BD = loc
|
||||
BD.attack_hand(usr)
|
||||
open()
|
||||
|
||||
/obj/structure/closet/tesla_act(var/power)
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is blown apart by the bolt of electricity!</span>", "<span class='danger'>You hear a metallic screeching sound.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/structure/closet/ex_act(severity)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity)
|
||||
CHECK_TICK
|
||||
..()
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/bluespace
|
||||
name = "bluespace closet"
|
||||
desc = "A storage unit that moves and stores through the fourth dimension."
|
||||
density = 0
|
||||
icon_state = "bluespace"
|
||||
icon_closed = "bluespace"
|
||||
icon_opened = "bluespaceopen"
|
||||
storage_capacity = 60
|
||||
var/materials = list(MAT_METAL = 5000, MAT_PLASMA = 2500, MAT_TITANIUM = 500, MAT_BLUESPACE = 500)
|
||||
|
||||
/obj/structure/closet/bluespace/CheckExit(atom/movable/AM)
|
||||
UpdateTransparency(AM, loc)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/bluespace/proc/UpdateTransparency(atom/movable/AM, atom/location)
|
||||
var/transparent = FALSE
|
||||
for(var/atom/A in location)
|
||||
if(A.density && A != src && A != AM)
|
||||
transparent = TRUE
|
||||
break
|
||||
icon_opened = transparent ? "bluespaceopentrans" : "bluespaceopen"
|
||||
icon_closed = transparent ? "bluespacetrans" : "bluespace"
|
||||
icon_state = opened ? icon_opened : icon_closed
|
||||
|
||||
/obj/structure/closet/bluespace/Crossed(atom/movable/AM, oldloc)
|
||||
if(AM.density)
|
||||
icon_state = opened ? "bluespaceopentrans" : "bluespacetrans"
|
||||
|
||||
/obj/structure/closet/bluespace/Move(NewLoc, direct) // Allows for "phasing" throug objects but doesn't allow you to stuff your EOC homebois in one of these and push them through walls.
|
||||
var/turf/T = get_turf(NewLoc)
|
||||
if(T.density)
|
||||
return
|
||||
for(var/atom/A in T.contents)
|
||||
if(A.density && istype(A, /obj/machinery/door))
|
||||
return
|
||||
UpdateTransparency(src, NewLoc)
|
||||
forceMove(NewLoc)
|
||||
|
||||
/obj/structure/closet/bluespace/close()
|
||||
. = ..()
|
||||
density = 0
|
||||
/obj/structure/closet
|
||||
name = "closet"
|
||||
desc = "It's a basic storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "closed"
|
||||
density = 1
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/lastbang
|
||||
var/sound = 'sound/machines/click.ogg'
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
var/material_drop_amount = 2
|
||||
|
||||
/obj/structure/closet/New()
|
||||
..()
|
||||
spawn(1)
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
for(var/obj/item/I in loc)
|
||||
if(I.density || I.anchored || I == src) continue
|
||||
I.forceMove(src)
|
||||
|
||||
// Fix for #383 - C4 deleting fridges with corpses
|
||||
/obj/structure/closet/Destroy()
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0 || wall_mounted)
|
||||
return TRUE
|
||||
return (!density)
|
||||
|
||||
/obj/structure/closet/proc/can_open()
|
||||
if(welded)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/can_close()
|
||||
for(var/obj/structure/closet/closet in get_turf(src))
|
||||
if(closet != src && closet.anchored != 1)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.forceMove(T)
|
||||
if(throwing) // you keep some momentum when getting out of a thrown closet
|
||||
step(AM, dir)
|
||||
if(throwing)
|
||||
throwing.finalize(FALSE)
|
||||
|
||||
/obj/structure/closet/proc/open()
|
||||
if(opened)
|
||||
return FALSE
|
||||
|
||||
if(!can_open())
|
||||
return FALSE
|
||||
|
||||
dump_contents()
|
||||
|
||||
icon_state = icon_opened
|
||||
opened = TRUE
|
||||
if(sound)
|
||||
playsound(loc, sound, 15, 1, -3)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 0
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/close()
|
||||
if(!opened)
|
||||
return FALSE
|
||||
if(!can_close())
|
||||
return FALSE
|
||||
|
||||
var/itemcount = 0
|
||||
|
||||
//Cham Projector Exception
|
||||
for(var/obj/effect/dummy/chameleon/AD in loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
AD.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(!I.anchored)
|
||||
I.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
for(var/mob/M in loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(istype(M, /mob/dead/observer))
|
||||
continue
|
||||
if(istype(M, /mob/living/simple_animal/bot/mulebot))
|
||||
continue
|
||||
if(M.buckled || M.anchored || M.has_buckled_mobs())
|
||||
continue
|
||||
if(isAI(M))
|
||||
continue
|
||||
|
||||
M.forceMove(src)
|
||||
itemcount++
|
||||
|
||||
icon_state = icon_closed
|
||||
opened = FALSE
|
||||
if(sound)
|
||||
playsound(loc, sound, 15, 1, -3)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user)
|
||||
if(!(opened ? close() : open()))
|
||||
to_chat(user, "<span class='notice'>It won't budge!</span>")
|
||||
|
||||
/obj/structure/closet/proc/bust_open()
|
||||
welded = FALSE //applies to all lockers
|
||||
locked = FALSE //applies to critter crates and secure lockers only
|
||||
broken = TRUE //applies to secure lockers only
|
||||
open()
|
||||
|
||||
/obj/structure/closet/deconstruct(disassembled = TRUE)
|
||||
if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs) && !opened)
|
||||
if(user in contents) //to prevent self-teleporting.
|
||||
return
|
||||
var/obj/item/rcs/E = W
|
||||
if(E.rcell && (E.rcell.charge >= E.chargecost))
|
||||
if(!is_level_reachable(z))
|
||||
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
|
||||
return
|
||||
if(E.mode == 0)
|
||||
if(!E.teleporting)
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
for(var/obj/machinery/telepad_cargo/R in world)
|
||||
if(R.stage == 0)
|
||||
var/turf/T = get_turf(R)
|
||||
var/tmpname = T.loc.name
|
||||
if(areaindex[tmpname])
|
||||
tmpname = "[tmpname] ([++areaindex[tmpname]])"
|
||||
else
|
||||
areaindex[tmpname] = 1
|
||||
L[tmpname] = R
|
||||
var/desc = input("Please select a telepad.", "RCS") in L
|
||||
E.pad = L[desc]
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
|
||||
E.teleporting = 1
|
||||
if(!do_after(user, 50 * E.toolspeed, target = src))
|
||||
E.teleporting = 0
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(user in contents)
|
||||
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
|
||||
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, E.pad, 0)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
else
|
||||
E.rand_x = rand(50,200)
|
||||
E.rand_y = rand(50,200)
|
||||
var/L = locate(E.rand_x, E.rand_y, 6)
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
|
||||
return
|
||||
playsound(E.loc, E.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
|
||||
E.teleporting = 1
|
||||
if(!do_after(user, 50, E.toolspeed, target = src))
|
||||
E.teleporting = 0
|
||||
return
|
||||
E.teleporting = 0
|
||||
if(user in contents)
|
||||
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
|
||||
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return
|
||||
if(!(E.rcell && E.rcell.use(E.chargecost)))
|
||||
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
|
||||
return
|
||||
do_sparks(5, 1, src)
|
||||
do_teleport(src, L)
|
||||
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Out of charges.</span>")
|
||||
return
|
||||
return
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return FALSE
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/stack/packageWrap))
|
||||
return
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!opened && user.loc == src)
|
||||
to_chat(user, "<span class='warning'>You can't weld [src] from inside!</span>")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(opened)
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
else
|
||||
var/adjective = welded ? "open" : "shut"
|
||||
user.visible_message("<span class='notice'>[user] begins welding [src] [adjective]...</span>", "<span class='notice'>You begin welding [src] [adjective]...</span>", "<span class='warning'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 15, volume = I.tool_volume))
|
||||
if(opened)
|
||||
to_chat(user, "<span class='notice'>Keep [src] shut while doing that!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] welds [src] [adjective]!</span>", "<span class='notice'>You weld [src] [adjective]!</span>")
|
||||
welded = !welded
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
|
||||
..()
|
||||
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
|
||||
return
|
||||
if(O.loc == user)
|
||||
return
|
||||
if(user.restrained() || user.stat || user.IsWeakened() || user.stunned || user.paralysis || user.lying)
|
||||
return
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
|
||||
return
|
||||
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
|
||||
return
|
||||
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(!opened)
|
||||
return
|
||||
if(istype(O, /obj/structure/closet))
|
||||
return
|
||||
step_towards(O, loc)
|
||||
if(user != O)
|
||||
user.visible_message("<span class='danger'>[user] stuffs [O] into [src]!</span>", "<span class='danger'>You stuff [O] into [src]!</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/closet/attack_ai(mob/user)
|
||||
if(isrobot(user) && Adjacent(user)) //Robots can open/close it, but not the AI
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
|
||||
if(!open())
|
||||
to_chat(user, "<span class='notice'>It won't budge!</span>")
|
||||
if(!lastbang)
|
||||
lastbang = 1
|
||||
for(var/mob/M in hearers(src, null))
|
||||
to_chat(M, text("<FONT size=[]>BANG, bang!</FONT>", max(0, 5 - get_dist(src, M))))
|
||||
spawn(30)
|
||||
lastbang = 0
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/closet/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
toggle(user)
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(!toggle())
|
||||
to_chat(usr, "<span class='notice'>It won't budge!</span>")
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
set category = null
|
||||
set name = "Toggle Open"
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
add_fingerprint(usr)
|
||||
toggle(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays.Cut()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
// Objects that try to exit a locker by stepping were doing so successfully,
|
||||
// and due to an oversight in turf/Enter() were going through walls. That
|
||||
// should be independently resolved, but this is also an interesting twist.
|
||||
/obj/structure/closet/Exit(atom/movable/AM)
|
||||
open()
|
||||
if(AM.loc == src)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/container_resist(var/mob/living/L)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
if(opened)
|
||||
if(L.loc == src)
|
||||
L.forceMove(get_turf(src)) // Let's just be safe here
|
||||
return //Door's open... wait, why are you in it's contents then?
|
||||
if(!welded)
|
||||
open() //for cardboard boxes
|
||||
return //closed but not welded...
|
||||
// else Meh, lets just keep it at 2 minutes for now
|
||||
// breakout_time++ //Harder to get out of welded lockers than locked lockers
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
L.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
L.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(L, "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>")
|
||||
for(var/mob/O in viewers(usr.loc))
|
||||
O.show_message("<span class='danger'>The [src] begins to shake violently!</span>", 1)
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(L,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!src || !L || L.stat != CONSCIOUS || L.loc != src || opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!welded)
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
welded = FALSE
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='warning'>You successfully break out!</span>")
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("<span class='danger'>\the [usr] successfully broke out of \the [src]!</span>", 1)
|
||||
if(istype(loc, /obj/structure/bigDelivery)) //nullspace ect.. read the comment above
|
||||
var/obj/structure/bigDelivery/BD = loc
|
||||
BD.attack_hand(usr)
|
||||
open()
|
||||
|
||||
/obj/structure/closet/tesla_act(var/power)
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is blown apart by the bolt of electricity!</span>", "<span class='danger'>You hear a metallic screeching sound.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/structure/closet/ex_act(severity)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity)
|
||||
CHECK_TICK
|
||||
..()
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/bluespace
|
||||
name = "bluespace closet"
|
||||
desc = "A storage unit that moves and stores through the fourth dimension."
|
||||
density = 0
|
||||
icon_state = "bluespace"
|
||||
icon_closed = "bluespace"
|
||||
icon_opened = "bluespaceopen"
|
||||
storage_capacity = 60
|
||||
var/materials = list(MAT_METAL = 5000, MAT_PLASMA = 2500, MAT_TITANIUM = 500, MAT_BLUESPACE = 500)
|
||||
|
||||
/obj/structure/closet/bluespace/CheckExit(atom/movable/AM)
|
||||
UpdateTransparency(AM, loc)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/bluespace/proc/UpdateTransparency(atom/movable/AM, atom/location)
|
||||
var/transparent = FALSE
|
||||
for(var/atom/A in location)
|
||||
if(A.density && A != src && A != AM)
|
||||
transparent = TRUE
|
||||
break
|
||||
icon_opened = transparent ? "bluespaceopentrans" : "bluespaceopen"
|
||||
icon_closed = transparent ? "bluespacetrans" : "bluespace"
|
||||
icon_state = opened ? icon_opened : icon_closed
|
||||
|
||||
/obj/structure/closet/bluespace/Crossed(atom/movable/AM, oldloc)
|
||||
if(AM.density)
|
||||
icon_state = opened ? "bluespaceopentrans" : "bluespacetrans"
|
||||
|
||||
/obj/structure/closet/bluespace/Move(NewLoc, direct) // Allows for "phasing" throug objects but doesn't allow you to stuff your EOC homebois in one of these and push them through walls.
|
||||
var/turf/T = get_turf(NewLoc)
|
||||
if(T.density)
|
||||
return
|
||||
for(var/atom/A in T.contents)
|
||||
if(A.density && istype(A, /obj/machinery/door))
|
||||
return
|
||||
UpdateTransparency(src, NewLoc)
|
||||
forceMove(NewLoc)
|
||||
|
||||
/obj/structure/closet/bluespace/close()
|
||||
. = ..()
|
||||
density = 0
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/obj/structure/closet/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
icon_closed = "coffin"
|
||||
icon_opened = "coffin_open"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/wood
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/coffin/sarcophagus
|
||||
name = "sarcophagus"
|
||||
icon_state = "sarc"
|
||||
icon_closed = "sarc"
|
||||
icon_opened = "sarc_open"
|
||||
sound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
material_drop = /obj/item/stack/sheet/mineral/sandstone
|
||||
/obj/structure/closet/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
icon_closed = "coffin"
|
||||
icon_opened = "coffin_open"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/wood
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/coffin/sarcophagus
|
||||
name = "sarcophagus"
|
||||
icon_state = "sarc"
|
||||
icon_closed = "sarc"
|
||||
icon_opened = "sarc_open"
|
||||
sound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
material_drop = /obj/item/stack/sheet/mineral/sandstone
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/structure/closet/crate/critter
|
||||
name = "critter crate"
|
||||
desc = "A crate which can sustain life for a while."
|
||||
icon_state = "critter"
|
||||
icon_opened = "critteropen"
|
||||
icon_closed = "critter"
|
||||
material_drop = /obj/item/stack/sheet/wood
|
||||
/obj/structure/closet/crate/critter
|
||||
name = "critter crate"
|
||||
desc = "A crate which can sustain life for a while."
|
||||
icon_state = "critter"
|
||||
icon_opened = "critteropen"
|
||||
icon_closed = "critter"
|
||||
material_drop = /obj/item/stack/sheet/wood
|
||||
|
||||
@@ -71,4 +71,4 @@
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
new /obj/item/clothing/head/helmet/bluetaghelm(src)
|
||||
new /obj/item/clothing/head/helmet/bluetaghelm(src)
|
||||
|
||||
@@ -1,136 +1,136 @@
|
||||
/obj/structure/closet/cabinet
|
||||
name = "cabinet"
|
||||
desc = "Old will forever be in fashion."
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
desc = "It looks alien!"
|
||||
icon_state = "acloset"
|
||||
icon_closed = "acloset"
|
||||
icon_opened = "aclosetopen"
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick
|
||||
name = "administrative supply closet"
|
||||
desc = "It's a storage unit for things that have no right being here."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/closet/gimmick/russian
|
||||
name = "russian surplus closet"
|
||||
desc = "It's a storage unit for Russian standard-issue surplus."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/gimmick/russian/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool
|
||||
name = "tacticool gear closet"
|
||||
desc = "It's a storage unit for Tacticool gear."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool/New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/eyepatch(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/combat(src)
|
||||
new /obj/item/clothing/gloves/combat(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/shoes/combat/swat(src)
|
||||
new /obj/item/clothing/shoes/combat/swat(src)
|
||||
new /obj/item/clothing/suit/space/deathsquad(src)
|
||||
new /obj/item/clothing/suit/space/deathsquad(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
|
||||
|
||||
/obj/structure/closet/thunderdome
|
||||
name = "\improper Thunderdome closet"
|
||||
desc = "Everything you need!"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred
|
||||
name = "red-team Thunderdome closet"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen
|
||||
name = "green-team Thunderdome closet"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/cabinet
|
||||
name = "cabinet"
|
||||
desc = "Old will forever be in fashion."
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
desc = "It looks alien!"
|
||||
icon_state = "acloset"
|
||||
icon_closed = "acloset"
|
||||
icon_opened = "aclosetopen"
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick
|
||||
name = "administrative supply closet"
|
||||
desc = "It's a storage unit for things that have no right being here."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/closet/gimmick/russian
|
||||
name = "russian surplus closet"
|
||||
desc = "It's a storage unit for Russian standard-issue surplus."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/gimmick/russian/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
new /obj/item/clothing/under/soviet(src)
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool
|
||||
name = "tacticool gear closet"
|
||||
desc = "It's a storage unit for Tacticool gear."
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/gimmick/tacticool/New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/eyepatch(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/combat(src)
|
||||
new /obj/item/clothing/gloves/combat(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/shoes/combat/swat(src)
|
||||
new /obj/item/clothing/shoes/combat/swat(src)
|
||||
new /obj/item/clothing/suit/space/deathsquad(src)
|
||||
new /obj/item/clothing/suit/space/deathsquad(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
new /obj/item/clothing/under/syndicate/tacticool(src)
|
||||
|
||||
|
||||
/obj/structure/closet/thunderdome
|
||||
name = "\improper Thunderdome closet"
|
||||
desc = "Everything you need!"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred
|
||||
name = "red-team Thunderdome closet"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen
|
||||
name = "green-team Thunderdome closet"
|
||||
icon_state = "syndicate1"
|
||||
icon_closed = "syndicate1"
|
||||
icon_opened = "syndicate1open"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/melee/energy/sword/saber(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/gun/energy/laser(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
|
||||
@@ -1,144 +1,144 @@
|
||||
/* Closets for specific jobs
|
||||
* Contains:
|
||||
* Bartender
|
||||
* Janitor
|
||||
* Lawyer
|
||||
*/
|
||||
|
||||
/*
|
||||
* Bartender
|
||||
*/
|
||||
/obj/structure/closet/gmcloset
|
||||
name = "formal closet"
|
||||
desc = "It's a storage unit for formal clothing."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/gmcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/clothing/head/hairflower
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/dress/dress_saloon
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
/*
|
||||
* Chef
|
||||
*/
|
||||
/obj/structure/closet/chefcloset
|
||||
name = "chef's closet"
|
||||
desc = "It's a storage unit for foodservice garments."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/chefcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/waiter(src)
|
||||
new /obj/item/clothing/under/waiter(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/clothing/accessory/waistcoat(src)
|
||||
new /obj/item/clothing/accessory/waistcoat(src)
|
||||
new /obj/item/clothing/suit/chef/classic(src)
|
||||
new /obj/item/clothing/suit/chef/classic(src)
|
||||
new /obj/item/clothing/suit/chef/classic(src)
|
||||
new /obj/item/clothing/head/soft/mime(src)
|
||||
new /obj/item/clothing/head/soft/mime(src)
|
||||
new /obj/item/storage/box/mousetraps(src)
|
||||
new /obj/item/storage/box/mousetraps(src)
|
||||
new /obj/item/clothing/under/rank/chef(src)
|
||||
new /obj/item/clothing/head/chefhat(src)
|
||||
new /obj/item/reagent_containers/glass/rag(src)
|
||||
|
||||
/*
|
||||
* Janitor
|
||||
*/
|
||||
/obj/structure/closet/jcloset
|
||||
name = "custodial closet"
|
||||
desc = "It's a storage unit for janitorial clothes and gear."
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/jcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/janitor(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/cartridge/janitor(src)
|
||||
new /obj/item/flashlight(src)
|
||||
new /obj/item/melee/flyswatter(src)
|
||||
new /obj/item/clothing/shoes/galoshes(src)
|
||||
new /obj/item/soap(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/storage/bag/trash(src)
|
||||
new /obj/item/lightreplacer(src)
|
||||
new /obj/item/holosign_creator(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
new /obj/item/watertank/janitor(src)
|
||||
new /obj/item/storage/belt/janitor(src)
|
||||
|
||||
/*
|
||||
* Lawyer
|
||||
*/
|
||||
/obj/structure/closet/lawcloset
|
||||
name = "legal closet"
|
||||
desc = "It's a storage unit for courtroom apparel and items."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/lawcloset/New()
|
||||
..()
|
||||
new /obj/item/storage/box/tapes(src)
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/bluesuit(src)
|
||||
new /obj/item/clothing/suit/storage/lawyer/bluejacket(src)
|
||||
new /obj/item/clothing/under/lawyer/purpsuit(src)
|
||||
new /obj/item/clothing/suit/storage/lawyer/purpjacket(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/big(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/big(src)
|
||||
|
||||
//Paramedic
|
||||
|
||||
/obj/structure/closet/paramedic
|
||||
name = "paramedic wardrobe"
|
||||
desc = "It's a storage unit for paramedic equipment."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
|
||||
/obj/structure/closet/paramedic/New()
|
||||
new /obj/item/clothing/under/rank/medical/paramedic(src)
|
||||
new /obj/item/clothing/under/rank/medical/paramedic(src)
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/suit/storage/paramedic(src)
|
||||
new /obj/item/clothing/suit/storage/paramedic(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
/* Closets for specific jobs
|
||||
* Contains:
|
||||
* Bartender
|
||||
* Janitor
|
||||
* Lawyer
|
||||
*/
|
||||
|
||||
/*
|
||||
* Bartender
|
||||
*/
|
||||
/obj/structure/closet/gmcloset
|
||||
name = "formal closet"
|
||||
desc = "It's a storage unit for formal clothing."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/gmcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/clothing/head/hairflower
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/sl_suit(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/dress/dress_saloon
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
/*
|
||||
* Chef
|
||||
*/
|
||||
/obj/structure/closet/chefcloset
|
||||
name = "chef's closet"
|
||||
desc = "It's a storage unit for foodservice garments."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/chefcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/waiter(src)
|
||||
new /obj/item/clothing/under/waiter(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/clothing/accessory/waistcoat(src)
|
||||
new /obj/item/clothing/accessory/waistcoat(src)
|
||||
new /obj/item/clothing/suit/chef/classic(src)
|
||||
new /obj/item/clothing/suit/chef/classic(src)
|
||||
new /obj/item/clothing/suit/chef/classic(src)
|
||||
new /obj/item/clothing/head/soft/mime(src)
|
||||
new /obj/item/clothing/head/soft/mime(src)
|
||||
new /obj/item/storage/box/mousetraps(src)
|
||||
new /obj/item/storage/box/mousetraps(src)
|
||||
new /obj/item/clothing/under/rank/chef(src)
|
||||
new /obj/item/clothing/head/chefhat(src)
|
||||
new /obj/item/reagent_containers/glass/rag(src)
|
||||
|
||||
/*
|
||||
* Janitor
|
||||
*/
|
||||
/obj/structure/closet/jcloset
|
||||
name = "custodial closet"
|
||||
desc = "It's a storage unit for janitorial clothes and gear."
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/jcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/janitor(src)
|
||||
new /obj/item/radio/headset/headset_service(src)
|
||||
new /obj/item/cartridge/janitor(src)
|
||||
new /obj/item/flashlight(src)
|
||||
new /obj/item/melee/flyswatter(src)
|
||||
new /obj/item/clothing/shoes/galoshes(src)
|
||||
new /obj/item/soap(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/caution(src)
|
||||
new /obj/item/storage/bag/trash(src)
|
||||
new /obj/item/lightreplacer(src)
|
||||
new /obj/item/holosign_creator(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
new /obj/item/watertank/janitor(src)
|
||||
new /obj/item/storage/belt/janitor(src)
|
||||
|
||||
/*
|
||||
* Lawyer
|
||||
*/
|
||||
/obj/structure/closet/lawcloset
|
||||
name = "legal closet"
|
||||
desc = "It's a storage unit for courtroom apparel and items."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/lawcloset/New()
|
||||
..()
|
||||
new /obj/item/storage/box/tapes(src)
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/bluesuit(src)
|
||||
new /obj/item/clothing/suit/storage/lawyer/bluejacket(src)
|
||||
new /obj/item/clothing/under/lawyer/purpsuit(src)
|
||||
new /obj/item/clothing/suit/storage/lawyer/purpjacket(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/big(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/big(src)
|
||||
|
||||
//Paramedic
|
||||
|
||||
/obj/structure/closet/paramedic
|
||||
name = "paramedic wardrobe"
|
||||
desc = "It's a storage unit for paramedic equipment."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
|
||||
/obj/structure/closet/paramedic/New()
|
||||
new /obj/item/clothing/under/rank/medical/paramedic(src)
|
||||
new /obj/item/clothing/under/rank/medical/paramedic(src)
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/head/soft/blue(src)
|
||||
new /obj/item/clothing/suit/storage/paramedic(src)
|
||||
new /obj/item/clothing/suit/storage/paramedic(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
|
||||
@@ -1,76 +1,76 @@
|
||||
/obj/structure/closet/l3closet
|
||||
name = "level-3 biohazard suit closet"
|
||||
desc = "It's a storage unit for level-3 biohazard gear."
|
||||
icon_state = "bio"
|
||||
icon_closed = "bio"
|
||||
icon_opened = "bioopen"
|
||||
|
||||
/obj/structure/closet/l3closet/New()
|
||||
..()
|
||||
new /obj/item/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/general
|
||||
icon_state = "bio_general"
|
||||
icon_closed = "bio_general"
|
||||
icon_opened = "bio_generalopen"
|
||||
|
||||
/obj/structure/closet/l3closet/general/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/virology
|
||||
icon_state = "bio_virology"
|
||||
icon_closed = "bio_virology"
|
||||
icon_opened = "bio_virologyopen"
|
||||
|
||||
/obj/structure/closet/l3closet/virology/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/tank/oxygen(src)
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/security
|
||||
icon_state = "bio_security"
|
||||
icon_closed = "bio_security"
|
||||
icon_opened = "bio_securityopen"
|
||||
|
||||
/obj/structure/closet/l3closet/security/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/security( src )
|
||||
new /obj/item/clothing/head/bio_hood/security( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/janitor
|
||||
icon_state = "bio_janitor"
|
||||
icon_closed = "bio_janitor"
|
||||
icon_opened = "bio_janitoropen"
|
||||
|
||||
/obj/structure/closet/l3closet/janitor/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/janitor( src )
|
||||
new /obj/item/clothing/head/bio_hood/janitor( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/scientist
|
||||
icon_state = "bio_scientist"
|
||||
icon_closed = "bio_scientist"
|
||||
icon_opened = "bio_scientistopen"
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/scientist( src )
|
||||
new /obj/item/clothing/head/bio_hood/scientist( src )
|
||||
/obj/structure/closet/l3closet
|
||||
name = "level-3 biohazard suit closet"
|
||||
desc = "It's a storage unit for level-3 biohazard gear."
|
||||
icon_state = "bio"
|
||||
icon_closed = "bio"
|
||||
icon_opened = "bioopen"
|
||||
|
||||
/obj/structure/closet/l3closet/New()
|
||||
..()
|
||||
new /obj/item/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/general
|
||||
icon_state = "bio_general"
|
||||
icon_closed = "bio_general"
|
||||
icon_opened = "bio_generalopen"
|
||||
|
||||
/obj/structure/closet/l3closet/general/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/virology
|
||||
icon_state = "bio_virology"
|
||||
icon_closed = "bio_virology"
|
||||
icon_opened = "bio_virologyopen"
|
||||
|
||||
/obj/structure/closet/l3closet/virology/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/tank/oxygen(src)
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/security
|
||||
icon_state = "bio_security"
|
||||
icon_closed = "bio_security"
|
||||
icon_opened = "bio_securityopen"
|
||||
|
||||
/obj/structure/closet/l3closet/security/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/security( src )
|
||||
new /obj/item/clothing/head/bio_hood/security( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/janitor
|
||||
icon_state = "bio_janitor"
|
||||
icon_closed = "bio_janitor"
|
||||
icon_opened = "bio_janitoropen"
|
||||
|
||||
/obj/structure/closet/l3closet/janitor/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/janitor( src )
|
||||
new /obj/item/clothing/head/bio_hood/janitor( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/scientist
|
||||
icon_state = "bio_scientist"
|
||||
icon_closed = "bio_scientist"
|
||||
icon_opened = "bio_scientistopen"
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/scientist( src )
|
||||
new /obj/item/clothing/head/bio_hood/scientist( src )
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
|
||||
/obj/structure/closet/malf/suits
|
||||
desc = "It's a storage unit for operational gear."
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
/obj/structure/closet/malf/suits/New()
|
||||
..()
|
||||
new /obj/item/tank/jetpack/void(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/effect/nasavoidsuitspawner(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/stock_parts/cell(src)
|
||||
new /obj/item/multitool(src)
|
||||
|
||||
/obj/structure/closet/malf/suits
|
||||
desc = "It's a storage unit for operational gear."
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
/obj/structure/closet/malf/suits/New()
|
||||
..()
|
||||
new /obj/item/tank/jetpack/void(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/effect/nasavoidsuitspawner(src)
|
||||
new /obj/item/crowbar(src)
|
||||
new /obj/item/stock_parts/cell(src)
|
||||
new /obj/item/multitool(src)
|
||||
|
||||
@@ -63,4 +63,4 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/armory
|
||||
req_access = list(ACCESS_SYNDICATE)
|
||||
is_armory = TRUE
|
||||
is_armory = TRUE
|
||||
|
||||
@@ -1,152 +1,152 @@
|
||||
/obj/structure/closet/secure_closet/engineering_chief
|
||||
name = "chief engineer's locker"
|
||||
req_access = list(ACCESS_CE)
|
||||
icon_state = "securece1"
|
||||
icon_closed = "securece"
|
||||
icon_locked = "securece1"
|
||||
icon_opened = "secureceopen"
|
||||
icon_broken = "securecebroken"
|
||||
icon_off = "secureceoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_chief/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/storage/backpack/duffel/engineering(src)
|
||||
new /obj/item/clothing/head/beret/ce(src)
|
||||
new /obj/item/areaeditor/blueprints(src)
|
||||
new /obj/item/storage/box/permits(src)
|
||||
new /obj/item/clothing/under/rank/chief_engineer(src)
|
||||
new /obj/item/clothing/under/rank/chief_engineer/skirt(src)
|
||||
new /obj/item/clothing/suit/mantle/chief_engineer(src)
|
||||
new /obj/item/clothing/head/hardhat/white(src)
|
||||
new /obj/item/clothing/glasses/welding/superior(src)
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/tank/jetpack/suit(src)
|
||||
new /obj/item/cartridge/ce(src)
|
||||
new /obj/item/radio/headset/heads/ce(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/holosign_creator/engineering(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/door_remote/chief_engineer(src)
|
||||
new /obj/item/rpd(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/ce(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/meson(src)
|
||||
new /obj/item/clothing/accessory/medal/engineering(src)
|
||||
new /obj/item/holosign_creator/atmos(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
name = "electrical supplies locker"
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
icon_state = "secureengelec1"
|
||||
icon_closed = "secureengelec"
|
||||
icon_locked = "secureengelec1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_broken = "secureengelecbroken"
|
||||
icon_off = "secureengelecoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical/New()
|
||||
..()
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/storage/toolbox/electrical(src)
|
||||
new /obj/item/storage/toolbox/electrical(src)
|
||||
new /obj/item/storage/toolbox/electrical(src)
|
||||
new /obj/item/apc_electronics(src)
|
||||
new /obj/item/apc_electronics(src)
|
||||
new /obj/item/apc_electronics(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/clothing/head/beret/eng
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding
|
||||
name = "welding supplies locker"
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
icon_state = "secureengweld1"
|
||||
icon_closed = "secureengweld"
|
||||
icon_locked = "secureengweld1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_broken = "secureengweldbroken"
|
||||
icon_off = "secureengweldoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal
|
||||
name = "engineer's locker"
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
icon_opened = "secureengopen"
|
||||
icon_broken = "secureengbroken"
|
||||
icon_off = "secureengoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/storage/backpack/duffel/engineering(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
new /obj/item/holosign_creator/engineering(src)
|
||||
new /obj/item/radio/headset/headset_eng(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/cartridge/engineering(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/atmos_personal
|
||||
name = "technician's locker"
|
||||
req_access = list(ACCESS_ATMOSPHERICS)
|
||||
icon_state = "secureatm1"
|
||||
icon_closed = "secureatm"
|
||||
icon_locked = "secureatm1"
|
||||
icon_opened = "secureatmopen"
|
||||
icon_broken = "secureatmbroken"
|
||||
icon_off = "secureatmoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/atmos_personal/New()
|
||||
..()
|
||||
new /obj/item/radio/headset/headset_eng(src)
|
||||
new /obj/item/cartridge/atmos(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/storage/backpack/duffel/atmos(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/grenade/gas/oxygen(src)
|
||||
new /obj/item/grenade/gas/oxygen(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/holosign_creator/atmos(src)
|
||||
new /obj/item/watertank/atmos(src)
|
||||
new /obj/item/clothing/suit/fire/atmos(src)
|
||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||
new /obj/item/rpd(src)
|
||||
new /obj/item/destTagger(src)
|
||||
/obj/structure/closet/secure_closet/engineering_chief
|
||||
name = "chief engineer's locker"
|
||||
req_access = list(ACCESS_CE)
|
||||
icon_state = "securece1"
|
||||
icon_closed = "securece"
|
||||
icon_locked = "securece1"
|
||||
icon_opened = "secureceopen"
|
||||
icon_broken = "securecebroken"
|
||||
icon_off = "secureceoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_chief/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/storage/backpack/duffel/engineering(src)
|
||||
new /obj/item/clothing/head/beret/ce(src)
|
||||
new /obj/item/areaeditor/blueprints(src)
|
||||
new /obj/item/storage/box/permits(src)
|
||||
new /obj/item/clothing/under/rank/chief_engineer(src)
|
||||
new /obj/item/clothing/under/rank/chief_engineer/skirt(src)
|
||||
new /obj/item/clothing/suit/mantle/chief_engineer(src)
|
||||
new /obj/item/clothing/head/hardhat/white(src)
|
||||
new /obj/item/clothing/glasses/welding/superior(src)
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/tank/jetpack/suit(src)
|
||||
new /obj/item/cartridge/ce(src)
|
||||
new /obj/item/radio/headset/heads/ce(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/holosign_creator/engineering(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/door_remote/chief_engineer(src)
|
||||
new /obj/item/rpd(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/ce(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/meson(src)
|
||||
new /obj/item/clothing/accessory/medal/engineering(src)
|
||||
new /obj/item/holosign_creator/atmos(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
name = "electrical supplies locker"
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
icon_state = "secureengelec1"
|
||||
icon_closed = "secureengelec"
|
||||
icon_locked = "secureengelec1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_broken = "secureengelecbroken"
|
||||
icon_off = "secureengelecoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical/New()
|
||||
..()
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/storage/toolbox/electrical(src)
|
||||
new /obj/item/storage/toolbox/electrical(src)
|
||||
new /obj/item/storage/toolbox/electrical(src)
|
||||
new /obj/item/apc_electronics(src)
|
||||
new /obj/item/apc_electronics(src)
|
||||
new /obj/item/apc_electronics(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/multitool(src)
|
||||
new /obj/item/clothing/head/beret/eng
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding
|
||||
name = "welding supplies locker"
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
icon_state = "secureengweld1"
|
||||
icon_closed = "secureengweld"
|
||||
icon_locked = "secureengweld1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_broken = "secureengweldbroken"
|
||||
icon_off = "secureengweldoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
new /obj/item/weldingtool/largetank(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal
|
||||
name = "engineer's locker"
|
||||
req_access = list(ACCESS_ENGINE_EQUIP)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
icon_opened = "secureengopen"
|
||||
icon_broken = "secureengbroken"
|
||||
icon_off = "secureengoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/storage/backpack/duffel/engineering(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
new /obj/item/holosign_creator/engineering(src)
|
||||
new /obj/item/radio/headset/headset_eng(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
new /obj/item/cartridge/engineering(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/atmos_personal
|
||||
name = "technician's locker"
|
||||
req_access = list(ACCESS_ATMOSPHERICS)
|
||||
icon_state = "secureatm1"
|
||||
icon_closed = "secureatm"
|
||||
icon_locked = "secureatm1"
|
||||
icon_opened = "secureatmopen"
|
||||
icon_broken = "secureatmbroken"
|
||||
icon_off = "secureatmoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/atmos_personal/New()
|
||||
..()
|
||||
new /obj/item/radio/headset/headset_eng(src)
|
||||
new /obj/item/cartridge/atmos(src)
|
||||
new /obj/item/storage/toolbox/mechanical(src)
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/storage/backpack/duffel/atmos(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/grenade/gas/oxygen(src)
|
||||
new /obj/item/grenade/gas/oxygen(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/holosign_creator/atmos(src)
|
||||
new /obj/item/watertank/atmos(src)
|
||||
new /obj/item/clothing/suit/fire/atmos(src)
|
||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||
new /obj/item/rpd(src)
|
||||
new /obj/item/destTagger(src)
|
||||
|
||||
@@ -1,112 +1,112 @@
|
||||
/obj/structure/closet/secure_closet/freezer
|
||||
desc = "It's a card-locked refrigerative storage unit. This one is lead-lined."
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/ex_act(var/severity)
|
||||
// IF INDIANA JONES CAN DO IT SO CAN YOU
|
||||
|
||||
// Bomb in here? (using same search as space transits searching for nuke disk)
|
||||
var/list/bombs = search_contents_for(/obj/item/transfer_valve)
|
||||
if(!isemptylist(bombs)) // You're fucked.
|
||||
..(severity)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen
|
||||
name = "kitchen cabinet"
|
||||
req_access = list(ACCESS_KITCHEN)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/food/condiment/flour(src)
|
||||
new /obj/item/reagent_containers/food/condiment/rice(src)
|
||||
new /obj/item/reagent_containers/food/condiment/sugar(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/mining
|
||||
req_access = list()
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/maintenance
|
||||
name = "maintenance refrigerator"
|
||||
desc = "This refrigerator looks quite dusty, is there anything edible still inside?"
|
||||
req_access = list()
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/maintenance/New()
|
||||
..()
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/reagent_containers/food/condiment/milk(src)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/reagent_containers/food/condiment/soymilk(src)
|
||||
for(var/i = 0, i < 2, i++)
|
||||
new /obj/item/storage/fancy/egg_box(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat
|
||||
name = "meat fridge"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
icon_opened = "fridgeopen"
|
||||
icon_broken = "fridgebroken"
|
||||
icon_off = "fridge1"
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat/New()
|
||||
..()
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/food/snacks/meat/monkey(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat/open
|
||||
req_access = null
|
||||
locked = FALSE
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge
|
||||
name = "refrigerator"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
icon_opened = "fridgeopen"
|
||||
icon_broken = "fridgebroken"
|
||||
icon_off = "fridge1"
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge/New()
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/food/condiment/milk(src)
|
||||
new /obj/item/reagent_containers/food/condiment/soymilk(src)
|
||||
for(var/i in 1 to 2)
|
||||
new /obj/item/storage/fancy/egg_box(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge/open
|
||||
req_access = null
|
||||
locked = FALSE
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/money
|
||||
name = "freezer"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
icon_opened = "fridgeopen"
|
||||
icon_broken = "fridgebroken"
|
||||
icon_off = "fridge1"
|
||||
req_access = list(ACCESS_HEADS_VAULT)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/money/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/stack/spacecash/c500(src)
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/stack/spacecash/c200(src)
|
||||
/obj/structure/closet/secure_closet/freezer
|
||||
desc = "It's a card-locked refrigerative storage unit. This one is lead-lined."
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/ex_act(var/severity)
|
||||
// IF INDIANA JONES CAN DO IT SO CAN YOU
|
||||
|
||||
// Bomb in here? (using same search as space transits searching for nuke disk)
|
||||
var/list/bombs = search_contents_for(/obj/item/transfer_valve)
|
||||
if(!isemptylist(bombs)) // You're fucked.
|
||||
..(severity)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen
|
||||
name = "kitchen cabinet"
|
||||
req_access = list(ACCESS_KITCHEN)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/food/condiment/flour(src)
|
||||
new /obj/item/reagent_containers/food/condiment/rice(src)
|
||||
new /obj/item/reagent_containers/food/condiment/sugar(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/mining
|
||||
req_access = list()
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/maintenance
|
||||
name = "maintenance refrigerator"
|
||||
desc = "This refrigerator looks quite dusty, is there anything edible still inside?"
|
||||
req_access = list()
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/maintenance/New()
|
||||
..()
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/reagent_containers/food/condiment/milk(src)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/reagent_containers/food/condiment/soymilk(src)
|
||||
for(var/i = 0, i < 2, i++)
|
||||
new /obj/item/storage/fancy/egg_box(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat
|
||||
name = "meat fridge"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
icon_opened = "fridgeopen"
|
||||
icon_broken = "fridgebroken"
|
||||
icon_off = "fridge1"
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat/New()
|
||||
..()
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/reagent_containers/food/snacks/meat/monkey(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat/open
|
||||
req_access = null
|
||||
locked = FALSE
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge
|
||||
name = "refrigerator"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
icon_opened = "fridgeopen"
|
||||
icon_broken = "fridgebroken"
|
||||
icon_off = "fridge1"
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge/New()
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/food/condiment/milk(src)
|
||||
new /obj/item/reagent_containers/food/condiment/soymilk(src)
|
||||
for(var/i in 1 to 2)
|
||||
new /obj/item/storage/fancy/egg_box(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge/open
|
||||
req_access = null
|
||||
locked = FALSE
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/money
|
||||
name = "freezer"
|
||||
icon_state = "fridge1"
|
||||
icon_closed = "fridge"
|
||||
icon_locked = "fridge1"
|
||||
icon_opened = "fridgeopen"
|
||||
icon_broken = "fridgebroken"
|
||||
icon_off = "fridge1"
|
||||
req_access = list(ACCESS_HEADS_VAULT)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/money/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/stack/spacecash/c500(src)
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/stack/spacecash/c200(src)
|
||||
|
||||
@@ -52,4 +52,4 @@
|
||||
else if(locked)
|
||||
overlays += icon(src.icon,"locked")
|
||||
else
|
||||
overlays += icon(src.icon,"open")
|
||||
overlays += icon(src.icon,"open")
|
||||
|
||||
@@ -23,4 +23,4 @@
|
||||
new /obj/item/clothing/mask/bandana/botany(src)
|
||||
new /obj/item/cultivator(src)
|
||||
new /obj/item/hatchet(src)
|
||||
new /obj/item/storage/box/disks_plantgene(src)
|
||||
new /obj/item/storage/box/disks_plantgene(src)
|
||||
|
||||
@@ -1,295 +1,295 @@
|
||||
/obj/structure/closet/secure_closet/medical1
|
||||
name = "medicine closet"
|
||||
desc = "Filled with medical junk."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical1/New()
|
||||
..()
|
||||
new /obj/item/storage/box/autoinjectors(src)
|
||||
new /obj/item/storage/box/syringes(src)
|
||||
new /obj/item/storage/box/pillbottles(src)
|
||||
new /obj/item/storage/box/patch_packs(src)
|
||||
new /obj/item/storage/box/iv_bags(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
new /obj/item/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/epinephrine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/epinephrine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/charcoal(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/charcoal(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical2
|
||||
name = "anesthetic locker"
|
||||
desc = "Used to knock people out."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_SURGERY)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical2/New()
|
||||
..()
|
||||
new /obj/item/tank/anesthetic(src)
|
||||
new /obj/item/tank/anesthetic(src)
|
||||
new /obj/item/tank/anesthetic(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3
|
||||
name = "medical doctor's locker"
|
||||
req_access = list(ACCESS_SURGERY)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/storage/backpack/duffel/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/defibrillator/loaded(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/clothing/glasses/hud/health(src)
|
||||
new /obj/item/clothing/shoes/sandal/white(src)
|
||||
|
||||
|
||||
//Exam Room
|
||||
/obj/structure/closet/secure_closet/exam
|
||||
name = "exam room closet"
|
||||
desc = "Filled with exam room materials."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
/obj/structure/closet/secure_closet/exam/New()
|
||||
..()
|
||||
new /obj/item/storage/box/syringes(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/glasses/hud/health(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/clothing/accessory/stethoscope(src)
|
||||
new /obj/item/flashlight/pen(src)
|
||||
new /obj/item/storage/firstaid/regular(src)
|
||||
new /obj/item/storage/firstaid/adv(src)
|
||||
new /obj/item/storage/firstaid/brute(src)
|
||||
new /obj/item/storage/firstaid/fire(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
new /obj/item/storage/firstaid/toxin(src)
|
||||
|
||||
|
||||
// Psychiatrist's pill bottle
|
||||
/obj/item/storage/pill_bottle/psychiatrist
|
||||
name = "psychiatrist's pill bottle"
|
||||
desc = "Contains various pills to calm or sedate patients."
|
||||
wrapper_color = COLOR_PALE_BTL_GREEN
|
||||
|
||||
/obj/item/storage/pill_bottle/psychiatrist/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/food/pill/haloperidol(src)
|
||||
new /obj/item/reagent_containers/food/pill/haloperidol(src)
|
||||
new /obj/item/reagent_containers/food/pill/haloperidol(src)
|
||||
new /obj/item/reagent_containers/food/pill/methamphetamine(src)
|
||||
new /obj/item/reagent_containers/food/pill/methamphetamine(src)
|
||||
new /obj/item/reagent_containers/food/pill/methamphetamine(src)
|
||||
new /obj/item/reagent_containers/food/pill/patch/nicotine(src)
|
||||
new /obj/item/reagent_containers/food/pill/patch/nicotine(src)
|
||||
new /obj/item/reagent_containers/food/pill/patch/nicotine(src)
|
||||
new /obj/item/reagent_containers/food/pill/hydrocodone(src)
|
||||
new /obj/item/reagent_containers/food/pill/hydrocodone(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/psychiatrist
|
||||
name = "psychiatrist's locker"
|
||||
req_access = list(ACCESS_PSYCHIATRIST)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/psychiatrist/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/straight_jacket(src)
|
||||
new /obj/item/reagent_containers/syringe(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/ether(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
|
||||
new /obj/item/storage/pill_bottle/psychiatrist(src)
|
||||
new /obj/random/plushie(src)
|
||||
for(var/i in 0 to 3)
|
||||
var/candy = pick(subtypesof(/obj/item/reagent_containers/food/snacks/candy/fudge))
|
||||
new candy(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO
|
||||
name = "chief medical officer's locker"
|
||||
req_access = list(ACCESS_CMO)
|
||||
icon_state = "cmosecure1"
|
||||
icon_closed = "cmosecure"
|
||||
icon_locked = "cmosecure1"
|
||||
icon_opened = "cmosecureopen"
|
||||
icon_broken = "cmosecurebroken"
|
||||
icon_off = "cmosecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/storage/backpack/duffel/medical(src)
|
||||
new /obj/item/clothing/suit/bio_suit/cmo(src)
|
||||
new /obj/item/clothing/head/bio_hood/cmo(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
switch(pick("blue", "green", "purple"))
|
||||
if("blue")
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
new /obj/item/clothing/head/surgery/blue(src)
|
||||
if("green")
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
new /obj/item/clothing/head/surgery/green(src)
|
||||
if("purple")
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/head/surgery/purple(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/cmo(src)
|
||||
new /obj/item/clothing/under/rank/chief_medical_officer(src)
|
||||
new /obj/item/clothing/suit/mantle/labcoat/chief_medical_officer(src)
|
||||
new /obj/item/clothing/shoes/brown (src)
|
||||
new /obj/item/radio/headset/heads/cmo(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/defibrillator/compact/loaded(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/reagent_containers/hypospray/CMO(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/hud/medical(src)
|
||||
new /obj/item/door_remote/chief_medical_officer(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/cmo(src)
|
||||
new /obj/item/clothing/accessory/medal/medical(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/animal
|
||||
name = "animal control locker"
|
||||
req_access = list(ACCESS_SURGERY)
|
||||
|
||||
/obj/structure/closet/secure_closet/animal/New()
|
||||
..()
|
||||
new /obj/item/assembly/signaler(src)
|
||||
new /obj/item/radio/electropack(src)
|
||||
new /obj/item/radio/electropack(src)
|
||||
new /obj/item/radio/electropack(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/chemical
|
||||
name = "chemical closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_CHEMISTRY)
|
||||
|
||||
/obj/structure/closet/secure_closet/chemical/New()
|
||||
..()
|
||||
new /obj/item/storage/box/pillbottles(src)
|
||||
new /obj/item/storage/box/pillbottles(src)
|
||||
new /obj/item/storage/box/patch_packs(src)
|
||||
new /obj/item/storage/box/patch_packs(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall
|
||||
name = "first aid closet"
|
||||
desc = "It's a secure wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall_locked"
|
||||
icon_closed = "medical_wall_unlocked"
|
||||
icon_locked = "medical_wall_locked"
|
||||
icon_opened = "medical_wall_open"
|
||||
icon_broken = "medical_wall_spark"
|
||||
icon_off = "medical_wall_off"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/paramedic
|
||||
name = "paramedic EVA gear"
|
||||
desc = "A locker with a Paramedic EVA suit."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_PARAMEDIC)
|
||||
|
||||
/obj/structure/closet/secure_closet/paramedic/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/space/eva/paramedic(src)
|
||||
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
|
||||
new /obj/item/sensor_device(src)
|
||||
new /obj/item/key/ambulance(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/reagents
|
||||
name = "chemical storage closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_state = "chemical1"
|
||||
icon_closed = "chemical"
|
||||
icon_locked = "chemical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "chemicalbroken"
|
||||
icon_off = "chemicaloff"
|
||||
req_access = list(ACCESS_CHEMISTRY)
|
||||
|
||||
/obj/structure/closet/secure_closet/reagents/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/phenol(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/ammonia(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/oil(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acetone(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acid(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/diethylamine(src)
|
||||
/obj/structure/closet/secure_closet/medical1
|
||||
name = "medicine closet"
|
||||
desc = "Filled with medical junk."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical1/New()
|
||||
..()
|
||||
new /obj/item/storage/box/autoinjectors(src)
|
||||
new /obj/item/storage/box/syringes(src)
|
||||
new /obj/item/storage/box/pillbottles(src)
|
||||
new /obj/item/storage/box/patch_packs(src)
|
||||
new /obj/item/storage/box/iv_bags(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
new /obj/item/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/epinephrine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/epinephrine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/charcoal(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/charcoal(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical2
|
||||
name = "anesthetic locker"
|
||||
desc = "Used to knock people out."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_SURGERY)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical2/New()
|
||||
..()
|
||||
new /obj/item/tank/anesthetic(src)
|
||||
new /obj/item/tank/anesthetic(src)
|
||||
new /obj/item/tank/anesthetic(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
new /obj/item/clothing/mask/breath/medical(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3
|
||||
name = "medical doctor's locker"
|
||||
req_access = list(ACCESS_SURGERY)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/storage/backpack/duffel/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/defibrillator/loaded(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/clothing/glasses/hud/health(src)
|
||||
new /obj/item/clothing/shoes/sandal/white(src)
|
||||
|
||||
|
||||
//Exam Room
|
||||
/obj/structure/closet/secure_closet/exam
|
||||
name = "exam room closet"
|
||||
desc = "Filled with exam room materials."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
/obj/structure/closet/secure_closet/exam/New()
|
||||
..()
|
||||
new /obj/item/storage/box/syringes(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/glasses/hud/health(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/clothing/accessory/stethoscope(src)
|
||||
new /obj/item/flashlight/pen(src)
|
||||
new /obj/item/storage/firstaid/regular(src)
|
||||
new /obj/item/storage/firstaid/adv(src)
|
||||
new /obj/item/storage/firstaid/brute(src)
|
||||
new /obj/item/storage/firstaid/fire(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
new /obj/item/storage/firstaid/toxin(src)
|
||||
|
||||
|
||||
// Psychiatrist's pill bottle
|
||||
/obj/item/storage/pill_bottle/psychiatrist
|
||||
name = "psychiatrist's pill bottle"
|
||||
desc = "Contains various pills to calm or sedate patients."
|
||||
wrapper_color = COLOR_PALE_BTL_GREEN
|
||||
|
||||
/obj/item/storage/pill_bottle/psychiatrist/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/food/pill/haloperidol(src)
|
||||
new /obj/item/reagent_containers/food/pill/haloperidol(src)
|
||||
new /obj/item/reagent_containers/food/pill/haloperidol(src)
|
||||
new /obj/item/reagent_containers/food/pill/methamphetamine(src)
|
||||
new /obj/item/reagent_containers/food/pill/methamphetamine(src)
|
||||
new /obj/item/reagent_containers/food/pill/methamphetamine(src)
|
||||
new /obj/item/reagent_containers/food/pill/patch/nicotine(src)
|
||||
new /obj/item/reagent_containers/food/pill/patch/nicotine(src)
|
||||
new /obj/item/reagent_containers/food/pill/patch/nicotine(src)
|
||||
new /obj/item/reagent_containers/food/pill/hydrocodone(src)
|
||||
new /obj/item/reagent_containers/food/pill/hydrocodone(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/psychiatrist
|
||||
name = "psychiatrist's locker"
|
||||
req_access = list(ACCESS_PSYCHIATRIST)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/psychiatrist/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/straight_jacket(src)
|
||||
new /obj/item/reagent_containers/syringe(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/ether(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
|
||||
new /obj/item/storage/pill_bottle/psychiatrist(src)
|
||||
new /obj/random/plushie(src)
|
||||
for(var/i in 0 to 3)
|
||||
var/candy = pick(subtypesof(/obj/item/reagent_containers/food/snacks/candy/fudge))
|
||||
new candy(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO
|
||||
name = "chief medical officer's locker"
|
||||
req_access = list(ACCESS_CMO)
|
||||
icon_state = "cmosecure1"
|
||||
icon_closed = "cmosecure"
|
||||
icon_locked = "cmosecure1"
|
||||
icon_opened = "cmosecureopen"
|
||||
icon_broken = "cmosecurebroken"
|
||||
icon_off = "cmosecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/storage/backpack/duffel/medical(src)
|
||||
new /obj/item/clothing/suit/bio_suit/cmo(src)
|
||||
new /obj/item/clothing/head/bio_hood/cmo(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
switch(pick("blue", "green", "purple"))
|
||||
if("blue")
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
new /obj/item/clothing/head/surgery/blue(src)
|
||||
if("green")
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
new /obj/item/clothing/head/surgery/green(src)
|
||||
if("purple")
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/head/surgery/purple(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/cmo(src)
|
||||
new /obj/item/clothing/under/rank/chief_medical_officer(src)
|
||||
new /obj/item/clothing/suit/mantle/labcoat/chief_medical_officer(src)
|
||||
new /obj/item/clothing/shoes/brown (src)
|
||||
new /obj/item/radio/headset/heads/cmo(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/defibrillator/compact/loaded(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/reagent_containers/hypospray/CMO(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/hud/medical(src)
|
||||
new /obj/item/door_remote/chief_medical_officer(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/cmo(src)
|
||||
new /obj/item/clothing/accessory/medal/medical(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/animal
|
||||
name = "animal control locker"
|
||||
req_access = list(ACCESS_SURGERY)
|
||||
|
||||
/obj/structure/closet/secure_closet/animal/New()
|
||||
..()
|
||||
new /obj/item/assembly/signaler(src)
|
||||
new /obj/item/radio/electropack(src)
|
||||
new /obj/item/radio/electropack(src)
|
||||
new /obj/item/radio/electropack(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/chemical
|
||||
name = "chemical closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_CHEMISTRY)
|
||||
|
||||
/obj/structure/closet/secure_closet/chemical/New()
|
||||
..()
|
||||
new /obj/item/storage/box/pillbottles(src)
|
||||
new /obj/item/storage/box/pillbottles(src)
|
||||
new /obj/item/storage/box/patch_packs(src)
|
||||
new /obj/item/storage/box/patch_packs(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall
|
||||
name = "first aid closet"
|
||||
desc = "It's a secure wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall_locked"
|
||||
icon_closed = "medical_wall_unlocked"
|
||||
icon_locked = "medical_wall_locked"
|
||||
icon_opened = "medical_wall_open"
|
||||
icon_broken = "medical_wall_spark"
|
||||
icon_off = "medical_wall_off"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/paramedic
|
||||
name = "paramedic EVA gear"
|
||||
desc = "A locker with a Paramedic EVA suit."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(ACCESS_PARAMEDIC)
|
||||
|
||||
/obj/structure/closet/secure_closet/paramedic/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/space/eva/paramedic(src)
|
||||
new /obj/item/clothing/head/helmet/space/eva/paramedic(src)
|
||||
new /obj/item/sensor_device(src)
|
||||
new /obj/item/key/ambulance(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/reagents
|
||||
name = "chemical storage closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_state = "chemical1"
|
||||
icon_closed = "chemical"
|
||||
icon_locked = "chemical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "chemicalbroken"
|
||||
icon_off = "chemicaloff"
|
||||
req_access = list(ACCESS_CHEMISTRY)
|
||||
|
||||
/obj/structure/closet/secure_closet/reagents/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/phenol(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/ammonia(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/oil(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acetone(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acid(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/diethylamine(src)
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
/obj/structure/closet/secure_closet/personal
|
||||
desc = "It's a secure locker for personnel. The first card swiped gains control."
|
||||
name = "personal closet"
|
||||
req_access = list(ACCESS_ALL_PERSONAL_LOCKERS)
|
||||
var/registered_name = null
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/radio/headset( src )
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient
|
||||
name = "patient's closet"
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient/New()
|
||||
..()
|
||||
contents.Cut()
|
||||
new /obj/item/clothing/under/color/white( src )
|
||||
new /obj/item/clothing/shoes/white( src )
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/New()
|
||||
..()
|
||||
contents.Cut()
|
||||
new /obj/item/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/radio/headset( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
if(W) W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/card/id))
|
||||
if(src.broken)
|
||||
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
|
||||
return
|
||||
var/obj/item/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
if(src == user.loc)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
else if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
src.locked = !( src.locked )
|
||||
if(src.locked)
|
||||
src.icon_state = src.icon_locked
|
||||
else
|
||||
src.icon_state = src.icon_closed
|
||||
registered_name = null
|
||||
desc = initial(desc)
|
||||
|
||||
if(!src.registered_name && src.locked)
|
||||
src.registered_name = I.registered_name
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
else if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/closet/secure_closet/personal
|
||||
desc = "It's a secure locker for personnel. The first card swiped gains control."
|
||||
name = "personal closet"
|
||||
req_access = list(ACCESS_ALL_PERSONAL_LOCKERS)
|
||||
var/registered_name = null
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/radio/headset( src )
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient
|
||||
name = "patient's closet"
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/patient/New()
|
||||
..()
|
||||
contents.Cut()
|
||||
new /obj/item/clothing/under/color/white( src )
|
||||
new /obj/item/clothing/shoes/white( src )
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/New()
|
||||
..()
|
||||
contents.Cut()
|
||||
new /obj/item/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/radio/headset( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
user.drop_item()
|
||||
if(W) W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/card/id))
|
||||
if(src.broken)
|
||||
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
|
||||
return
|
||||
var/obj/item/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
if(src == user.loc)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
else if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
src.locked = !( src.locked )
|
||||
if(src.locked)
|
||||
src.icon_state = src.icon_locked
|
||||
else
|
||||
src.icon_state = src.icon_closed
|
||||
registered_name = null
|
||||
desc = initial(desc)
|
||||
|
||||
if(!src.registered_name && src.locked)
|
||||
src.registered_name = I.registered_name
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
else if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -1,108 +1,108 @@
|
||||
/obj/structure/closet/secure_closet/scientist
|
||||
name = "scientist's locker"
|
||||
req_access = list(ACCESS_TOX_STORAGE)
|
||||
icon_state = "secureres1"
|
||||
icon_closed = "secureres"
|
||||
icon_locked = "secureres1"
|
||||
icon_opened = "secureresopen"
|
||||
icon_broken = "secureresbroken"
|
||||
icon_off = "secureresoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/scientist/New()
|
||||
..()
|
||||
new /obj/item/storage/backpack/science(src)
|
||||
new /obj/item/storage/backpack/satchel_tox(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
//new /obj/item/clothing/suit/labcoat/science(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/science(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
// new /obj/item/cartridge/signal/toxins(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/tank/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/shoes/sandal/white(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/roboticist
|
||||
name = "roboticist's locker"
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
icon_state = "secureres1"
|
||||
icon_closed = "secureres"
|
||||
icon_locked = "secureres1"
|
||||
icon_opened = "secureresopen"
|
||||
icon_broken = "secureresbroken"
|
||||
icon_off = "secureresoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/roboticist/New()
|
||||
..()
|
||||
new /obj/item/storage/backpack(src)
|
||||
new /obj/item/storage/backpack(src)
|
||||
new /obj/item/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/reagent_containers/food/drinks/oilcan(src)
|
||||
new /obj/item/reagent_containers/food/drinks/oilcan(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "research director's locker"
|
||||
req_access = list(ACCESS_RD)
|
||||
icon_state = "rdsecure1"
|
||||
icon_closed = "rdsecure"
|
||||
icon_locked = "rdsecure1"
|
||||
icon_opened = "rdsecureopen"
|
||||
icon_broken = "rdsecurebroken"
|
||||
icon_off = "rdsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/RD/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bio_suit/scientist(src)
|
||||
new /obj/item/clothing/head/bio_hood/scientist(src)
|
||||
new /obj/item/clothing/under/rank/research_director(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/mantle/labcoat(src)
|
||||
new /obj/item/cartridge/rd(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/radio/headset/heads/rd(src)
|
||||
new /obj/item/tank/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/suit/armor/reactive/teleport(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/laser_pointer(src)
|
||||
new /obj/item/door_remote/research_director(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/rd(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/hud/diagnostic(src)
|
||||
new /obj/item/clothing/accessory/medal/science(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/research_reagents
|
||||
name = "research chemical storage closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_state = "rchemical1"
|
||||
icon_closed = "rchemical"
|
||||
icon_locked = "rchemical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "rchemicalbroken"
|
||||
icon_off = "rchemicaloff"
|
||||
req_access = list(ACCESS_TOX_STORAGE)
|
||||
|
||||
/obj/structure/closet/secure_closet/research_reagents/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/phenol(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/ammonia(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/oil(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acetone(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acid(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/diethylamine(src)
|
||||
/obj/structure/closet/secure_closet/scientist
|
||||
name = "scientist's locker"
|
||||
req_access = list(ACCESS_TOX_STORAGE)
|
||||
icon_state = "secureres1"
|
||||
icon_closed = "secureres"
|
||||
icon_locked = "secureres1"
|
||||
icon_opened = "secureresopen"
|
||||
icon_broken = "secureresbroken"
|
||||
icon_off = "secureresoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/scientist/New()
|
||||
..()
|
||||
new /obj/item/storage/backpack/science(src)
|
||||
new /obj/item/storage/backpack/satchel_tox(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
//new /obj/item/clothing/suit/labcoat/science(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/science(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
// new /obj/item/cartridge/signal/toxins(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/tank/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/shoes/sandal/white(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/roboticist
|
||||
name = "roboticist's locker"
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
icon_state = "secureres1"
|
||||
icon_closed = "secureres"
|
||||
icon_locked = "secureres1"
|
||||
icon_opened = "secureresopen"
|
||||
icon_broken = "secureresbroken"
|
||||
icon_off = "secureresoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/roboticist/New()
|
||||
..()
|
||||
new /obj/item/storage/backpack(src)
|
||||
new /obj/item/storage/backpack(src)
|
||||
new /obj/item/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/radio/headset/headset_sci(src)
|
||||
new /obj/item/reagent_containers/food/drinks/oilcan(src)
|
||||
new /obj/item/reagent_containers/food/drinks/oilcan(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "research director's locker"
|
||||
req_access = list(ACCESS_RD)
|
||||
icon_state = "rdsecure1"
|
||||
icon_closed = "rdsecure"
|
||||
icon_locked = "rdsecure1"
|
||||
icon_opened = "rdsecureopen"
|
||||
icon_broken = "rdsecurebroken"
|
||||
icon_off = "rdsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/RD/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bio_suit/scientist(src)
|
||||
new /obj/item/clothing/head/bio_hood/scientist(src)
|
||||
new /obj/item/clothing/under/rank/research_director(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/mantle/labcoat(src)
|
||||
new /obj/item/cartridge/rd(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/radio/headset/heads/rd(src)
|
||||
new /obj/item/tank/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/suit/armor/reactive/teleport(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/laser_pointer(src)
|
||||
new /obj/item/door_remote/research_director(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/rd(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/hud/diagnostic(src)
|
||||
new /obj/item/clothing/accessory/medal/science(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/research_reagents
|
||||
name = "research chemical storage closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_state = "rchemical1"
|
||||
icon_closed = "rchemical"
|
||||
icon_locked = "rchemical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "rchemicalbroken"
|
||||
icon_off = "rchemicaloff"
|
||||
req_access = list(ACCESS_TOX_STORAGE)
|
||||
|
||||
/obj/structure/closet/secure_closet/research_reagents/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/morphine(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/insulin(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/phenol(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/ammonia(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/oil(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acetone(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/acid(src)
|
||||
new /obj/item/reagent_containers/glass/bottle/reagent/diethylamine(src)
|
||||
|
||||
@@ -1,179 +1,179 @@
|
||||
/obj/structure/closet/secure_closet
|
||||
name = "secure locker"
|
||||
desc = "It's an immobile card-locked storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "secure1"
|
||||
density = 1
|
||||
opened = 0
|
||||
locked = 1
|
||||
broken = 0
|
||||
max_integrity = 250
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 20
|
||||
var/large = 1
|
||||
icon_closed = "secure"
|
||||
var/icon_locked = "secure1"
|
||||
icon_opened = "secureopen"
|
||||
var/icon_broken = "securebroken"
|
||||
var/icon_off = "secureoff"
|
||||
wall_mounted = 0 //never solid (You can always pass over it)
|
||||
|
||||
/obj/structure/closet/secure_closet/can_open()
|
||||
if(!..())
|
||||
return 0
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/close()
|
||||
if(..())
|
||||
if(broken)
|
||||
icon_state = icon_off
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/secure_closet/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(!broken)
|
||||
if(prob(50/severity))
|
||||
locked = !locked
|
||||
update_icon()
|
||||
if(prob(20/severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
req_access = list()
|
||||
req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/secure_closet/proc/togglelock(mob/user)
|
||||
if(opened)
|
||||
to_chat(user, "<span class='notice'>Close the locker first.</span>")
|
||||
return
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>The locker appears to be broken.</span>")
|
||||
return
|
||||
if(user.loc == src)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
return
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
visible_message("<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs))
|
||||
return ..()
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
if(large)
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>")
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool))
|
||||
return ..(W, user)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
togglelock(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/emag_act(mob/user)
|
||||
if(!broken)
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
icon_state = icon_off
|
||||
flick(icon_broken, src)
|
||||
to_chat(user, "<span class='notice'>You break the lock on \the [src].</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(locked)
|
||||
togglelock(user)
|
||||
else
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = "Object"
|
||||
set name = "Toggle Lock"
|
||||
|
||||
if(usr.incapacitated()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
add_fingerprint(usr)
|
||||
togglelock(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays.Cut()
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/container_resist(var/mob/living/L)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
if(opened)
|
||||
if(L.loc == src)
|
||||
L.forceMove(get_turf(src)) // Let's just be safe here
|
||||
return //Door's open... wait, why are you in it's contents then?
|
||||
if(!locked && !welded)
|
||||
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
L.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
L.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(L, "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>")
|
||||
for(var/mob/O in viewers(src))
|
||||
O.show_message("<span class='danger'>The [src] begins to shake violently!</span>", 1)
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(usr,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!src || !L || L.stat != CONSCIOUS || L.loc != src || opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!locked && !welded)
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
desc = "It appears to be broken."
|
||||
icon_state = icon_off
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
broken = 1
|
||||
locked = 0
|
||||
welded = 0
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='warning'>You successfully break out!</span>")
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("<span class='danger'>\the [usr] successfully broke out of \the [src]!</span>", 1)
|
||||
if(istype(loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
var/obj/structure/bigDelivery/BD = loc
|
||||
BD.attack_hand(usr)
|
||||
open()
|
||||
/obj/structure/closet/secure_closet
|
||||
name = "secure locker"
|
||||
desc = "It's an immobile card-locked storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "secure1"
|
||||
density = 1
|
||||
opened = 0
|
||||
locked = 1
|
||||
broken = 0
|
||||
max_integrity = 250
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 20
|
||||
var/large = 1
|
||||
icon_closed = "secure"
|
||||
var/icon_locked = "secure1"
|
||||
icon_opened = "secureopen"
|
||||
var/icon_broken = "securebroken"
|
||||
var/icon_off = "secureoff"
|
||||
wall_mounted = 0 //never solid (You can always pass over it)
|
||||
|
||||
/obj/structure/closet/secure_closet/can_open()
|
||||
if(!..())
|
||||
return 0
|
||||
if(locked)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/close()
|
||||
if(..())
|
||||
if(broken)
|
||||
icon_state = icon_off
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/secure_closet/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(!broken)
|
||||
if(prob(50/severity))
|
||||
locked = !locked
|
||||
update_icon()
|
||||
if(prob(20/severity) && !opened)
|
||||
if(!locked)
|
||||
open()
|
||||
else
|
||||
req_access = list()
|
||||
req_access += pick(get_all_accesses())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/secure_closet/proc/togglelock(mob/user)
|
||||
if(opened)
|
||||
to_chat(user, "<span class='notice'>Close the locker first.</span>")
|
||||
return
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>The locker appears to be broken.</span>")
|
||||
return
|
||||
if(user.loc == src)
|
||||
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
|
||||
return
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
visible_message("<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs))
|
||||
return ..()
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
if(large)
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>")
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
|
||||
return
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool))
|
||||
return ..(W, user)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
togglelock(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/emag_act(mob/user)
|
||||
if(!broken)
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
icon_state = icon_off
|
||||
flick(icon_broken, src)
|
||||
to_chat(user, "<span class='notice'>You break the lock on \the [src].</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(locked)
|
||||
togglelock(user)
|
||||
else
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = "Object"
|
||||
set name = "Toggle Lock"
|
||||
|
||||
if(usr.incapacitated()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
|
||||
return
|
||||
|
||||
if(ishuman(usr))
|
||||
add_fingerprint(usr)
|
||||
togglelock(usr)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>This mob type can't use this verb.</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
|
||||
overlays.Cut()
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
if(welded)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/container_resist(var/mob/living/L)
|
||||
var/breakout_time = 2 //2 minutes by default
|
||||
if(opened)
|
||||
if(L.loc == src)
|
||||
L.forceMove(get_turf(src)) // Let's just be safe here
|
||||
return //Door's open... wait, why are you in it's contents then?
|
||||
if(!locked && !welded)
|
||||
return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist'
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
L.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
L.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(L, "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>")
|
||||
for(var/mob/O in viewers(src))
|
||||
O.show_message("<span class='danger'>The [src] begins to shake violently!</span>", 1)
|
||||
|
||||
|
||||
spawn(0)
|
||||
if(do_after(usr,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!src || !L || L.stat != CONSCIOUS || L.loc != src || opened) //closet/user destroyed OR user dead/unconcious OR user no longer in closet OR closet opened
|
||||
return
|
||||
|
||||
//Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'...
|
||||
if(!locked && !welded)
|
||||
return
|
||||
|
||||
//Well then break it!
|
||||
desc = "It appears to be broken."
|
||||
icon_state = icon_off
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
flick(icon_broken, src)
|
||||
sleep(10)
|
||||
broken = 1
|
||||
locked = 0
|
||||
welded = 0
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='warning'>You successfully break out!</span>")
|
||||
for(var/mob/O in viewers(L.loc))
|
||||
O.show_message("<span class='danger'>\the [usr] successfully broke out of \the [src]!</span>", 1)
|
||||
if(istype(loc, /obj/structure/bigDelivery)) //Do this to prevent contents from being opened into nullspace (read: bluespace)
|
||||
var/obj/structure/bigDelivery/BD = loc
|
||||
BD.attack_hand(usr)
|
||||
open()
|
||||
|
||||
@@ -1,468 +1,468 @@
|
||||
/obj/structure/closet/secure_closet/captains
|
||||
name = "captain's locker"
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
icon_locked = "capsecure1"
|
||||
icon_opened = "capsecureopen"
|
||||
icon_broken = "capsecurebroken"
|
||||
icon_off = "capsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/captains/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/captain(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/storage/backpack/duffel/captain(src)
|
||||
new /obj/item/clothing/suit/captunic(src)
|
||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||
new /obj/item/clothing/suit/mantle/armor/captain(src)
|
||||
new /obj/item/clothing/under/captainparade(src)
|
||||
new /obj/item/clothing/head/caphat/parade(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/under/dress/dress_cap(src)
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace/alt(src)
|
||||
new /obj/item/cartridge/captain(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/radio/headset/heads/captain/alt(src)
|
||||
new /obj/item/clothing/gloves/color/captain(src)
|
||||
new /obj/item/storage/belt/rapier(src)
|
||||
new /obj/item/gun/energy/gun(src)
|
||||
new /obj/item/door_remote/captain(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/cap(src)
|
||||
new /obj/item/tank/emergency_oxygen/double(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hop
|
||||
name = "head of personnel's locker"
|
||||
req_access = list(ACCESS_HOP)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
icon_opened = "hopsecureopen"
|
||||
icon_broken = "hopsecurebroken"
|
||||
icon_off = "hopsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/hop/New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/head/hopcap(src)
|
||||
new /obj/item/cartridge/hop(src)
|
||||
new /obj/item/radio/headset/heads/hop(src)
|
||||
new /obj/item/storage/box/ids(src)
|
||||
new /obj/item/storage/box/PDAs(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/gun/energy/gun/mini(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/accessory/petcollar(src)
|
||||
new /obj/item/door_remote/civillian(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/hop(src)
|
||||
new /obj/item/clothing/accessory/medal/service(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/hop2
|
||||
name = "head of personnel's attire"
|
||||
req_access = list(ACCESS_HOP)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
icon_opened = "hopsecureopen"
|
||||
icon_broken = "hopsecurebroken"
|
||||
icon_off = "hopsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/hop2/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/head_of_personnel(src)
|
||||
new /obj/item/clothing/suit/mantle/armor/head_of_personnel(src)
|
||||
new /obj/item/clothing/under/dress/dress_hop(src)
|
||||
new /obj/item/clothing/under/dress/dress_hr(src)
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/oldman(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hos
|
||||
name = "head of security's locker"
|
||||
req_access = list(ACCESS_HOS)
|
||||
icon_state = "hossecure1"
|
||||
icon_closed = "hossecure"
|
||||
icon_locked = "hossecure1"
|
||||
icon_opened = "hossecureopen"
|
||||
icon_broken = "hossecurebroken"
|
||||
icon_off = "hossecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/hos/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/cartridge/hos(src)
|
||||
new /obj/item/radio/headset/heads/hos/alt(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/formal(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/skirt(src)
|
||||
new /obj/item/clothing/suit/armor/hos(src)
|
||||
new /obj/item/clothing/suit/armor/hos/alt(src)
|
||||
new /obj/item/clothing/head/HoS(src)
|
||||
new /obj/item/clothing/head/HoS/beret(src)
|
||||
new /obj/item/clothing/suit/mantle/armor(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/storage/lockbox/mindshield(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/hos(src)
|
||||
new /obj/item/shield/riot/tele(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/gun/energy/gun/hos(src)
|
||||
new /obj/item/door_remote/head_of_security(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/hos(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/hud/security(src)
|
||||
new /obj/item/clothing/accessory/medal/security(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "warden's locker"
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
icon_state = "wardensecure1"
|
||||
icon_closed = "wardensecure"
|
||||
icon_locked = "wardensecure1"
|
||||
icon_opened = "wardensecureopen"
|
||||
icon_broken = "wardensecurebroken"
|
||||
icon_off = "wardensecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/warden/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/warden(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden/alt(src)
|
||||
new /obj/item/clothing/head/beret/sec/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden/formal(src)
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/under/rank/warden/skirt(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/warden(src)
|
||||
new /obj/item/storage/box/zipties(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/gun/energy/gun/advtaser(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/storage/box/holobadge(src)
|
||||
new /obj/item/clothing/gloves/color/black/krav_maga/sec(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "security officer's locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
icon_locked = "sec1"
|
||||
icon_opened = "secopen"
|
||||
icon_broken = "secbroken"
|
||||
icon_off = "secoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/security/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/grenade/flashbang(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/clothing/suit/armor/secjacket(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/brigdoc
|
||||
name = "brig physician's locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/brigdoc/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/storage/firstaid/regular(src)
|
||||
new /obj/item/storage/firstaid/fire(src)
|
||||
new /obj/item/storage/firstaid/adv(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
new /obj/item/storage/firstaid/toxin(src)
|
||||
new /obj/item/clothing/suit/storage/brigdoc(src)
|
||||
new /obj/item/clothing/under/rank/security/brigphys(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/clothing/shoes/sandal/white(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/blueshield
|
||||
name = "blueshield's locker"
|
||||
req_access = list(ACCESS_BLUESHIELD)
|
||||
icon_state = "bssecure1"
|
||||
icon_closed = "bssecure"
|
||||
icon_locked = "bssecure1"
|
||||
icon_opened = "bssecureopen"
|
||||
icon_broken = "bssecurebroken"
|
||||
icon_off = "bssecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/blueshield/New()
|
||||
..()
|
||||
new /obj/item/storage/briefcase(src)
|
||||
new /obj/item/storage/firstaid/adv(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/grenade/flashbang(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/restraints/handcuffs(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses/read_only(src)
|
||||
new /obj/item/clothing/glasses/hud/health/sunglasses
|
||||
new /obj/item/clothing/head/beret/centcom/officer(src)
|
||||
new /obj/item/clothing/head/beret/centcom/officer/navy(src)
|
||||
new /obj/item/clothing/suit/armor/vest/blueshield(src)
|
||||
new /obj/item/clothing/suit/storage/blueshield(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/accessory/holster(src)
|
||||
new /obj/item/clothing/accessory/blue(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/under/rank/centcom/blueshield(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/ntrep
|
||||
name = "\improper Nanotrasen Representative's locker"
|
||||
req_access = list(ACCESS_NTREP)
|
||||
icon_state = "ntsecure1"
|
||||
icon_closed = "ntsecure"
|
||||
icon_locked = "ntsecure1"
|
||||
icon_opened = "ntsecureopen"
|
||||
icon_broken = "ntsecurebroken"
|
||||
icon_off = "ntsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/ntrep/New()
|
||||
..()
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/storage/briefcase(src)
|
||||
new /obj/item/paicard(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/under/lawyer/oldman(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/rank/centcom/representative(src)
|
||||
new /obj/item/clothing/head/ntrep(src)
|
||||
new /obj/item/clothing/shoes/sandal/fancy(src)
|
||||
new /obj/item/storage/box/tapes(src)
|
||||
new /obj/item/taperecorder(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/cargo
|
||||
|
||||
/obj/structure/closet/secure_closet/security/cargo/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/cargo(src)
|
||||
new /obj/item/encryptionkey/headset_cargo(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/engine
|
||||
|
||||
/obj/structure/closet/secure_closet/security/engine/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/engine(src)
|
||||
new /obj/item/encryptionkey/headset_eng(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/science
|
||||
|
||||
/obj/structure/closet/secure_closet/security/science/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/science(src)
|
||||
new /obj/item/encryptionkey/headset_sci(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/med
|
||||
|
||||
/obj/structure/closet/secure_closet/security/med/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/medgreen(src)
|
||||
new /obj/item/encryptionkey/headset_med(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/detective
|
||||
name = "detective's cabinet"
|
||||
req_access = list(ACCESS_FORENSICS_LOCKERS)
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/forensics/blue(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/forensics/red(src)
|
||||
new /obj/item/clothing/gloves/color/black/forensics(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/storage/box/evidence(src)
|
||||
new /obj/item/clipboard(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/detective_scanner(src)
|
||||
new /obj/item/clothing/suit/armor/vest/det_suit(src)
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
new /obj/item/gun/projectile/revolver/detective(src)
|
||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/yeah(src)
|
||||
new /obj/item/flashlight/seclite(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/accessory/black(src)
|
||||
new /obj/item/taperecorder(src)
|
||||
new /obj/item/storage/box/tapes(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/injection
|
||||
name = "lethal injections locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/structure/closet/secure_closet/injection/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/syringe/lethal(src)
|
||||
new /obj/item/reagent_containers/syringe/lethal(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/brig
|
||||
name = "brig locker"
|
||||
req_access = list(ACCESS_BRIG)
|
||||
anchored = 1
|
||||
var/id = null
|
||||
|
||||
/obj/structure/closet/secure_closet/brig/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/card/id/prisoner/random(src)
|
||||
new /obj/item/radio/headset(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/courtroom
|
||||
name = "courtroom locker"
|
||||
req_access = list(ACCESS_COURT)
|
||||
|
||||
/obj/structure/closet/secure_closet/courtroom/New()
|
||||
..()
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/paper/Court (src)
|
||||
new /obj/item/paper/Court (src)
|
||||
new /obj/item/paper/Court (src)
|
||||
new /obj/item/pen (src)
|
||||
new /obj/item/clothing/suit/judgerobe (src)
|
||||
new /obj/item/clothing/head/powdered_wig (src)
|
||||
new /obj/item/storage/briefcase(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/wall
|
||||
name = "wall locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "wall-locker1"
|
||||
density = 1
|
||||
icon_closed = "wall-locker"
|
||||
icon_locked = "wall-locker1"
|
||||
icon_opened = "wall-lockeropen"
|
||||
icon_broken = "wall-lockerbroken"
|
||||
icon_off = "wall-lockeroff"
|
||||
|
||||
//too small to put a man in
|
||||
large = 0
|
||||
|
||||
/obj/structure/closet/secure_closet/wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/magistrate
|
||||
name = "\improper Magistrate's locker"
|
||||
req_access = list(ACCESS_MAGISTRATE)
|
||||
icon_state = "magistratesecure1"
|
||||
icon_closed = "magistratesecure"
|
||||
icon_locked = "magistratesecure1"
|
||||
icon_opened = "magistratesecureopen"
|
||||
icon_broken = "magistratesecurebroken"
|
||||
icon_off = "magistratesecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/magistrate/New()
|
||||
..()
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/storage/secure/briefcase(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/under/suit_jacket/really_black(src)
|
||||
new /obj/item/clothing/under/rank/centcom/magistrate(src)
|
||||
new /obj/item/clothing/suit/judgerobe(src)
|
||||
new /obj/item/clothing/head/powdered_wig(src)
|
||||
new /obj/item/gavelblock(src)
|
||||
new /obj/item/gavelhammer(src)
|
||||
new /obj/item/clothing/head/justice_wig(src)
|
||||
new /obj/item/clothing/accessory/medal/legal(src)
|
||||
/obj/structure/closet/secure_closet/captains
|
||||
name = "captain's locker"
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
icon_locked = "capsecure1"
|
||||
icon_opened = "capsecureopen"
|
||||
icon_broken = "capsecurebroken"
|
||||
icon_off = "capsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/captains/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/captain(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/storage/backpack/duffel/captain(src)
|
||||
new /obj/item/clothing/suit/captunic(src)
|
||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||
new /obj/item/clothing/suit/mantle/armor/captain(src)
|
||||
new /obj/item/clothing/under/captainparade(src)
|
||||
new /obj/item/clothing/head/caphat/parade(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/under/dress/dress_cap(src)
|
||||
new /obj/item/clothing/suit/armor/vest/capcarapace/alt(src)
|
||||
new /obj/item/cartridge/captain(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/radio/headset/heads/captain/alt(src)
|
||||
new /obj/item/clothing/gloves/color/captain(src)
|
||||
new /obj/item/storage/belt/rapier(src)
|
||||
new /obj/item/gun/energy/gun(src)
|
||||
new /obj/item/door_remote/captain(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/cap(src)
|
||||
new /obj/item/tank/emergency_oxygen/double(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hop
|
||||
name = "head of personnel's locker"
|
||||
req_access = list(ACCESS_HOP)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
icon_opened = "hopsecureopen"
|
||||
icon_broken = "hopsecurebroken"
|
||||
icon_off = "hopsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/hop/New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/head/hopcap(src)
|
||||
new /obj/item/cartridge/hop(src)
|
||||
new /obj/item/radio/headset/heads/hop(src)
|
||||
new /obj/item/storage/box/ids(src)
|
||||
new /obj/item/storage/box/PDAs(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/gun/energy/gun/mini(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/accessory/petcollar(src)
|
||||
new /obj/item/door_remote/civillian(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/hop(src)
|
||||
new /obj/item/clothing/accessory/medal/service(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/hop2
|
||||
name = "head of personnel's attire"
|
||||
req_access = list(ACCESS_HOP)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
icon_opened = "hopsecureopen"
|
||||
icon_broken = "hopsecurebroken"
|
||||
icon_off = "hopsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/hop2/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/head_of_personnel(src)
|
||||
new /obj/item/clothing/suit/mantle/armor/head_of_personnel(src)
|
||||
new /obj/item/clothing/under/dress/dress_hop(src)
|
||||
new /obj/item/clothing/under/dress/dress_hr(src)
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/red(src)
|
||||
new /obj/item/clothing/under/lawyer/oldman(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hos
|
||||
name = "head of security's locker"
|
||||
req_access = list(ACCESS_HOS)
|
||||
icon_state = "hossecure1"
|
||||
icon_closed = "hossecure"
|
||||
icon_locked = "hossecure1"
|
||||
icon_opened = "hossecureopen"
|
||||
icon_broken = "hossecurebroken"
|
||||
icon_off = "hossecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/hos/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/cartridge/hos(src)
|
||||
new /obj/item/radio/headset/heads/hos/alt(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/formal(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/skirt(src)
|
||||
new /obj/item/clothing/suit/armor/hos(src)
|
||||
new /obj/item/clothing/suit/armor/hos/alt(src)
|
||||
new /obj/item/clothing/head/HoS(src)
|
||||
new /obj/item/clothing/head/HoS/beret(src)
|
||||
new /obj/item/clothing/suit/mantle/armor(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/storage/lockbox/mindshield(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/hos(src)
|
||||
new /obj/item/shield/riot/tele(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/gun/energy/gun/hos(src)
|
||||
new /obj/item/door_remote/head_of_security(src)
|
||||
new /obj/item/reagent_containers/food/drinks/mug/hos(src)
|
||||
new /obj/item/organ/internal/cyberimp/eyes/hud/security(src)
|
||||
new /obj/item/clothing/accessory/medal/security(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "warden's locker"
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
icon_state = "wardensecure1"
|
||||
icon_closed = "wardensecure"
|
||||
icon_locked = "wardensecure1"
|
||||
icon_opened = "wardensecureopen"
|
||||
icon_broken = "wardensecurebroken"
|
||||
icon_off = "wardensecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/warden/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/warden(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden/alt(src)
|
||||
new /obj/item/clothing/head/beret/sec/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden/formal(src)
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/under/rank/warden/skirt(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/warden(src)
|
||||
new /obj/item/storage/box/zipties(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/gun/energy/gun/advtaser(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/storage/box/holobadge(src)
|
||||
new /obj/item/clothing/gloves/color/black/krav_maga/sec(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "security officer's locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
icon_locked = "sec1"
|
||||
icon_opened = "secopen"
|
||||
icon_broken = "secbroken"
|
||||
icon_off = "secoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/security/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/grenade/flashbang(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/clothing/suit/armor/secjacket(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/brigdoc
|
||||
name = "brig physician's locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/brigdoc/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/storage/firstaid/regular(src)
|
||||
new /obj/item/storage/firstaid/fire(src)
|
||||
new /obj/item/storage/firstaid/adv(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
new /obj/item/storage/firstaid/toxin(src)
|
||||
new /obj/item/clothing/suit/storage/brigdoc(src)
|
||||
new /obj/item/clothing/under/rank/security/brigphys(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/clothing/shoes/sandal/white(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/blueshield
|
||||
name = "blueshield's locker"
|
||||
req_access = list(ACCESS_BLUESHIELD)
|
||||
icon_state = "bssecure1"
|
||||
icon_closed = "bssecure"
|
||||
icon_locked = "bssecure1"
|
||||
icon_opened = "bssecureopen"
|
||||
icon_broken = "bssecurebroken"
|
||||
icon_off = "bssecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/blueshield/New()
|
||||
..()
|
||||
new /obj/item/storage/briefcase(src)
|
||||
new /obj/item/storage/firstaid/adv(src)
|
||||
new /obj/item/pinpointer/crew(src)
|
||||
new /obj/item/storage/belt/security/sec(src)
|
||||
new /obj/item/grenade/flashbang(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/restraints/handcuffs(src)
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses/read_only(src)
|
||||
new /obj/item/clothing/glasses/hud/health/sunglasses
|
||||
new /obj/item/clothing/head/beret/centcom/officer(src)
|
||||
new /obj/item/clothing/head/beret/centcom/officer/navy(src)
|
||||
new /obj/item/clothing/suit/armor/vest/blueshield(src)
|
||||
new /obj/item/clothing/suit/storage/blueshield(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/accessory/holster(src)
|
||||
new /obj/item/clothing/accessory/blue(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/under/rank/centcom/blueshield(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/ntrep
|
||||
name = "\improper Nanotrasen Representative's locker"
|
||||
req_access = list(ACCESS_NTREP)
|
||||
icon_state = "ntsecure1"
|
||||
icon_closed = "ntsecure"
|
||||
icon_locked = "ntsecure1"
|
||||
icon_opened = "ntsecureopen"
|
||||
icon_broken = "ntsecurebroken"
|
||||
icon_off = "ntsecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/ntrep/New()
|
||||
..()
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/storage/briefcase(src)
|
||||
new /obj/item/paicard(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/under/lawyer/oldman(src)
|
||||
new /obj/item/clothing/under/lawyer/black(src)
|
||||
new /obj/item/clothing/under/lawyer/female(src)
|
||||
new /obj/item/clothing/under/rank/centcom/representative(src)
|
||||
new /obj/item/clothing/head/ntrep(src)
|
||||
new /obj/item/clothing/shoes/sandal/fancy(src)
|
||||
new /obj/item/storage/box/tapes(src)
|
||||
new /obj/item/taperecorder(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/cargo
|
||||
|
||||
/obj/structure/closet/secure_closet/security/cargo/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/cargo(src)
|
||||
new /obj/item/encryptionkey/headset_cargo(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/engine
|
||||
|
||||
/obj/structure/closet/secure_closet/security/engine/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/engine(src)
|
||||
new /obj/item/encryptionkey/headset_eng(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/science
|
||||
|
||||
/obj/structure/closet/secure_closet/security/science/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/science(src)
|
||||
new /obj/item/encryptionkey/headset_sci(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security/med
|
||||
|
||||
/obj/structure/closet/secure_closet/security/med/New()
|
||||
..()
|
||||
new /obj/item/clothing/accessory/armband/medgreen(src)
|
||||
new /obj/item/encryptionkey/headset_med(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/detective
|
||||
name = "detective's cabinet"
|
||||
req_access = list(ACCESS_FORENSICS_LOCKERS)
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/forensics/blue(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/forensics/red(src)
|
||||
new /obj/item/clothing/gloves/color/black/forensics(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/storage/box/evidence(src)
|
||||
new /obj/item/clipboard(src)
|
||||
new /obj/item/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/detective_scanner(src)
|
||||
new /obj/item/clothing/suit/armor/vest/det_suit(src)
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
new /obj/item/ammo_box/c38(src)
|
||||
new /obj/item/gun/projectile/revolver/detective(src)
|
||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/yeah(src)
|
||||
new /obj/item/flashlight/seclite(src)
|
||||
new /obj/item/holosign_creator/security(src)
|
||||
new /obj/item/clothing/accessory/black(src)
|
||||
new /obj/item/taperecorder(src)
|
||||
new /obj/item/storage/box/tapes(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/injection
|
||||
name = "lethal injections locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
/obj/structure/closet/secure_closet/injection/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/syringe/lethal(src)
|
||||
new /obj/item/reagent_containers/syringe/lethal(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/brig
|
||||
name = "brig locker"
|
||||
req_access = list(ACCESS_BRIG)
|
||||
anchored = 1
|
||||
var/id = null
|
||||
|
||||
/obj/structure/closet/secure_closet/brig/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/card/id/prisoner/random(src)
|
||||
new /obj/item/radio/headset(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/courtroom
|
||||
name = "courtroom locker"
|
||||
req_access = list(ACCESS_COURT)
|
||||
|
||||
/obj/structure/closet/secure_closet/courtroom/New()
|
||||
..()
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/paper/Court (src)
|
||||
new /obj/item/paper/Court (src)
|
||||
new /obj/item/paper/Court (src)
|
||||
new /obj/item/pen (src)
|
||||
new /obj/item/clothing/suit/judgerobe (src)
|
||||
new /obj/item/clothing/head/powdered_wig (src)
|
||||
new /obj/item/storage/briefcase(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/wall
|
||||
name = "wall locker"
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "wall-locker1"
|
||||
density = 1
|
||||
icon_closed = "wall-locker"
|
||||
icon_locked = "wall-locker1"
|
||||
icon_opened = "wall-lockeropen"
|
||||
icon_broken = "wall-lockerbroken"
|
||||
icon_off = "wall-lockeroff"
|
||||
|
||||
//too small to put a man in
|
||||
large = 0
|
||||
|
||||
/obj/structure/closet/secure_closet/wall/update_icon()
|
||||
if(broken)
|
||||
icon_state = icon_broken
|
||||
else
|
||||
if(!opened)
|
||||
if(locked)
|
||||
icon_state = icon_locked
|
||||
else
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/secure_closet/magistrate
|
||||
name = "\improper Magistrate's locker"
|
||||
req_access = list(ACCESS_MAGISTRATE)
|
||||
icon_state = "magistratesecure1"
|
||||
icon_closed = "magistratesecure"
|
||||
icon_locked = "magistratesecure1"
|
||||
icon_opened = "magistratesecureopen"
|
||||
icon_broken = "magistratesecurebroken"
|
||||
icon_off = "magistratesecureoff"
|
||||
|
||||
/obj/structure/closet/secure_closet/magistrate/New()
|
||||
..()
|
||||
new /obj/item/book/manual/faxes(src)
|
||||
new /obj/item/storage/secure/briefcase(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/under/suit_jacket/really_black(src)
|
||||
new /obj/item/clothing/under/rank/centcom/magistrate(src)
|
||||
new /obj/item/clothing/suit/judgerobe(src)
|
||||
new /obj/item/clothing/head/powdered_wig(src)
|
||||
new /obj/item/gavelblock(src)
|
||||
new /obj/item/gavelhammer(src)
|
||||
new /obj/item/clothing/head/justice_wig(src)
|
||||
new /obj/item/clothing/accessory/medal/legal(src)
|
||||
|
||||
@@ -114,4 +114,4 @@
|
||||
if(user)
|
||||
user.dust()
|
||||
dump_contents()
|
||||
visible_message("<span class='warning'>[src] shatters!. </span>")
|
||||
visible_message("<span class='warning'>[src] shatters!. </span>")
|
||||
|
||||
@@ -1,149 +1,149 @@
|
||||
/obj/structure/closet/syndicate
|
||||
name = "armoury closet"
|
||||
desc = "Why is this here?"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/personal
|
||||
desc = "It's a storage unit for operative gear."
|
||||
|
||||
/obj/structure/closet/syndicate/personal/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/syndicate(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/storage/belt/military(src)
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/clothing/glasses/night(src)
|
||||
|
||||
/obj/structure/closet/syndicate/suits
|
||||
desc = "It's a storage unit for operative space gear."
|
||||
|
||||
/obj/structure/closet/syndicate/suits/New()
|
||||
..()
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi(src)
|
||||
new /obj/item/tank/jetpack/oxygen/harness(src)
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party."
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/storage/box/teargas(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/backpack/duffel/syndie/med(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/pda/syndicate(src)
|
||||
|
||||
/obj/structure/closet/syndicate/sst
|
||||
desc = "It's a storage unit for an elite syndicate strike team's gear."
|
||||
|
||||
/obj/structure/closet/syndicate/sst/New()
|
||||
..()
|
||||
new /obj/item/ammo_box/magazine/mm556x45(src)
|
||||
new /obj/item/gun/projectile/automatic/l6_saw(src)
|
||||
new /obj/item/tank/jetpack/oxygen/harness(src)
|
||||
new /obj/item/storage/belt/military/sst(src)
|
||||
new /obj/item/clothing/glasses/thermal(src)
|
||||
new /obj/item/clothing/shoes/magboots/syndie/advance(src)
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi/elite/sst(src)
|
||||
|
||||
/obj/structure/closet/syndicate/resources/
|
||||
desc = "An old, dusty locker."
|
||||
|
||||
New()
|
||||
..()
|
||||
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
|
||||
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
|
||||
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
|
||||
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
|
||||
|
||||
var/pickednum = rand(1, 50)
|
||||
|
||||
//Sad trombone
|
||||
if(pickednum == 1)
|
||||
var/obj/item/paper/P = new /obj/item/paper(src)
|
||||
P.name = "IOU"
|
||||
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
|
||||
|
||||
//Metal (common ore)
|
||||
if(pickednum >= 2)
|
||||
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
|
||||
|
||||
//Glass (common ore)
|
||||
if(pickednum >= 5)
|
||||
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
|
||||
|
||||
//Plasteel (common ore) Because it has a million more uses then plasma
|
||||
if(pickednum >= 10)
|
||||
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
|
||||
|
||||
//Plasma (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Titanium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/titanium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Plastitanium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/plastitanium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
new /obj/item/tank/jetpack/carbondioxide(src)
|
||||
|
||||
/obj/structure/closet/syndicate/resources/everything
|
||||
desc = "It's an emergency storage closet for repairs."
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/resources = list(
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/mineral/gold,
|
||||
/obj/item/stack/sheet/mineral/silver,
|
||||
/obj/item/stack/sheet/mineral/plasma,
|
||||
/obj/item/stack/sheet/mineral/uranium,
|
||||
/obj/item/stack/sheet/mineral/diamond,
|
||||
/obj/item/stack/sheet/mineral/bananium,
|
||||
/obj/item/stack/sheet/mineral/titanium,
|
||||
/obj/item/stack/sheet/mineral/plastitanium,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
for(var/i in 1 to 2)
|
||||
for(var/res in resources)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = R.max_amount
|
||||
/obj/structure/closet/syndicate
|
||||
name = "armoury closet"
|
||||
desc = "Why is this here?"
|
||||
icon_state = "syndicate"
|
||||
icon_closed = "syndicate"
|
||||
icon_opened = "syndicateopen"
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/personal
|
||||
desc = "It's a storage unit for operative gear."
|
||||
|
||||
/obj/structure/closet/syndicate/personal/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/syndicate(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/storage/belt/military(src)
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/clothing/glasses/night(src)
|
||||
|
||||
/obj/structure/closet/syndicate/suits
|
||||
desc = "It's a storage unit for operative space gear."
|
||||
|
||||
/obj/structure/closet/syndicate/suits/New()
|
||||
..()
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi(src)
|
||||
new /obj/item/tank/jetpack/oxygen/harness(src)
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party."
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/storage/box/teargas(src)
|
||||
new /obj/item/storage/box/flashbangs(src)
|
||||
new /obj/item/storage/backpack/duffel/syndie/med(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/gun/projectile/automatic/shotgun/bulldog(src)
|
||||
new /obj/item/pda/syndicate(src)
|
||||
|
||||
/obj/structure/closet/syndicate/sst
|
||||
desc = "It's a storage unit for an elite syndicate strike team's gear."
|
||||
|
||||
/obj/structure/closet/syndicate/sst/New()
|
||||
..()
|
||||
new /obj/item/ammo_box/magazine/mm556x45(src)
|
||||
new /obj/item/gun/projectile/automatic/l6_saw(src)
|
||||
new /obj/item/tank/jetpack/oxygen/harness(src)
|
||||
new /obj/item/storage/belt/military/sst(src)
|
||||
new /obj/item/clothing/glasses/thermal(src)
|
||||
new /obj/item/clothing/shoes/magboots/syndie/advance(src)
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/syndi/elite/sst(src)
|
||||
|
||||
/obj/structure/closet/syndicate/resources/
|
||||
desc = "An old, dusty locker."
|
||||
|
||||
New()
|
||||
..()
|
||||
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
|
||||
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
|
||||
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
|
||||
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
|
||||
|
||||
var/pickednum = rand(1, 50)
|
||||
|
||||
//Sad trombone
|
||||
if(pickednum == 1)
|
||||
var/obj/item/paper/P = new /obj/item/paper(src)
|
||||
P.name = "IOU"
|
||||
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
|
||||
|
||||
//Metal (common ore)
|
||||
if(pickednum >= 2)
|
||||
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
|
||||
|
||||
//Glass (common ore)
|
||||
if(pickednum >= 5)
|
||||
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
|
||||
|
||||
//Plasteel (common ore) Because it has a million more uses then plasma
|
||||
if(pickednum >= 10)
|
||||
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
|
||||
|
||||
//Plasma (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Titanium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/titanium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Plastitanium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/plastitanium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
new /obj/item/tank/jetpack/carbondioxide(src)
|
||||
|
||||
/obj/structure/closet/syndicate/resources/everything
|
||||
desc = "It's an emergency storage closet for repairs."
|
||||
|
||||
New()
|
||||
..()
|
||||
var/list/resources = list(
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/mineral/gold,
|
||||
/obj/item/stack/sheet/mineral/silver,
|
||||
/obj/item/stack/sheet/mineral/plasma,
|
||||
/obj/item/stack/sheet/mineral/uranium,
|
||||
/obj/item/stack/sheet/mineral/diamond,
|
||||
/obj/item/stack/sheet/mineral/bananium,
|
||||
/obj/item/stack/sheet/mineral/titanium,
|
||||
/obj/item/stack/sheet/mineral/plastitanium,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
for(var/i in 1 to 2)
|
||||
for(var/res in resources)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = R.max_amount
|
||||
|
||||
@@ -1,226 +1,226 @@
|
||||
/* Utility Closets
|
||||
* Contains:
|
||||
* Emergency Closet
|
||||
* Fire Closet
|
||||
* Tool Closet
|
||||
* Radiation Closet
|
||||
* Bombsuit Closet
|
||||
* Hydrant
|
||||
* First Aid
|
||||
*/
|
||||
|
||||
/*
|
||||
* Emergency Closet
|
||||
*/
|
||||
/obj/structure/closet/emcloset
|
||||
name = "emergency closet"
|
||||
desc = "It's a storage unit for emergency breathmasks and o2 tanks."
|
||||
icon_state = "emergency"
|
||||
icon_closed = "emergency"
|
||||
icon_opened = "emergencyopen"
|
||||
|
||||
/obj/structure/closet/emcloset/anchored
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/closet/emcloset/New()
|
||||
..()
|
||||
|
||||
switch(pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10, "nothing" = 0, "delete" = 0)))
|
||||
if("small")
|
||||
new /obj/item/tank/emergency_oxygen(src)
|
||||
new /obj/item/tank/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
if("aid")
|
||||
new /obj/item/tank/emergency_oxygen(src)
|
||||
new /obj/item/storage/toolbox/emergency(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
if("tank")
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
if("both")
|
||||
new /obj/item/storage/toolbox/emergency(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
if("nothing")
|
||||
// doot
|
||||
|
||||
// teehee - Ah, tg coders...
|
||||
if("delete")
|
||||
qdel(src)
|
||||
|
||||
//If you want to re-add fire, just add "fire" = 15 to the pick list.
|
||||
/*if("fire")
|
||||
new /obj/structure/closet/firecloset(src.loc)
|
||||
qdel(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
new /obj/item/tank/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
|
||||
/*
|
||||
* Fire Closet
|
||||
*/
|
||||
/obj/structure/closet/firecloset
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "firecloset"
|
||||
icon_closed = "firecloset"
|
||||
icon_opened = "fireclosetopen"
|
||||
|
||||
/obj/structure/closet/firecloset/New()
|
||||
..()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/tank/oxygen/red(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/full/New()
|
||||
..()
|
||||
contents.Cut()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/flashlight(src)
|
||||
new /obj/item/tank/oxygen/red(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
|
||||
/*
|
||||
* Tool Closet
|
||||
*/
|
||||
/obj/structure/closet/toolcloset
|
||||
name = "tool closet"
|
||||
desc = "It's a storage unit for tools."
|
||||
icon_state = "toolcloset"
|
||||
icon_closed = "toolcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
|
||||
/obj/structure/closet/toolcloset/New()
|
||||
..()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
if(prob(70))
|
||||
new /obj/item/flashlight(src)
|
||||
if(prob(70))
|
||||
new /obj/item/screwdriver(src)
|
||||
if(prob(70))
|
||||
new /obj/item/wrench(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weldingtool(src)
|
||||
if(prob(70))
|
||||
new /obj/item/crowbar(src)
|
||||
if(prob(70))
|
||||
new /obj/item/wirecutters(src)
|
||||
if(prob(70))
|
||||
new /obj/item/t_scanner(src)
|
||||
if(prob(20))
|
||||
new /obj/item/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/multitool(src)
|
||||
if(prob(5))
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
|
||||
|
||||
/*
|
||||
* Radiation Closet
|
||||
*/
|
||||
/obj/structure/closet/radiation
|
||||
name = "radiation suit closet"
|
||||
desc = "It's a storage unit for rad-protective suits."
|
||||
icon_state = "radsuitcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_closed = "radsuitcloset"
|
||||
|
||||
/obj/structure/closet/radiation/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
|
||||
/*
|
||||
* Bombsuit closet
|
||||
*/
|
||||
/obj/structure/closet/bombcloset
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuit"
|
||||
icon_closed = "bombsuit"
|
||||
icon_opened = "bombsuitopen"
|
||||
|
||||
/obj/structure/closet/bombcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bomb_suit( src )
|
||||
new /obj/item/clothing/under/color/black( src )
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuitsec"
|
||||
icon_closed = "bombsuitsec"
|
||||
icon_opened = "bombsuitsecopen"
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bomb_suit/security( src )
|
||||
new /obj/item/clothing/under/rank/security( src )
|
||||
new /obj/item/clothing/shoes/brown( src )
|
||||
new /obj/item/clothing/head/bomb_hood/security( src )
|
||||
|
||||
/*
|
||||
* Hydrant
|
||||
*/
|
||||
/obj/structure/closet/hydrant //wall mounted fire closet
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "hydrant"
|
||||
icon_closed = "hydrant"
|
||||
icon_opened = "hydrant_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/hydrant/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/flashlight(src)
|
||||
new /obj/item/tank/oxygen/red(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/*
|
||||
* First Aid
|
||||
*/
|
||||
/obj/structure/closet/medical_wall //wall mounted medical closet
|
||||
name = "first-aid closet"
|
||||
desc = "It's wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall"
|
||||
icon_closed = "medical_wall"
|
||||
icon_opened = "medical_wall_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/medical_wall/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
/* Utility Closets
|
||||
* Contains:
|
||||
* Emergency Closet
|
||||
* Fire Closet
|
||||
* Tool Closet
|
||||
* Radiation Closet
|
||||
* Bombsuit Closet
|
||||
* Hydrant
|
||||
* First Aid
|
||||
*/
|
||||
|
||||
/*
|
||||
* Emergency Closet
|
||||
*/
|
||||
/obj/structure/closet/emcloset
|
||||
name = "emergency closet"
|
||||
desc = "It's a storage unit for emergency breathmasks and o2 tanks."
|
||||
icon_state = "emergency"
|
||||
icon_closed = "emergency"
|
||||
icon_opened = "emergencyopen"
|
||||
|
||||
/obj/structure/closet/emcloset/anchored
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/closet/emcloset/New()
|
||||
..()
|
||||
|
||||
switch(pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10, "nothing" = 0, "delete" = 0)))
|
||||
if("small")
|
||||
new /obj/item/tank/emergency_oxygen(src)
|
||||
new /obj/item/tank/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
if("aid")
|
||||
new /obj/item/tank/emergency_oxygen(src)
|
||||
new /obj/item/storage/toolbox/emergency(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
if("tank")
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
if("both")
|
||||
new /obj/item/storage/toolbox/emergency(src)
|
||||
new /obj/item/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/storage/firstaid/o2(src)
|
||||
if("nothing")
|
||||
// doot
|
||||
|
||||
// teehee - Ah, tg coders...
|
||||
if("delete")
|
||||
qdel(src)
|
||||
|
||||
//If you want to re-add fire, just add "fire" = 15 to the pick list.
|
||||
/*if("fire")
|
||||
new /obj/structure/closet/firecloset(src.loc)
|
||||
qdel(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
new /obj/item/tank/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
|
||||
/*
|
||||
* Fire Closet
|
||||
*/
|
||||
/obj/structure/closet/firecloset
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "firecloset"
|
||||
icon_closed = "firecloset"
|
||||
icon_opened = "fireclosetopen"
|
||||
|
||||
/obj/structure/closet/firecloset/New()
|
||||
..()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/tank/oxygen/red(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/full/New()
|
||||
..()
|
||||
contents.Cut()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/flashlight(src)
|
||||
new /obj/item/tank/oxygen/red(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
|
||||
/*
|
||||
* Tool Closet
|
||||
*/
|
||||
/obj/structure/closet/toolcloset
|
||||
name = "tool closet"
|
||||
desc = "It's a storage unit for tools."
|
||||
icon_state = "toolcloset"
|
||||
icon_closed = "toolcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
|
||||
/obj/structure/closet/toolcloset/New()
|
||||
..()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
if(prob(70))
|
||||
new /obj/item/flashlight(src)
|
||||
if(prob(70))
|
||||
new /obj/item/screwdriver(src)
|
||||
if(prob(70))
|
||||
new /obj/item/wrench(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weldingtool(src)
|
||||
if(prob(70))
|
||||
new /obj/item/crowbar(src)
|
||||
if(prob(70))
|
||||
new /obj/item/wirecutters(src)
|
||||
if(prob(70))
|
||||
new /obj/item/t_scanner(src)
|
||||
if(prob(20))
|
||||
new /obj/item/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/stack/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/multitool(src)
|
||||
if(prob(5))
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
|
||||
|
||||
/*
|
||||
* Radiation Closet
|
||||
*/
|
||||
/obj/structure/closet/radiation
|
||||
name = "radiation suit closet"
|
||||
desc = "It's a storage unit for rad-protective suits."
|
||||
icon_state = "radsuitcloset"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_closed = "radsuitcloset"
|
||||
|
||||
/obj/structure/closet/radiation/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
|
||||
/*
|
||||
* Bombsuit closet
|
||||
*/
|
||||
/obj/structure/closet/bombcloset
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuit"
|
||||
icon_closed = "bombsuit"
|
||||
icon_opened = "bombsuitopen"
|
||||
|
||||
/obj/structure/closet/bombcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bomb_suit( src )
|
||||
new /obj/item/clothing/under/color/black( src )
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity
|
||||
name = "\improper EOD closet"
|
||||
desc = "It's a storage unit for explosion-protective suits."
|
||||
icon_state = "bombsuitsec"
|
||||
icon_closed = "bombsuitsec"
|
||||
icon_opened = "bombsuitsecopen"
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bomb_suit/security( src )
|
||||
new /obj/item/clothing/under/rank/security( src )
|
||||
new /obj/item/clothing/shoes/brown( src )
|
||||
new /obj/item/clothing/head/bomb_hood/security( src )
|
||||
|
||||
/*
|
||||
* Hydrant
|
||||
*/
|
||||
/obj/structure/closet/hydrant //wall mounted fire closet
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "hydrant"
|
||||
icon_closed = "hydrant"
|
||||
icon_opened = "hydrant_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/hydrant/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/flashlight(src)
|
||||
new /obj/item/tank/oxygen/red(src)
|
||||
new /obj/item/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/*
|
||||
* First Aid
|
||||
*/
|
||||
/obj/structure/closet/medical_wall //wall mounted medical closet
|
||||
name = "first-aid closet"
|
||||
desc = "It's wall-mounted storage unit for first aid supplies."
|
||||
icon_state = "medical_wall"
|
||||
icon_closed = "medical_wall"
|
||||
icon_opened = "medical_wall_open"
|
||||
anchored = 1
|
||||
density = 0
|
||||
wall_mounted = 1
|
||||
|
||||
/obj/structure/closet/medical_wall/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
@@ -1,481 +1,481 @@
|
||||
/obj/structure/closet/wardrobe
|
||||
name = "wardrobe"
|
||||
desc = "It's a storage unit for standard-issue Nanotrasen attire."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/wardrobe/generic
|
||||
// Identical to the base wardrobe, aside from containing some stuff.
|
||||
|
||||
/obj/structure/closet/wardrobe/generic/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/wardrobe/red/New()
|
||||
..()
|
||||
new /obj/item/storage/backpack/duffel/security(src)
|
||||
new /obj/item/storage/backpack/duffel/security(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security/formal(src)
|
||||
new /obj/item/clothing/under/rank/security/formal(src)
|
||||
new /obj/item/clothing/under/rank/security/formal(src)
|
||||
new /obj/item/clothing/under/rank/security/skirt(src)
|
||||
new /obj/item/clothing/under/rank/security/skirt(src)
|
||||
new /obj/item/clothing/under/rank/security/skirt(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/officer(src)
|
||||
new /obj/item/clothing/head/officer(src)
|
||||
new /obj/item/clothing/head/officer(src)
|
||||
|
||||
/obj/structure/closet/redcorp
|
||||
name = "corporate security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/redcorp/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/pink
|
||||
name = "pink wardrobe"
|
||||
icon_state = "pink"
|
||||
icon_closed = "pink"
|
||||
|
||||
/obj/structure/closet/wardrobe/pink/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/black
|
||||
name = "black wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/black/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
if(prob(25))
|
||||
new /obj/item/clothing/suit/jacket/leather(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/green
|
||||
name = "green wardrobe"
|
||||
icon_state = "green"
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/green/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/xenos
|
||||
name = "xenos wardrobe"
|
||||
icon_state = "green"
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/xenos/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/unathi/mantle(src)
|
||||
new /obj/item/clothing/suit/unathi/robe(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/footwraps(src)
|
||||
new /obj/item/clothing/shoes/footwraps(src)
|
||||
new /obj/item/clothing/shoes/footwraps(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/orange
|
||||
name = "prison wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
|
||||
icon_state = "orange"
|
||||
icon_closed = "orange"
|
||||
|
||||
/obj/structure/closet/wardrobe/orange/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow
|
||||
name = "yellow wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow
|
||||
name = "atmospherics wardrobe"
|
||||
icon_state = "atmostech"
|
||||
icon_closed = "atmostech"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/beret/atmos(src)
|
||||
new /obj/item/clothing/head/beret/atmos(src)
|
||||
new /obj/item/clothing/head/beret/atmos(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow
|
||||
name = "engineering wardrobe"
|
||||
icon_state = "engineer"
|
||||
icon_closed = "engineer"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/white
|
||||
name = "white wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/medical_white
|
||||
name = "medical doctor's wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/medical_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/nursesuit (src)
|
||||
new /obj/item/clothing/head/nursehat (src)
|
||||
new /obj/item/clothing/under/rank/nurse(src)
|
||||
new /obj/item/clothing/under/rank/orderly(src)
|
||||
new /obj/item/clothing/suit/storage/fr_jacket(src)
|
||||
new /obj/item/clothing/suit/storage/fr_jacket(src)
|
||||
new /obj/item/clothing/suit/storage/fr_jacket(src)
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
new /obj/item/clothing/head/surgery/blue(src)
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
new /obj/item/clothing/head/surgery/green(src)
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/head/surgery/purple(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs
|
||||
name = "Pajama wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/slippers(src)
|
||||
new /obj/item/clothing/shoes/slippers(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white
|
||||
name = "toxins wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/slippers
|
||||
new /obj/item/clothing/shoes/slippers
|
||||
new /obj/item/clothing/shoes/slippers
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black
|
||||
name = "robotics wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/roboticist/skirt(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/gloves/fingerless(src)
|
||||
new /obj/item/clothing/gloves/fingerless(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white
|
||||
name = "chemistry wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/chemist/skirt(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/storage/backpack/chemistry(src)
|
||||
new /obj/item/storage/backpack/chemistry(src)
|
||||
new /obj/item/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/storage/bag/chemistry(src)
|
||||
new /obj/item/storage/bag/chemistry(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white
|
||||
name = "genetics wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
|
||||
new /obj/item/storage/backpack/genetics(src)
|
||||
new /obj/item/storage/backpack/genetics(src)
|
||||
new /obj/item/storage/backpack/satchel_gen(src)
|
||||
new /obj/item/storage/backpack/satchel_gen(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white
|
||||
name = "virology wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/virologist/skirt(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/storage/backpack/virology(src)
|
||||
new /obj/item/storage/backpack/virology(src)
|
||||
new /obj/item/storage/backpack/satchel_vir(src)
|
||||
new /obj/item/storage/backpack/satchel_vir(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/medic_white
|
||||
name = "medical wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/medic_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/head/headmirror(src)
|
||||
new /obj/item/clothing/head/headmirror(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/grey
|
||||
name = "grey wardrobe"
|
||||
icon_state = "grey"
|
||||
icon_closed = "grey"
|
||||
|
||||
/obj/structure/closet/wardrobe/grey/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed
|
||||
name = "mixed wardrobe"
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/dress/plaid_blue(src)
|
||||
new /obj/item/clothing/under/dress/plaid_red(src)
|
||||
new /obj/item/clothing/under/dress/plaid_purple(src)
|
||||
new /obj/item/clothing/shoes/blue(src)
|
||||
new /obj/item/clothing/shoes/yellow(src)
|
||||
new /obj/item/clothing/shoes/green(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/purple(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/coroner
|
||||
name = "coroner wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/coroner/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/storage/backpack/duffel/medical(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/mortician(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/under/rank/medical/mortician(src)
|
||||
new /obj/item/clothing/head/surgery/black(src)
|
||||
/obj/structure/closet/wardrobe
|
||||
name = "wardrobe"
|
||||
desc = "It's a storage unit for standard-issue Nanotrasen attire."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/wardrobe/generic
|
||||
// Identical to the base wardrobe, aside from containing some stuff.
|
||||
|
||||
/obj/structure/closet/wardrobe/generic/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/wardrobe/red/New()
|
||||
..()
|
||||
new /obj/item/storage/backpack/duffel/security(src)
|
||||
new /obj/item/storage/backpack/duffel/security(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
new /obj/item/clothing/under/rank/security/formal(src)
|
||||
new /obj/item/clothing/under/rank/security/formal(src)
|
||||
new /obj/item/clothing/under/rank/security/formal(src)
|
||||
new /obj/item/clothing/under/rank/security/skirt(src)
|
||||
new /obj/item/clothing/under/rank/security/skirt(src)
|
||||
new /obj/item/clothing/under/rank/security/skirt(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/officer(src)
|
||||
new /obj/item/clothing/head/officer(src)
|
||||
new /obj/item/clothing/head/officer(src)
|
||||
|
||||
/obj/structure/closet/redcorp
|
||||
name = "corporate security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
|
||||
/obj/structure/closet/redcorp/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/pink
|
||||
name = "pink wardrobe"
|
||||
icon_state = "pink"
|
||||
icon_closed = "pink"
|
||||
|
||||
/obj/structure/closet/wardrobe/pink/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/black
|
||||
name = "black wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/black/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
if(prob(25))
|
||||
new /obj/item/clothing/suit/jacket/leather(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/green
|
||||
name = "green wardrobe"
|
||||
icon_state = "green"
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/green/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/xenos
|
||||
name = "xenos wardrobe"
|
||||
icon_state = "green"
|
||||
icon_closed = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/xenos/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/unathi/mantle(src)
|
||||
new /obj/item/clothing/suit/unathi/robe(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
new /obj/item/clothing/shoes/footwraps(src)
|
||||
new /obj/item/clothing/shoes/footwraps(src)
|
||||
new /obj/item/clothing/shoes/footwraps(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/orange
|
||||
name = "prison wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
|
||||
icon_state = "orange"
|
||||
icon_closed = "orange"
|
||||
|
||||
/obj/structure/closet/wardrobe/orange/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/under/color/orange/prison(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow
|
||||
name = "yellow wardrobe"
|
||||
icon_state = "yellow"
|
||||
icon_closed = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow
|
||||
name = "atmospherics wardrobe"
|
||||
icon_state = "atmostech"
|
||||
icon_closed = "atmostech"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician/skirt(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/beret/atmos(src)
|
||||
new /obj/item/clothing/head/beret/atmos(src)
|
||||
new /obj/item/clothing/head/beret/atmos(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow
|
||||
name = "engineering wardrobe"
|
||||
icon_state = "engineer"
|
||||
icon_closed = "engineer"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/under/rank/engineer/skirt(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/white
|
||||
name = "white wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/medical_white
|
||||
name = "medical doctor's wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/medical_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/nursesuit (src)
|
||||
new /obj/item/clothing/head/nursehat (src)
|
||||
new /obj/item/clothing/under/rank/nurse(src)
|
||||
new /obj/item/clothing/under/rank/orderly(src)
|
||||
new /obj/item/clothing/suit/storage/fr_jacket(src)
|
||||
new /obj/item/clothing/suit/storage/fr_jacket(src)
|
||||
new /obj/item/clothing/suit/storage/fr_jacket(src)
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
new /obj/item/clothing/head/surgery/blue(src)
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
new /obj/item/clothing/head/surgery/green(src)
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/head/surgery/purple(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs
|
||||
name = "Pajama wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/red(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/under/pj/blue(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/slippers(src)
|
||||
new /obj/item/clothing/shoes/slippers(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white
|
||||
name = "toxins wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/toxins_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/scientist/skirt(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/slippers
|
||||
new /obj/item/clothing/shoes/slippers
|
||||
new /obj/item/clothing/shoes/slippers
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black
|
||||
name = "robotics wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/roboticist/skirt(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/gloves/fingerless(src)
|
||||
new /obj/item/clothing/gloves/fingerless(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white
|
||||
name = "chemistry wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/chemist/skirt(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/storage/backpack/chemistry(src)
|
||||
new /obj/item/storage/backpack/chemistry(src)
|
||||
new /obj/item/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/storage/bag/chemistry(src)
|
||||
new /obj/item/storage/bag/chemistry(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white
|
||||
name = "genetics wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
|
||||
new /obj/item/storage/backpack/genetics(src)
|
||||
new /obj/item/storage/backpack/genetics(src)
|
||||
new /obj/item/storage/backpack/satchel_gen(src)
|
||||
new /obj/item/storage/backpack/satchel_gen(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white
|
||||
name = "virology wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist/skirt(src)
|
||||
new /obj/item/clothing/under/rank/virologist/skirt(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/storage/backpack/virology(src)
|
||||
new /obj/item/storage/backpack/virology(src)
|
||||
new /obj/item/storage/backpack/satchel_vir(src)
|
||||
new /obj/item/storage/backpack/satchel_vir(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/medic_white
|
||||
name = "medical wardrobe"
|
||||
icon_state = "white"
|
||||
icon_closed = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/medic_white/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/under/rank/medical/skirt(src)
|
||||
new /obj/item/clothing/under/rank/medical/blue(src)
|
||||
new /obj/item/clothing/under/rank/medical/green(src)
|
||||
new /obj/item/clothing/under/rank/medical/purple(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/under/medigown(src)
|
||||
new /obj/item/clothing/head/headmirror(src)
|
||||
new /obj/item/clothing/head/headmirror(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/grey
|
||||
name = "grey wardrobe"
|
||||
icon_state = "grey"
|
||||
icon_closed = "grey"
|
||||
|
||||
/obj/structure/closet/wardrobe/grey/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/duffel(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed
|
||||
name = "mixed wardrobe"
|
||||
icon_state = "mixed"
|
||||
icon_closed = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
new /obj/item/clothing/under/color/orange(src)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
new /obj/item/clothing/under/dress/plaid_blue(src)
|
||||
new /obj/item/clothing/under/dress/plaid_red(src)
|
||||
new /obj/item/clothing/under/dress/plaid_purple(src)
|
||||
new /obj/item/clothing/shoes/blue(src)
|
||||
new /obj/item/clothing/shoes/yellow(src)
|
||||
new /obj/item/clothing/shoes/green(src)
|
||||
new /obj/item/clothing/shoes/orange(src)
|
||||
new /obj/item/clothing/shoes/purple(src)
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/coroner
|
||||
name = "coroner wardrobe"
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/coroner/New()
|
||||
..()
|
||||
if(prob(50))
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
else
|
||||
new /obj/item/storage/backpack/satchel_med(src)
|
||||
new /obj/item/storage/backpack/duffel/medical(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/mortician(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/under/rank/medical/mortician(src)
|
||||
new /obj/item/clothing/head/surgery/black(src)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -88,4 +88,4 @@
|
||||
|
||||
/obj/structure/closet/critter/deer
|
||||
name = "deer crate"
|
||||
content_mob = /mob/living/simple_animal/deer
|
||||
content_mob = /mob/living/simple_animal/deer
|
||||
|
||||
@@ -1,99 +1,99 @@
|
||||
/obj/structure/largecrate
|
||||
name = "large crate"
|
||||
desc = "A hefty wooden crate."
|
||||
icon = 'icons/obj/crates.dmi'
|
||||
icon_state = "largecrate"
|
||||
density = 1
|
||||
var/obj/item/paper/manifest/manifest
|
||||
|
||||
/obj/structure/largecrate/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/largecrate/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
if(manifest)
|
||||
overlays += "manifest"
|
||||
|
||||
/obj/structure/largecrate/attack_hand(mob/user as mob)
|
||||
if(manifest)
|
||||
to_chat(user, "<span class='notice'>You tear the manifest off of the crate.</span>")
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 75, 1)
|
||||
manifest.forceMove(loc)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(manifest)
|
||||
manifest = null
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need a crowbar to pry this open!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
if(manifest)
|
||||
manifest.forceMove(loc)
|
||||
manifest = null
|
||||
update_icon()
|
||||
new /obj/item/stack/sheet/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/O in contents)
|
||||
var/atom/movable/A = O
|
||||
A.forceMove(T)
|
||||
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
|
||||
"<span class='notice'>You pry open \the [src].</span>", \
|
||||
"<span class='notice'>You hear splitting wood.</span>")
|
||||
qdel(src)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/mule
|
||||
|
||||
/obj/structure/largecrate/lisa
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/lisa/attackby(obj/item/W as obj, mob/user as mob) //ugly but oh well
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/pet/dog/corgi/Lisa(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/cow
|
||||
name = "cow crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/cow/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/goat
|
||||
name = "goat crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/goat/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/chick
|
||||
name = "chicken crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/chick/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
var/num = rand(4, 6)
|
||||
for(var/i = 0, i < num, i++)
|
||||
new /mob/living/simple_animal/chick(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/cat
|
||||
name = "cat crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/cat/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/pet/cat(loc)
|
||||
return ..()
|
||||
/obj/structure/largecrate
|
||||
name = "large crate"
|
||||
desc = "A hefty wooden crate."
|
||||
icon = 'icons/obj/crates.dmi'
|
||||
icon_state = "largecrate"
|
||||
density = 1
|
||||
var/obj/item/paper/manifest/manifest
|
||||
|
||||
/obj/structure/largecrate/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/largecrate/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
if(manifest)
|
||||
overlays += "manifest"
|
||||
|
||||
/obj/structure/largecrate/attack_hand(mob/user as mob)
|
||||
if(manifest)
|
||||
to_chat(user, "<span class='notice'>You tear the manifest off of the crate.</span>")
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 75, 1)
|
||||
manifest.forceMove(loc)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(manifest)
|
||||
manifest = null
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need a crowbar to pry this open!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
if(manifest)
|
||||
manifest.forceMove(loc)
|
||||
manifest = null
|
||||
update_icon()
|
||||
new /obj/item/stack/sheet/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/O in contents)
|
||||
var/atom/movable/A = O
|
||||
A.forceMove(T)
|
||||
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
|
||||
"<span class='notice'>You pry open \the [src].</span>", \
|
||||
"<span class='notice'>You hear splitting wood.</span>")
|
||||
qdel(src)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/mule
|
||||
|
||||
/obj/structure/largecrate/lisa
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/lisa/attackby(obj/item/W as obj, mob/user as mob) //ugly but oh well
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/pet/dog/corgi/Lisa(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/cow
|
||||
name = "cow crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/cow/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/goat
|
||||
name = "goat crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/goat/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/chick
|
||||
name = "chicken crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/chick/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
var/num = rand(4, 6)
|
||||
for(var/i = 0, i < num, i++)
|
||||
new /mob/living/simple_animal/chick(loc)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/cat
|
||||
name = "cat crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/cat/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/pet/cat(loc)
|
||||
return ..()
|
||||
|
||||
@@ -126,4 +126,4 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/overload/ex_act(severity)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,238 +1,238 @@
|
||||
/obj/structure/displaycase
|
||||
name = "display case"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox0"
|
||||
desc = "A display case for prized possessions."
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
var/obj/item/showpiece = null
|
||||
var/alert = TRUE
|
||||
var/open = FALSE
|
||||
var/openable = TRUE
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
var/start_showpiece_type = null //add type for items on display
|
||||
var/list/start_showpieces = list() //Takes sublists in the form of list("type" = /obj/item/bikehorn, "trophy_message" = "henk")
|
||||
var/trophy_message = ""
|
||||
|
||||
/obj/structure/displaycase/Initialize(mapload)
|
||||
. = ..()
|
||||
if(start_showpieces.len && !start_showpiece_type)
|
||||
var/list/showpiece_entry = pick(start_showpieces)
|
||||
if (showpiece_entry && showpiece_entry["type"])
|
||||
start_showpiece_type = showpiece_entry["type"]
|
||||
if (showpiece_entry["trophy_message"])
|
||||
trophy_message = showpiece_entry["trophy_message"]
|
||||
if(start_showpiece_type)
|
||||
showpiece = new start_showpiece_type (src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
QDEL_NULL(showpiece)
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/examine(mob/user)
|
||||
. = ..()
|
||||
if(alert)
|
||||
. += "<span class='notice'>Hooked up with an anti-theft system.</span>"
|
||||
if(showpiece)
|
||||
. += "<span class='notice'>There's [showpiece] inside.</span>"
|
||||
if(trophy_message)
|
||||
. += "The plaque reads:\n [trophy_message]"
|
||||
|
||||
/obj/structure/displaycase/proc/dump()
|
||||
if(showpiece)
|
||||
showpiece.forceMove(loc)
|
||||
showpiece = null
|
||||
|
||||
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/displaycase/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
dump()
|
||||
if(!disassembled)
|
||||
new /obj/item/shard(loc)
|
||||
trigger_alarm()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/displaycase/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
density = FALSE
|
||||
broken = 1
|
||||
new /obj/item/shard( src.loc )
|
||||
playsound(src, "shatter", 70, TRUE)
|
||||
update_icon()
|
||||
trigger_alarm()
|
||||
|
||||
/obj/structure/displaycase/proc/trigger_alarm()
|
||||
set waitfor = FALSE
|
||||
if(alert && is_station_contact(z))
|
||||
var/area/alarmed = get_area(src)
|
||||
alarmed.burglaralert(src)
|
||||
visible_message("<span class='danger'>The burglar alarm goes off!</span>")
|
||||
// Play the burglar alarm three times
|
||||
for(var/i = 0, i < 4, i++)
|
||||
playsound(src, 'sound/machines/burglar_alarm.ogg', 50, 0)
|
||||
sleep(74) // 7.4 seconds long
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
var/icon/I
|
||||
if(open)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
|
||||
else
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox0")
|
||||
if(broken)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
|
||||
if(showpiece)
|
||||
var/icon/S = getFlatIcon(showpiece)
|
||||
S.Scale(17, 17)
|
||||
I.Blend(S,ICON_UNDERLAY,8,8)
|
||||
icon = I
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/I, mob/user, params)
|
||||
if(I.GetID() && !broken && openable)
|
||||
if(allowed(user))
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
else if(open && !showpiece)
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
showpiece = I
|
||||
to_chat(user, "<span class='notice'>You put [I] on display</span>")
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/stack/sheet/glass) && broken)
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two glass sheets to fix the case!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start fixing [src]...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(2)
|
||||
broken = 0
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/crowbar_act(mob/user, obj/item/I) //Only applies to the lab cage and player made display cases
|
||||
if(alert || !openable)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(broken)
|
||||
if(showpiece)
|
||||
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
|
||||
if(I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed case</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start to [open ? "close":"open"] [src].</span>")
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
|
||||
obj/structure/displaycase/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(default_welder_repair(user, I))
|
||||
broken = FALSE
|
||||
|
||||
/obj/structure/displaycase/proc/toggle_lock(mob/user)
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(showpiece && (broken || open))
|
||||
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
|
||||
dump()
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
//prevents remote "kicks" with TK
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] kicks the display case.</span>")
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
take_damage(2)
|
||||
|
||||
/obj/structure/displaycase_chassis
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
name = "display case chassis"
|
||||
desc = "The wooden base of a display case."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox_chassis"
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/airlock_electronics))
|
||||
to_chat(user, "<span class='notice'>You start installing the electronics into [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30, target = src))
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
electronics = I
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 10)
|
||||
to_chat(user, "<span class='warning'>You need ten glass sheets 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(10)
|
||||
var/obj/structure/displaycase/display = new(src.loc)
|
||||
if(electronics)
|
||||
electronics.forceMove(display)
|
||||
display.electronics = electronics
|
||||
if(electronics.one_access)
|
||||
display.req_one_access = electronics.conf_access
|
||||
else
|
||||
display.req_access = electronics.conf_access
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase_chassis/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
return
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
new /obj/item/stack/sheet/wood(get_turf(src), 5)
|
||||
qdel(src)
|
||||
|
||||
//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed.
|
||||
/obj/structure/displaycase/captain
|
||||
alert = TRUE
|
||||
start_showpiece_type = /obj/item/gun/energy/laser/captain
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
|
||||
/obj/structure/displaycase/labcage
|
||||
name = "lab cage"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
|
||||
req_access = list(ACCESS_RD)
|
||||
|
||||
/obj/structure/displaycase/stechkin
|
||||
name = "officer's display case"
|
||||
desc = "A display case containing a humble stechkin pistol. Never forget your roots."
|
||||
start_showpiece_type = /obj/item/gun/projectile/automatic/pistol
|
||||
req_access = list(ACCESS_SYNDICATE_COMMAND)
|
||||
/obj/structure/displaycase
|
||||
name = "display case"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox0"
|
||||
desc = "A display case for prized possessions."
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
var/obj/item/showpiece = null
|
||||
var/alert = TRUE
|
||||
var/open = FALSE
|
||||
var/openable = TRUE
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
var/start_showpiece_type = null //add type for items on display
|
||||
var/list/start_showpieces = list() //Takes sublists in the form of list("type" = /obj/item/bikehorn, "trophy_message" = "henk")
|
||||
var/trophy_message = ""
|
||||
|
||||
/obj/structure/displaycase/Initialize(mapload)
|
||||
. = ..()
|
||||
if(start_showpieces.len && !start_showpiece_type)
|
||||
var/list/showpiece_entry = pick(start_showpieces)
|
||||
if (showpiece_entry && showpiece_entry["type"])
|
||||
start_showpiece_type = showpiece_entry["type"]
|
||||
if (showpiece_entry["trophy_message"])
|
||||
trophy_message = showpiece_entry["trophy_message"]
|
||||
if(start_showpiece_type)
|
||||
showpiece = new start_showpiece_type (src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
QDEL_NULL(showpiece)
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/examine(mob/user)
|
||||
. = ..()
|
||||
if(alert)
|
||||
. += "<span class='notice'>Hooked up with an anti-theft system.</span>"
|
||||
if(showpiece)
|
||||
. += "<span class='notice'>There's [showpiece] inside.</span>"
|
||||
if(trophy_message)
|
||||
. += "The plaque reads:\n [trophy_message]"
|
||||
|
||||
/obj/structure/displaycase/proc/dump()
|
||||
if(showpiece)
|
||||
showpiece.forceMove(loc)
|
||||
showpiece = null
|
||||
|
||||
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/displaycase/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
dump()
|
||||
if(!disassembled)
|
||||
new /obj/item/shard(loc)
|
||||
trigger_alarm()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/displaycase/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
density = FALSE
|
||||
broken = 1
|
||||
new /obj/item/shard( src.loc )
|
||||
playsound(src, "shatter", 70, TRUE)
|
||||
update_icon()
|
||||
trigger_alarm()
|
||||
|
||||
/obj/structure/displaycase/proc/trigger_alarm()
|
||||
set waitfor = FALSE
|
||||
if(alert && is_station_contact(z))
|
||||
var/area/alarmed = get_area(src)
|
||||
alarmed.burglaralert(src)
|
||||
visible_message("<span class='danger'>The burglar alarm goes off!</span>")
|
||||
// Play the burglar alarm three times
|
||||
for(var/i = 0, i < 4, i++)
|
||||
playsound(src, 'sound/machines/burglar_alarm.ogg', 50, 0)
|
||||
sleep(74) // 7.4 seconds long
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
var/icon/I
|
||||
if(open)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
|
||||
else
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox0")
|
||||
if(broken)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
|
||||
if(showpiece)
|
||||
var/icon/S = getFlatIcon(showpiece)
|
||||
S.Scale(17, 17)
|
||||
I.Blend(S,ICON_UNDERLAY,8,8)
|
||||
icon = I
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/I, mob/user, params)
|
||||
if(I.GetID() && !broken && openable)
|
||||
if(allowed(user))
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
else if(open && !showpiece)
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
showpiece = I
|
||||
to_chat(user, "<span class='notice'>You put [I] on display</span>")
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/stack/sheet/glass) && broken)
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two glass sheets to fix the case!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start fixing [src]...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(2)
|
||||
broken = 0
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/crowbar_act(mob/user, obj/item/I) //Only applies to the lab cage and player made display cases
|
||||
if(alert || !openable)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(broken)
|
||||
if(showpiece)
|
||||
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
|
||||
if(I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed case</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start to [open ? "close":"open"] [src].</span>")
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
|
||||
obj/structure/displaycase/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(default_welder_repair(user, I))
|
||||
broken = FALSE
|
||||
|
||||
/obj/structure/displaycase/proc/toggle_lock(mob/user)
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(showpiece && (broken || open))
|
||||
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
|
||||
dump()
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
//prevents remote "kicks" with TK
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] kicks the display case.</span>")
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
take_damage(2)
|
||||
|
||||
/obj/structure/displaycase_chassis
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
name = "display case chassis"
|
||||
desc = "The wooden base of a display case."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox_chassis"
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/airlock_electronics))
|
||||
to_chat(user, "<span class='notice'>You start installing the electronics into [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30, target = src))
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
electronics = I
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 10)
|
||||
to_chat(user, "<span class='warning'>You need ten glass sheets 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(10)
|
||||
var/obj/structure/displaycase/display = new(src.loc)
|
||||
if(electronics)
|
||||
electronics.forceMove(display)
|
||||
display.electronics = electronics
|
||||
if(electronics.one_access)
|
||||
display.req_one_access = electronics.conf_access
|
||||
else
|
||||
display.req_access = electronics.conf_access
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase_chassis/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
return
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
new /obj/item/stack/sheet/wood(get_turf(src), 5)
|
||||
qdel(src)
|
||||
|
||||
//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed.
|
||||
/obj/structure/displaycase/captain
|
||||
alert = TRUE
|
||||
start_showpiece_type = /obj/item/gun/energy/laser/captain
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
|
||||
/obj/structure/displaycase/labcage
|
||||
name = "lab cage"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
|
||||
req_access = list(ACCESS_RD)
|
||||
|
||||
/obj/structure/displaycase/stechkin
|
||||
name = "officer's display case"
|
||||
desc = "A display case containing a humble stechkin pistol. Never forget your roots."
|
||||
start_showpiece_type = /obj/item/gun/projectile/automatic/pistol
|
||||
req_access = list(ACCESS_SYNDICATE_COMMAND)
|
||||
|
||||
@@ -1,313 +1,313 @@
|
||||
/obj/structure/door_assembly
|
||||
name = "airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/public.dmi'
|
||||
icon_state = "construction"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
max_integrity = 200
|
||||
var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
var/mineral
|
||||
var/base_name = "airlock"
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
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
|
||||
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_icon()
|
||||
update_name()
|
||||
..()
|
||||
|
||||
/obj/structure/door_assembly/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
return ..()
|
||||
|
||||
/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)
|
||||
. += "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>"
|
||||
else
|
||||
. += "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>"
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
. += "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>"
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
. += "<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)
|
||||
. += "<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)
|
||||
. += "<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)
|
||||
. += "<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
|
||||
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>"
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
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
|
||||
|
||||
else if(iscoil(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES && anchored)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.get_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(coil.get_amount() < 1 || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
coil.use(1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/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(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/stack/sheet) && (!glass || !mineral))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(S)
|
||||
if(S.get_amount() >= 1)
|
||||
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.get_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.get_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.get_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 to 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
|
||||
return ..()
|
||||
update_name()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/crowbar_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is removing the electronics from the airlock assembly...", "You start to remove electronics from the airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || 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/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/airlock_electronics(loc)
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
update_icon()
|
||||
update_name()
|
||||
|
||||
/obj/structure/door_assembly/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is finishing the airlock...", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
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.unres_sides = electronics.unres_sides
|
||||
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)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is cutting the wires from the airlock assembly...", "You start to cut the wires from airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || 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
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
user.visible_message("[user] is unsecuring the airlock assembly from the floor...", "You start to unsecure the airlock assembly from the floor...")
|
||||
else
|
||||
user.visible_message("[user] is securing the airlock assembly to the floor...", "You start to secure the airlock assembly to the floor...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure the airlock assembly.</span>")
|
||||
anchored = !anchored
|
||||
|
||||
/obj/structure/door_assembly/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
visible_message("<span class='notice'>[user] welds the [mineral] plating off [src].</span>",\
|
||||
"<span class='notice'>You start to weld the [mineral] plating off [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
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)
|
||||
visible_message("<span class='notice'>[user] welds the glass panel out of [src].</span>",\
|
||||
"<span class='notice'>You start to weld the glass panel out of the [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
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 = FALSE
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = FALSE
|
||||
else if(!anchored)
|
||||
visible_message("<span class='warning'>[user] disassembles [src].</span>", \
|
||||
"<span class='notice'>You start to disassemble [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
update_icon()
|
||||
|
||||
/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(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
if(anchored)
|
||||
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(!(flags & NODECONSTRUCT))
|
||||
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/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)
|
||||
/obj/structure/door_assembly
|
||||
name = "airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/public.dmi'
|
||||
icon_state = "construction"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
max_integrity = 200
|
||||
var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
var/mineral
|
||||
var/base_name = "airlock"
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
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
|
||||
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_icon()
|
||||
update_name()
|
||||
..()
|
||||
|
||||
/obj/structure/door_assembly/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
return ..()
|
||||
|
||||
/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)
|
||||
. += "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>"
|
||||
else
|
||||
. += "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>"
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
. += "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>"
|
||||
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
. += "<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)
|
||||
. += "<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)
|
||||
. += "<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)
|
||||
. += "<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
|
||||
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>"
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
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
|
||||
|
||||
else if(iscoil(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES && anchored)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.get_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(coil.get_amount() < 1 || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
coil.use(1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/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(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/stack/sheet) && (!glass || !mineral))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(S)
|
||||
if(S.get_amount() >= 1)
|
||||
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.get_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.get_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.get_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 to 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
|
||||
return ..()
|
||||
update_name()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/crowbar_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is removing the electronics from the airlock assembly...", "You start to remove electronics from the airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || 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/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/airlock_electronics(loc)
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
update_icon()
|
||||
update_name()
|
||||
|
||||
/obj/structure/door_assembly/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is finishing the airlock...", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
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.unres_sides = electronics.unres_sides
|
||||
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)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is cutting the wires from the airlock assembly...", "You start to cut the wires from airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || 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
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
user.visible_message("[user] is unsecuring the airlock assembly from the floor...", "You start to unsecure the airlock assembly from the floor...")
|
||||
else
|
||||
user.visible_message("[user] is securing the airlock assembly to the floor...", "You start to secure the airlock assembly to the floor...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure the airlock assembly.</span>")
|
||||
anchored = !anchored
|
||||
|
||||
/obj/structure/door_assembly/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
visible_message("<span class='notice'>[user] welds the [mineral] plating off [src].</span>",\
|
||||
"<span class='notice'>You start to weld the [mineral] plating off [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
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)
|
||||
visible_message("<span class='notice'>[user] welds the glass panel out of [src].</span>",\
|
||||
"<span class='notice'>You start to weld the glass panel out of the [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
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 = FALSE
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = FALSE
|
||||
else if(!anchored)
|
||||
visible_message("<span class='warning'>[user] disassembles [src].</span>", \
|
||||
"<span class='notice'>You start to disassemble [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
update_icon()
|
||||
|
||||
/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(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
if(anchored)
|
||||
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(!(flags & NODECONSTRUCT))
|
||||
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/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)
|
||||
|
||||
@@ -79,4 +79,4 @@
|
||||
|
||||
/obj/structure/dresser/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/wood(drop_location(), 30)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -80,4 +80,4 @@
|
||||
spawn(1)
|
||||
buckled_mob.electrocute_act(110, src, 1)
|
||||
A.power_light = light
|
||||
A.updateicon()
|
||||
A.updateicon()
|
||||
|
||||
@@ -179,4 +179,4 @@
|
||||
if(myredtoolbox)
|
||||
overlays += "cart_redtoolbox"
|
||||
if(myyellowtoolbox)
|
||||
overlays += "cart_yellowtoolbox"
|
||||
overlays += "cart_yellowtoolbox"
|
||||
|
||||
@@ -1,355 +1,355 @@
|
||||
/*
|
||||
* False Walls
|
||||
*/
|
||||
|
||||
// Minimum pressure difference to fail building falsewalls.
|
||||
// Also affects admin alerts.
|
||||
#define FALSEDOOR_MAX_PRESSURE_DIFF 25.0
|
||||
|
||||
/obj/structure/falsewall
|
||||
name = "wall"
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
anchored = TRUE
|
||||
icon = 'icons/turf/walls/wall.dmi'
|
||||
icon_state = "wall"
|
||||
|
||||
var/mineral = /obj/item/stack/sheet/metal
|
||||
var/mineral_amount = 2
|
||||
var/walltype = /turf/simulated/wall
|
||||
var/girder_type = /obj/structure/girder/displaced
|
||||
var/opening = FALSE
|
||||
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
max_integrity = 100
|
||||
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/wall,
|
||||
/turf/simulated/wall/r_wall,
|
||||
/obj/structure/falsewall,
|
||||
/obj/structure/falsewall/brass,
|
||||
/obj/structure/falsewall/reinforced, // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS. //because we do smooth with real r-walls now
|
||||
/turf/simulated/wall/rust,
|
||||
/turf/simulated/wall/r_wall/rust)
|
||||
smooth = SMOOTH_TRUE
|
||||
|
||||
/obj/structure/falsewall/New(loc)
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/falsewall/ratvar_act()
|
||||
new /obj/structure/falsewall/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/falsewall/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/falsewall/attack_hand(mob/user)
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/falsewall/proc/toggle(mob/user)
|
||||
if(opening)
|
||||
return
|
||||
|
||||
opening = 1
|
||||
if(density)
|
||||
do_the_flick()
|
||||
sleep(4)
|
||||
density = 0
|
||||
set_opacity(0)
|
||||
update_icon(0)
|
||||
else
|
||||
var/srcturf = get_turf(src)
|
||||
for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield
|
||||
opening = 0
|
||||
return
|
||||
do_the_flick()
|
||||
density = 1
|
||||
sleep(4)
|
||||
set_opacity(1)
|
||||
update_icon()
|
||||
air_update_turf(1)
|
||||
opening = 0
|
||||
|
||||
/obj/structure/falsewall/proc/do_the_flick()
|
||||
if(density)
|
||||
smooth = SMOOTH_FALSE
|
||||
clear_smooth_overlays()
|
||||
icon_state = "fwall_opening"
|
||||
else
|
||||
icon_state = "fwall_closing"
|
||||
|
||||
/obj/structure/falsewall/update_icon()
|
||||
if(density)
|
||||
icon_state = initial(icon_state)
|
||||
smooth = SMOOTH_TRUE
|
||||
queue_smooth(src)
|
||||
else
|
||||
icon_state = "fwall_open"
|
||||
|
||||
/obj/structure/falsewall/proc/ChangeToWall(delete = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(walltype)
|
||||
if(delete)
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/obj/structure/falsewall/attackby(obj/item/W, mob/user, params)
|
||||
if(opening)
|
||||
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving.</span>")
|
||||
return
|
||||
|
||||
if(density)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.density)
|
||||
to_chat(user, "<span class='warning'>[src] is blocked!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(!istype(T, /turf/simulated/floor))
|
||||
to_chat(user, "<span class='warning'>[src] bolts must be tightened on the floor!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='warning'>You tighten the bolts on the wall.</span>")
|
||||
ChangeToWall()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
||||
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter) || istype(W, /obj/item/pickaxe/drill/diamonddrill) || istype(W, /obj/item/pickaxe/drill/jackhammer) || istype(W, /obj/item/melee/energy/blade))
|
||||
dismantle(user, TRUE)
|
||||
|
||||
/obj/structure/falsewall/welder_act(mob/user, obj/item/I)
|
||||
if(!density)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, volume = I.tool_volume))
|
||||
return
|
||||
dismantle(user, TRUE)
|
||||
|
||||
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE)
|
||||
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='warning'>You dismantle the false wall.</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
||||
deconstruct(disassembled)
|
||||
|
||||
/obj/structure/falsewall/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(disassembled)
|
||||
new girder_type(loc)
|
||||
if(mineral_amount)
|
||||
for(var/i in 1 to mineral_amount)
|
||||
new mineral(loc)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* False R-Walls
|
||||
*/
|
||||
|
||||
/obj/structure/falsewall/reinforced
|
||||
name = "reinforced wall"
|
||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||
icon = 'icons/turf/walls/reinforced_wall.dmi'
|
||||
icon_state = "r_wall"
|
||||
walltype = /turf/simulated/wall/r_wall
|
||||
mineral = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
if(delete)
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/*
|
||||
* Uranium Falsewalls
|
||||
*/
|
||||
|
||||
/obj/structure/falsewall/uranium
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon = 'icons/turf/walls/uranium_wall.dmi'
|
||||
icon_state = "uranium"
|
||||
mineral = /obj/item/stack/sheet/mineral/uranium
|
||||
walltype = /turf/simulated/wall/mineral/uranium
|
||||
var/active = null
|
||||
var/last_event = 0
|
||||
canSmoothWith = list(/obj/structure/falsewall/uranium, /turf/simulated/wall/mineral/uranium)
|
||||
|
||||
/obj/structure/falsewall/uranium/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/uranium/proc/radiate()
|
||||
if(!active)
|
||||
if(world.time > last_event+15)
|
||||
active = 1
|
||||
for(var/mob/living/L in range(3,src))
|
||||
L.apply_effect(12,IRRADIATE,0)
|
||||
for(var/turf/simulated/wall/mineral/uranium/T in range(3,src))
|
||||
T.radiate()
|
||||
last_event = world.time
|
||||
active = null
|
||||
return
|
||||
return
|
||||
/*
|
||||
* Other misc falsewall types
|
||||
*/
|
||||
|
||||
/obj/structure/falsewall/gold
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon = 'icons/turf/walls/gold_wall.dmi'
|
||||
icon_state = "gold"
|
||||
mineral = /obj/item/stack/sheet/mineral/gold
|
||||
walltype = /turf/simulated/wall/mineral/gold
|
||||
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
|
||||
|
||||
/obj/structure/falsewall/silver
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny."
|
||||
icon = 'icons/turf/walls/silver_wall.dmi'
|
||||
icon_state = "silver"
|
||||
mineral = /obj/item/stack/sheet/mineral/silver
|
||||
walltype = /turf/simulated/wall/mineral/silver
|
||||
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
|
||||
|
||||
/obj/structure/falsewall/diamond
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon = 'icons/turf/walls/diamond_wall.dmi'
|
||||
icon_state = "diamond"
|
||||
mineral = /obj/item/stack/sheet/mineral/diamond
|
||||
walltype = /turf/simulated/wall/mineral/diamond
|
||||
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
|
||||
max_integrity = 800
|
||||
|
||||
|
||||
/obj/structure/falsewall/plasma
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
mineral = /obj/item/stack/sheet/mineral/plasma
|
||||
walltype = /turf/simulated/wall/mineral/plasma
|
||||
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
|
||||
|
||||
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
|
||||
if(is_hot(W) > 300)
|
||||
message_admins("Plasma falsewall ignited by [key_name_admin(user)] in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("Plasma falsewall ignited by [key_name(user)] in [AREACOORD(T)]")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
burnbabyburn()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
atmos_spawn_air(LINDA_SPAWN_HEAT | LINDA_SPAWN_TOXINS, 400)
|
||||
new /obj/structure/girder/displaced(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 300)
|
||||
burnbabyburn()
|
||||
|
||||
/obj/structure/falsewall/alien
|
||||
name = "alien wall"
|
||||
desc = "A strange-looking alien wall."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
mineral = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/simulated/wall/mineral/abductor
|
||||
canSmoothWith = list(/obj/structure/falsewall/alien, /turf/simulated/wall/mineral/alien)
|
||||
|
||||
|
||||
/obj/structure/falsewall/bananium
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon = 'icons/turf/walls/bananium_wall.dmi'
|
||||
icon_state = "bananium"
|
||||
mineral = /obj/item/stack/sheet/mineral/bananium
|
||||
walltype = /turf/simulated/wall/mineral/bananium
|
||||
canSmoothWith = list(/obj/structure/falsewall/bananium, /turf/simulated/wall/mineral/bananium)
|
||||
|
||||
/obj/structure/falsewall/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon_state = "sandstone"
|
||||
mineral = /obj/item/stack/sheet/mineral/sandstone
|
||||
walltype = /turf/simulated/wall/mineral/sandstone
|
||||
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/simulated/wall/mineral/sandstone)
|
||||
|
||||
/obj/structure/falsewall/wood
|
||||
name = "wooden wall"
|
||||
desc = "A wall with wooden plating. Stiff."
|
||||
icon = 'icons/turf/walls/wood_wall.dmi'
|
||||
icon_state = "wood"
|
||||
mineral = /obj/item/stack/sheet/wood
|
||||
walltype = /turf/simulated/wall/mineral/wood
|
||||
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
|
||||
|
||||
/obj/structure/falsewall/iron
|
||||
name = "rough metal wall"
|
||||
desc = "A wall with rough metal plating."
|
||||
icon = 'icons/turf/walls/iron_wall.dmi'
|
||||
icon_state = "iron"
|
||||
mineral = /obj/item/stack/rods
|
||||
mineral_amount = 5
|
||||
walltype = /turf/simulated/wall/mineral/iron
|
||||
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
|
||||
|
||||
/obj/structure/falsewall/abductor
|
||||
name = "alien wall"
|
||||
desc = "A wall with alien alloy plating."
|
||||
icon = 'icons/turf/walls/abductor_wall.dmi'
|
||||
icon_state = "abductor"
|
||||
mineral = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/simulated/wall/mineral/abductor
|
||||
canSmoothWith = list(/obj/structure/falsewall/abductor, /turf/simulated/wall/mineral/abductor)
|
||||
|
||||
/obj/structure/falsewall/titanium
|
||||
desc = "A light-weight titanium wall used in shuttles."
|
||||
icon = 'icons/turf/walls/shuttle_wall.dmi'
|
||||
icon_state = "shuttle"
|
||||
mineral = /obj/item/stack/sheet/mineral/titanium
|
||||
walltype = /turf/simulated/wall/mineral/titanium
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
|
||||
|
||||
/obj/structure/falsewall/plastitanium
|
||||
desc = "An evil wall of plasma and titanium."
|
||||
icon = 'icons/turf/walls/plastitanium_wall.dmi'
|
||||
icon_state = "shuttle"
|
||||
mineral = /obj/item/stack/sheet/mineral/plastitanium
|
||||
walltype = /turf/simulated/wall/mineral/plastitanium
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/mineral/plastitanium/nodiagonal, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
|
||||
|
||||
/obj/structure/falsewall/brass
|
||||
name = "clockwork wall"
|
||||
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
|
||||
icon = 'icons/turf/walls/clockwork_wall.dmi'
|
||||
icon_state = "clockwork_wall"
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
mineral_amount = 1
|
||||
canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass)
|
||||
girder_type = /obj/structure/clockwork/wall_gear/displaced
|
||||
walltype = /turf/simulated/wall/clockwork
|
||||
mineral = /obj/item/stack/tile/brass
|
||||
|
||||
/obj/structure/falsewall/brass/New(loc)
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
new /obj/effect/temp_visual/ratvar/wall/false(T)
|
||||
new /obj/effect/temp_visual/ratvar/beam/falsewall(T)
|
||||
/*
|
||||
* False Walls
|
||||
*/
|
||||
|
||||
// Minimum pressure difference to fail building falsewalls.
|
||||
// Also affects admin alerts.
|
||||
#define FALSEDOOR_MAX_PRESSURE_DIFF 25.0
|
||||
|
||||
/obj/structure/falsewall
|
||||
name = "wall"
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
anchored = TRUE
|
||||
icon = 'icons/turf/walls/wall.dmi'
|
||||
icon_state = "wall"
|
||||
|
||||
var/mineral = /obj/item/stack/sheet/metal
|
||||
var/mineral_amount = 2
|
||||
var/walltype = /turf/simulated/wall
|
||||
var/girder_type = /obj/structure/girder/displaced
|
||||
var/opening = FALSE
|
||||
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
max_integrity = 100
|
||||
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/wall,
|
||||
/turf/simulated/wall/r_wall,
|
||||
/obj/structure/falsewall,
|
||||
/obj/structure/falsewall/brass,
|
||||
/obj/structure/falsewall/reinforced, // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS. //because we do smooth with real r-walls now
|
||||
/turf/simulated/wall/rust,
|
||||
/turf/simulated/wall/r_wall/rust)
|
||||
smooth = SMOOTH_TRUE
|
||||
|
||||
/obj/structure/falsewall/New(loc)
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/falsewall/ratvar_act()
|
||||
new /obj/structure/falsewall/brass(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/falsewall/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/falsewall/attack_hand(mob/user)
|
||||
toggle(user)
|
||||
|
||||
/obj/structure/falsewall/proc/toggle(mob/user)
|
||||
if(opening)
|
||||
return
|
||||
|
||||
opening = 1
|
||||
if(density)
|
||||
do_the_flick()
|
||||
sleep(4)
|
||||
density = 0
|
||||
set_opacity(0)
|
||||
update_icon(0)
|
||||
else
|
||||
var/srcturf = get_turf(src)
|
||||
for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield
|
||||
opening = 0
|
||||
return
|
||||
do_the_flick()
|
||||
density = 1
|
||||
sleep(4)
|
||||
set_opacity(1)
|
||||
update_icon()
|
||||
air_update_turf(1)
|
||||
opening = 0
|
||||
|
||||
/obj/structure/falsewall/proc/do_the_flick()
|
||||
if(density)
|
||||
smooth = SMOOTH_FALSE
|
||||
clear_smooth_overlays()
|
||||
icon_state = "fwall_opening"
|
||||
else
|
||||
icon_state = "fwall_closing"
|
||||
|
||||
/obj/structure/falsewall/update_icon()
|
||||
if(density)
|
||||
icon_state = initial(icon_state)
|
||||
smooth = SMOOTH_TRUE
|
||||
queue_smooth(src)
|
||||
else
|
||||
icon_state = "fwall_open"
|
||||
|
||||
/obj/structure/falsewall/proc/ChangeToWall(delete = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(walltype)
|
||||
if(delete)
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/obj/structure/falsewall/attackby(obj/item/W, mob/user, params)
|
||||
if(opening)
|
||||
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving.</span>")
|
||||
return
|
||||
|
||||
if(density)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.density)
|
||||
to_chat(user, "<span class='warning'>[src] is blocked!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(!istype(T, /turf/simulated/floor))
|
||||
to_chat(user, "<span class='warning'>[src] bolts must be tightened on the floor!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='warning'>You tighten the bolts on the wall.</span>")
|
||||
ChangeToWall()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
||||
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter) || istype(W, /obj/item/pickaxe/drill/diamonddrill) || istype(W, /obj/item/pickaxe/drill/jackhammer) || istype(W, /obj/item/melee/energy/blade))
|
||||
dismantle(user, TRUE)
|
||||
|
||||
/obj/structure/falsewall/welder_act(mob/user, obj/item/I)
|
||||
if(!density)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, volume = I.tool_volume))
|
||||
return
|
||||
dismantle(user, TRUE)
|
||||
|
||||
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE)
|
||||
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='warning'>You dismantle the false wall.</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
||||
deconstruct(disassembled)
|
||||
|
||||
/obj/structure/falsewall/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(disassembled)
|
||||
new girder_type(loc)
|
||||
if(mineral_amount)
|
||||
for(var/i in 1 to mineral_amount)
|
||||
new mineral(loc)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* False R-Walls
|
||||
*/
|
||||
|
||||
/obj/structure/falsewall/reinforced
|
||||
name = "reinforced wall"
|
||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||
icon = 'icons/turf/walls/reinforced_wall.dmi'
|
||||
icon_state = "r_wall"
|
||||
walltype = /turf/simulated/wall/r_wall
|
||||
mineral = /obj/item/stack/sheet/plasteel
|
||||
|
||||
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
if(delete)
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/*
|
||||
* Uranium Falsewalls
|
||||
*/
|
||||
|
||||
/obj/structure/falsewall/uranium
|
||||
name = "uranium wall"
|
||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||
icon = 'icons/turf/walls/uranium_wall.dmi'
|
||||
icon_state = "uranium"
|
||||
mineral = /obj/item/stack/sheet/mineral/uranium
|
||||
walltype = /turf/simulated/wall/mineral/uranium
|
||||
var/active = null
|
||||
var/last_event = 0
|
||||
canSmoothWith = list(/obj/structure/falsewall/uranium, /turf/simulated/wall/mineral/uranium)
|
||||
|
||||
/obj/structure/falsewall/uranium/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/uranium/proc/radiate()
|
||||
if(!active)
|
||||
if(world.time > last_event+15)
|
||||
active = 1
|
||||
for(var/mob/living/L in range(3,src))
|
||||
L.apply_effect(12,IRRADIATE,0)
|
||||
for(var/turf/simulated/wall/mineral/uranium/T in range(3,src))
|
||||
T.radiate()
|
||||
last_event = world.time
|
||||
active = null
|
||||
return
|
||||
return
|
||||
/*
|
||||
* Other misc falsewall types
|
||||
*/
|
||||
|
||||
/obj/structure/falsewall/gold
|
||||
name = "gold wall"
|
||||
desc = "A wall with gold plating. Swag!"
|
||||
icon = 'icons/turf/walls/gold_wall.dmi'
|
||||
icon_state = "gold"
|
||||
mineral = /obj/item/stack/sheet/mineral/gold
|
||||
walltype = /turf/simulated/wall/mineral/gold
|
||||
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/simulated/wall/mineral/gold)
|
||||
|
||||
/obj/structure/falsewall/silver
|
||||
name = "silver wall"
|
||||
desc = "A wall with silver plating. Shiny."
|
||||
icon = 'icons/turf/walls/silver_wall.dmi'
|
||||
icon_state = "silver"
|
||||
mineral = /obj/item/stack/sheet/mineral/silver
|
||||
walltype = /turf/simulated/wall/mineral/silver
|
||||
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/simulated/wall/mineral/silver)
|
||||
|
||||
/obj/structure/falsewall/diamond
|
||||
name = "diamond wall"
|
||||
desc = "A wall with diamond plating. You monster."
|
||||
icon = 'icons/turf/walls/diamond_wall.dmi'
|
||||
icon_state = "diamond"
|
||||
mineral = /obj/item/stack/sheet/mineral/diamond
|
||||
walltype = /turf/simulated/wall/mineral/diamond
|
||||
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
|
||||
max_integrity = 800
|
||||
|
||||
|
||||
/obj/structure/falsewall/plasma
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
mineral = /obj/item/stack/sheet/mineral/plasma
|
||||
walltype = /turf/simulated/wall/mineral/plasma
|
||||
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/simulated/wall/mineral/plasma, /turf/simulated/wall/mineral/alien)
|
||||
|
||||
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
|
||||
if(is_hot(W) > 300)
|
||||
message_admins("Plasma falsewall ignited by [key_name_admin(user)] in [ADMIN_VERBOSEJMP(T)]")
|
||||
log_game("Plasma falsewall ignited by [key_name(user)] in [AREACOORD(T)]")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
burnbabyburn()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
atmos_spawn_air(LINDA_SPAWN_HEAT | LINDA_SPAWN_TOXINS, 400)
|
||||
new /obj/structure/girder/displaced(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 300)
|
||||
burnbabyburn()
|
||||
|
||||
/obj/structure/falsewall/alien
|
||||
name = "alien wall"
|
||||
desc = "A strange-looking alien wall."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
mineral = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/simulated/wall/mineral/abductor
|
||||
canSmoothWith = list(/obj/structure/falsewall/alien, /turf/simulated/wall/mineral/alien)
|
||||
|
||||
|
||||
/obj/structure/falsewall/bananium
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon = 'icons/turf/walls/bananium_wall.dmi'
|
||||
icon_state = "bananium"
|
||||
mineral = /obj/item/stack/sheet/mineral/bananium
|
||||
walltype = /turf/simulated/wall/mineral/bananium
|
||||
canSmoothWith = list(/obj/structure/falsewall/bananium, /turf/simulated/wall/mineral/bananium)
|
||||
|
||||
/obj/structure/falsewall/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating."
|
||||
icon_state = "sandstone"
|
||||
mineral = /obj/item/stack/sheet/mineral/sandstone
|
||||
walltype = /turf/simulated/wall/mineral/sandstone
|
||||
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/simulated/wall/mineral/sandstone)
|
||||
|
||||
/obj/structure/falsewall/wood
|
||||
name = "wooden wall"
|
||||
desc = "A wall with wooden plating. Stiff."
|
||||
icon = 'icons/turf/walls/wood_wall.dmi'
|
||||
icon_state = "wood"
|
||||
mineral = /obj/item/stack/sheet/wood
|
||||
walltype = /turf/simulated/wall/mineral/wood
|
||||
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/simulated/wall/mineral/wood)
|
||||
|
||||
/obj/structure/falsewall/iron
|
||||
name = "rough metal wall"
|
||||
desc = "A wall with rough metal plating."
|
||||
icon = 'icons/turf/walls/iron_wall.dmi'
|
||||
icon_state = "iron"
|
||||
mineral = /obj/item/stack/rods
|
||||
mineral_amount = 5
|
||||
walltype = /turf/simulated/wall/mineral/iron
|
||||
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/simulated/wall/mineral/iron)
|
||||
|
||||
/obj/structure/falsewall/abductor
|
||||
name = "alien wall"
|
||||
desc = "A wall with alien alloy plating."
|
||||
icon = 'icons/turf/walls/abductor_wall.dmi'
|
||||
icon_state = "abductor"
|
||||
mineral = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/simulated/wall/mineral/abductor
|
||||
canSmoothWith = list(/obj/structure/falsewall/abductor, /turf/simulated/wall/mineral/abductor)
|
||||
|
||||
/obj/structure/falsewall/titanium
|
||||
desc = "A light-weight titanium wall used in shuttles."
|
||||
icon = 'icons/turf/walls/shuttle_wall.dmi'
|
||||
icon_state = "shuttle"
|
||||
mineral = /obj/item/stack/sheet/mineral/titanium
|
||||
walltype = /turf/simulated/wall/mineral/titanium
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
|
||||
|
||||
/obj/structure/falsewall/plastitanium
|
||||
desc = "An evil wall of plasma and titanium."
|
||||
icon = 'icons/turf/walls/plastitanium_wall.dmi'
|
||||
icon_state = "shuttle"
|
||||
mineral = /obj/item/stack/sheet/mineral/plastitanium
|
||||
walltype = /turf/simulated/wall/mineral/plastitanium
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /turf/simulated/wall/mineral/plastitanium/nodiagonal, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
|
||||
|
||||
/obj/structure/falsewall/brass
|
||||
name = "clockwork wall"
|
||||
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
|
||||
icon = 'icons/turf/walls/clockwork_wall.dmi'
|
||||
icon_state = "clockwork_wall"
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
mineral_amount = 1
|
||||
canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass)
|
||||
girder_type = /obj/structure/clockwork/wall_gear/displaced
|
||||
walltype = /turf/simulated/wall/clockwork
|
||||
mineral = /obj/item/stack/tile/brass
|
||||
|
||||
/obj/structure/falsewall/brass/New(loc)
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
new /obj/effect/temp_visual/ratvar/wall/false(T)
|
||||
new /obj/effect/temp_visual/ratvar/beam/falsewall(T)
|
||||
|
||||
@@ -1,346 +1,346 @@
|
||||
/obj/structure/flora
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 150
|
||||
|
||||
//trees
|
||||
/obj/structure/flora/tree
|
||||
name = "tree"
|
||||
anchored = 1
|
||||
density = 1
|
||||
pixel_x = -16
|
||||
layer = 9
|
||||
|
||||
/obj/structure/flora/tree/pine
|
||||
name = "pine tree"
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "pine_1"
|
||||
|
||||
/obj/structure/flora/tree/pine/New()
|
||||
..()
|
||||
icon_state = "pine_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas
|
||||
name = "xmas tree"
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "pine_c"
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/New()
|
||||
..()
|
||||
icon_state = "pine_c"
|
||||
|
||||
/obj/structure/flora/tree/dead
|
||||
icon = 'icons/obj/flora/deadtrees.dmi'
|
||||
icon_state = "tree_1"
|
||||
|
||||
/obj/structure/flora/tree/dead/New()
|
||||
..()
|
||||
icon_state = "tree_[rand(1, 6)]"
|
||||
|
||||
/obj/structure/flora/tree/palm
|
||||
icon = 'icons/misc/beach2.dmi'
|
||||
icon_state = "palm1"
|
||||
|
||||
/obj/structure/flora/tree/palm/New()
|
||||
..()
|
||||
icon_state = pick("palm1","palm2")
|
||||
pixel_x = 0
|
||||
|
||||
//grass
|
||||
/obj/structure/flora/grass
|
||||
name = "grass"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/grass/brown
|
||||
icon_state = "snowgrass1bb"
|
||||
|
||||
/obj/structure/flora/grass/brown/New()
|
||||
..()
|
||||
icon_state = "snowgrass[rand(1, 3)]bb"
|
||||
|
||||
|
||||
/obj/structure/flora/grass/green
|
||||
icon_state = "snowgrass1gb"
|
||||
|
||||
/obj/structure/flora/grass/green/New()
|
||||
..()
|
||||
icon_state = "snowgrass[rand(1, 3)]gb"
|
||||
|
||||
/obj/structure/flora/grass/both
|
||||
icon_state = "snowgrassall1"
|
||||
|
||||
/obj/structure/flora/grass/both/New()
|
||||
..()
|
||||
icon_state = "snowgrassall[rand(1, 3)]"
|
||||
|
||||
|
||||
//bushes
|
||||
/obj/structure/flora/bush
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
icon_state = "snowbush1"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/bush/New()
|
||||
..()
|
||||
icon_state = "snowbush[rand(1, 6)]"
|
||||
|
||||
//newbushes
|
||||
|
||||
/obj/structure/flora/ausbushes
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/ausflora.dmi'
|
||||
icon_state = "firstbush_1"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/ausbushes/New()
|
||||
..()
|
||||
icon_state = "firstbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush
|
||||
icon_state = "reedbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush/New()
|
||||
..()
|
||||
icon_state = "reedbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush
|
||||
icon_state = "leafybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush/New()
|
||||
..()
|
||||
icon_state = "leafybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush
|
||||
icon_state = "palebush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush/New()
|
||||
..()
|
||||
icon_state = "palebush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush
|
||||
icon_state = "stalkybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush/New()
|
||||
..()
|
||||
icon_state = "stalkybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush
|
||||
icon_state = "grassybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush/New()
|
||||
..()
|
||||
icon_state = "grassybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush
|
||||
icon_state = "fernybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush/New()
|
||||
..()
|
||||
icon_state = "fernybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush
|
||||
icon_state = "sunnybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush/New()
|
||||
..()
|
||||
icon_state = "sunnybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush
|
||||
icon_state = "genericbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush/New()
|
||||
..()
|
||||
icon_state = "genericbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush
|
||||
icon_state = "pointybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush/New()
|
||||
..()
|
||||
icon_state = "pointybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass
|
||||
icon_state = "lavendergrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass/New()
|
||||
..()
|
||||
icon_state = "lavendergrass_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers
|
||||
icon_state = "ywflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers/New()
|
||||
..()
|
||||
icon_state = "ywflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers
|
||||
icon_state = "brflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers/New()
|
||||
..()
|
||||
icon_state = "brflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers
|
||||
icon_state = "ppflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers/New()
|
||||
..()
|
||||
icon_state = "ppflowers_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass
|
||||
icon_state = "sparsegrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass/New()
|
||||
..()
|
||||
icon_state = "sparsegrass_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass
|
||||
icon_state = "fullgrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass/New()
|
||||
..()
|
||||
icon_state = "fullgrass_[rand(1, 3)]"
|
||||
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants
|
||||
name = "potted plant"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "plant-1"
|
||||
anchored = 0
|
||||
layer = 5
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 10
|
||||
force_wielded = 10
|
||||
throwforce = 13
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/New()
|
||||
..()
|
||||
icon_state = "plant-[rand(1,35)]"
|
||||
if(prob(1))
|
||||
icon_state = "plant-36"
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/equipped(mob/living/user)
|
||||
. = ..()
|
||||
var/image/I = image(icon = 'icons/obj/flora/plants.dmi' , icon_state = src.icon_state, loc = user)
|
||||
I.override = 1
|
||||
user.add_alt_appearance("sneaking_mission", I, GLOB.player_list)
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/dropped(mob/living/user)
|
||||
..()
|
||||
user.remove_alt_appearance("sneaking_mission")
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/dead
|
||||
name = "\improper RD's potted plant"
|
||||
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
|
||||
icon_state = "plant-dead"
|
||||
|
||||
//a rock is flora according to where the icon file is
|
||||
//and now these defines
|
||||
/obj/structure/flora/rock
|
||||
name = "rock"
|
||||
desc = "a rock"
|
||||
icon_state = "rock1"
|
||||
icon = 'icons/obj/flora/rocks.dmi'
|
||||
resistance_flags = FIRE_PROOF
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/rock/New()
|
||||
..()
|
||||
icon_state = "rock[rand(1,5)]"
|
||||
|
||||
/obj/structure/flora/rock/pile
|
||||
name = "rocks"
|
||||
desc = "some rocks"
|
||||
icon_state = "rockpile1"
|
||||
|
||||
/obj/structure/flora/rock/pile/New()
|
||||
..()
|
||||
icon_state = "rockpile[rand(1,5)]"
|
||||
|
||||
/obj/structure/flora/rock/icy
|
||||
name = "icy rock"
|
||||
color = "#cce9eb"
|
||||
|
||||
/obj/structure/flora/rock/pile/icy
|
||||
name = "icy rocks"
|
||||
color = "#cce9eb"
|
||||
|
||||
/obj/structure/flora/corn_stalk
|
||||
name = "corn stalk"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "cornstalk1"
|
||||
anchored = 0
|
||||
layer = 5
|
||||
|
||||
/obj/structure/flora/corn_stalk/alt_1
|
||||
icon_state = "cornstalk2"
|
||||
|
||||
/obj/structure/flora/corn_stalk/alt_2
|
||||
icon_state = "cornstalk3"
|
||||
|
||||
/obj/structure/flora/straw_bail
|
||||
name = "straw bail"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "strawbail1"
|
||||
density = 1
|
||||
climbable = 1 // you can climb all over them.
|
||||
|
||||
/obj/structure/flora/straw_bail/alt_1
|
||||
icon_state = "strawbail2"
|
||||
|
||||
/obj/structure/flora/straw_bail/alt_2
|
||||
icon_state = "strawbail3"
|
||||
|
||||
/obj/structure/bush
|
||||
name = "foliage"
|
||||
desc = "Pretty thick scrub, it'll take something sharp and a lot of determination to clear away."
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "bush1"
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 3.2
|
||||
var/indestructable = 0
|
||||
var/stump = 0
|
||||
|
||||
/obj/structure/bush/New()
|
||||
if(prob(20))
|
||||
opacity = 1
|
||||
|
||||
/*
|
||||
/obj/structure/bush/Bumped(M as mob)
|
||||
if(istype(M, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/A = M
|
||||
A.loc = get_turf(src)
|
||||
else if(istype(M, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/A = M
|
||||
A.loc = get_turf(src)
|
||||
*/
|
||||
|
||||
/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob, params)
|
||||
//hatchets can clear away undergrowth
|
||||
if(istype(I, /obj/item/hatchet) && !stump)
|
||||
if(indestructable)
|
||||
//this bush marks the edge of the map, you can't destroy it
|
||||
to_chat(user, "<span class='warning'>You flail away at the undergrowth, but it's too thick here.</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] begins clearing away [src].</b>","<span class='warning'><b>You begin clearing away [src].</span></span>")
|
||||
spawn(rand(15,30))
|
||||
if(get_dist(user,src) < 2)
|
||||
to_chat(user, "<span class='notice'>You clear away [src].</span>")
|
||||
var/obj/item/stack/sheet/wood/W = new(src.loc)
|
||||
W.amount = rand(3,15)
|
||||
if(prob(50))
|
||||
icon_state = "stump[rand(1,2)]"
|
||||
name = "cleared foliage"
|
||||
desc = "There used to be dense undergrowth here."
|
||||
density = 0
|
||||
stump = 1
|
||||
pixel_x = rand(-6,6)
|
||||
pixel_y = rand(-6,6)
|
||||
else
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/flora
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 150
|
||||
|
||||
//trees
|
||||
/obj/structure/flora/tree
|
||||
name = "tree"
|
||||
anchored = 1
|
||||
density = 1
|
||||
pixel_x = -16
|
||||
layer = 9
|
||||
|
||||
/obj/structure/flora/tree/pine
|
||||
name = "pine tree"
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "pine_1"
|
||||
|
||||
/obj/structure/flora/tree/pine/New()
|
||||
..()
|
||||
icon_state = "pine_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas
|
||||
name = "xmas tree"
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "pine_c"
|
||||
|
||||
/obj/structure/flora/tree/pine/xmas/New()
|
||||
..()
|
||||
icon_state = "pine_c"
|
||||
|
||||
/obj/structure/flora/tree/dead
|
||||
icon = 'icons/obj/flora/deadtrees.dmi'
|
||||
icon_state = "tree_1"
|
||||
|
||||
/obj/structure/flora/tree/dead/New()
|
||||
..()
|
||||
icon_state = "tree_[rand(1, 6)]"
|
||||
|
||||
/obj/structure/flora/tree/palm
|
||||
icon = 'icons/misc/beach2.dmi'
|
||||
icon_state = "palm1"
|
||||
|
||||
/obj/structure/flora/tree/palm/New()
|
||||
..()
|
||||
icon_state = pick("palm1","palm2")
|
||||
pixel_x = 0
|
||||
|
||||
//grass
|
||||
/obj/structure/flora/grass
|
||||
name = "grass"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/grass/brown
|
||||
icon_state = "snowgrass1bb"
|
||||
|
||||
/obj/structure/flora/grass/brown/New()
|
||||
..()
|
||||
icon_state = "snowgrass[rand(1, 3)]bb"
|
||||
|
||||
|
||||
/obj/structure/flora/grass/green
|
||||
icon_state = "snowgrass1gb"
|
||||
|
||||
/obj/structure/flora/grass/green/New()
|
||||
..()
|
||||
icon_state = "snowgrass[rand(1, 3)]gb"
|
||||
|
||||
/obj/structure/flora/grass/both
|
||||
icon_state = "snowgrassall1"
|
||||
|
||||
/obj/structure/flora/grass/both/New()
|
||||
..()
|
||||
icon_state = "snowgrassall[rand(1, 3)]"
|
||||
|
||||
|
||||
//bushes
|
||||
/obj/structure/flora/bush
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
icon_state = "snowbush1"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/bush/New()
|
||||
..()
|
||||
icon_state = "snowbush[rand(1, 6)]"
|
||||
|
||||
//newbushes
|
||||
|
||||
/obj/structure/flora/ausbushes
|
||||
name = "bush"
|
||||
icon = 'icons/obj/flora/ausflora.dmi'
|
||||
icon_state = "firstbush_1"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/ausbushes/New()
|
||||
..()
|
||||
icon_state = "firstbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush
|
||||
icon_state = "reedbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/reedbush/New()
|
||||
..()
|
||||
icon_state = "reedbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush
|
||||
icon_state = "leafybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/leafybush/New()
|
||||
..()
|
||||
icon_state = "leafybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush
|
||||
icon_state = "palebush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/palebush/New()
|
||||
..()
|
||||
icon_state = "palebush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush
|
||||
icon_state = "stalkybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/stalkybush/New()
|
||||
..()
|
||||
icon_state = "stalkybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush
|
||||
icon_state = "grassybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/grassybush/New()
|
||||
..()
|
||||
icon_state = "grassybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush
|
||||
icon_state = "fernybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fernybush/New()
|
||||
..()
|
||||
icon_state = "fernybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush
|
||||
icon_state = "sunnybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sunnybush/New()
|
||||
..()
|
||||
icon_state = "sunnybush_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush
|
||||
icon_state = "genericbush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/genericbush/New()
|
||||
..()
|
||||
icon_state = "genericbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush
|
||||
icon_state = "pointybush_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/pointybush/New()
|
||||
..()
|
||||
icon_state = "pointybush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass
|
||||
icon_state = "lavendergrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/lavendergrass/New()
|
||||
..()
|
||||
icon_state = "lavendergrass_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers
|
||||
icon_state = "ywflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ywflowers/New()
|
||||
..()
|
||||
icon_state = "ywflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers
|
||||
icon_state = "brflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/brflowers/New()
|
||||
..()
|
||||
icon_state = "brflowers_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers
|
||||
icon_state = "ppflowers_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/ppflowers/New()
|
||||
..()
|
||||
icon_state = "ppflowers_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass
|
||||
icon_state = "sparsegrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/sparsegrass/New()
|
||||
..()
|
||||
icon_state = "sparsegrass_[rand(1, 3)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass
|
||||
icon_state = "fullgrass_1"
|
||||
|
||||
/obj/structure/flora/ausbushes/fullgrass/New()
|
||||
..()
|
||||
icon_state = "fullgrass_[rand(1, 3)]"
|
||||
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants
|
||||
name = "potted plant"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "plant-1"
|
||||
anchored = 0
|
||||
layer = 5
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 10
|
||||
force_wielded = 10
|
||||
throwforce = 13
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/New()
|
||||
..()
|
||||
icon_state = "plant-[rand(1,35)]"
|
||||
if(prob(1))
|
||||
icon_state = "plant-36"
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/equipped(mob/living/user)
|
||||
. = ..()
|
||||
var/image/I = image(icon = 'icons/obj/flora/plants.dmi' , icon_state = src.icon_state, loc = user)
|
||||
I.override = 1
|
||||
user.add_alt_appearance("sneaking_mission", I, GLOB.player_list)
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/dropped(mob/living/user)
|
||||
..()
|
||||
user.remove_alt_appearance("sneaking_mission")
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/dead
|
||||
name = "\improper RD's potted plant"
|
||||
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
|
||||
icon_state = "plant-dead"
|
||||
|
||||
//a rock is flora according to where the icon file is
|
||||
//and now these defines
|
||||
/obj/structure/flora/rock
|
||||
name = "rock"
|
||||
desc = "a rock"
|
||||
icon_state = "rock1"
|
||||
icon = 'icons/obj/flora/rocks.dmi'
|
||||
resistance_flags = FIRE_PROOF
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/rock/New()
|
||||
..()
|
||||
icon_state = "rock[rand(1,5)]"
|
||||
|
||||
/obj/structure/flora/rock/pile
|
||||
name = "rocks"
|
||||
desc = "some rocks"
|
||||
icon_state = "rockpile1"
|
||||
|
||||
/obj/structure/flora/rock/pile/New()
|
||||
..()
|
||||
icon_state = "rockpile[rand(1,5)]"
|
||||
|
||||
/obj/structure/flora/rock/icy
|
||||
name = "icy rock"
|
||||
color = "#cce9eb"
|
||||
|
||||
/obj/structure/flora/rock/pile/icy
|
||||
name = "icy rocks"
|
||||
color = "#cce9eb"
|
||||
|
||||
/obj/structure/flora/corn_stalk
|
||||
name = "corn stalk"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "cornstalk1"
|
||||
anchored = 0
|
||||
layer = 5
|
||||
|
||||
/obj/structure/flora/corn_stalk/alt_1
|
||||
icon_state = "cornstalk2"
|
||||
|
||||
/obj/structure/flora/corn_stalk/alt_2
|
||||
icon_state = "cornstalk3"
|
||||
|
||||
/obj/structure/flora/straw_bail
|
||||
name = "straw bail"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "strawbail1"
|
||||
density = 1
|
||||
climbable = 1 // you can climb all over them.
|
||||
|
||||
/obj/structure/flora/straw_bail/alt_1
|
||||
icon_state = "strawbail2"
|
||||
|
||||
/obj/structure/flora/straw_bail/alt_2
|
||||
icon_state = "strawbail3"
|
||||
|
||||
/obj/structure/bush
|
||||
name = "foliage"
|
||||
desc = "Pretty thick scrub, it'll take something sharp and a lot of determination to clear away."
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "bush1"
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 3.2
|
||||
var/indestructable = 0
|
||||
var/stump = 0
|
||||
|
||||
/obj/structure/bush/New()
|
||||
if(prob(20))
|
||||
opacity = 1
|
||||
|
||||
/*
|
||||
/obj/structure/bush/Bumped(M as mob)
|
||||
if(istype(M, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/A = M
|
||||
A.loc = get_turf(src)
|
||||
else if(istype(M, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/A = M
|
||||
A.loc = get_turf(src)
|
||||
*/
|
||||
|
||||
/obj/structure/bush/attackby(var/obj/I as obj, var/mob/user as mob, params)
|
||||
//hatchets can clear away undergrowth
|
||||
if(istype(I, /obj/item/hatchet) && !stump)
|
||||
if(indestructable)
|
||||
//this bush marks the edge of the map, you can't destroy it
|
||||
to_chat(user, "<span class='warning'>You flail away at the undergrowth, but it's too thick here.</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] begins clearing away [src].</b>","<span class='warning'><b>You begin clearing away [src].</span></span>")
|
||||
spawn(rand(15,30))
|
||||
if(get_dist(user,src) < 2)
|
||||
to_chat(user, "<span class='notice'>You clear away [src].</span>")
|
||||
var/obj/item/stack/sheet/wood/W = new(src.loc)
|
||||
W.amount = rand(3,15)
|
||||
if(prob(50))
|
||||
icon_state = "stump[rand(1,2)]"
|
||||
name = "cleared foliage"
|
||||
desc = "There used to be dense undergrowth here."
|
||||
density = 0
|
||||
stump = 1
|
||||
pixel_x = rand(-6,6)
|
||||
pixel_y = rand(-6,6)
|
||||
else
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -78,4 +78,4 @@
|
||||
/obj/structure/fluff/divine/conduit
|
||||
name = "conduit"
|
||||
desc = "It allows a deity to extend their reach. Their powers are just as potent near a conduit as a nexus."
|
||||
icon_state = "conduit"
|
||||
icon_state = "conduit"
|
||||
|
||||
@@ -176,4 +176,4 @@
|
||||
/obj/structure/foodcart/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal(loc, 4)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -1,471 +1,471 @@
|
||||
/obj/structure/girder
|
||||
name = "girder"
|
||||
icon_state = "girder"
|
||||
anchored = 1
|
||||
density = 1
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/state = GIRDER_NORMAL
|
||||
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
|
||||
max_integrity = 200
|
||||
var/can_displace = TRUE //If the girder can be moved around by crowbarring it
|
||||
var/metalUsed = 2 //used to determine amount returned in deconstruction
|
||||
var/metal_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/girder/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(GIRDER_REINF)
|
||||
. += "<span class='notice'>The support struts are <b>screwed</b> in place.</span>"
|
||||
if(GIRDER_REINF_STRUTS)
|
||||
. += "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>"
|
||||
if(GIRDER_NORMAL)
|
||||
if(can_displace)
|
||||
. += "<span class='notice'>The bolts are <b>lodged</b> in place.</span>"
|
||||
if(GIRDER_DISPLACED)
|
||||
. += "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>"
|
||||
if(GIRDER_DISASSEMBLED)
|
||||
. += "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>"
|
||||
|
||||
/obj/structure/girder/proc/refundMetal(metalAmount) //refunds metal used in construction when deconstructed
|
||||
for(var/i=0;i < metalAmount;i++)
|
||||
new metal_type(get_turf(src))
|
||||
|
||||
/obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
..()
|
||||
var/temp_check = exposed_temperature
|
||||
if(temp_check >= GIRDER_MELTING_TEMP)
|
||||
take_damage(10)
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src)
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/diamonddrill))
|
||||
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You disintegrate the girder!</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack))
|
||||
if(iswallturf(loc))
|
||||
to_chat(user, "<span class='warning'>There is already a wall present!</span>")
|
||||
return
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to build a false wall!</span>")
|
||||
return
|
||||
if (locate(/obj/structure/falsewall) in loc.contents)
|
||||
to_chat(user, "<span class='warning'>There is already a false wall present!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/stack/sheet/runed_metal))
|
||||
to_chat(user, "<span class='warning'>You can't seem to make the metal bend..</span>")
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/S = W
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/iron/FW = new (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning'>You need at least five rods to add plating!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if (do_after(user, 40, target = src))
|
||||
if(!loc || !S || S.get_amount() < 5)
|
||||
return
|
||||
S.use(5)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/iron)
|
||||
transfer_fingerprints_to(T)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!istype(W,/obj/item/stack/sheet))
|
||||
return
|
||||
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!S.wall_allowed)
|
||||
to_chat(user, "<span class='warning'>You don't think that is good material for a wall!</span>")
|
||||
return
|
||||
|
||||
if(istype(S, /obj/item/stack/sheet/wood))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two planks of wood to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/wood/falsewood = new(loc)
|
||||
transfer_fingerprints_to(falsewood)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two planks of wood to finish a wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/wood)
|
||||
for(var/turf/simulated/wall/mineral/wood/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if(istype(S, /obj/item/stack/sheet/metal))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/F = new(loc)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to finish a wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(istype(S, /obj/item/stack/sheet/plasteel))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a reinforced false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/reinforced/FW = new (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
else
|
||||
if(state == GIRDER_REINF)
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start finalizing the reinforced wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(!src || !S || S.get_amount() < 1)
|
||||
return
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You fully reinforce the wall.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start reinforcing the girder...</span>")
|
||||
if(do_after(user,60, target = src))
|
||||
if(!src || !S || S.get_amount() < 1)
|
||||
return
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You reinforce the girder.</span>")
|
||||
var/obj/structure/girder/reinforced/R = new (loc)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/F = text2path("/obj/structure/falsewall/[M]")
|
||||
var/obj/structure/FW = new F (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to add plating!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user,40, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]"))
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
add_hiddenprint(user)
|
||||
|
||||
else if(istype(W, /obj/item/pipe))
|
||||
var/obj/item/pipe/P = W
|
||||
if(P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
|
||||
if(!user.drop_item())
|
||||
return
|
||||
P.loc = src.loc
|
||||
to_chat(user, "<span class='notice'>You fit the pipe into \the [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/crowbar_act(mob/user, obj/item/I)
|
||||
if(!can_displace || state != GIRDER_NORMAL)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start dislodging the girder...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You dislodge the girder.</span>")
|
||||
var/obj/structure/girder/displaced/D = new (loc)
|
||||
transfer_fingerprints_to(D)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_DISPLACED && state != GIRDER_REINF && state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
switch(state)
|
||||
if(GIRDER_DISPLACED)
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
if(GIRDER_REINF)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring support struts...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the support struts.</span>")
|
||||
state = GIRDER_REINF_STRUTS
|
||||
if(GIRDER_REINF_STRUTS)
|
||||
to_chat(user, "<span class='notice'>You start securing support struts...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the support struts.</span>")
|
||||
state = GIRDER_REINF
|
||||
|
||||
/obj/structure/girder/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start removing the inner grille...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the inner grille.</span>")
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(src))
|
||||
var/obj/structure/girder/G = new (loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/wrench_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_NORMAL && state != GIRDER_DISPLACED)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(state == GIRDER_NORMAL)
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to secure the girder!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start securing the girder...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the girder.</span>")
|
||||
var/obj/structure/girder/G = new(loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return prob(girderpasschance)
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(girderpasschance)
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/girder/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/girder/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/remains = pick(/obj/item/stack/rods, /obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/narsie_act()
|
||||
if(prob(25))
|
||||
new /obj/structure/girder/cult(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/displaced
|
||||
name = "displaced girder"
|
||||
icon_state = "displaced"
|
||||
anchored = 0
|
||||
state = GIRDER_DISPLACED
|
||||
girderpasschance = 25
|
||||
max_integrity = 120
|
||||
|
||||
/obj/structure/girder/reinforced
|
||||
name = "reinforced girder"
|
||||
icon_state = "reinforced"
|
||||
state = GIRDER_REINF
|
||||
girderpasschance = 0
|
||||
max_integrity = 350
|
||||
|
||||
/obj/structure/girder/cult
|
||||
name = "runed girder"
|
||||
desc = "Framework made of a strange and shockingly cold metal. It doesn't seem to have any bolts."
|
||||
icon = 'icons/obj/cult.dmi'
|
||||
icon_state = "cultgirder"
|
||||
can_displace = FALSE
|
||||
metalUsed = 1
|
||||
metal_type = /obj/item/stack/sheet/runed_metal
|
||||
|
||||
/obj/structure/girder/cult/New()
|
||||
. = ..()
|
||||
icon_state = SSticker.cultdat?.cult_girder_icon_state
|
||||
|
||||
/obj/structure/girder/cult/refundMetal(metalAmount)
|
||||
for(var/i=0;i < metalAmount;i++)
|
||||
new /obj/item/stack/sheet/runed_metal(get_turf(src))
|
||||
|
||||
/obj/structure/girder/cult/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/tome) && iscultist(user)) //Cultists can demolish cult girders instantly with their tomes
|
||||
user.visible_message("<span class='warning'>[user] strikes [src] with [W]!</span>", "<span class='notice'>You demolish [src].</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40* W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 1
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
var/obj/item/pickaxe/drill/jackhammer/D = W
|
||||
to_chat(user, "<span class='notice'>Your jackhammer smashes through the girder!</span>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 1
|
||||
transfer_fingerprints_to(R)
|
||||
D.playDigSound()
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet/runed_metal))
|
||||
var/obj/item/stack/sheet/runed_metal/R = W
|
||||
if(R.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of runed metal to construct a runed wall!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(R.get_amount() < 1 || !R)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
|
||||
R.use(1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/cult)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/cult/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/girder/cult/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
||||
qdel(src)
|
||||
/obj/structure/girder
|
||||
name = "girder"
|
||||
icon_state = "girder"
|
||||
anchored = 1
|
||||
density = 1
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/state = GIRDER_NORMAL
|
||||
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
|
||||
max_integrity = 200
|
||||
var/can_displace = TRUE //If the girder can be moved around by crowbarring it
|
||||
var/metalUsed = 2 //used to determine amount returned in deconstruction
|
||||
var/metal_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/girder/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(GIRDER_REINF)
|
||||
. += "<span class='notice'>The support struts are <b>screwed</b> in place.</span>"
|
||||
if(GIRDER_REINF_STRUTS)
|
||||
. += "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>"
|
||||
if(GIRDER_NORMAL)
|
||||
if(can_displace)
|
||||
. += "<span class='notice'>The bolts are <b>lodged</b> in place.</span>"
|
||||
if(GIRDER_DISPLACED)
|
||||
. += "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>"
|
||||
if(GIRDER_DISASSEMBLED)
|
||||
. += "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>"
|
||||
|
||||
/obj/structure/girder/proc/refundMetal(metalAmount) //refunds metal used in construction when deconstructed
|
||||
for(var/i=0;i < metalAmount;i++)
|
||||
new metal_type(get_turf(src))
|
||||
|
||||
/obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
..()
|
||||
var/temp_check = exposed_temperature
|
||||
if(temp_check >= GIRDER_MELTING_TEMP)
|
||||
take_damage(10)
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src)
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/diamonddrill))
|
||||
to_chat(user, "<span class='notice'>You drill through the girder!</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You disintegrate the girder!</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack))
|
||||
if(iswallturf(loc))
|
||||
to_chat(user, "<span class='warning'>There is already a wall present!</span>")
|
||||
return
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to build a false wall!</span>")
|
||||
return
|
||||
if (locate(/obj/structure/falsewall) in loc.contents)
|
||||
to_chat(user, "<span class='warning'>There is already a false wall present!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/stack/sheet/runed_metal))
|
||||
to_chat(user, "<span class='warning'>You can't seem to make the metal bend..</span>")
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/S = W
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/iron/FW = new (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning'>You need at least five rods to add plating!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if (do_after(user, 40, target = src))
|
||||
if(!loc || !S || S.get_amount() < 5)
|
||||
return
|
||||
S.use(5)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/iron)
|
||||
transfer_fingerprints_to(T)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!istype(W,/obj/item/stack/sheet))
|
||||
return
|
||||
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(!S.wall_allowed)
|
||||
to_chat(user, "<span class='warning'>You don't think that is good material for a wall!</span>")
|
||||
return
|
||||
|
||||
if(istype(S, /obj/item/stack/sheet/wood))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two planks of wood to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/wood/falsewood = new(loc)
|
||||
transfer_fingerprints_to(falsewood)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two planks of wood to finish a wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/mineral/wood)
|
||||
for(var/turf/simulated/wall/mineral/wood/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if(istype(S, /obj/item/stack/sheet/metal))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/F = new(loc)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two sheets of metal to finish a wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(istype(S, /obj/item/stack/sheet/plasteel))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a reinforced false wall. Push on it to open or close the passage.</span>")
|
||||
var/obj/structure/falsewall/reinforced/FW = new (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
else
|
||||
if(state == GIRDER_REINF)
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start finalizing the reinforced wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(!src || !S || S.get_amount() < 1)
|
||||
return
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You fully reinforce the wall.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start reinforcing the girder...</span>")
|
||||
if(do_after(user,60, target = src))
|
||||
if(!src || !S || S.get_amount() < 1)
|
||||
return
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You reinforce the girder.</span>")
|
||||
var/obj/structure/girder/reinforced/R = new (loc)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
var/F = text2path("/obj/structure/falsewall/[M]")
|
||||
var/obj/structure/FW = new F (loc)
|
||||
transfer_fingerprints_to(FW)
|
||||
qdel(src)
|
||||
else
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to add plating!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if(do_after(user,40, target = src))
|
||||
if(!src || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]"))
|
||||
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
|
||||
if(X)
|
||||
X.add_hiddenprint(usr)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
add_hiddenprint(user)
|
||||
|
||||
else if(istype(W, /obj/item/pipe))
|
||||
var/obj/item/pipe/P = W
|
||||
if(P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
|
||||
if(!user.drop_item())
|
||||
return
|
||||
P.loc = src.loc
|
||||
to_chat(user, "<span class='notice'>You fit the pipe into \the [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/crowbar_act(mob/user, obj/item/I)
|
||||
if(!can_displace || state != GIRDER_NORMAL)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start dislodging the girder...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You dislodge the girder.</span>")
|
||||
var/obj/structure/girder/displaced/D = new (loc)
|
||||
transfer_fingerprints_to(D)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_DISPLACED && state != GIRDER_REINF && state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
switch(state)
|
||||
if(GIRDER_DISPLACED)
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
if(GIRDER_REINF)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring support struts...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the support struts.</span>")
|
||||
state = GIRDER_REINF_STRUTS
|
||||
if(GIRDER_REINF_STRUTS)
|
||||
to_chat(user, "<span class='notice'>You start securing support struts...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the support struts.</span>")
|
||||
state = GIRDER_REINF
|
||||
|
||||
/obj/structure/girder/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start removing the inner grille...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the inner grille.</span>")
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(src))
|
||||
var/obj/structure/girder/G = new (loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/wrench_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_NORMAL && state != GIRDER_DISPLACED)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(state == GIRDER_NORMAL)
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to secure the girder!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start securing the girder...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the girder.</span>")
|
||||
var/obj/structure/girder/G = new(loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return prob(girderpasschance)
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(girderpasschance)
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/girder/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/girder/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/remains = pick(/obj/item/stack/rods, /obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/narsie_act()
|
||||
if(prob(25))
|
||||
new /obj/structure/girder/cult(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/displaced
|
||||
name = "displaced girder"
|
||||
icon_state = "displaced"
|
||||
anchored = 0
|
||||
state = GIRDER_DISPLACED
|
||||
girderpasschance = 25
|
||||
max_integrity = 120
|
||||
|
||||
/obj/structure/girder/reinforced
|
||||
name = "reinforced girder"
|
||||
icon_state = "reinforced"
|
||||
state = GIRDER_REINF
|
||||
girderpasschance = 0
|
||||
max_integrity = 350
|
||||
|
||||
/obj/structure/girder/cult
|
||||
name = "runed girder"
|
||||
desc = "Framework made of a strange and shockingly cold metal. It doesn't seem to have any bolts."
|
||||
icon = 'icons/obj/cult.dmi'
|
||||
icon_state = "cultgirder"
|
||||
can_displace = FALSE
|
||||
metalUsed = 1
|
||||
metal_type = /obj/item/stack/sheet/runed_metal
|
||||
|
||||
/obj/structure/girder/cult/New()
|
||||
. = ..()
|
||||
icon_state = SSticker.cultdat?.cult_girder_icon_state
|
||||
|
||||
/obj/structure/girder/cult/refundMetal(metalAmount)
|
||||
for(var/i=0;i < metalAmount;i++)
|
||||
new /obj/item/stack/sheet/runed_metal(get_turf(src))
|
||||
|
||||
/obj/structure/girder/cult/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/tome) && iscultist(user)) //Cultists can demolish cult girders instantly with their tomes
|
||||
user.visible_message("<span class='warning'>[user] strikes [src] with [W]!</span>", "<span class='notice'>You demolish [src].</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40* W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 1
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
var/obj/item/pickaxe/drill/jackhammer/D = W
|
||||
to_chat(user, "<span class='notice'>Your jackhammer smashes through the girder!</span>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 1
|
||||
transfer_fingerprints_to(R)
|
||||
D.playDigSound()
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet/runed_metal))
|
||||
var/obj/item/stack/sheet/runed_metal/R = W
|
||||
if(R.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need at least one sheet of runed metal to construct a runed wall!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(R.get_amount() < 1 || !R)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
|
||||
R.use(1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/cult)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/cult/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/girder/cult/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -1,318 +1,318 @@
|
||||
/obj/structure/grille
|
||||
desc = "A flimsy framework of metal rods."
|
||||
name = "grille"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "grille"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
flags = CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = BELOW_OBJ_LAYER
|
||||
level = 3
|
||||
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
|
||||
max_integrity = 50
|
||||
integrity_failure = 20
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
var/grille_type
|
||||
var/broken_type = /obj/structure/grille/broken
|
||||
var/shockcooldown = 0
|
||||
var/my_shockcooldown = 1 SECONDS
|
||||
|
||||
/obj/structure/grille/fence/
|
||||
var/width = 3
|
||||
|
||||
/obj/structure/grille/fence/New()
|
||||
if(width > 1)
|
||||
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/grille/fence/east_west
|
||||
//width=80
|
||||
//height=42
|
||||
icon='icons/fence-ew.dmi'
|
||||
|
||||
/obj/structure/grille/fence/north_south
|
||||
//width=80
|
||||
//height=42
|
||||
icon='icons/fence-ns.dmi'
|
||||
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/grille/examine(mob/user)
|
||||
. = ..()
|
||||
if(anchored)
|
||||
. += "<span class='notice'>It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.</span>"
|
||||
if(!anchored)
|
||||
. += "<span class='notice'>The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.</span>"
|
||||
|
||||
/obj/structure/grille/ratvar_act()
|
||||
if(broken)
|
||||
new /obj/structure/grille/ratvar/broken(loc)
|
||||
else
|
||||
new /obj/structure/grille/ratvar(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/Bumped(atom/user)
|
||||
if(ismob(user))
|
||||
if(!(shockcooldown <= world.time))
|
||||
return
|
||||
shock(user, 70)
|
||||
shockcooldown = world.time + my_shockcooldown
|
||||
|
||||
/obj/structure/grille/attack_animal(mob/user)
|
||||
. = ..()
|
||||
if(. && !QDELETED(src) && !shock(user, 70))
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/hulk_damage()
|
||||
return 60
|
||||
|
||||
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(!shock(user, 70))
|
||||
..(user, TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>")
|
||||
if(!shock(user, 70))
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>")
|
||||
if(!shock(user, 70))
|
||||
take_damage(20, BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return 1
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
else
|
||||
return !density
|
||||
|
||||
/obj/structure/grille/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/stack/rods) && broken)
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(!shock(user, 90))
|
||||
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
|
||||
"<span class='notice'>You rebuild the broken grille.</span>")
|
||||
new grille_type(loc)
|
||||
R.use(1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if(is_glass_sheet(W))
|
||||
build_window(W, user)
|
||||
return
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/shard) || !shock(user, 70))
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(shock(user, 100))
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/grille/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!(istype(loc, /turf/simulated) || anchored))
|
||||
return
|
||||
. = TRUE
|
||||
if(shock(user, 90))
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
anchored = !anchored
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
|
||||
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
|
||||
|
||||
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
|
||||
var/dir_to_set = NORTH
|
||||
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(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
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
|
||||
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, 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/W = new S.created_window(get_turf(src))
|
||||
S.use(1)
|
||||
W.setDir(dir_to_set)
|
||||
W.ini_dir = dir_to_set
|
||||
W.anchored = FALSE
|
||||
W.state = WINDOW_OUT_OF_FRAME
|
||||
to_chat(user, "<span class='notice'>You place the [W] on [src].</span>")
|
||||
W.update_nearby_icons()
|
||||
|
||||
|
||||
/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, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/grille/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/obj/R = new rods_type(drop_location(), rods_amount)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/structure/grille/obj_break()
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
new broken_type(loc)
|
||||
var/obj/R = new rods_type(drop_location(), rods_broken)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
/obj/structure/grille/proc/shock(mob/user, prb)
|
||||
if(!anchored || broken) // unanchored/broken grilles are never connected
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE
|
||||
if(!in_range(src, user))//To prevent TK and mech users from getting shocked
|
||||
return FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if(electrocute_mob(user, C, src, 1, TRUE))
|
||||
do_sparks(3, 1, src)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(!broken)
|
||||
if(exposed_temperature > T0C + 1500)
|
||||
take_damage(1, BURN, 0, 0)
|
||||
|
||||
/obj/structure/grille/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(isobj(AM))
|
||||
if(prob(50) && anchored && !broken)
|
||||
var/obj/O = AM
|
||||
if(O.throwforce != 0)//don't want to let people spam tesla bolts, this way it will break after time
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
obj_integrity = 20
|
||||
broken = 1
|
||||
rods_amount = 1
|
||||
rods_broken = 0
|
||||
grille_type = /obj/structure/grille
|
||||
broken_type = null
|
||||
|
||||
/obj/structure/grille/ratvar
|
||||
icon_state = "ratvargrille"
|
||||
name = "cog grille"
|
||||
desc = "A strangely-shaped grille."
|
||||
broken_type = /obj/structure/grille/ratvar/broken
|
||||
|
||||
/obj/structure/grille/ratvar/New()
|
||||
..()
|
||||
if(broken)
|
||||
new /obj/effect/temp_visual/ratvar/grille/broken(get_turf(src))
|
||||
else
|
||||
new /obj/effect/temp_visual/ratvar/grille(get_turf(src))
|
||||
new /obj/effect/temp_visual/ratvar/beam/grille(get_turf(src))
|
||||
|
||||
/obj/structure/grille/ratvar/narsie_act()
|
||||
take_damage(rand(1, 3), BRUTE)
|
||||
if(src)
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/grille/ratvar/ratvar_act()
|
||||
return
|
||||
|
||||
/obj/structure/grille/ratvar/broken
|
||||
icon_state = "brokenratvargrille"
|
||||
density = FALSE
|
||||
obj_integrity = 20
|
||||
broken = TRUE
|
||||
rods_amount = 1
|
||||
rods_broken = 0
|
||||
grille_type = /obj/structure/grille/ratvar
|
||||
broken_type = null
|
||||
/obj/structure/grille
|
||||
desc = "A flimsy framework of metal rods."
|
||||
name = "grille"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "grille"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
flags = CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = BELOW_OBJ_LAYER
|
||||
level = 3
|
||||
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
|
||||
max_integrity = 50
|
||||
integrity_failure = 20
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
var/rods_amount = 2
|
||||
var/rods_broken = 1
|
||||
var/grille_type
|
||||
var/broken_type = /obj/structure/grille/broken
|
||||
var/shockcooldown = 0
|
||||
var/my_shockcooldown = 1 SECONDS
|
||||
|
||||
/obj/structure/grille/fence/
|
||||
var/width = 3
|
||||
|
||||
/obj/structure/grille/fence/New()
|
||||
if(width > 1)
|
||||
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/grille/fence/east_west
|
||||
//width=80
|
||||
//height=42
|
||||
icon='icons/fence-ew.dmi'
|
||||
|
||||
/obj/structure/grille/fence/north_south
|
||||
//width=80
|
||||
//height=42
|
||||
icon='icons/fence-ns.dmi'
|
||||
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/grille/examine(mob/user)
|
||||
. = ..()
|
||||
if(anchored)
|
||||
. += "<span class='notice'>It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.</span>"
|
||||
if(!anchored)
|
||||
. += "<span class='notice'>The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.</span>"
|
||||
|
||||
/obj/structure/grille/ratvar_act()
|
||||
if(broken)
|
||||
new /obj/structure/grille/ratvar/broken(loc)
|
||||
else
|
||||
new /obj/structure/grille/ratvar(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/Bumped(atom/user)
|
||||
if(ismob(user))
|
||||
if(!(shockcooldown <= world.time))
|
||||
return
|
||||
shock(user, 70)
|
||||
shockcooldown = world.time + my_shockcooldown
|
||||
|
||||
/obj/structure/grille/attack_animal(mob/user)
|
||||
. = ..()
|
||||
if(. && !QDELETED(src) && !shock(user, 70))
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/hulk_damage()
|
||||
return 60
|
||||
|
||||
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(!shock(user, 70))
|
||||
..(user, TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>")
|
||||
if(!shock(user, 70))
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/living/user)
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>")
|
||||
if(!shock(user, 70))
|
||||
take_damage(20, BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return 1
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
else
|
||||
return !density
|
||||
|
||||
/obj/structure/grille/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/stack/rods) && broken)
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(!shock(user, 90))
|
||||
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
|
||||
"<span class='notice'>You rebuild the broken grille.</span>")
|
||||
new grille_type(loc)
|
||||
R.use(1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if(is_glass_sheet(W))
|
||||
build_window(W, user)
|
||||
return
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/shard) || !shock(user, 70))
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(shock(user, 100))
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/grille/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!(istype(loc, /turf/simulated) || anchored))
|
||||
return
|
||||
. = TRUE
|
||||
if(shock(user, 90))
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
anchored = !anchored
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
|
||||
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
|
||||
|
||||
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
|
||||
var/dir_to_set = NORTH
|
||||
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(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
else
|
||||
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
|
||||
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, 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/W = new S.created_window(get_turf(src))
|
||||
S.use(1)
|
||||
W.setDir(dir_to_set)
|
||||
W.ini_dir = dir_to_set
|
||||
W.anchored = FALSE
|
||||
W.state = WINDOW_OUT_OF_FRAME
|
||||
to_chat(user, "<span class='notice'>You place the [W] on [src].</span>")
|
||||
W.update_nearby_icons()
|
||||
|
||||
|
||||
/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, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/grille/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/obj/R = new rods_type(drop_location(), rods_amount)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/structure/grille/obj_break()
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
new broken_type(loc)
|
||||
var/obj/R = new rods_type(drop_location(), rods_broken)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
|
||||
/obj/structure/grille/proc/shock(mob/user, prb)
|
||||
if(!anchored || broken) // unanchored/broken grilles are never connected
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE
|
||||
if(!in_range(src, user))//To prevent TK and mech users from getting shocked
|
||||
return FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if(electrocute_mob(user, C, src, 1, TRUE))
|
||||
do_sparks(3, 1, src)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(!broken)
|
||||
if(exposed_temperature > T0C + 1500)
|
||||
take_damage(1, BURN, 0, 0)
|
||||
|
||||
/obj/structure/grille/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(isobj(AM))
|
||||
if(prob(50) && anchored && !broken)
|
||||
var/obj/O = AM
|
||||
if(O.throwforce != 0)//don't want to let people spam tesla bolts, this way it will break after time
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
icon_state = "brokengrille"
|
||||
density = 0
|
||||
obj_integrity = 20
|
||||
broken = 1
|
||||
rods_amount = 1
|
||||
rods_broken = 0
|
||||
grille_type = /obj/structure/grille
|
||||
broken_type = null
|
||||
|
||||
/obj/structure/grille/ratvar
|
||||
icon_state = "ratvargrille"
|
||||
name = "cog grille"
|
||||
desc = "A strangely-shaped grille."
|
||||
broken_type = /obj/structure/grille/ratvar/broken
|
||||
|
||||
/obj/structure/grille/ratvar/New()
|
||||
..()
|
||||
if(broken)
|
||||
new /obj/effect/temp_visual/ratvar/grille/broken(get_turf(src))
|
||||
else
|
||||
new /obj/effect/temp_visual/ratvar/grille(get_turf(src))
|
||||
new /obj/effect/temp_visual/ratvar/beam/grille(get_turf(src))
|
||||
|
||||
/obj/structure/grille/ratvar/narsie_act()
|
||||
take_damage(rand(1, 3), BRUTE)
|
||||
if(src)
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/grille/ratvar/ratvar_act()
|
||||
return
|
||||
|
||||
/obj/structure/grille/ratvar/broken
|
||||
icon_state = "brokenratvargrille"
|
||||
density = FALSE
|
||||
obj_integrity = 20
|
||||
broken = TRUE
|
||||
rods_amount = 1
|
||||
rods_broken = 0
|
||||
grille_type = /obj/structure/grille/ratvar
|
||||
broken_type = null
|
||||
|
||||
@@ -253,4 +253,4 @@
|
||||
#undef GUILLOTINE_ACTIVATE_DELAY
|
||||
#undef GUILLOTINE_WRENCH_DELAY
|
||||
#undef GUILLOTINE_ACTION_INUSE
|
||||
#undef GUILLOTINE_ACTION_WRENCH
|
||||
#undef GUILLOTINE_ACTION_WRENCH
|
||||
|
||||
@@ -208,4 +208,4 @@
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
|
||||
@@ -1,186 +1,186 @@
|
||||
//TG style Janicart
|
||||
|
||||
/obj/structure/janitorialcart
|
||||
name = "janitorial cart"
|
||||
desc = "This is the alpha and omega of sanitation."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cart"
|
||||
anchored = 0
|
||||
density = 1
|
||||
container_type = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/storage/bag/trash/mybag = null
|
||||
var/obj/item/mop/mymop = null
|
||||
var/obj/item/reagent_containers/spray/cleaner/myspray = null
|
||||
var/obj/item/lightreplacer/myreplacer = null
|
||||
var/signs = 0
|
||||
var/const/max_signs = 4
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/New()
|
||||
..()
|
||||
create_reagents(100)
|
||||
GLOB.janitorial_equipment += src
|
||||
|
||||
/obj/structure/janitorialcart/Destroy()
|
||||
GLOB.janitorial_equipment -= src
|
||||
QDEL_NULL(mybag)
|
||||
QDEL_NULL(mymop)
|
||||
QDEL_NULL(myspray)
|
||||
QDEL_NULL(myreplacer)
|
||||
return ..()
|
||||
|
||||
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "[src] is out of water!</span>")
|
||||
else
|
||||
reagents.trans_to(mop, 5) //
|
||||
to_chat(user, "<span class='notice'>You wet [mop] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
updateUsrDialog()
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user, params)
|
||||
var/fail_msg = "<span class='notice'>There is already one of those in [src].</span>"
|
||||
|
||||
if(!I.is_robot_module())
|
||||
if(istype(I, /obj/item/mop))
|
||||
var/obj/item/mop/m=I
|
||||
if(m.reagents.total_volume < m.reagents.maximum_volume)
|
||||
wet_mop(m, user)
|
||||
return
|
||||
if(!mymop)
|
||||
m.janicart_insert(user, src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
|
||||
else if(istype(I, /obj/item/storage/bag/trash))
|
||||
if(!mybag)
|
||||
var/obj/item/storage/bag/trash/t=I
|
||||
t.janicart_insert(user, src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/reagent_containers/spray/cleaner))
|
||||
if(!myspray)
|
||||
put_in_cart(I, user)
|
||||
myspray=I
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/lightreplacer))
|
||||
if(!myreplacer)
|
||||
var/obj/item/lightreplacer/l=I
|
||||
l.janicart_insert(user,src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/caution))
|
||||
if(signs < max_signs)
|
||||
put_in_cart(I, user)
|
||||
signs++
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
user.visible_message("<span class='warning'>[user] begins to empty the contents of [src].</span>")
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
to_chat(usr, "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>")
|
||||
reagents.reaction(src.loc)
|
||||
src.reagents.clear_reagents()
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(!anchored && !isinspace())
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 0
|
||||
else if(mybag)
|
||||
mybag.attackby(I, user, params)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You cannot interface your modules [src]!</span>")
|
||||
|
||||
/obj/structure/janitorialcart/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(mybag)
|
||||
dat += "<a href='?src=[UID()];garbage=1'>[mybag.name]</a><br>"
|
||||
if(mymop)
|
||||
dat += "<a href='?src=[UID()];mop=1'>[mymop.name]</a><br>"
|
||||
if(myspray)
|
||||
dat += "<a href='?src=[UID()];spray=1'>[myspray.name]</a><br>"
|
||||
if(myreplacer)
|
||||
dat += "<a href='?src=[UID()];replacer=1'>[myreplacer.name]</a><br>"
|
||||
if(signs)
|
||||
dat += "<a href='?src=[UID()];sign=1'>[signs] sign\s</a><br>"
|
||||
var/datum/browser/popup = new(user, "janicart", name, 240, 160)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/Topic(href, href_list)
|
||||
if(!in_range(src, usr))
|
||||
return
|
||||
if(!isliving(usr))
|
||||
return
|
||||
var/mob/living/user = usr
|
||||
if(href_list["garbage"])
|
||||
if(mybag)
|
||||
user.put_in_hands(mybag)
|
||||
to_chat(user, "<span class='notice'>You take [mybag] from [src].</span>")
|
||||
mybag = null
|
||||
if(href_list["mop"])
|
||||
if(mymop)
|
||||
user.put_in_hands(mymop)
|
||||
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
|
||||
mymop = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
to_chat(user, "<span class='notice'>You take [myspray] from [src].</span>")
|
||||
myspray = null
|
||||
if(href_list["replacer"])
|
||||
if(myreplacer)
|
||||
user.put_in_hands(myreplacer)
|
||||
to_chat(user, "<span class='notice'>You take [myreplacer] from [src].</span>")
|
||||
myreplacer = null
|
||||
if(href_list["sign"])
|
||||
if(signs)
|
||||
var/obj/item/caution/Sign = locate() in src
|
||||
if(Sign)
|
||||
user.put_in_hands(Sign)
|
||||
to_chat(user, "<span class='notice'>You take \a [Sign] from [src].</span>")
|
||||
signs--
|
||||
else
|
||||
WARNING("Signs ([signs]) didn't match contents")
|
||||
signs = 0
|
||||
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/update_icon()
|
||||
overlays = null
|
||||
if(mybag)
|
||||
overlays += "cart_garbage"
|
||||
if(mymop)
|
||||
overlays += "cart_mop"
|
||||
if(myspray)
|
||||
overlays += "cart_spray"
|
||||
if(myreplacer)
|
||||
overlays += "cart_replacer"
|
||||
if(signs)
|
||||
overlays += "cart_sign[signs]"
|
||||
//TG style Janicart
|
||||
|
||||
/obj/structure/janitorialcart
|
||||
name = "janitorial cart"
|
||||
desc = "This is the alpha and omega of sanitation."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cart"
|
||||
anchored = 0
|
||||
density = 1
|
||||
container_type = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/storage/bag/trash/mybag = null
|
||||
var/obj/item/mop/mymop = null
|
||||
var/obj/item/reagent_containers/spray/cleaner/myspray = null
|
||||
var/obj/item/lightreplacer/myreplacer = null
|
||||
var/signs = 0
|
||||
var/const/max_signs = 4
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/New()
|
||||
..()
|
||||
create_reagents(100)
|
||||
GLOB.janitorial_equipment += src
|
||||
|
||||
/obj/structure/janitorialcart/Destroy()
|
||||
GLOB.janitorial_equipment -= src
|
||||
QDEL_NULL(mybag)
|
||||
QDEL_NULL(mymop)
|
||||
QDEL_NULL(myspray)
|
||||
QDEL_NULL(myreplacer)
|
||||
return ..()
|
||||
|
||||
/obj/structure/janitorialcart/proc/wet_mop(obj/item/mop, mob/user)
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "[src] is out of water!</span>")
|
||||
else
|
||||
reagents.trans_to(mop, 5) //
|
||||
to_chat(user, "<span class='notice'>You wet [mop] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
updateUsrDialog()
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user, params)
|
||||
var/fail_msg = "<span class='notice'>There is already one of those in [src].</span>"
|
||||
|
||||
if(!I.is_robot_module())
|
||||
if(istype(I, /obj/item/mop))
|
||||
var/obj/item/mop/m=I
|
||||
if(m.reagents.total_volume < m.reagents.maximum_volume)
|
||||
wet_mop(m, user)
|
||||
return
|
||||
if(!mymop)
|
||||
m.janicart_insert(user, src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
|
||||
else if(istype(I, /obj/item/storage/bag/trash))
|
||||
if(!mybag)
|
||||
var/obj/item/storage/bag/trash/t=I
|
||||
t.janicart_insert(user, src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/reagent_containers/spray/cleaner))
|
||||
if(!myspray)
|
||||
put_in_cart(I, user)
|
||||
myspray=I
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/lightreplacer))
|
||||
if(!myreplacer)
|
||||
var/obj/item/lightreplacer/l=I
|
||||
l.janicart_insert(user,src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/caution))
|
||||
if(signs < max_signs)
|
||||
put_in_cart(I, user)
|
||||
signs++
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
user.visible_message("<span class='warning'>[user] begins to empty the contents of [src].</span>")
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
to_chat(usr, "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>")
|
||||
reagents.reaction(src.loc)
|
||||
src.reagents.clear_reagents()
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(!anchored && !isinspace())
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 0
|
||||
else if(mybag)
|
||||
mybag.attackby(I, user, params)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You cannot interface your modules [src]!</span>")
|
||||
|
||||
/obj/structure/janitorialcart/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(mybag)
|
||||
dat += "<a href='?src=[UID()];garbage=1'>[mybag.name]</a><br>"
|
||||
if(mymop)
|
||||
dat += "<a href='?src=[UID()];mop=1'>[mymop.name]</a><br>"
|
||||
if(myspray)
|
||||
dat += "<a href='?src=[UID()];spray=1'>[myspray.name]</a><br>"
|
||||
if(myreplacer)
|
||||
dat += "<a href='?src=[UID()];replacer=1'>[myreplacer.name]</a><br>"
|
||||
if(signs)
|
||||
dat += "<a href='?src=[UID()];sign=1'>[signs] sign\s</a><br>"
|
||||
var/datum/browser/popup = new(user, "janicart", name, 240, 160)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/Topic(href, href_list)
|
||||
if(!in_range(src, usr))
|
||||
return
|
||||
if(!isliving(usr))
|
||||
return
|
||||
var/mob/living/user = usr
|
||||
if(href_list["garbage"])
|
||||
if(mybag)
|
||||
user.put_in_hands(mybag)
|
||||
to_chat(user, "<span class='notice'>You take [mybag] from [src].</span>")
|
||||
mybag = null
|
||||
if(href_list["mop"])
|
||||
if(mymop)
|
||||
user.put_in_hands(mymop)
|
||||
to_chat(user, "<span class='notice'>You take [mymop] from [src].</span>")
|
||||
mymop = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
to_chat(user, "<span class='notice'>You take [myspray] from [src].</span>")
|
||||
myspray = null
|
||||
if(href_list["replacer"])
|
||||
if(myreplacer)
|
||||
user.put_in_hands(myreplacer)
|
||||
to_chat(user, "<span class='notice'>You take [myreplacer] from [src].</span>")
|
||||
myreplacer = null
|
||||
if(href_list["sign"])
|
||||
if(signs)
|
||||
var/obj/item/caution/Sign = locate() in src
|
||||
if(Sign)
|
||||
user.put_in_hands(Sign)
|
||||
to_chat(user, "<span class='notice'>You take \a [Sign] from [src].</span>")
|
||||
signs--
|
||||
else
|
||||
WARNING("Signs ([signs]) didn't match contents")
|
||||
signs = 0
|
||||
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/update_icon()
|
||||
overlays = null
|
||||
if(mybag)
|
||||
overlays += "cart_garbage"
|
||||
if(mymop)
|
||||
overlays += "cart_mop"
|
||||
if(myspray)
|
||||
overlays += "cart_spray"
|
||||
if(myreplacer)
|
||||
overlays += "cart_replacer"
|
||||
if(signs)
|
||||
overlays += "cart_sign[signs]"
|
||||
|
||||
@@ -1,156 +1,156 @@
|
||||
|
||||
//////Kitchen Spike
|
||||
|
||||
/obj/structure/kitchenspike_frame
|
||||
name = "meatspike frame"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spikeframe"
|
||||
desc = "The frame of a meat spike."
|
||||
density = 1
|
||||
anchored = 0
|
||||
max_integrity = 200
|
||||
|
||||
/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You unwrench [src] from the floor.</span>")
|
||||
anchored = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
|
||||
anchored = 1
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
if(R.get_amount() >= 4)
|
||||
R.use(4)
|
||||
to_chat(user, "<span class='notice'>You add spikes to the frame.</span>")
|
||||
new /obj/structure/kitchenspike(loc)
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
name = "meat spike"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spike"
|
||||
desc = "A spike for collecting meat from animals."
|
||||
density = 1
|
||||
anchored = 1
|
||||
buckle_lying = FALSE
|
||||
can_buckle = TRUE
|
||||
max_integrity = 250
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user)
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
user_unbuckle_mob(L, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/grab/G, mob/user)
|
||||
if(istype(G, /obj/item/crowbar))
|
||||
if(!has_buckled_mobs())
|
||||
playsound(loc, G.usesound, 100, 1)
|
||||
if(do_after(user, 20 * G.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
|
||||
return
|
||||
if(!istype(G, /obj/item/grab) || !G.affecting)
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>")
|
||||
return
|
||||
if(isliving(G.affecting))
|
||||
if(!has_buckled_mobs())
|
||||
if(do_mob(user, src, 120))
|
||||
if(spike(G.affecting))
|
||||
G.affecting.visible_message("<span class='danger'>[user] slams [G.affecting] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
|
||||
qdel(G)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/proc/spike(mob/living/victim)
|
||||
|
||||
if(!istype(victim))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs()) //to prevent spam/queing up attacks
|
||||
return FALSE
|
||||
if(victim.buckled)
|
||||
return FALSE
|
||||
playsound(loc, 'sound/effects/splat.ogg', 25, 1)
|
||||
victim.forceMove(drop_location())
|
||||
victim.emote("scream")
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
H.add_splatter_floor()
|
||||
victim.adjustBruteLoss(30)
|
||||
victim.setDir(2)
|
||||
buckle_mob(victim, force = TRUE)
|
||||
var/matrix/m180 = matrix(victim.transform)
|
||||
m180.Turn(180)
|
||||
animate(victim, transform = m180, time = 3)
|
||||
victim.pixel_y = victim.get_standard_pixel_y_offset(180)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
|
||||
return
|
||||
|
||||
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user)
|
||||
if(buckled_mob)
|
||||
var/mob/living/M = buckled_mob
|
||||
if(M != user)
|
||||
M.visible_message("<span class='notice'>[user] tries to pull [M] free of [src]!</span>",\
|
||||
"<span class='notice'>[user] is trying to pull you off [src], opening up fresh wounds!</span>",\
|
||||
"<span class='italics'>You hear a squishy wet noise.</span>")
|
||||
if(!do_after(user, 300, target = src))
|
||||
if(M && M.buckled)
|
||||
M.visible_message("<span class='notice'>[user] fails to free [M]!</span>",\
|
||||
"<span class='notice'>[user] fails to pull you off of [src].</span>")
|
||||
return
|
||||
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M] struggles to break free from [src]!</span>",\
|
||||
"<span class='notice'>You struggle to break free from [src], exacerbating your wounds! (Stay still for two minutes.)</span>",\
|
||||
"<span class='italics'>You hear a wet squishing noise..</span>")
|
||||
M.adjustBruteLoss(30)
|
||||
if(!do_after(M, 1200, target = src))
|
||||
if(M && M.buckled)
|
||||
to_chat(M, "<span class='warning'>You fail to free yourself!</span>")
|
||||
return
|
||||
if(!M.buckled)
|
||||
return
|
||||
release_mob(M)
|
||||
|
||||
/obj/structure/kitchenspike/proc/release_mob(mob/living/M)
|
||||
var/matrix/m180 = matrix(M.transform)
|
||||
m180.Turn(180)
|
||||
animate(M, transform = m180, time = 3)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(180)
|
||||
M.adjustBruteLoss(30)
|
||||
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
|
||||
unbuckle_mob(M, force = TRUE)
|
||||
M.emote("scream")
|
||||
M.AdjustWeakened(10)
|
||||
|
||||
/obj/structure/kitchenspike/Destroy()
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
release_mob(L)
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/deconstruct(disassembled = TRUE)
|
||||
if(disassembled)
|
||||
var/obj/F = new /obj/structure/kitchenspike_frame(loc)
|
||||
transfer_fingerprints_to(F)
|
||||
else
|
||||
new /obj/item/stack/sheet/metal(loc, 4)
|
||||
new /obj/item/stack/rods(loc, 4)
|
||||
qdel(src)
|
||||
|
||||
//////Kitchen Spike
|
||||
|
||||
/obj/structure/kitchenspike_frame
|
||||
name = "meatspike frame"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spikeframe"
|
||||
desc = "The frame of a meat spike."
|
||||
density = 1
|
||||
anchored = 0
|
||||
max_integrity = 200
|
||||
|
||||
/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You unwrench [src] from the floor.</span>")
|
||||
anchored = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
|
||||
anchored = 1
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
if(R.get_amount() >= 4)
|
||||
R.use(4)
|
||||
to_chat(user, "<span class='notice'>You add spikes to the frame.</span>")
|
||||
new /obj/structure/kitchenspike(loc)
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
name = "meat spike"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spike"
|
||||
desc = "A spike for collecting meat from animals."
|
||||
density = 1
|
||||
anchored = 1
|
||||
buckle_lying = FALSE
|
||||
can_buckle = TRUE
|
||||
max_integrity = 250
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user)
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
user_unbuckle_mob(L, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/grab/G, mob/user)
|
||||
if(istype(G, /obj/item/crowbar))
|
||||
if(!has_buckled_mobs())
|
||||
playsound(loc, G.usesound, 100, 1)
|
||||
if(do_after(user, 20 * G.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
|
||||
return
|
||||
if(!istype(G, /obj/item/grab) || !G.affecting)
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>")
|
||||
return
|
||||
if(isliving(G.affecting))
|
||||
if(!has_buckled_mobs())
|
||||
if(do_mob(user, src, 120))
|
||||
if(spike(G.affecting))
|
||||
G.affecting.visible_message("<span class='danger'>[user] slams [G.affecting] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
|
||||
qdel(G)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/proc/spike(mob/living/victim)
|
||||
|
||||
if(!istype(victim))
|
||||
return FALSE
|
||||
|
||||
if(has_buckled_mobs()) //to prevent spam/queing up attacks
|
||||
return FALSE
|
||||
if(victim.buckled)
|
||||
return FALSE
|
||||
playsound(loc, 'sound/effects/splat.ogg', 25, 1)
|
||||
victim.forceMove(drop_location())
|
||||
victim.emote("scream")
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
H.add_splatter_floor()
|
||||
victim.adjustBruteLoss(30)
|
||||
victim.setDir(2)
|
||||
buckle_mob(victim, force = TRUE)
|
||||
var/matrix/m180 = matrix(victim.transform)
|
||||
m180.Turn(180)
|
||||
animate(victim, transform = m180, time = 3)
|
||||
victim.pixel_y = victim.get_standard_pixel_y_offset(180)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/user_buckle_mob(mob/living/M, mob/living/user) //Don't want them getting put on the rack other than by spiking
|
||||
return
|
||||
|
||||
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user)
|
||||
if(buckled_mob)
|
||||
var/mob/living/M = buckled_mob
|
||||
if(M != user)
|
||||
M.visible_message("<span class='notice'>[user] tries to pull [M] free of [src]!</span>",\
|
||||
"<span class='notice'>[user] is trying to pull you off [src], opening up fresh wounds!</span>",\
|
||||
"<span class='italics'>You hear a squishy wet noise.</span>")
|
||||
if(!do_after(user, 300, target = src))
|
||||
if(M && M.buckled)
|
||||
M.visible_message("<span class='notice'>[user] fails to free [M]!</span>",\
|
||||
"<span class='notice'>[user] fails to pull you off of [src].</span>")
|
||||
return
|
||||
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M] struggles to break free from [src]!</span>",\
|
||||
"<span class='notice'>You struggle to break free from [src], exacerbating your wounds! (Stay still for two minutes.)</span>",\
|
||||
"<span class='italics'>You hear a wet squishing noise..</span>")
|
||||
M.adjustBruteLoss(30)
|
||||
if(!do_after(M, 1200, target = src))
|
||||
if(M && M.buckled)
|
||||
to_chat(M, "<span class='warning'>You fail to free yourself!</span>")
|
||||
return
|
||||
if(!M.buckled)
|
||||
return
|
||||
release_mob(M)
|
||||
|
||||
/obj/structure/kitchenspike/proc/release_mob(mob/living/M)
|
||||
var/matrix/m180 = matrix(M.transform)
|
||||
m180.Turn(180)
|
||||
animate(M, transform = m180, time = 3)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(180)
|
||||
M.adjustBruteLoss(30)
|
||||
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
|
||||
unbuckle_mob(M, force = TRUE)
|
||||
M.emote("scream")
|
||||
M.AdjustWeakened(10)
|
||||
|
||||
/obj/structure/kitchenspike/Destroy()
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
release_mob(L)
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/deconstruct(disassembled = TRUE)
|
||||
if(disassembled)
|
||||
var/obj/F = new /obj/structure/kitchenspike_frame(loc)
|
||||
transfer_fingerprints_to(F)
|
||||
else
|
||||
new /obj/item/stack/sheet/metal(loc, 4)
|
||||
new /obj/item/stack/rods(loc, 4)
|
||||
qdel(src)
|
||||
|
||||
@@ -1,202 +1,202 @@
|
||||
// Basic ladder. By default links to the z-level above/below.
|
||||
/obj/structure/ladder
|
||||
name = "ladder"
|
||||
desc = "A sturdy metal ladder."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "ladder11"
|
||||
anchored = TRUE
|
||||
var/obj/structure/ladder/down //the ladder below this one
|
||||
var/obj/structure/ladder/up //the ladder above this one
|
||||
var/use_verb = "climb"
|
||||
|
||||
/obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down)
|
||||
. = ..()
|
||||
if (up)
|
||||
src.up = up
|
||||
up.down = src
|
||||
up.update_icon()
|
||||
if (down)
|
||||
src.down = down
|
||||
down.up = src
|
||||
down.update_icon()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/ladder/Destroy(force)
|
||||
if((resistance_flags & INDESTRUCTIBLE) && !force)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
disconnect()
|
||||
return ..()
|
||||
|
||||
/obj/structure/ladder/LateInitialize()
|
||||
// By default, discover ladders above and below us vertically
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(!down)
|
||||
for(var/obj/structure/ladder/L in locate(T.x, T.y, T.z - 1))
|
||||
down = L
|
||||
L.up = src // Don't waste effort looping the other way
|
||||
L.update_icon()
|
||||
break
|
||||
if(!up)
|
||||
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
|
||||
up = L
|
||||
L.down = src // Don't waste effort looping the other way
|
||||
L.update_icon()
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/ladder/proc/disconnect()
|
||||
if(up && up.down == src)
|
||||
up.down = null
|
||||
up.update_icon()
|
||||
if(down && down.up == src)
|
||||
down.up = null
|
||||
down.update_icon()
|
||||
up = down = null
|
||||
|
||||
/obj/structure/ladder/update_icon()
|
||||
if(up && down)
|
||||
icon_state = "ladder11"
|
||||
|
||||
else if(up)
|
||||
icon_state = "ladder10"
|
||||
|
||||
else if(down)
|
||||
icon_state = "ladder01"
|
||||
|
||||
else //wtf make your ladders properly assholes
|
||||
icon_state = "ladder00"
|
||||
|
||||
/obj/structure/ladder/singularity_pull()
|
||||
if(!(resistance_flags & INDESTRUCTIBLE))
|
||||
visible_message("<span class='danger'>[src] is torn to pieces by the gravitational pull!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/ladder/proc/travel(going_up, mob/user, is_ghost, obj/structure/ladder/ladder)
|
||||
if(!is_ghost)
|
||||
show_fluff_message(going_up, user)
|
||||
ladder.add_fingerprint(user)
|
||||
|
||||
var/turf/T = get_turf(ladder)
|
||||
var/atom/movable/AM
|
||||
if(user.pulling)
|
||||
AM = user.pulling
|
||||
AM.forceMove(T)
|
||||
user.forceMove(T)
|
||||
if(AM)
|
||||
user.start_pulling(AM)
|
||||
|
||||
/obj/structure/ladder/proc/use(mob/user, is_ghost = FALSE)
|
||||
if(!is_ghost && !in_range(src, user))
|
||||
return
|
||||
|
||||
if(up && down)
|
||||
var/result = alert("Go up or down [src]?", "[name]", "Up", "Down", "Cancel")
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
return // nice try
|
||||
switch(result)
|
||||
if("Up")
|
||||
travel(TRUE, user, is_ghost, up)
|
||||
if("Down")
|
||||
travel(FALSE, user, is_ghost, down)
|
||||
if("Cancel")
|
||||
return
|
||||
else if(up)
|
||||
travel(TRUE, user, is_ghost, up)
|
||||
else if(down)
|
||||
travel(FALSE, user, is_ghost, down)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] doesn't seem to lead anywhere!</span>")
|
||||
|
||||
if(!is_ghost)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user)
|
||||
use(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/W, mob/user, params)
|
||||
return use(user)
|
||||
|
||||
/obj/structure/ladder/attack_robot(mob/living/silicon/robot/R)
|
||||
if(R.Adjacent(src))
|
||||
return use(R)
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
|
||||
use(user, TRUE)
|
||||
|
||||
/obj/structure/ladder/proc/show_fluff_message(going_up, mob/user)
|
||||
if(going_up)
|
||||
user.visible_message("[user] climbs up [src].","<span class='notice'>You [use_verb] up [src].</span>")
|
||||
else
|
||||
user.visible_message("[user] climbs down [src].","<span class='notice'>You [use_verb] down [src].</span>")
|
||||
|
||||
|
||||
// Indestructible away mission ladders which link based on a mapped ID and height value rather than X/Y/Z.
|
||||
/obj/structure/ladder/unbreakable
|
||||
name = "sturdy ladder"
|
||||
desc = "An extremely sturdy metal ladder."
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
var/id
|
||||
var/height = 0 // higher numbers are considered physically higher
|
||||
|
||||
/obj/structure/ladder/unbreakable/Initialize(mapload)
|
||||
GLOB.ladders += src
|
||||
return ..()
|
||||
|
||||
/obj/structure/ladder/unbreakable/Destroy()
|
||||
. = ..()
|
||||
if(. != QDEL_HINT_LETMELIVE)
|
||||
GLOB.ladders -= src
|
||||
|
||||
/obj/structure/ladder/unbreakable/LateInitialize()
|
||||
// Override the parent to find ladders based on being height-linked
|
||||
if(!id || (up && down))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
for(var/O in GLOB.ladders)
|
||||
var/obj/structure/ladder/unbreakable/L = O
|
||||
if(L.id != id)
|
||||
continue // not one of our pals
|
||||
if(!down && L.height == height - 1)
|
||||
down = L
|
||||
L.up = src
|
||||
L.update_icon()
|
||||
if (up)
|
||||
break // break if both our connections are filled
|
||||
else if(!up && L.height == height + 1)
|
||||
up = L
|
||||
L.down = src
|
||||
L.update_icon()
|
||||
if (down)
|
||||
break // break if both our connections are filled
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/ladder/unbreakable/dive_point/buoy
|
||||
name = "diving point buoy"
|
||||
desc = "A buoy marking the location of an underwater dive area."
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "buoy"
|
||||
id = "dive"
|
||||
height = 2
|
||||
use_verb = "swim"
|
||||
layer = MOB_LAYER + 0.2 //0.1 higher than the water overlay, this also means people can "swim" behind/under it
|
||||
|
||||
/obj/structure/ladder/unbreakable/dive_point/anchor
|
||||
name = "diving point anchor"
|
||||
desc = "An anchor tethered to the buoy at the surface, to keep the dive area marked."
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "anchor"
|
||||
id = "dive"
|
||||
height = 1
|
||||
light_range = 5
|
||||
|
||||
/obj/structure/ladder/dive_point/Initialize(mapload)
|
||||
. = ..()
|
||||
set_light(light_range, light_power) //magical glowing anchor
|
||||
|
||||
/obj/structure/ladder/unbreakable/dive_point/update_icon()
|
||||
return
|
||||
// Basic ladder. By default links to the z-level above/below.
|
||||
/obj/structure/ladder
|
||||
name = "ladder"
|
||||
desc = "A sturdy metal ladder."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "ladder11"
|
||||
anchored = TRUE
|
||||
var/obj/structure/ladder/down //the ladder below this one
|
||||
var/obj/structure/ladder/up //the ladder above this one
|
||||
var/use_verb = "climb"
|
||||
|
||||
/obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down)
|
||||
. = ..()
|
||||
if (up)
|
||||
src.up = up
|
||||
up.down = src
|
||||
up.update_icon()
|
||||
if (down)
|
||||
src.down = down
|
||||
down.up = src
|
||||
down.update_icon()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/structure/ladder/Destroy(force)
|
||||
if((resistance_flags & INDESTRUCTIBLE) && !force)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
disconnect()
|
||||
return ..()
|
||||
|
||||
/obj/structure/ladder/LateInitialize()
|
||||
// By default, discover ladders above and below us vertically
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(!down)
|
||||
for(var/obj/structure/ladder/L in locate(T.x, T.y, T.z - 1))
|
||||
down = L
|
||||
L.up = src // Don't waste effort looping the other way
|
||||
L.update_icon()
|
||||
break
|
||||
if(!up)
|
||||
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
|
||||
up = L
|
||||
L.down = src // Don't waste effort looping the other way
|
||||
L.update_icon()
|
||||
break
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/ladder/proc/disconnect()
|
||||
if(up && up.down == src)
|
||||
up.down = null
|
||||
up.update_icon()
|
||||
if(down && down.up == src)
|
||||
down.up = null
|
||||
down.update_icon()
|
||||
up = down = null
|
||||
|
||||
/obj/structure/ladder/update_icon()
|
||||
if(up && down)
|
||||
icon_state = "ladder11"
|
||||
|
||||
else if(up)
|
||||
icon_state = "ladder10"
|
||||
|
||||
else if(down)
|
||||
icon_state = "ladder01"
|
||||
|
||||
else //wtf make your ladders properly assholes
|
||||
icon_state = "ladder00"
|
||||
|
||||
/obj/structure/ladder/singularity_pull()
|
||||
if(!(resistance_flags & INDESTRUCTIBLE))
|
||||
visible_message("<span class='danger'>[src] is torn to pieces by the gravitational pull!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/ladder/proc/travel(going_up, mob/user, is_ghost, obj/structure/ladder/ladder)
|
||||
if(!is_ghost)
|
||||
show_fluff_message(going_up, user)
|
||||
ladder.add_fingerprint(user)
|
||||
|
||||
var/turf/T = get_turf(ladder)
|
||||
var/atom/movable/AM
|
||||
if(user.pulling)
|
||||
AM = user.pulling
|
||||
AM.forceMove(T)
|
||||
user.forceMove(T)
|
||||
if(AM)
|
||||
user.start_pulling(AM)
|
||||
|
||||
/obj/structure/ladder/proc/use(mob/user, is_ghost = FALSE)
|
||||
if(!is_ghost && !in_range(src, user))
|
||||
return
|
||||
|
||||
if(up && down)
|
||||
var/result = alert("Go up or down [src]?", "[name]", "Up", "Down", "Cancel")
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
return // nice try
|
||||
switch(result)
|
||||
if("Up")
|
||||
travel(TRUE, user, is_ghost, up)
|
||||
if("Down")
|
||||
travel(FALSE, user, is_ghost, down)
|
||||
if("Cancel")
|
||||
return
|
||||
else if(up)
|
||||
travel(TRUE, user, is_ghost, up)
|
||||
else if(down)
|
||||
travel(FALSE, user, is_ghost, down)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] doesn't seem to lead anywhere!</span>")
|
||||
|
||||
if(!is_ghost)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user)
|
||||
use(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/W, mob/user, params)
|
||||
return use(user)
|
||||
|
||||
/obj/structure/ladder/attack_robot(mob/living/silicon/robot/R)
|
||||
if(R.Adjacent(src))
|
||||
return use(R)
|
||||
|
||||
//ATTACK GHOST IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
|
||||
use(user, TRUE)
|
||||
|
||||
/obj/structure/ladder/proc/show_fluff_message(going_up, mob/user)
|
||||
if(going_up)
|
||||
user.visible_message("[user] climbs up [src].","<span class='notice'>You [use_verb] up [src].</span>")
|
||||
else
|
||||
user.visible_message("[user] climbs down [src].","<span class='notice'>You [use_verb] down [src].</span>")
|
||||
|
||||
|
||||
// Indestructible away mission ladders which link based on a mapped ID and height value rather than X/Y/Z.
|
||||
/obj/structure/ladder/unbreakable
|
||||
name = "sturdy ladder"
|
||||
desc = "An extremely sturdy metal ladder."
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
var/id
|
||||
var/height = 0 // higher numbers are considered physically higher
|
||||
|
||||
/obj/structure/ladder/unbreakable/Initialize(mapload)
|
||||
GLOB.ladders += src
|
||||
return ..()
|
||||
|
||||
/obj/structure/ladder/unbreakable/Destroy()
|
||||
. = ..()
|
||||
if(. != QDEL_HINT_LETMELIVE)
|
||||
GLOB.ladders -= src
|
||||
|
||||
/obj/structure/ladder/unbreakable/LateInitialize()
|
||||
// Override the parent to find ladders based on being height-linked
|
||||
if(!id || (up && down))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
for(var/O in GLOB.ladders)
|
||||
var/obj/structure/ladder/unbreakable/L = O
|
||||
if(L.id != id)
|
||||
continue // not one of our pals
|
||||
if(!down && L.height == height - 1)
|
||||
down = L
|
||||
L.up = src
|
||||
L.update_icon()
|
||||
if (up)
|
||||
break // break if both our connections are filled
|
||||
else if(!up && L.height == height + 1)
|
||||
up = L
|
||||
L.down = src
|
||||
L.update_icon()
|
||||
if (down)
|
||||
break // break if both our connections are filled
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/structure/ladder/unbreakable/dive_point/buoy
|
||||
name = "diving point buoy"
|
||||
desc = "A buoy marking the location of an underwater dive area."
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "buoy"
|
||||
id = "dive"
|
||||
height = 2
|
||||
use_verb = "swim"
|
||||
layer = MOB_LAYER + 0.2 //0.1 higher than the water overlay, this also means people can "swim" behind/under it
|
||||
|
||||
/obj/structure/ladder/unbreakable/dive_point/anchor
|
||||
name = "diving point anchor"
|
||||
desc = "An anchor tethered to the buoy at the surface, to keep the dive area marked."
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "anchor"
|
||||
id = "dive"
|
||||
height = 1
|
||||
light_range = 5
|
||||
|
||||
/obj/structure/ladder/dive_point/Initialize(mapload)
|
||||
. = ..()
|
||||
set_light(light_range, light_power) //magical glowing anchor
|
||||
|
||||
/obj/structure/ladder/unbreakable/dive_point/update_icon()
|
||||
return
|
||||
|
||||
@@ -1,126 +1,126 @@
|
||||
/obj/structure/lattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
|
||||
max_integrity = 50
|
||||
layer = LATTICE_LAYER //under pipes
|
||||
plane = FLOOR_PLANE
|
||||
var/number_of_rods = 1
|
||||
canSmoothWith = list(/obj/structure/lattice,
|
||||
/turf/simulated/floor,
|
||||
/turf/simulated/wall,
|
||||
/obj/structure/falsewall)
|
||||
smooth = SMOOTH_MORE
|
||||
|
||||
/obj/structure/lattice/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/obj/structure/lattice/LAT in loc)
|
||||
if(LAT != src)
|
||||
QDEL_IN(LAT, 0)
|
||||
|
||||
/obj/structure/lattice/examine(mob/user)
|
||||
. = ..()
|
||||
. += deconstruction_hints(user)
|
||||
|
||||
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
|
||||
return "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>"
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/W = C
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Slicing [name] joints...</span>")
|
||||
deconstruct()
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
|
||||
|
||||
/obj/structure/lattice/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/rods(get_turf(src), number_of_rods)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lattice/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/lattice/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FOUR)
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/lattice/clockwork
|
||||
name = "cog lattice"
|
||||
desc = "A lightweight support lattice. These hold the Justicar's station together."
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
|
||||
|
||||
/obj/structure/lattice/clockwork/Initialize(mapload)
|
||||
. = ..()
|
||||
ratvar_act()
|
||||
|
||||
/obj/structure/lattice/clockwork/ratvar_act()
|
||||
if((x + y) % 2 != 0)
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork_large.dmi'
|
||||
pixel_x = -9
|
||||
pixel_y = -9
|
||||
else
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
return TRUE
|
||||
|
||||
/obj/structure/lattice/catwalk
|
||||
name = "catwalk"
|
||||
desc = "A catwalk for easier EVA maneuvering and cable placement."
|
||||
icon = 'icons/obj/smooth_structures/catwalk.dmi'
|
||||
icon_state = "catwalk"
|
||||
number_of_rods = 2
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
|
||||
/obj/structure/lattice/catwalk/deconstruction_hints(mob/user)
|
||||
to_chat(user, "<span class='notice'>The supporting rods look like they could be <b>cut</b>.</span>")
|
||||
|
||||
/obj/structure/lattice/catwalk/Move()
|
||||
var/turf/T = loc
|
||||
for(var/obj/structure/cable/C in T)
|
||||
C.deconstruct()
|
||||
..()
|
||||
|
||||
/obj/structure/lattice/catwalk/deconstruct()
|
||||
var/turf/T = loc
|
||||
for(var/obj/structure/cable/C in T)
|
||||
C.deconstruct()
|
||||
..()
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork
|
||||
name = "clockwork catwalk"
|
||||
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
|
||||
canSmoothWith = list(/obj/structure/lattice,
|
||||
/turf/simulated/floor,
|
||||
/turf/simulated/wall,
|
||||
/obj/structure/falsewall)
|
||||
smooth = SMOOTH_MORE
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork/Initialize(mapload)
|
||||
. = ..()
|
||||
ratvar_act()
|
||||
if(!mapload)
|
||||
new /obj/effect/temp_visual/ratvar/floor/catwalk(loc)
|
||||
new /obj/effect/temp_visual/ratvar/beam/catwalk(loc)
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork/ratvar_act()
|
||||
if((x + y) % 2 != 0)
|
||||
icon = 'icons/obj/smooth_structures/catwalk_clockwork_large.dmi'
|
||||
pixel_x = -9
|
||||
pixel_y = -9
|
||||
else
|
||||
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
return TRUE
|
||||
/obj/structure/lattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
|
||||
max_integrity = 50
|
||||
layer = LATTICE_LAYER //under pipes
|
||||
plane = FLOOR_PLANE
|
||||
var/number_of_rods = 1
|
||||
canSmoothWith = list(/obj/structure/lattice,
|
||||
/turf/simulated/floor,
|
||||
/turf/simulated/wall,
|
||||
/obj/structure/falsewall)
|
||||
smooth = SMOOTH_MORE
|
||||
|
||||
/obj/structure/lattice/Initialize(mapload)
|
||||
. = ..()
|
||||
for(var/obj/structure/lattice/LAT in loc)
|
||||
if(LAT != src)
|
||||
QDEL_IN(LAT, 0)
|
||||
|
||||
/obj/structure/lattice/examine(mob/user)
|
||||
. = ..()
|
||||
. += deconstruction_hints(user)
|
||||
|
||||
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
|
||||
return "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>"
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
if(istype(C, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/W = C
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>Slicing [name] joints...</span>")
|
||||
deconstruct()
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
|
||||
|
||||
/obj/structure/lattice/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/rods(get_turf(src), number_of_rods)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lattice/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/lattice/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FOUR)
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/lattice/clockwork
|
||||
name = "cog lattice"
|
||||
desc = "A lightweight support lattice. These hold the Justicar's station together."
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
|
||||
|
||||
/obj/structure/lattice/clockwork/Initialize(mapload)
|
||||
. = ..()
|
||||
ratvar_act()
|
||||
|
||||
/obj/structure/lattice/clockwork/ratvar_act()
|
||||
if((x + y) % 2 != 0)
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork_large.dmi'
|
||||
pixel_x = -9
|
||||
pixel_y = -9
|
||||
else
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
return TRUE
|
||||
|
||||
/obj/structure/lattice/catwalk
|
||||
name = "catwalk"
|
||||
desc = "A catwalk for easier EVA maneuvering and cable placement."
|
||||
icon = 'icons/obj/smooth_structures/catwalk.dmi'
|
||||
icon_state = "catwalk"
|
||||
number_of_rods = 2
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
|
||||
/obj/structure/lattice/catwalk/deconstruction_hints(mob/user)
|
||||
to_chat(user, "<span class='notice'>The supporting rods look like they could be <b>cut</b>.</span>")
|
||||
|
||||
/obj/structure/lattice/catwalk/Move()
|
||||
var/turf/T = loc
|
||||
for(var/obj/structure/cable/C in T)
|
||||
C.deconstruct()
|
||||
..()
|
||||
|
||||
/obj/structure/lattice/catwalk/deconstruct()
|
||||
var/turf/T = loc
|
||||
for(var/obj/structure/cable/C in T)
|
||||
C.deconstruct()
|
||||
..()
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork
|
||||
name = "clockwork catwalk"
|
||||
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
|
||||
canSmoothWith = list(/obj/structure/lattice,
|
||||
/turf/simulated/floor,
|
||||
/turf/simulated/wall,
|
||||
/obj/structure/falsewall)
|
||||
smooth = SMOOTH_MORE
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork/Initialize(mapload)
|
||||
. = ..()
|
||||
ratvar_act()
|
||||
if(!mapload)
|
||||
new /obj/effect/temp_visual/ratvar/floor/catwalk(loc)
|
||||
new /obj/effect/temp_visual/ratvar/beam/catwalk(loc)
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork/ratvar_act()
|
||||
if((x + y) % 2 != 0)
|
||||
icon = 'icons/obj/smooth_structures/catwalk_clockwork_large.dmi'
|
||||
pixel_x = -9
|
||||
pixel_y = -9
|
||||
else
|
||||
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
return TRUE
|
||||
|
||||
@@ -97,4 +97,4 @@ GLOBAL_LIST_INIT(tendrils, list())
|
||||
for(var/turf/T in range(2,src))
|
||||
if(!T.density)
|
||||
T.TerraformTurf(/turf/simulated/floor/chasm/straight_down/lava_land_surface)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
user.show_message("<span class='notice'>You weave \the [W.name] into a workable fabric.</span>", 1)
|
||||
return TRUE
|
||||
|
||||
#undef FABRIC_PER_SHEET
|
||||
#undef FABRIC_PER_SHEET
|
||||
|
||||
@@ -1,236 +1,236 @@
|
||||
//NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its machineryness
|
||||
/obj/structure/mineral_door
|
||||
name = "metal door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 1
|
||||
|
||||
icon = 'icons/obj/doors/mineral_doors.dmi'
|
||||
icon_state = "metal"
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 50, "acid" = 50)
|
||||
var/initial_state
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/close_delay = -1 //-1 if does not auto close.
|
||||
|
||||
var/hardness = 1
|
||||
var/sheetType = /obj/item/stack/sheet/metal
|
||||
var/sheetAmount = 7
|
||||
var/openSound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
var/closeSound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
var/damageSound = null
|
||||
|
||||
/obj/structure/mineral_door/New(location)
|
||||
..()
|
||||
initial_state = icon_state
|
||||
|
||||
/obj/structure/mineral_door/Initialize()
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/mineral_door/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/mineral_door/Move()
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/mineral_door/Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user) && Adjacent(user)) //but cyborgs can, but not remotely
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_hand(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
SwitchState()
|
||||
|
||||
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height = 0)
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates)
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
else
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
/obj/structure/mineral_door/proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
|
||||
/obj/structure/mineral_door/proc/Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, openSound, 100, 1)
|
||||
flick("[initial_state]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
if(close_delay != -1)
|
||||
spawn(close_delay)
|
||||
Close()
|
||||
|
||||
/obj/structure/mineral_door/proc/Close()
|
||||
if(isSwitchingStates || state != 1)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
return
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, closeSound, 100, 1)
|
||||
flick("[initial_state]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
/obj/structure/mineral_door/update_icon()
|
||||
if(state)
|
||||
icon_state = "[initial_state]open"
|
||||
else
|
||||
icon_state = initial_state
|
||||
|
||||
/obj/structure/mineral_door/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pickaxe))
|
||||
var/obj/item/pickaxe/digTool = W
|
||||
to_chat(user, "<span class='notice'>You start digging \the [src].</span>")
|
||||
if(do_after(user, 40 * digTool.toolspeed * hardness, target = src) && src)
|
||||
to_chat(user, "<span class='notice'>You finished digging.</span>")
|
||||
deconstruct(TRUE)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/mineral_door/deconstruct(disassembled = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
if(sheetType)
|
||||
if(disassembled)
|
||||
new sheetType(T, sheetAmount)
|
||||
else
|
||||
new sheetType(T, max(sheetAmount - 2, 1))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
max_integrity = 300
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
name = "silver door"
|
||||
icon_state = "silver"
|
||||
sheetType = /obj/item/stack/sheet/mineral/silver
|
||||
max_integrity = 300
|
||||
|
||||
/obj/structure/mineral_door/gold
|
||||
name = "gold door"
|
||||
icon_state = "gold"
|
||||
sheetType = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
/obj/structure/mineral_door/uranium
|
||||
name = "uranium door"
|
||||
icon_state = "uranium"
|
||||
sheetType = /obj/item/stack/sheet/mineral/uranium
|
||||
max_integrity = 300
|
||||
light_range = 2
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
name = "sandstone door"
|
||||
icon_state = "sandstone"
|
||||
sheetType = /obj/item/stack/sheet/mineral/sandstone
|
||||
max_integrity = 100
|
||||
|
||||
/obj/structure/mineral_door/transparent
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/mineral_door/transparent/Close()
|
||||
..()
|
||||
set_opacity(0)
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma
|
||||
name = "plasma door"
|
||||
icon_state = "plasma"
|
||||
sheetType = /obj/item/stack/sheet/mineral/plasma
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/W, mob/user)
|
||||
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 ..()
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 300)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/proc/TemperatureAct(temperature)
|
||||
atmos_spawn_air(LINDA_SPAWN_HEAT | LINDA_SPAWN_TOXINS, 500)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/mineral_door/transparent/diamond
|
||||
name = "diamond door"
|
||||
icon_state = "diamond"
|
||||
sheetType = /obj/item/stack/sheet/mineral/diamond
|
||||
max_integrity = 1000
|
||||
|
||||
/obj/structure/mineral_door/wood
|
||||
name = "wood door"
|
||||
icon_state = "wood"
|
||||
openSound = 'sound/effects/doorcreaky.ogg'
|
||||
closeSound = 'sound/effects/doorcreaky.ogg'
|
||||
sheetType = /obj/item/stack/sheet/wood
|
||||
hardness = 1
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 200
|
||||
|
||||
/obj/structure/mineral_door/resin
|
||||
name = "resin door"
|
||||
icon_state = "resin"
|
||||
hardness = 1.5
|
||||
close_delay = 100
|
||||
openSound = 'sound/effects/attackblob.ogg'
|
||||
closeSound = 'sound/effects/attackblob.ogg'
|
||||
damageSound = 'sound/effects/attackblob.ogg'
|
||||
sheetType = null
|
||||
|
||||
/obj/structure/mineral_door/resin/TryToSwitchState(atom/user)
|
||||
if(isalien(user))
|
||||
return ..()
|
||||
//NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its machineryness
|
||||
/obj/structure/mineral_door
|
||||
name = "metal door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 1
|
||||
|
||||
icon = 'icons/obj/doors/mineral_doors.dmi'
|
||||
icon_state = "metal"
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 50, "acid" = 50)
|
||||
var/initial_state
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/close_delay = -1 //-1 if does not auto close.
|
||||
|
||||
var/hardness = 1
|
||||
var/sheetType = /obj/item/stack/sheet/metal
|
||||
var/sheetAmount = 7
|
||||
var/openSound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
var/closeSound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
var/damageSound = null
|
||||
|
||||
/obj/structure/mineral_door/New(location)
|
||||
..()
|
||||
initial_state = icon_state
|
||||
|
||||
/obj/structure/mineral_door/Initialize()
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/mineral_door/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/mineral_door/Move()
|
||||
var/turf/T = loc
|
||||
. = ..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/mineral_door/Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user) && Adjacent(user)) //but cyborgs can, but not remotely
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_hand(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
SwitchState()
|
||||
|
||||
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height = 0)
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates)
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
else
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
/obj/structure/mineral_door/proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
|
||||
/obj/structure/mineral_door/proc/Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, openSound, 100, 1)
|
||||
flick("[initial_state]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
if(close_delay != -1)
|
||||
spawn(close_delay)
|
||||
Close()
|
||||
|
||||
/obj/structure/mineral_door/proc/Close()
|
||||
if(isSwitchingStates || state != 1)
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
return
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, closeSound, 100, 1)
|
||||
flick("[initial_state]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
air_update_turf(1)
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
/obj/structure/mineral_door/update_icon()
|
||||
if(state)
|
||||
icon_state = "[initial_state]open"
|
||||
else
|
||||
icon_state = initial_state
|
||||
|
||||
/obj/structure/mineral_door/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pickaxe))
|
||||
var/obj/item/pickaxe/digTool = W
|
||||
to_chat(user, "<span class='notice'>You start digging \the [src].</span>")
|
||||
if(do_after(user, 40 * digTool.toolspeed * hardness, target = src) && src)
|
||||
to_chat(user, "<span class='notice'>You finished digging.</span>")
|
||||
deconstruct(TRUE)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/mineral_door/deconstruct(disassembled = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
if(sheetType)
|
||||
if(disassembled)
|
||||
new sheetType(T, sheetAmount)
|
||||
else
|
||||
new sheetType(T, max(sheetAmount - 2, 1))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
max_integrity = 300
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
name = "silver door"
|
||||
icon_state = "silver"
|
||||
sheetType = /obj/item/stack/sheet/mineral/silver
|
||||
max_integrity = 300
|
||||
|
||||
/obj/structure/mineral_door/gold
|
||||
name = "gold door"
|
||||
icon_state = "gold"
|
||||
sheetType = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
/obj/structure/mineral_door/uranium
|
||||
name = "uranium door"
|
||||
icon_state = "uranium"
|
||||
sheetType = /obj/item/stack/sheet/mineral/uranium
|
||||
max_integrity = 300
|
||||
light_range = 2
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
name = "sandstone door"
|
||||
icon_state = "sandstone"
|
||||
sheetType = /obj/item/stack/sheet/mineral/sandstone
|
||||
max_integrity = 100
|
||||
|
||||
/obj/structure/mineral_door/transparent
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/mineral_door/transparent/Close()
|
||||
..()
|
||||
set_opacity(0)
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma
|
||||
name = "plasma door"
|
||||
icon_state = "plasma"
|
||||
sheetType = /obj/item/stack/sheet/mineral/plasma
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/W, mob/user)
|
||||
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 ..()
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature > 300)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/proc/TemperatureAct(temperature)
|
||||
atmos_spawn_air(LINDA_SPAWN_HEAT | LINDA_SPAWN_TOXINS, 500)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/mineral_door/transparent/diamond
|
||||
name = "diamond door"
|
||||
icon_state = "diamond"
|
||||
sheetType = /obj/item/stack/sheet/mineral/diamond
|
||||
max_integrity = 1000
|
||||
|
||||
/obj/structure/mineral_door/wood
|
||||
name = "wood door"
|
||||
icon_state = "wood"
|
||||
openSound = 'sound/effects/doorcreaky.ogg'
|
||||
closeSound = 'sound/effects/doorcreaky.ogg'
|
||||
sheetType = /obj/item/stack/sheet/wood
|
||||
hardness = 1
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 200
|
||||
|
||||
/obj/structure/mineral_door/resin
|
||||
name = "resin door"
|
||||
icon_state = "resin"
|
||||
hardness = 1.5
|
||||
close_delay = 100
|
||||
openSound = 'sound/effects/attackblob.ogg'
|
||||
closeSound = 'sound/effects/attackblob.ogg'
|
||||
damageSound = 'sound/effects/attackblob.ogg'
|
||||
sheetType = null
|
||||
|
||||
/obj/structure/mineral_door/resin/TryToSwitchState(atom/user)
|
||||
if(isalien(user))
|
||||
return ..()
|
||||
|
||||
@@ -1,163 +1,163 @@
|
||||
//wip wip wup
|
||||
/obj/structure/mirror
|
||||
name = "mirror"
|
||||
desc = "Mirror mirror on the wall, who's the most robust of them all?"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
anchored = 1
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
var/list/ui_users = list()
|
||||
|
||||
/obj/structure/mirror/New(turf/T, newdir = SOUTH, building = FALSE)
|
||||
..()
|
||||
if(building)
|
||||
switch(newdir)
|
||||
if(NORTH)
|
||||
pixel_y = -32
|
||||
if(SOUTH)
|
||||
pixel_y = 32
|
||||
if(EAST)
|
||||
pixel_x = -32
|
||||
if(WEST)
|
||||
pixel_x = 32
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
if(broken)
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "SalonPro Nano-Mirror™"
|
||||
AC.flags = APPEARANCE_ALL_BODY
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
/obj/structure/mirror/obj_break(damage_flag, mapload)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
icon_state = "mirror_broke"
|
||||
if(!mapload)
|
||||
playsound(src, "shatter", 70, TRUE)
|
||||
if(desc == initial(desc))
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
broken = TRUE
|
||||
|
||||
/obj/structure/mirror/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] begins to unfasten [src].</span>", "<span class='notice'>You begin to unfasten [src].</span>")
|
||||
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
return
|
||||
if(broken)
|
||||
user.visible_message("<span class='notice'>[user] drops the broken shards to the floor.</span>", "<span class='notice'>You drop the broken shards on the floor.</span>")
|
||||
new /obj/item/shard(get_turf(user))
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] carefully places [src] on the floor.</span>", "<span class='notice'>You carefully place [src] on the floor.</span>")
|
||||
new /obj/item/mounted/mirror(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!disassembled)
|
||||
new /obj/item/shard( src.loc )
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
|
||||
|
||||
|
||||
/obj/item/mounted/mirror
|
||||
name = "mirror"
|
||||
desc = "Some reflective glass ready to be hung on a wall. Don't break it!"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
|
||||
/obj/item/mounted/mirror/do_build(turf/on_wall, mob/user)
|
||||
var/obj/structure/mirror/M = new /obj/structure/mirror(get_turf(user), get_dir(on_wall, user), 1)
|
||||
transfer_prints_to(M, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/magic
|
||||
name = "magic mirror"
|
||||
icon_state = "magic_mirror"
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user)
|
||||
if(!ishuman(user) || broken)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("Name", "Body", "Voice")
|
||||
|
||||
switch(choice)
|
||||
if("Name")
|
||||
var/newname = copytext(sanitize(input(H, "Who are we again?", "Name change", H.name) as null|text),1,MAX_NAME_LEN)
|
||||
|
||||
if(!newname)
|
||||
return
|
||||
H.real_name = newname
|
||||
H.name = newname
|
||||
if(H.dna)
|
||||
H.dna.real_name = newname
|
||||
if(H.mind)
|
||||
H.mind.name = newname
|
||||
|
||||
if(newname)
|
||||
curse(user)
|
||||
|
||||
if("Body")
|
||||
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
|
||||
if(config.usealienwhitelist)
|
||||
for(var/Spec in GLOB.whitelisted_species)
|
||||
if(is_alien_whitelisted(H, Spec))
|
||||
race_list += Spec
|
||||
else
|
||||
race_list += GLOB.whitelisted_species
|
||||
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "Magic Mirror"
|
||||
AC.flags = APPEARANCE_ALL
|
||||
AC.whitelist = race_list
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
if("Voice")
|
||||
var/voice_choice = input(user, "Perhaps...", "Voice effects") as null|anything in list("Comic Sans", "Wingdings", "Swedish", "Chav")
|
||||
var/voice_mutation
|
||||
switch(voice_choice)
|
||||
if("Comic Sans")
|
||||
voice_mutation = COMICBLOCK
|
||||
if("Wingdings")
|
||||
voice_mutation = WINGDINGSBLOCK
|
||||
if("Swedish")
|
||||
voice_mutation = SWEDEBLOCK
|
||||
if("Chav")
|
||||
voice_mutation = CHAVBLOCK
|
||||
if(voice_mutation)
|
||||
if(H.dna.GetSEState(voice_mutation))
|
||||
H.dna.SetSEState(voice_mutation, FALSE)
|
||||
genemutcheck(H, voice_mutation, null, MUTCHK_FORCED)
|
||||
else
|
||||
H.dna.SetSEState(voice_mutation, TRUE)
|
||||
genemutcheck(H, voice_mutation, null, MUTCHK_FORCED)
|
||||
|
||||
if(voice_choice)
|
||||
curse(user)
|
||||
|
||||
/obj/structure/mirror/magic/on_ui_close(mob/user)
|
||||
curse(user)
|
||||
|
||||
/obj/structure/mirror/magic/attackby(obj/item/I, mob/living/user, params)
|
||||
return
|
||||
|
||||
/obj/structure/mirror/magic/proc/curse(mob/living/user)
|
||||
return
|
||||
//wip wip wup
|
||||
/obj/structure/mirror
|
||||
name = "mirror"
|
||||
desc = "Mirror mirror on the wall, who's the most robust of them all?"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
anchored = 1
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
var/list/ui_users = list()
|
||||
|
||||
/obj/structure/mirror/New(turf/T, newdir = SOUTH, building = FALSE)
|
||||
..()
|
||||
if(building)
|
||||
switch(newdir)
|
||||
if(NORTH)
|
||||
pixel_y = -32
|
||||
if(SOUTH)
|
||||
pixel_y = 32
|
||||
if(EAST)
|
||||
pixel_x = -32
|
||||
if(WEST)
|
||||
pixel_x = 32
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
if(broken)
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "SalonPro Nano-Mirror™"
|
||||
AC.flags = APPEARANCE_ALL_BODY
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
/obj/structure/mirror/obj_break(damage_flag, mapload)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
icon_state = "mirror_broke"
|
||||
if(!mapload)
|
||||
playsound(src, "shatter", 70, TRUE)
|
||||
if(desc == initial(desc))
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
broken = TRUE
|
||||
|
||||
/obj/structure/mirror/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] begins to unfasten [src].</span>", "<span class='notice'>You begin to unfasten [src].</span>")
|
||||
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
return
|
||||
if(broken)
|
||||
user.visible_message("<span class='notice'>[user] drops the broken shards to the floor.</span>", "<span class='notice'>You drop the broken shards on the floor.</span>")
|
||||
new /obj/item/shard(get_turf(user))
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] carefully places [src] on the floor.</span>", "<span class='notice'>You carefully place [src] on the floor.</span>")
|
||||
new /obj/item/mounted/mirror(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!disassembled)
|
||||
new /obj/item/shard( src.loc )
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
|
||||
|
||||
|
||||
/obj/item/mounted/mirror
|
||||
name = "mirror"
|
||||
desc = "Some reflective glass ready to be hung on a wall. Don't break it!"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
|
||||
/obj/item/mounted/mirror/do_build(turf/on_wall, mob/user)
|
||||
var/obj/structure/mirror/M = new /obj/structure/mirror(get_turf(user), get_dir(on_wall, user), 1)
|
||||
transfer_prints_to(M, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/magic
|
||||
name = "magic mirror"
|
||||
icon_state = "magic_mirror"
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user)
|
||||
if(!ishuman(user) || broken)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("Name", "Body", "Voice")
|
||||
|
||||
switch(choice)
|
||||
if("Name")
|
||||
var/newname = copytext(sanitize(input(H, "Who are we again?", "Name change", H.name) as null|text),1,MAX_NAME_LEN)
|
||||
|
||||
if(!newname)
|
||||
return
|
||||
H.real_name = newname
|
||||
H.name = newname
|
||||
if(H.dna)
|
||||
H.dna.real_name = newname
|
||||
if(H.mind)
|
||||
H.mind.name = newname
|
||||
|
||||
if(newname)
|
||||
curse(user)
|
||||
|
||||
if("Body")
|
||||
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin")
|
||||
if(config.usealienwhitelist)
|
||||
for(var/Spec in GLOB.whitelisted_species)
|
||||
if(is_alien_whitelisted(H, Spec))
|
||||
race_list += Spec
|
||||
else
|
||||
race_list += GLOB.whitelisted_species
|
||||
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "Magic Mirror"
|
||||
AC.flags = APPEARANCE_ALL
|
||||
AC.whitelist = race_list
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
if("Voice")
|
||||
var/voice_choice = input(user, "Perhaps...", "Voice effects") as null|anything in list("Comic Sans", "Wingdings", "Swedish", "Chav")
|
||||
var/voice_mutation
|
||||
switch(voice_choice)
|
||||
if("Comic Sans")
|
||||
voice_mutation = COMICBLOCK
|
||||
if("Wingdings")
|
||||
voice_mutation = WINGDINGSBLOCK
|
||||
if("Swedish")
|
||||
voice_mutation = SWEDEBLOCK
|
||||
if("Chav")
|
||||
voice_mutation = CHAVBLOCK
|
||||
if(voice_mutation)
|
||||
if(H.dna.GetSEState(voice_mutation))
|
||||
H.dna.SetSEState(voice_mutation, FALSE)
|
||||
genemutcheck(H, voice_mutation, null, MUTCHK_FORCED)
|
||||
else
|
||||
H.dna.SetSEState(voice_mutation, TRUE)
|
||||
genemutcheck(H, voice_mutation, null, MUTCHK_FORCED)
|
||||
|
||||
if(voice_choice)
|
||||
curse(user)
|
||||
|
||||
/obj/structure/mirror/magic/on_ui_close(mob/user)
|
||||
curse(user)
|
||||
|
||||
/obj/structure/mirror/magic/attackby(obj/item/I, mob/living/user, params)
|
||||
return
|
||||
|
||||
/obj/structure/mirror/magic/proc/curse(mob/living/user)
|
||||
return
|
||||
|
||||
@@ -120,4 +120,4 @@
|
||||
icon_state = "boulder1"
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
anchored = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
/obj/structure/mopbucket
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
name = "mop bucket"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
container_type = OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
/obj/structure/mopbucket/New()
|
||||
..()
|
||||
create_reagents(100)
|
||||
GLOB.janitorial_equipment += src
|
||||
|
||||
/obj/structure/mopbucket/full/New()
|
||||
..()
|
||||
reagents.add_reagent("water", 100)
|
||||
|
||||
/obj/structure/mopbucket/Destroy()
|
||||
GLOB.janitorial_equipment -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/mopbucket/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src))
|
||||
. += "[bicon(src)] [src] contains [reagents.total_volume] units of water left!"
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/mop))
|
||||
if(src.reagents.total_volume >= 2)
|
||||
src.reagents.trans_to(W, 2)
|
||||
to_chat(user, "<span class='notice'>You wet the mop</span>")
|
||||
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
if(src.reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='notice'>Out of water!</span>")
|
||||
return
|
||||
return ..()
|
||||
/obj/structure/mopbucket
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
name = "mop bucket"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
container_type = OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
/obj/structure/mopbucket/New()
|
||||
..()
|
||||
create_reagents(100)
|
||||
GLOB.janitorial_equipment += src
|
||||
|
||||
/obj/structure/mopbucket/full/New()
|
||||
..()
|
||||
reagents.add_reagent("water", 100)
|
||||
|
||||
/obj/structure/mopbucket/Destroy()
|
||||
GLOB.janitorial_equipment -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/mopbucket/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src))
|
||||
. += "[bicon(src)] [src] contains [reagents.total_volume] units of water left!"
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/mop))
|
||||
if(src.reagents.total_volume >= 2)
|
||||
src.reagents.trans_to(W, 2)
|
||||
to_chat(user, "<span class='notice'>You wet the mop</span>")
|
||||
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
if(src.reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='notice'>Out of water!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -1,491 +1,491 @@
|
||||
/* Morgue stuff
|
||||
* Contains:
|
||||
* Morgue
|
||||
* Morgue trays
|
||||
* Creamatorium
|
||||
* Creamatorium trays
|
||||
*/
|
||||
|
||||
/*
|
||||
* Morgue
|
||||
*/
|
||||
|
||||
/obj/structure/morgue
|
||||
name = "morgue"
|
||||
desc = "Used to keep bodies in until someone fetches them."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morgue1"
|
||||
density = 1
|
||||
max_integrity = 400
|
||||
dir = EAST
|
||||
var/obj/structure/m_tray/connected = null
|
||||
var/list/status_descriptors = list(
|
||||
"The tray is currently extended.",
|
||||
"The tray is currently empty.",
|
||||
"The tray contains an unviable body.",
|
||||
"The tray contains a body that is responsive to revival techniques.",
|
||||
"The tray contains something that is not a body.",
|
||||
"The tray contains a body that might be responsive."
|
||||
)
|
||||
anchored = 1.0
|
||||
var/open_sound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/structure/morgue/Initialize()
|
||||
. = ..()
|
||||
update()
|
||||
|
||||
/obj/structure/morgue/proc/update()
|
||||
if(connected)
|
||||
icon_state = "morgue0"
|
||||
desc = initial(desc) + "\n[status_descriptors[1]]"
|
||||
else
|
||||
if(contents.len)
|
||||
|
||||
var/mob/living/M = locate() in contents
|
||||
|
||||
var/obj/structure/closet/body_bag/B = locate() in contents
|
||||
if(M==null) M = locate() in B
|
||||
|
||||
if(M)
|
||||
var/mob/dead/observer/G = M.get_ghost()
|
||||
|
||||
if(M.client)
|
||||
icon_state = "morgue3"
|
||||
desc = initial(desc) + "\n[status_descriptors[4]]"
|
||||
else if(G && G.client) //There is a ghost and it is connected to the server
|
||||
icon_state = "morgue5"
|
||||
desc = initial(desc) + "\n[status_descriptors[6]]"
|
||||
else
|
||||
icon_state = "morgue2"
|
||||
desc = initial(desc) + "\n[status_descriptors[3]]"
|
||||
|
||||
|
||||
else
|
||||
icon_state = "morgue4"
|
||||
desc = initial(desc) + "\n[status_descriptors[5]]"
|
||||
else
|
||||
icon_state = "morgue1"
|
||||
desc = initial(desc) + "\n[status_descriptors[2]]"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/morgue/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(src)
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
QDEL_NULL(connected)
|
||||
else
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
connected = new /obj/structure/m_tray( loc )
|
||||
step(connected, dir)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "morguet"
|
||||
connected.dir = dir
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/structure/morgue/attackby(P as obj, mob/user as mob, params)
|
||||
if(istype(P, /obj/item/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", name), null) as text
|
||||
if(user.get_active_hand() != P)
|
||||
return
|
||||
if((!in_range(src, usr) && loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if(t)
|
||||
name = text("Morgue- '[]'", t)
|
||||
overlays += image(icon, "morgue_label")
|
||||
else
|
||||
name = "Morgue"
|
||||
overlays.Cut()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/morgue/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
return
|
||||
connected = new /obj/structure/m_tray( loc )
|
||||
step(connected, dir)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "morguet"
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
return
|
||||
|
||||
/obj/structure/morgue/Destroy()
|
||||
QDEL_NULL(connected)
|
||||
return ..()
|
||||
|
||||
/obj/structure/morgue/container_resist(var/mob/living/L)
|
||||
var/mob/living/carbon/CM = L
|
||||
if(!istype(CM))
|
||||
return
|
||||
if(CM.stat || CM.restrained())
|
||||
return
|
||||
|
||||
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
|
||||
src.attack_hand(CM)
|
||||
|
||||
|
||||
/obj/structure/morgue/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Morgue tray
|
||||
*/
|
||||
/obj/structure/m_tray
|
||||
name = "morgue tray"
|
||||
desc = "Apply corpse before closing. May float away in no-gravity."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morguet"
|
||||
density = 1
|
||||
layer = 2.0
|
||||
var/obj/structure/morgue/connected = null
|
||||
anchored = 1.0
|
||||
pass_flags = LETPASSTHROW
|
||||
max_integrity = 350
|
||||
|
||||
|
||||
/obj/structure/m_tray/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(connected)
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/m_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
|
||||
return
|
||||
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
if(!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.forceMove(loc)
|
||||
if(user != O)
|
||||
user.visible_message("<span class='warning'>[user] stuffs [O] into [src]!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/m_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return 1
|
||||
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
/*
|
||||
* Crematorium
|
||||
*/
|
||||
|
||||
/obj/structure/crematorium
|
||||
name = "crematorium"
|
||||
desc = "A human incinerator. Works well on barbeque nights."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "crema1"
|
||||
density = 1
|
||||
var/obj/structure/c_tray/connected = null
|
||||
anchored = 1.0
|
||||
var/cremating = 0
|
||||
var/id = 1
|
||||
var/locked = 0
|
||||
var/open_sound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/structure/crematorium/proc/update()
|
||||
if(connected)
|
||||
icon_state = "crema0"
|
||||
else
|
||||
if(contents.len)
|
||||
icon_state = "crema2"
|
||||
else
|
||||
icon_state = "crema1"
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
if(cremating)
|
||||
to_chat(usr, "<span class='warning'>It's locked.</span>")
|
||||
return
|
||||
if((connected) && (locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(src)
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
QDEL_NULL(connected)
|
||||
else if(locked == 0)
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
connected = new /obj/structure/c_tray( loc )
|
||||
step(connected, SOUTH)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, SOUTH)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "cremat"
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
|
||||
/obj/structure/crematorium/attackby(P as obj, mob/user as mob, params)
|
||||
if(istype(P, /obj/item/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", name), null) as text
|
||||
if(user.get_active_hand() != P)
|
||||
return
|
||||
if((!in_range(src, usr) > 1 && loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if(t)
|
||||
name = text("Crematorium- '[]'", t)
|
||||
else
|
||||
name = "Crematorium"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/crematorium/relaymove(mob/user as mob)
|
||||
if(user.stat || locked)
|
||||
return
|
||||
connected = new /obj/structure/c_tray( loc )
|
||||
step(connected, SOUTH)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, SOUTH)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "cremat"
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/proc/cremate(mob/user as mob)
|
||||
if(cremating)
|
||||
return //don't let you cremate something twice or w/e
|
||||
|
||||
if(contents.len <= 0)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>You hear a hollow crackle.</span>", 1)
|
||||
return
|
||||
|
||||
else
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>You hear a roar as the crematorium activates.</span>", 1)
|
||||
|
||||
cremating = 1
|
||||
locked = 1
|
||||
icon_state = "crema_active"
|
||||
|
||||
for(var/mob/living/M in search_contents_for(/mob/living))
|
||||
if(QDELETED(M))
|
||||
continue
|
||||
if(M.stat!=2)
|
||||
M.emote("scream")
|
||||
if(istype(user))
|
||||
add_attack_logs(user, M, "Cremated")
|
||||
M.death(1)
|
||||
if(QDELETED(M))
|
||||
continue // Re-check for mobs that delete themselves on death
|
||||
M.ghostize()
|
||||
qdel(M)
|
||||
|
||||
for(var/obj/O in contents) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
|
||||
qdel(O)
|
||||
|
||||
new /obj/effect/decal/cleanable/ash(src)
|
||||
sleep(30)
|
||||
cremating = 0
|
||||
locked = 0
|
||||
update()
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/Destroy()
|
||||
QDEL_NULL(connected)
|
||||
return ..()
|
||||
|
||||
/obj/structure/crematorium/container_resist(var/mob/living/L)
|
||||
var/mob/living/carbon/CM = L
|
||||
if(!istype(CM))
|
||||
return
|
||||
if(CM.stat || CM.restrained())
|
||||
return
|
||||
|
||||
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
|
||||
src.attack_hand(CM)
|
||||
|
||||
/obj/structure/crematorium/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Crematorium tray
|
||||
*/
|
||||
/obj/structure/c_tray
|
||||
name = "crematorium tray"
|
||||
desc = "Apply body before burning."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "cremat"
|
||||
density = 1
|
||||
layer = 2.0
|
||||
var/obj/structure/crematorium/connected = null
|
||||
anchored = 1.0
|
||||
pass_flags = LETPASSTHROW
|
||||
|
||||
/obj/structure/c_tray/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(connected)
|
||||
//Foreach goto(26)
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
|
||||
return
|
||||
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
if(!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.forceMove(loc)
|
||||
if(user != O)
|
||||
user.visible_message("<span class='warning'>[user] stuffs [O] into [src]!</span>")
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
/obj/structure/c_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
// Crematorium switch
|
||||
/obj/machinery/crema_switch
|
||||
desc = "Burn baby burn!"
|
||||
name = "crematorium igniter"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "crema_switch"
|
||||
anchored = 1.0
|
||||
req_access = list(ACCESS_CREMATORIUM)
|
||||
var/on = 0
|
||||
var/area/area = null
|
||||
var/otherarea = null
|
||||
var/id = 1
|
||||
|
||||
/obj/machinery/crema_switch/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/crema_switch/attack_hand(mob/user)
|
||||
if(allowed(usr) || user.can_advanced_admin_interact())
|
||||
for(var/obj/structure/crematorium/C in world)
|
||||
if(C.id == id)
|
||||
if(!C.cremating)
|
||||
C.cremate(user)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
|
||||
/mob/proc/update_morgue()
|
||||
if(stat == DEAD)
|
||||
var/obj/structure/morgue/morgue
|
||||
var/mob/living/C = src
|
||||
var/mob/dead/observer/G = src
|
||||
if(istype(G) && G.can_reenter_corpse && G.mind) //We're a ghost, let's find our corpse
|
||||
C = G.mind.current
|
||||
if(istype(C)) //We found our corpse, is it inside a morgue?
|
||||
morgue = get(C.loc, /obj/structure/morgue)
|
||||
if(morgue)
|
||||
morgue.update()
|
||||
/* Morgue stuff
|
||||
* Contains:
|
||||
* Morgue
|
||||
* Morgue trays
|
||||
* Creamatorium
|
||||
* Creamatorium trays
|
||||
*/
|
||||
|
||||
/*
|
||||
* Morgue
|
||||
*/
|
||||
|
||||
/obj/structure/morgue
|
||||
name = "morgue"
|
||||
desc = "Used to keep bodies in until someone fetches them."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morgue1"
|
||||
density = 1
|
||||
max_integrity = 400
|
||||
dir = EAST
|
||||
var/obj/structure/m_tray/connected = null
|
||||
var/list/status_descriptors = list(
|
||||
"The tray is currently extended.",
|
||||
"The tray is currently empty.",
|
||||
"The tray contains an unviable body.",
|
||||
"The tray contains a body that is responsive to revival techniques.",
|
||||
"The tray contains something that is not a body.",
|
||||
"The tray contains a body that might be responsive."
|
||||
)
|
||||
anchored = 1.0
|
||||
var/open_sound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/structure/morgue/Initialize()
|
||||
. = ..()
|
||||
update()
|
||||
|
||||
/obj/structure/morgue/proc/update()
|
||||
if(connected)
|
||||
icon_state = "morgue0"
|
||||
desc = initial(desc) + "\n[status_descriptors[1]]"
|
||||
else
|
||||
if(contents.len)
|
||||
|
||||
var/mob/living/M = locate() in contents
|
||||
|
||||
var/obj/structure/closet/body_bag/B = locate() in contents
|
||||
if(M==null) M = locate() in B
|
||||
|
||||
if(M)
|
||||
var/mob/dead/observer/G = M.get_ghost()
|
||||
|
||||
if(M.client)
|
||||
icon_state = "morgue3"
|
||||
desc = initial(desc) + "\n[status_descriptors[4]]"
|
||||
else if(G && G.client) //There is a ghost and it is connected to the server
|
||||
icon_state = "morgue5"
|
||||
desc = initial(desc) + "\n[status_descriptors[6]]"
|
||||
else
|
||||
icon_state = "morgue2"
|
||||
desc = initial(desc) + "\n[status_descriptors[3]]"
|
||||
|
||||
|
||||
else
|
||||
icon_state = "morgue4"
|
||||
desc = initial(desc) + "\n[status_descriptors[5]]"
|
||||
else
|
||||
icon_state = "morgue1"
|
||||
desc = initial(desc) + "\n[status_descriptors[2]]"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/morgue/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(src)
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
QDEL_NULL(connected)
|
||||
else
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
connected = new /obj/structure/m_tray( loc )
|
||||
step(connected, dir)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "morguet"
|
||||
connected.dir = dir
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/structure/morgue/attackby(P as obj, mob/user as mob, params)
|
||||
if(istype(P, /obj/item/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", name), null) as text
|
||||
if(user.get_active_hand() != P)
|
||||
return
|
||||
if((!in_range(src, usr) && loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if(t)
|
||||
name = text("Morgue- '[]'", t)
|
||||
overlays += image(icon, "morgue_label")
|
||||
else
|
||||
name = "Morgue"
|
||||
overlays.Cut()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/morgue/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
return
|
||||
connected = new /obj/structure/m_tray( loc )
|
||||
step(connected, dir)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "morguet"
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
return
|
||||
|
||||
/obj/structure/morgue/Destroy()
|
||||
QDEL_NULL(connected)
|
||||
return ..()
|
||||
|
||||
/obj/structure/morgue/container_resist(var/mob/living/L)
|
||||
var/mob/living/carbon/CM = L
|
||||
if(!istype(CM))
|
||||
return
|
||||
if(CM.stat || CM.restrained())
|
||||
return
|
||||
|
||||
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
|
||||
src.attack_hand(CM)
|
||||
|
||||
|
||||
/obj/structure/morgue/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Morgue tray
|
||||
*/
|
||||
/obj/structure/m_tray
|
||||
name = "morgue tray"
|
||||
desc = "Apply corpse before closing. May float away in no-gravity."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morguet"
|
||||
density = 1
|
||||
layer = 2.0
|
||||
var/obj/structure/morgue/connected = null
|
||||
anchored = 1.0
|
||||
pass_flags = LETPASSTHROW
|
||||
max_integrity = 350
|
||||
|
||||
|
||||
/obj/structure/m_tray/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(connected)
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/m_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
|
||||
return
|
||||
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
if(!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.forceMove(loc)
|
||||
if(user != O)
|
||||
user.visible_message("<span class='warning'>[user] stuffs [O] into [src]!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/m_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return 1
|
||||
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
/*
|
||||
* Crematorium
|
||||
*/
|
||||
|
||||
/obj/structure/crematorium
|
||||
name = "crematorium"
|
||||
desc = "A human incinerator. Works well on barbeque nights."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "crema1"
|
||||
density = 1
|
||||
var/obj/structure/c_tray/connected = null
|
||||
anchored = 1.0
|
||||
var/cremating = 0
|
||||
var/id = 1
|
||||
var/locked = 0
|
||||
var/open_sound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/structure/crematorium/proc/update()
|
||||
if(connected)
|
||||
icon_state = "crema0"
|
||||
else
|
||||
if(contents.len)
|
||||
icon_state = "crema2"
|
||||
else
|
||||
icon_state = "crema1"
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
if(cremating)
|
||||
to_chat(usr, "<span class='warning'>It's locked.</span>")
|
||||
return
|
||||
if((connected) && (locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(src)
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
QDEL_NULL(connected)
|
||||
else if(locked == 0)
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
connected = new /obj/structure/c_tray( loc )
|
||||
step(connected, SOUTH)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, SOUTH)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "cremat"
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
|
||||
/obj/structure/crematorium/attackby(P as obj, mob/user as mob, params)
|
||||
if(istype(P, /obj/item/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", name), null) as text
|
||||
if(user.get_active_hand() != P)
|
||||
return
|
||||
if((!in_range(src, usr) > 1 && loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if(t)
|
||||
name = text("Crematorium- '[]'", t)
|
||||
else
|
||||
name = "Crematorium"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/crematorium/relaymove(mob/user as mob)
|
||||
if(user.stat || locked)
|
||||
return
|
||||
connected = new /obj/structure/c_tray( loc )
|
||||
step(connected, SOUTH)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, SOUTH)
|
||||
if(T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "cremat"
|
||||
else
|
||||
QDEL_NULL(connected)
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/proc/cremate(mob/user as mob)
|
||||
if(cremating)
|
||||
return //don't let you cremate something twice or w/e
|
||||
|
||||
if(contents.len <= 0)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>You hear a hollow crackle.</span>", 1)
|
||||
return
|
||||
|
||||
else
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>You hear a roar as the crematorium activates.</span>", 1)
|
||||
|
||||
cremating = 1
|
||||
locked = 1
|
||||
icon_state = "crema_active"
|
||||
|
||||
for(var/mob/living/M in search_contents_for(/mob/living))
|
||||
if(QDELETED(M))
|
||||
continue
|
||||
if(M.stat!=2)
|
||||
M.emote("scream")
|
||||
if(istype(user))
|
||||
add_attack_logs(user, M, "Cremated")
|
||||
M.death(1)
|
||||
if(QDELETED(M))
|
||||
continue // Re-check for mobs that delete themselves on death
|
||||
M.ghostize()
|
||||
qdel(M)
|
||||
|
||||
for(var/obj/O in contents) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up
|
||||
qdel(O)
|
||||
|
||||
new /obj/effect/decal/cleanable/ash(src)
|
||||
sleep(30)
|
||||
cremating = 0
|
||||
locked = 0
|
||||
update()
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/Destroy()
|
||||
QDEL_NULL(connected)
|
||||
return ..()
|
||||
|
||||
/obj/structure/crematorium/container_resist(var/mob/living/L)
|
||||
var/mob/living/carbon/CM = L
|
||||
if(!istype(CM))
|
||||
return
|
||||
if(CM.stat || CM.restrained())
|
||||
return
|
||||
|
||||
to_chat(CM, "<span class='alert'>You attempt to slide yourself out of \the [src]...</span>")
|
||||
src.attack_hand(CM)
|
||||
|
||||
/obj/structure/crematorium/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/*
|
||||
* Crematorium tray
|
||||
*/
|
||||
/obj/structure/c_tray
|
||||
name = "crematorium tray"
|
||||
desc = "Apply body before burning."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "cremat"
|
||||
density = 1
|
||||
layer = 2.0
|
||||
var/obj/structure/crematorium/connected = null
|
||||
anchored = 1.0
|
||||
pass_flags = LETPASSTHROW
|
||||
|
||||
/obj/structure/c_tray/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in loc)
|
||||
if(!( A.anchored ))
|
||||
A.forceMove(connected)
|
||||
//Foreach goto(26)
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
|
||||
return
|
||||
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
if(!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.forceMove(loc)
|
||||
if(user != O)
|
||||
user.visible_message("<span class='warning'>[user] stuffs [O] into [src]!</span>")
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
/obj/structure/c_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
// Crematorium switch
|
||||
/obj/machinery/crema_switch
|
||||
desc = "Burn baby burn!"
|
||||
name = "crematorium igniter"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "crema_switch"
|
||||
anchored = 1.0
|
||||
req_access = list(ACCESS_CREMATORIUM)
|
||||
var/on = 0
|
||||
var/area/area = null
|
||||
var/otherarea = null
|
||||
var/id = 1
|
||||
|
||||
/obj/machinery/crema_switch/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/crema_switch/attack_hand(mob/user)
|
||||
if(allowed(usr) || user.can_advanced_admin_interact())
|
||||
for(var/obj/structure/crematorium/C in world)
|
||||
if(C.id == id)
|
||||
if(!C.cremating)
|
||||
C.cremate(user)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
|
||||
/mob/proc/update_morgue()
|
||||
if(stat == DEAD)
|
||||
var/obj/structure/morgue/morgue
|
||||
var/mob/living/C = src
|
||||
var/mob/dead/observer/G = src
|
||||
if(istype(G) && G.can_reenter_corpse && G.mind) //We're a ghost, let's find our corpse
|
||||
C = G.mind.current
|
||||
if(istype(C)) //We found our corpse, is it inside a morgue?
|
||||
morgue = get(C.loc, /obj/structure/morgue)
|
||||
if(morgue)
|
||||
morgue.update()
|
||||
|
||||
@@ -1,341 +1,341 @@
|
||||
|
||||
|
||||
/datum/song
|
||||
var/name = "Untitled"
|
||||
var/list/lines = new()
|
||||
var/tempo = 5 // delay between notes
|
||||
|
||||
var/playing = 0 // if we're playing
|
||||
var/help = 0 // if help is open
|
||||
var/repeat = 0 // number of times remaining to repeat
|
||||
var/max_repeat = 10 // maximum times we can repeat
|
||||
|
||||
var/instrumentDir = "piano" // the folder with the sounds
|
||||
var/instrumentExt = "ogg" // the file extension
|
||||
var/obj/instrumentObj = null // the associated obj playing the sound
|
||||
|
||||
/datum/song/New(dir, obj, ext = "ogg")
|
||||
tempo = sanitize_tempo(tempo)
|
||||
instrumentDir = dir
|
||||
instrumentObj = obj
|
||||
instrumentExt = ext
|
||||
|
||||
/datum/song/Destroy()
|
||||
instrumentObj = null
|
||||
return ..()
|
||||
|
||||
// note is a number from 1-7 for A-G
|
||||
// acc is either "b", "n", or "#"
|
||||
// oct is 1-8 (or 9 for C)
|
||||
/datum/song/proc/playnote(note, acc as text, oct)
|
||||
// handle accidental -> B<>C of E<>F
|
||||
if(acc == "b" && (note == 3 || note == 6)) // C or F
|
||||
if(note == 3)
|
||||
oct--
|
||||
note--
|
||||
acc = "n"
|
||||
else if(acc == "#" && (note == 2 || note == 5)) // B or E
|
||||
if(note == 2)
|
||||
oct++
|
||||
note++
|
||||
acc = "n"
|
||||
else if(acc == "#" && (note == 7)) //G#
|
||||
note = 1
|
||||
acc = "b"
|
||||
else if(acc == "#") // mass convert all sharps to flats, octave jump already handled
|
||||
acc = "b"
|
||||
note++
|
||||
|
||||
// check octave, C is allowed to go to 9
|
||||
if(oct < 1 || (note == 3 ? oct > 9 : oct > 8))
|
||||
return
|
||||
|
||||
// now generate name
|
||||
var/soundfile = "sound/instruments/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
|
||||
soundfile = file(soundfile)
|
||||
// make sure the note exists
|
||||
if(!fexists(soundfile))
|
||||
return
|
||||
// and play
|
||||
var/turf/source = get_turf(instrumentObj)
|
||||
var/sound/music_played = sound(soundfile)
|
||||
for(var/A in hearers(15, source))
|
||||
var/mob/M = A
|
||||
if(!M.client || !(M.client.prefs.sound & SOUND_INSTRUMENTS))
|
||||
continue
|
||||
M.playsound_local(source, null, 100, falloff = 5, S = music_played)
|
||||
|
||||
/datum/song/proc/shouldStopPlaying(mob/user)
|
||||
if(instrumentObj)
|
||||
//if(!user.canUseTopic(instrumentObj))
|
||||
//return 1
|
||||
return !instrumentObj.anchored // add special cases to stop in subclasses
|
||||
else
|
||||
return 1
|
||||
|
||||
/datum/song/proc/playsong(mob/user)
|
||||
while(repeat >= 0)
|
||||
var/cur_oct[7]
|
||||
var/cur_acc[7]
|
||||
for(var/i = 1 to 7)
|
||||
cur_oct[i] = 3
|
||||
cur_acc[i] = "n"
|
||||
|
||||
for(var/line in lines)
|
||||
for(var/beat in splittext(lowertext(line), ","))
|
||||
var/list/notes = splittext(beat, "/")
|
||||
for(var/note in splittext(notes[1], "-"))
|
||||
if(!playing || shouldStopPlaying(user)) //If the instrument is playing, or special case
|
||||
playing = 0
|
||||
return
|
||||
if(length(note) == 0)
|
||||
continue
|
||||
var/cur_note = text2ascii(note) - 96
|
||||
if(cur_note < 1 || cur_note > 7)
|
||||
continue
|
||||
for(var/i=2 to length(note))
|
||||
var/ni = copytext(note,i,i+1)
|
||||
if(!text2num(ni))
|
||||
if(ni == "#" || ni == "b" || ni == "n")
|
||||
cur_acc[cur_note] = ni
|
||||
else if(ni == "s")
|
||||
cur_acc[cur_note] = "#" // so shift is never required
|
||||
else
|
||||
cur_oct[cur_note] = text2num(ni)
|
||||
playnote(cur_note, cur_acc[cur_note], cur_oct[cur_note])
|
||||
if(notes.len >= 2 && text2num(notes[2]))
|
||||
sleep(sanitize_tempo(tempo / text2num(notes[2])))
|
||||
else
|
||||
sleep(tempo)
|
||||
repeat--
|
||||
playing = 0
|
||||
repeat = 0
|
||||
|
||||
/datum/song/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(!instrumentObj)
|
||||
return
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, instrumentObj, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/song/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["lines"] = lines
|
||||
data["tempo"] = tempo
|
||||
|
||||
data["playing"] = playing
|
||||
data["help"] = help
|
||||
data["repeat"] = repeat
|
||||
data["maxRepeat"] = max_repeat
|
||||
data["minTempo"] = world.tick_lag
|
||||
data["maxTempo"] = 600
|
||||
|
||||
return data
|
||||
|
||||
/datum/song/Topic(href, href_list)
|
||||
if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || usr.incapacitated())
|
||||
usr << browse(null, "window=instrument")
|
||||
usr.unset_machine()
|
||||
return 1
|
||||
|
||||
instrumentObj.add_fingerprint(usr)
|
||||
|
||||
if(href_list["newsong"])
|
||||
playing = 0
|
||||
lines = new()
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
name = ""
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["import"])
|
||||
playing = 0
|
||||
var/t = ""
|
||||
do
|
||||
t = html_encode(input(usr, "Please paste the entire song, formatted:", text("[]", name), t) as message)
|
||||
if(!in_range(instrumentObj, usr))
|
||||
return
|
||||
|
||||
if(length(t) >= 12000)
|
||||
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
|
||||
if(cont == "no")
|
||||
break
|
||||
while(length(t) > 12000)
|
||||
|
||||
//split into lines
|
||||
spawn()
|
||||
lines = splittext(t, "\n")
|
||||
if(lines.len == 0)
|
||||
return 1
|
||||
if(copytext(lines[1],1,6) == "BPM: ")
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
|
||||
lines.Cut(1,2)
|
||||
else
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
if(lines.len > 200)
|
||||
to_chat(usr, "Too many lines!")
|
||||
lines.Cut(201)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(length(l) > 200)
|
||||
to_chat(usr, "Line [linenum] too long!")
|
||||
lines.Remove(l)
|
||||
else
|
||||
linenum++
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["help"])
|
||||
help = !help
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops.
|
||||
if(playing)
|
||||
return //So that people cant keep adding to repeat. If the do it intentionally, it could result in the server crashing.
|
||||
repeat += round(text2num(href_list["repeat"]))
|
||||
if(repeat < 0)
|
||||
repeat = 0
|
||||
if(repeat > max_repeat)
|
||||
repeat = max_repeat
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["tempo"])
|
||||
tempo = sanitize_tempo(tempo + text2num(href_list["tempo"]) * world.tick_lag)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["play"])
|
||||
if(playing)
|
||||
return
|
||||
playing = 1
|
||||
spawn()
|
||||
playsong(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["insertline"])
|
||||
var/num = round(text2num(href_list["insertline"]))
|
||||
if(num < 1 || num > lines.len + 1)
|
||||
return
|
||||
|
||||
var/newline = html_encode(input("Enter your line: ", instrumentObj.name) as text|null)
|
||||
if(!newline || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(lines.len > 200)
|
||||
return
|
||||
if(length(newline) > 200)
|
||||
newline = copytext(newline, 1, 200)
|
||||
|
||||
lines.Insert(num, newline)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["deleteline"])
|
||||
var/num = round(text2num(href_list["deleteline"]))
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
lines.Cut(num, num + 1)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["modifyline"])
|
||||
var/num = round(text2num(href_list["modifyline"]))
|
||||
var/content = html_encode(input("Enter your line: ", instrumentObj.name, lines[num]) as text|null)
|
||||
if(!content || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(length(content) > 200)
|
||||
content = copytext(content, 1, 200)
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
lines[num] = content
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["stop"])
|
||||
playing = 0
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/datum/song/proc/sanitize_tempo(new_tempo)
|
||||
new_tempo = abs(new_tempo)
|
||||
return max(round(new_tempo, world.tick_lag), world.tick_lag)
|
||||
|
||||
// subclass for handheld instruments, like violin
|
||||
/datum/song/handheld
|
||||
|
||||
/datum/song/handheld/shouldStopPlaying()
|
||||
if(instrumentObj)
|
||||
return !isliving(instrumentObj.loc)
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/obj/structure/piano
|
||||
name = "space minimoog"
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
icon_state = "minimoog"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/datum/song/song
|
||||
|
||||
|
||||
/obj/structure/piano/New()
|
||||
..()
|
||||
song = new("piano", src)
|
||||
|
||||
if(prob(50))
|
||||
name = "space minimoog"
|
||||
desc = "This is a minimoog, like a space piano, but more spacey!"
|
||||
icon_state = "minimoog"
|
||||
else
|
||||
name = "space piano"
|
||||
desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
|
||||
icon_state = "piano"
|
||||
|
||||
/obj/structure/piano/Destroy()
|
||||
QDEL_NULL(song)
|
||||
return ..()
|
||||
|
||||
/obj/structure/piano/Initialize()
|
||||
if(song)
|
||||
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
|
||||
..()
|
||||
|
||||
/obj/structure/piano/attack_hand(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/piano/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(!isliving(user) || user.incapacitated() || !anchored)
|
||||
return
|
||||
|
||||
song.ui_interact(user, ui_key, ui, force_open)
|
||||
|
||||
/obj/structure/piano/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
return song.ui_data(user, ui_key, state)
|
||||
|
||||
/obj/structure/piano/Topic(href, href_list)
|
||||
song.Topic(href, href_list)
|
||||
|
||||
/obj/structure/piano/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(!anchored && !isinspace())
|
||||
WRENCH_ANCHOR_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
user.visible_message( \
|
||||
"[user] tightens [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened [src]'s casters. Now it can be played again.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = TRUE
|
||||
else if(anchored)
|
||||
to_chat(user, "<span class='notice'> You begin to loosen [src]'s casters...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
user.visible_message( \
|
||||
"[user] loosens [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] needs to be bolted to the floor!</span>")
|
||||
|
||||
|
||||
/datum/song
|
||||
var/name = "Untitled"
|
||||
var/list/lines = new()
|
||||
var/tempo = 5 // delay between notes
|
||||
|
||||
var/playing = 0 // if we're playing
|
||||
var/help = 0 // if help is open
|
||||
var/repeat = 0 // number of times remaining to repeat
|
||||
var/max_repeat = 10 // maximum times we can repeat
|
||||
|
||||
var/instrumentDir = "piano" // the folder with the sounds
|
||||
var/instrumentExt = "ogg" // the file extension
|
||||
var/obj/instrumentObj = null // the associated obj playing the sound
|
||||
|
||||
/datum/song/New(dir, obj, ext = "ogg")
|
||||
tempo = sanitize_tempo(tempo)
|
||||
instrumentDir = dir
|
||||
instrumentObj = obj
|
||||
instrumentExt = ext
|
||||
|
||||
/datum/song/Destroy()
|
||||
instrumentObj = null
|
||||
return ..()
|
||||
|
||||
// note is a number from 1-7 for A-G
|
||||
// acc is either "b", "n", or "#"
|
||||
// oct is 1-8 (or 9 for C)
|
||||
/datum/song/proc/playnote(note, acc as text, oct)
|
||||
// handle accidental -> B<>C of E<>F
|
||||
if(acc == "b" && (note == 3 || note == 6)) // C or F
|
||||
if(note == 3)
|
||||
oct--
|
||||
note--
|
||||
acc = "n"
|
||||
else if(acc == "#" && (note == 2 || note == 5)) // B or E
|
||||
if(note == 2)
|
||||
oct++
|
||||
note++
|
||||
acc = "n"
|
||||
else if(acc == "#" && (note == 7)) //G#
|
||||
note = 1
|
||||
acc = "b"
|
||||
else if(acc == "#") // mass convert all sharps to flats, octave jump already handled
|
||||
acc = "b"
|
||||
note++
|
||||
|
||||
// check octave, C is allowed to go to 9
|
||||
if(oct < 1 || (note == 3 ? oct > 9 : oct > 8))
|
||||
return
|
||||
|
||||
// now generate name
|
||||
var/soundfile = "sound/instruments/[instrumentDir]/[ascii2text(note+64)][acc][oct].[instrumentExt]"
|
||||
soundfile = file(soundfile)
|
||||
// make sure the note exists
|
||||
if(!fexists(soundfile))
|
||||
return
|
||||
// and play
|
||||
var/turf/source = get_turf(instrumentObj)
|
||||
var/sound/music_played = sound(soundfile)
|
||||
for(var/A in hearers(15, source))
|
||||
var/mob/M = A
|
||||
if(!M.client || !(M.client.prefs.sound & SOUND_INSTRUMENTS))
|
||||
continue
|
||||
M.playsound_local(source, null, 100, falloff = 5, S = music_played)
|
||||
|
||||
/datum/song/proc/shouldStopPlaying(mob/user)
|
||||
if(instrumentObj)
|
||||
//if(!user.canUseTopic(instrumentObj))
|
||||
//return 1
|
||||
return !instrumentObj.anchored // add special cases to stop in subclasses
|
||||
else
|
||||
return 1
|
||||
|
||||
/datum/song/proc/playsong(mob/user)
|
||||
while(repeat >= 0)
|
||||
var/cur_oct[7]
|
||||
var/cur_acc[7]
|
||||
for(var/i = 1 to 7)
|
||||
cur_oct[i] = 3
|
||||
cur_acc[i] = "n"
|
||||
|
||||
for(var/line in lines)
|
||||
for(var/beat in splittext(lowertext(line), ","))
|
||||
var/list/notes = splittext(beat, "/")
|
||||
for(var/note in splittext(notes[1], "-"))
|
||||
if(!playing || shouldStopPlaying(user)) //If the instrument is playing, or special case
|
||||
playing = 0
|
||||
return
|
||||
if(length(note) == 0)
|
||||
continue
|
||||
var/cur_note = text2ascii(note) - 96
|
||||
if(cur_note < 1 || cur_note > 7)
|
||||
continue
|
||||
for(var/i=2 to length(note))
|
||||
var/ni = copytext(note,i,i+1)
|
||||
if(!text2num(ni))
|
||||
if(ni == "#" || ni == "b" || ni == "n")
|
||||
cur_acc[cur_note] = ni
|
||||
else if(ni == "s")
|
||||
cur_acc[cur_note] = "#" // so shift is never required
|
||||
else
|
||||
cur_oct[cur_note] = text2num(ni)
|
||||
playnote(cur_note, cur_acc[cur_note], cur_oct[cur_note])
|
||||
if(notes.len >= 2 && text2num(notes[2]))
|
||||
sleep(sanitize_tempo(tempo / text2num(notes[2])))
|
||||
else
|
||||
sleep(tempo)
|
||||
repeat--
|
||||
playing = 0
|
||||
repeat = 0
|
||||
|
||||
/datum/song/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(!instrumentObj)
|
||||
return
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, instrumentObj, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, instrumentObj, ui_key, "song.tmpl", instrumentObj.name, 700, 500)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/song/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
|
||||
data["lines"] = lines
|
||||
data["tempo"] = tempo
|
||||
|
||||
data["playing"] = playing
|
||||
data["help"] = help
|
||||
data["repeat"] = repeat
|
||||
data["maxRepeat"] = max_repeat
|
||||
data["minTempo"] = world.tick_lag
|
||||
data["maxTempo"] = 600
|
||||
|
||||
return data
|
||||
|
||||
/datum/song/Topic(href, href_list)
|
||||
if(!in_range(instrumentObj, usr) || (issilicon(usr) && instrumentObj.loc != usr) || !isliving(usr) || usr.incapacitated())
|
||||
usr << browse(null, "window=instrument")
|
||||
usr.unset_machine()
|
||||
return 1
|
||||
|
||||
instrumentObj.add_fingerprint(usr)
|
||||
|
||||
if(href_list["newsong"])
|
||||
playing = 0
|
||||
lines = new()
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
name = ""
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["import"])
|
||||
playing = 0
|
||||
var/t = ""
|
||||
do
|
||||
t = html_encode(input(usr, "Please paste the entire song, formatted:", text("[]", name), t) as message)
|
||||
if(!in_range(instrumentObj, usr))
|
||||
return
|
||||
|
||||
if(length(t) >= 12000)
|
||||
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
|
||||
if(cont == "no")
|
||||
break
|
||||
while(length(t) > 12000)
|
||||
|
||||
//split into lines
|
||||
spawn()
|
||||
lines = splittext(t, "\n")
|
||||
if(lines.len == 0)
|
||||
return 1
|
||||
if(copytext(lines[1],1,6) == "BPM: ")
|
||||
tempo = sanitize_tempo(600 / text2num(copytext(lines[1],6)))
|
||||
lines.Cut(1,2)
|
||||
else
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
if(lines.len > 200)
|
||||
to_chat(usr, "Too many lines!")
|
||||
lines.Cut(201)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(length(l) > 200)
|
||||
to_chat(usr, "Line [linenum] too long!")
|
||||
lines.Remove(l)
|
||||
else
|
||||
linenum++
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["help"])
|
||||
help = !help
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops.
|
||||
if(playing)
|
||||
return //So that people cant keep adding to repeat. If the do it intentionally, it could result in the server crashing.
|
||||
repeat += round(text2num(href_list["repeat"]))
|
||||
if(repeat < 0)
|
||||
repeat = 0
|
||||
if(repeat > max_repeat)
|
||||
repeat = max_repeat
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["tempo"])
|
||||
tempo = sanitize_tempo(tempo + text2num(href_list["tempo"]) * world.tick_lag)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["play"])
|
||||
if(playing)
|
||||
return
|
||||
playing = 1
|
||||
spawn()
|
||||
playsong(usr)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["insertline"])
|
||||
var/num = round(text2num(href_list["insertline"]))
|
||||
if(num < 1 || num > lines.len + 1)
|
||||
return
|
||||
|
||||
var/newline = html_encode(input("Enter your line: ", instrumentObj.name) as text|null)
|
||||
if(!newline || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(lines.len > 200)
|
||||
return
|
||||
if(length(newline) > 200)
|
||||
newline = copytext(newline, 1, 200)
|
||||
|
||||
lines.Insert(num, newline)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["deleteline"])
|
||||
var/num = round(text2num(href_list["deleteline"]))
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
lines.Cut(num, num + 1)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["modifyline"])
|
||||
var/num = round(text2num(href_list["modifyline"]))
|
||||
var/content = html_encode(input("Enter your line: ", instrumentObj.name, lines[num]) as text|null)
|
||||
if(!content || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(length(content) > 200)
|
||||
content = copytext(content, 1, 200)
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
lines[num] = content
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
else if(href_list["stop"])
|
||||
playing = 0
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/datum/song/proc/sanitize_tempo(new_tempo)
|
||||
new_tempo = abs(new_tempo)
|
||||
return max(round(new_tempo, world.tick_lag), world.tick_lag)
|
||||
|
||||
// subclass for handheld instruments, like violin
|
||||
/datum/song/handheld
|
||||
|
||||
/datum/song/handheld/shouldStopPlaying()
|
||||
if(instrumentObj)
|
||||
return !isliving(instrumentObj.loc)
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/obj/structure/piano
|
||||
name = "space minimoog"
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
icon_state = "minimoog"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/datum/song/song
|
||||
|
||||
|
||||
/obj/structure/piano/New()
|
||||
..()
|
||||
song = new("piano", src)
|
||||
|
||||
if(prob(50))
|
||||
name = "space minimoog"
|
||||
desc = "This is a minimoog, like a space piano, but more spacey!"
|
||||
icon_state = "minimoog"
|
||||
else
|
||||
name = "space piano"
|
||||
desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
|
||||
icon_state = "piano"
|
||||
|
||||
/obj/structure/piano/Destroy()
|
||||
QDEL_NULL(song)
|
||||
return ..()
|
||||
|
||||
/obj/structure/piano/Initialize()
|
||||
if(song)
|
||||
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
|
||||
..()
|
||||
|
||||
/obj/structure/piano/attack_hand(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/piano/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(!isliving(user) || user.incapacitated() || !anchored)
|
||||
return
|
||||
|
||||
song.ui_interact(user, ui_key, ui, force_open)
|
||||
|
||||
/obj/structure/piano/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
return song.ui_data(user, ui_key, state)
|
||||
|
||||
/obj/structure/piano/Topic(href, href_list)
|
||||
song.Topic(href, href_list)
|
||||
|
||||
/obj/structure/piano/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(!anchored && !isinspace())
|
||||
WRENCH_ANCHOR_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
user.visible_message( \
|
||||
"[user] tightens [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened [src]'s casters. Now it can be played again.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = TRUE
|
||||
else if(anchored)
|
||||
to_chat(user, "<span class='notice'> You begin to loosen [src]'s casters...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
user.visible_message( \
|
||||
"[user] loosens [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] needs to be bolted to the floor!</span>")
|
||||
|
||||
@@ -1,82 +1,82 @@
|
||||
/obj/structure/noticeboard
|
||||
name = "notice board"
|
||||
desc = "A board for pinning important notices upon."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "nboard00"
|
||||
density = 0
|
||||
anchored = 1
|
||||
max_integrity = 150
|
||||
var/notices = 0
|
||||
|
||||
/obj/structure/noticeboard/Initialize()
|
||||
..()
|
||||
for(var/obj/item/I in loc)
|
||||
if(notices > 4) break
|
||||
if(istype(I, /obj/item/paper))
|
||||
I.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
//attaching papers!!
|
||||
/obj/structure/noticeboard/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/paper))
|
||||
if(notices < 5)
|
||||
O.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]" //update sprite
|
||||
to_chat(user, "<span class='notice'>You pin the paper to the noticeboard.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(user as mob)
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/paper/P in src)
|
||||
dat += "<A href='?src=[UID()];read=\ref[P]'>[P.name]</A> <A href='?src=[UID()];write=\ref[P]'>Write</A> <A href='?src=[UID()];remove=\ref[P]'>Remove</A><BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
|
||||
/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal (loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
usr.set_machine(src)
|
||||
if(href_list["remove"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["remove"])
|
||||
if((P && P.loc == src))
|
||||
P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck
|
||||
P.add_fingerprint(usr)
|
||||
add_fingerprint(usr)
|
||||
notices--
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
if(href_list["write"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["write"])
|
||||
|
||||
if((P && P.loc == src)) //ifthe paper's on the board
|
||||
if(istype(usr.r_hand, /obj/item/pen)) //and you're holding a pen
|
||||
add_fingerprint(usr)
|
||||
P.attackby(usr.r_hand, usr) //then do ittttt
|
||||
else
|
||||
if(istype(usr.l_hand, /obj/item/pen)) //check other hand for pen
|
||||
add_fingerprint(usr)
|
||||
P.attackby(usr.l_hand, usr)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You'll need something to write with!</span>")
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/paper/P = locate(href_list["read"])
|
||||
if((P && P.loc == src))
|
||||
P.show_content(usr)
|
||||
return
|
||||
/obj/structure/noticeboard
|
||||
name = "notice board"
|
||||
desc = "A board for pinning important notices upon."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "nboard00"
|
||||
density = 0
|
||||
anchored = 1
|
||||
max_integrity = 150
|
||||
var/notices = 0
|
||||
|
||||
/obj/structure/noticeboard/Initialize()
|
||||
..()
|
||||
for(var/obj/item/I in loc)
|
||||
if(notices > 4) break
|
||||
if(istype(I, /obj/item/paper))
|
||||
I.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
//attaching papers!!
|
||||
/obj/structure/noticeboard/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/paper))
|
||||
if(notices < 5)
|
||||
O.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]" //update sprite
|
||||
to_chat(user, "<span class='notice'>You pin the paper to the noticeboard.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(user as mob)
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/paper/P in src)
|
||||
dat += "<A href='?src=[UID()];read=\ref[P]'>[P.name]</A> <A href='?src=[UID()];write=\ref[P]'>Write</A> <A href='?src=[UID()];remove=\ref[P]'>Remove</A><BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
|
||||
/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal (loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
usr.set_machine(src)
|
||||
if(href_list["remove"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["remove"])
|
||||
if((P && P.loc == src))
|
||||
P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck
|
||||
P.add_fingerprint(usr)
|
||||
add_fingerprint(usr)
|
||||
notices--
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
if(href_list["write"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["write"])
|
||||
|
||||
if((P && P.loc == src)) //ifthe paper's on the board
|
||||
if(istype(usr.r_hand, /obj/item/pen)) //and you're holding a pen
|
||||
add_fingerprint(usr)
|
||||
P.attackby(usr.r_hand, usr) //then do ittttt
|
||||
else
|
||||
if(istype(usr.l_hand, /obj/item/pen)) //check other hand for pen
|
||||
add_fingerprint(usr)
|
||||
P.attackby(usr.l_hand, usr)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You'll need something to write with!</span>")
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/paper/P = locate(href_list["read"])
|
||||
if((P && P.loc == src))
|
||||
P.show_content(usr)
|
||||
return
|
||||
|
||||
@@ -108,4 +108,4 @@
|
||||
T.air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/plasticflaps/mining/CanAtmosPass(turf/T)
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
@@ -1,183 +1,183 @@
|
||||
/obj/structure/reflector
|
||||
name = "reflector frame"
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "box_0"
|
||||
desc = "A frame to create a reflector.\n<span class='notice'>Use <b>5</b> sheets of <b>glass</b> to create a 1 way reflector.\nUse <b>10</b> sheets of <b>reinforced glass</b> to create a 2 way reflector.\nUse <b>1 diamond</b> to create a reflector cube.</span>"
|
||||
anchored = 0
|
||||
density = 1
|
||||
layer = 3
|
||||
var/finished = 0
|
||||
|
||||
|
||||
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
|
||||
var/turf/reflector_turf = get_turf(src)
|
||||
var/turf/reflect_turf
|
||||
if(!istype(P, /obj/item/projectile/beam))
|
||||
return ..()
|
||||
var/new_dir = get_reflection(dir, P.dir)
|
||||
if(new_dir)
|
||||
reflect_turf = get_step(reflect_turf, new_dir)
|
||||
else
|
||||
visible_message("<span class='notice'>[src] is hit by [P]!</span>")
|
||||
new_dir = 0
|
||||
return ..() //Hits as normal, explodes or emps or whatever
|
||||
|
||||
visible_message("<span class='notice'>[P] bounces off of [src]</span>")
|
||||
reflect_turf = get_step(loc,new_dir)
|
||||
|
||||
P.original = reflect_turf
|
||||
P.starting = reflector_turf
|
||||
P.current = reflector_turf
|
||||
P.yo = reflect_turf.y - reflector_turf.y
|
||||
P.xo = reflect_turf.x - reflector_turf.x
|
||||
P.ignore_source_check = TRUE //If shot by a laser, will now hit the mob that fired it
|
||||
var/reflect_angle = dir2angle(new_dir)
|
||||
P.setAngle(reflect_angle)
|
||||
|
||||
new_dir = 0
|
||||
return -1
|
||||
|
||||
|
||||
/obj/structure/reflector/attackby(obj/item/W, mob/user, params)
|
||||
//Finishing the frame
|
||||
if(istype(W,/obj/item/stack/sheet))
|
||||
if(finished)
|
||||
return
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning'>You need five sheets of glass to create a reflector!</span>")
|
||||
return
|
||||
else
|
||||
S.use(5)
|
||||
new /obj/structure/reflector/single (src.loc)
|
||||
qdel(src)
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
if(S.get_amount() < 10)
|
||||
to_chat(user, "<span class='warning'>You need ten sheets of reinforced glass to create a double reflector!</span>")
|
||||
return
|
||||
else
|
||||
S.use(10)
|
||||
new /obj/structure/reflector/double (src.loc)
|
||||
qdel(src)
|
||||
if(istype(W, /obj/item/stack/sheet/mineral/diamond))
|
||||
if(S.get_amount() >= 1)
|
||||
S.use(1)
|
||||
new /obj/structure/reflector/box (src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(anchored)
|
||||
to_chat(user, "Unweld [src] first!")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 80, volume = I.tool_volume))
|
||||
return
|
||||
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reflector/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
WELDER_ATTEMPT_FLOOR_SLICE_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
WELDER_FLOOR_SLICE_SUCCESS_MESSAGE
|
||||
anchored = FALSE
|
||||
else
|
||||
WELDER_ATTEMPT_FLOOR_WELD_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
WELDER_FLOOR_WELD_SUCCESS_MESSAGE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/proc/get_reflection(srcdir,pdir)
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/reflector/verb/rotate()
|
||||
set name = "Rotate"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if(anchored)
|
||||
to_chat(usr, "<span class='warning'>It is fastened to the floor!</span>")
|
||||
return 0
|
||||
dir = turn(dir, 270)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/reflector/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
else
|
||||
rotate()
|
||||
|
||||
|
||||
//TYPES OF REFLECTORS, SINGLE, DOUBLE, BOX
|
||||
|
||||
//SINGLE
|
||||
|
||||
/obj/structure/reflector/single
|
||||
name = "reflector"
|
||||
icon = 'icons/obj/reflector.dmi'
|
||||
icon_state = "reflector"
|
||||
desc = "A double sided angled mirror for reflecting lasers. This one does so at a 90 degree angle."
|
||||
finished = 1
|
||||
var/static/list/rotations = list("[NORTH]" = list("[SOUTH]" = WEST, "[EAST]" = NORTH),
|
||||
"[EAST]" = list("[SOUTH]" = EAST, "[WEST]" = NORTH),
|
||||
"[SOUTH]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH),
|
||||
"[WEST]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH) )
|
||||
|
||||
/obj/structure/reflector/single/get_reflection(srcdir,pdir)
|
||||
var/new_dir = rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
//DOUBLE
|
||||
|
||||
/obj/structure/reflector/double
|
||||
name = "double sided reflector"
|
||||
icon = 'icons/obj/reflector.dmi'
|
||||
icon_state = "reflector_double"
|
||||
desc = "A double sided angled mirror for reflecting lasers. This one does so at a 90 degree angle."
|
||||
finished = 1
|
||||
var/static/list/double_rotations = list("[NORTH]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH, "[SOUTH]" = EAST, "[WEST]" = NORTH),
|
||||
"[EAST]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH, "[SOUTH]" = WEST, "[EAST]" = NORTH),
|
||||
"[SOUTH]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH, "[SOUTH]" = WEST, "[EAST]" = NORTH),
|
||||
"[WEST]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH, "[SOUTH]" = EAST, "[WEST]" = NORTH) )
|
||||
|
||||
/obj/structure/reflector/double/get_reflection(srcdir,pdir)
|
||||
var/new_dir = double_rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
//BOX
|
||||
|
||||
/obj/structure/reflector/box
|
||||
name = "reflector box"
|
||||
icon = 'icons/obj/reflector.dmi'
|
||||
icon_state = "reflector_box"
|
||||
desc = "A box with an internal set of mirrors that reflects all laser fire in a single direction."
|
||||
finished = 1
|
||||
var/static/list/box_rotations = list("[NORTH]" = list("[SOUTH]" = NORTH, "[EAST]" = NORTH, "[WEST]" = NORTH, "[NORTH]" = NORTH),
|
||||
"[EAST]" = list("[SOUTH]" = EAST, "[EAST]" = EAST, "[WEST]" = EAST, "[NORTH]" = EAST),
|
||||
"[SOUTH]" = list("[SOUTH]" = SOUTH, "[EAST]" = SOUTH, "[WEST]" = SOUTH, "[NORTH]" = SOUTH),
|
||||
"[WEST]" = list("[SOUTH]" = WEST, "[EAST]" = WEST, "[WEST]" = WEST, "[NORTH]" = WEST) )
|
||||
|
||||
/obj/structure/reflector/box/get_reflection(srcdir,pdir)
|
||||
var/new_dir = box_rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
/obj/structure/reflector
|
||||
name = "reflector frame"
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "box_0"
|
||||
desc = "A frame to create a reflector.\n<span class='notice'>Use <b>5</b> sheets of <b>glass</b> to create a 1 way reflector.\nUse <b>10</b> sheets of <b>reinforced glass</b> to create a 2 way reflector.\nUse <b>1 diamond</b> to create a reflector cube.</span>"
|
||||
anchored = 0
|
||||
density = 1
|
||||
layer = 3
|
||||
var/finished = 0
|
||||
|
||||
|
||||
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
|
||||
var/turf/reflector_turf = get_turf(src)
|
||||
var/turf/reflect_turf
|
||||
if(!istype(P, /obj/item/projectile/beam))
|
||||
return ..()
|
||||
var/new_dir = get_reflection(dir, P.dir)
|
||||
if(new_dir)
|
||||
reflect_turf = get_step(reflect_turf, new_dir)
|
||||
else
|
||||
visible_message("<span class='notice'>[src] is hit by [P]!</span>")
|
||||
new_dir = 0
|
||||
return ..() //Hits as normal, explodes or emps or whatever
|
||||
|
||||
visible_message("<span class='notice'>[P] bounces off of [src]</span>")
|
||||
reflect_turf = get_step(loc,new_dir)
|
||||
|
||||
P.original = reflect_turf
|
||||
P.starting = reflector_turf
|
||||
P.current = reflector_turf
|
||||
P.yo = reflect_turf.y - reflector_turf.y
|
||||
P.xo = reflect_turf.x - reflector_turf.x
|
||||
P.ignore_source_check = TRUE //If shot by a laser, will now hit the mob that fired it
|
||||
var/reflect_angle = dir2angle(new_dir)
|
||||
P.setAngle(reflect_angle)
|
||||
|
||||
new_dir = 0
|
||||
return -1
|
||||
|
||||
|
||||
/obj/structure/reflector/attackby(obj/item/W, mob/user, params)
|
||||
//Finishing the frame
|
||||
if(istype(W,/obj/item/stack/sheet))
|
||||
if(finished)
|
||||
return
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(istype(W, /obj/item/stack/sheet/glass))
|
||||
if(S.get_amount() < 5)
|
||||
to_chat(user, "<span class='warning'>You need five sheets of glass to create a reflector!</span>")
|
||||
return
|
||||
else
|
||||
S.use(5)
|
||||
new /obj/structure/reflector/single (src.loc)
|
||||
qdel(src)
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
if(S.get_amount() < 10)
|
||||
to_chat(user, "<span class='warning'>You need ten sheets of reinforced glass to create a double reflector!</span>")
|
||||
return
|
||||
else
|
||||
S.use(10)
|
||||
new /obj/structure/reflector/double (src.loc)
|
||||
qdel(src)
|
||||
if(istype(W, /obj/item/stack/sheet/mineral/diamond))
|
||||
if(S.get_amount() >= 1)
|
||||
S.use(1)
|
||||
new /obj/structure/reflector/box (src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(anchored)
|
||||
to_chat(user, "Unweld [src] first!")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 80, volume = I.tool_volume))
|
||||
return
|
||||
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reflector/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
WELDER_ATTEMPT_FLOOR_SLICE_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
WELDER_FLOOR_SLICE_SUCCESS_MESSAGE
|
||||
anchored = FALSE
|
||||
else
|
||||
WELDER_ATTEMPT_FLOOR_WELD_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
WELDER_FLOOR_WELD_SUCCESS_MESSAGE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/proc/get_reflection(srcdir,pdir)
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/reflector/verb/rotate()
|
||||
set name = "Rotate"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if(anchored)
|
||||
to_chat(usr, "<span class='warning'>It is fastened to the floor!</span>")
|
||||
return 0
|
||||
dir = turn(dir, 270)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/reflector/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
else
|
||||
rotate()
|
||||
|
||||
|
||||
//TYPES OF REFLECTORS, SINGLE, DOUBLE, BOX
|
||||
|
||||
//SINGLE
|
||||
|
||||
/obj/structure/reflector/single
|
||||
name = "reflector"
|
||||
icon = 'icons/obj/reflector.dmi'
|
||||
icon_state = "reflector"
|
||||
desc = "A double sided angled mirror for reflecting lasers. This one does so at a 90 degree angle."
|
||||
finished = 1
|
||||
var/static/list/rotations = list("[NORTH]" = list("[SOUTH]" = WEST, "[EAST]" = NORTH),
|
||||
"[EAST]" = list("[SOUTH]" = EAST, "[WEST]" = NORTH),
|
||||
"[SOUTH]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH),
|
||||
"[WEST]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH) )
|
||||
|
||||
/obj/structure/reflector/single/get_reflection(srcdir,pdir)
|
||||
var/new_dir = rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
//DOUBLE
|
||||
|
||||
/obj/structure/reflector/double
|
||||
name = "double sided reflector"
|
||||
icon = 'icons/obj/reflector.dmi'
|
||||
icon_state = "reflector_double"
|
||||
desc = "A double sided angled mirror for reflecting lasers. This one does so at a 90 degree angle."
|
||||
finished = 1
|
||||
var/static/list/double_rotations = list("[NORTH]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH, "[SOUTH]" = EAST, "[WEST]" = NORTH),
|
||||
"[EAST]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH, "[SOUTH]" = WEST, "[EAST]" = NORTH),
|
||||
"[SOUTH]" = list("[NORTH]" = EAST, "[WEST]" = SOUTH, "[SOUTH]" = WEST, "[EAST]" = NORTH),
|
||||
"[WEST]" = list("[NORTH]" = WEST, "[EAST]" = SOUTH, "[SOUTH]" = EAST, "[WEST]" = NORTH) )
|
||||
|
||||
/obj/structure/reflector/double/get_reflection(srcdir,pdir)
|
||||
var/new_dir = double_rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
//BOX
|
||||
|
||||
/obj/structure/reflector/box
|
||||
name = "reflector box"
|
||||
icon = 'icons/obj/reflector.dmi'
|
||||
icon_state = "reflector_box"
|
||||
desc = "A box with an internal set of mirrors that reflects all laser fire in a single direction."
|
||||
finished = 1
|
||||
var/static/list/box_rotations = list("[NORTH]" = list("[SOUTH]" = NORTH, "[EAST]" = NORTH, "[WEST]" = NORTH, "[NORTH]" = NORTH),
|
||||
"[EAST]" = list("[SOUTH]" = EAST, "[EAST]" = EAST, "[WEST]" = EAST, "[NORTH]" = EAST),
|
||||
"[SOUTH]" = list("[SOUTH]" = SOUTH, "[EAST]" = SOUTH, "[WEST]" = SOUTH, "[NORTH]" = SOUTH),
|
||||
"[WEST]" = list("[SOUTH]" = WEST, "[EAST]" = WEST, "[WEST]" = WEST, "[NORTH]" = WEST) )
|
||||
|
||||
/obj/structure/reflector/box/get_reflection(srcdir,pdir)
|
||||
var/new_dir = box_rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
@@ -1,385 +1,385 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
SAFE INTERNALS
|
||||
SAFE CODES
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_EMPTY(safes)
|
||||
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "\improper Safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
var/open = FALSE
|
||||
var/locked = TRUE
|
||||
var/dial = 0 // The position the dial is pointing to.
|
||||
|
||||
var/number_of_tumblers = 3 // The amount of tumblers that will be generated.
|
||||
var/list/tumblers = list() // The list of tumbler dial positions that need to be hit.
|
||||
var/list/current_tumbler_index = 1 // The index in the tumblers list of the tumbler dial position that needs to be hit.
|
||||
|
||||
var/space = 0 // The combined w_class of everything in the safe.
|
||||
var/maxspace = 24 // The maximum combined w_class of stuff in the safe.
|
||||
|
||||
var/obj/item/thermal_drill/drill = null
|
||||
var/drill_timer
|
||||
var/time_to_drill
|
||||
var/image/bar
|
||||
var/drill_start_time
|
||||
var/drill_x_offset = -13
|
||||
var/drill_y_offset = -3
|
||||
var/known_by = list()
|
||||
|
||||
var/image/progress_bar
|
||||
var/image/drill_overlay
|
||||
|
||||
/obj/structure/safe/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
GLOB.safes += src
|
||||
|
||||
for(var/i in 1 to number_of_tumblers)
|
||||
tumblers.Add(rand(0, 99))
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.forceMove(src)
|
||||
|
||||
/obj/structure/safe/Destroy()
|
||||
GLOB.safes -= src
|
||||
drill?.soundloop?.stop()
|
||||
drill?.forceMove(loc)
|
||||
drill = null
|
||||
|
||||
qdel(progress_bar)
|
||||
qdel(drill_overlay)
|
||||
return ..()
|
||||
|
||||
/obj/structure/safe/process()
|
||||
if(drill_timer)
|
||||
cut_overlay(progress_bar)
|
||||
progress_bar = image('icons/effects/progessbar.dmi', src, "prog_bar_[round((((world.time - drill_start_time) / time_to_drill) * 100), 5)]", HUD_LAYER)
|
||||
add_overlay(progress_bar)
|
||||
if(prob(15))
|
||||
drill.spark_system.start()
|
||||
|
||||
/obj/structure/safe/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
. += "This model appears to have [number_of_tumblers] tumblers."
|
||||
if(open)
|
||||
. += "The inside of the the door has numbers written on it: <b>[get_combination()]</b>"
|
||||
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity)
|
||||
return
|
||||
|
||||
/obj/structure/safe/examine_status(mob/user)
|
||||
return
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked()
|
||||
if(current_tumbler_index > number_of_tumblers)
|
||||
locked = FALSE
|
||||
visible_message("<span class='boldnotice'>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</span>")
|
||||
return TRUE
|
||||
|
||||
locked = TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/safe/proc/get_combination()
|
||||
var/combination = ""
|
||||
var/looped = 0
|
||||
|
||||
for(var/tumbler in tumblers)
|
||||
looped++
|
||||
combination += "[tumbler]"
|
||||
|
||||
if(looped < LAZYLEN(tumblers))
|
||||
combination += ", "
|
||||
|
||||
return combination
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
if(broken)
|
||||
icon_state = "[initial(icon_state)]-open-broken"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
if(broken)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
var/list/overlays_to_cut = list(drill_overlay)
|
||||
if(!drill_timer)
|
||||
overlays_to_cut += progress_bar
|
||||
|
||||
cut_overlay(overlays_to_cut)
|
||||
|
||||
if(istype(drill, /obj/item/thermal_drill))
|
||||
var/drill_icon = istype(drill, /obj/item/thermal_drill/diamond_drill) ? "d" : "h"
|
||||
if(drill_timer)
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_[drill_icon]-drill-on", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
else
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_[drill_icon]-drill-off", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
|
||||
add_overlay(drill_overlay)
|
||||
|
||||
/obj/structure/safe/attack_ghost(mob/user)
|
||||
if(..() || drill)
|
||||
return TRUE
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if(drill)
|
||||
switch(alert("What would you like to do?", "Thermal Drill", "Turn [drill_timer ? "Off" : "On"]", "Remove Drill", "Cancel"))
|
||||
if("Turn On")
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
drill_timer = addtimer(CALLBACK(src, .proc/drill_open), time_to_drill, TIMER_STOPPABLE)
|
||||
drill_start_time = world.time
|
||||
drill.soundloop.start()
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
if("Turn Off")
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
deltimer(drill_timer)
|
||||
drill_timer = null
|
||||
drill.soundloop.stop()
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if("Remove Drill")
|
||||
if(drill_timer)
|
||||
to_chat(user, "<span class='warning'>You cant remove the drill while it's running!</span>")
|
||||
else if(do_after(user, 2 SECONDS, target = src))
|
||||
user.put_in_hands(drill)
|
||||
drill = null
|
||||
update_icon()
|
||||
if("Cancel")
|
||||
return
|
||||
else
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/safe/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "safe.tmpl", name, 600, 750)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/structure/safe/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
var/list/contents_names = list()
|
||||
if(open)
|
||||
for(var/obj/O in contents)
|
||||
contents_names[++contents_names.len] = list("name" = O.name, "index" = contents.Find(O), "sprite" = O.icon_state)
|
||||
user << browse_rsc(icon(O.icon, O.icon_state), "[O.icon_state].png")
|
||||
|
||||
data["dial"] = dial
|
||||
data["open"] = open
|
||||
data["locked"] = locked
|
||||
data["rotation"] = "[-dial * 3.6]deg"
|
||||
data["contents"] = contents_names
|
||||
|
||||
return data
|
||||
|
||||
/obj/structure/safe/proc/notify_user(user, canhear, sounds, total_ticks, current_tick)
|
||||
if(!canhear)
|
||||
return
|
||||
|
||||
if(current_tick == 2)
|
||||
to_chat(user, "<span class='italics'>The sounds from [src] are too fast and blend together.</span>")
|
||||
|
||||
if(total_ticks == 1 || prob(10))
|
||||
to_chat(user, "<span class='italics'>You hear a [pick(sounds)] from [src].</span>")
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
var/mob/user = usr
|
||||
if(!user.IsAdvancedToolUser() && !isobserver(user))
|
||||
to_chat(user, "<span class='warning'>You're not able to operate the safe.</span>")
|
||||
return
|
||||
|
||||
var/canhear = FALSE
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.can_hear() && H.is_in_hands(/obj/item/clothing/accessory/stethoscope))
|
||||
canhear = TRUE
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked() || open || broken)
|
||||
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
|
||||
open = !open
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't open [src], as its lock is engaged!</span>")
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(href_list["turnright"])
|
||||
if(open)
|
||||
return
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>The dial will not turn, as the mechanism is destroyed.</span>")
|
||||
return
|
||||
|
||||
var/ticks = text2num(href_list["turnright"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial - 1, 0, 100)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
current_tumbler_index = 1
|
||||
|
||||
if(!invalid_turn && dial == tumblers[current_tumbler_index])
|
||||
notify_user(user, canhear, list("tink", "krink", "plink"), ticks, i)
|
||||
current_tumbler_index++
|
||||
else
|
||||
notify_user(user, canhear, list("clack", "scrape", "clank"), ticks, i)
|
||||
|
||||
sleep(1)
|
||||
check_unlocked(user, canhear)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(href_list["turnleft"])
|
||||
if(open)
|
||||
return
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>The dial will not turn, as the mechanism is destroyed.</span>")
|
||||
return
|
||||
|
||||
var/ticks = text2num(href_list["turnleft"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial + 1, 0, 100)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 != 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
current_tumbler_index = 1
|
||||
|
||||
if(!invalid_turn && dial == tumblers[current_tumbler_index])
|
||||
notify_user(user, canhear, list("tonk", "krunk", "plunk"), ticks, i)
|
||||
current_tumbler_index++
|
||||
else
|
||||
notify_user(user, canhear, list("click", "chink", "clink"), ticks, i)
|
||||
|
||||
sleep(1)
|
||||
check_unlocked(user, canhear)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(href_list["retrieve"])
|
||||
var/index = text2num(href_list["retrieve"])
|
||||
if(index > 0 && index <= contents.len)
|
||||
var/obj/item/P = contents[index]
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
space -= P.w_class
|
||||
. = TRUE
|
||||
|
||||
/obj/structure/safe/proc/drill_open()
|
||||
broken = TRUE
|
||||
drill_timer = null
|
||||
drill.soundloop.stop()
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
if(broken && istype(I, /obj/item/safe_internals) && do_after(user, 2 SECONDS, target = src))
|
||||
to_chat(user, "<span class='notice'>You replace the broken mechanism.</span>")
|
||||
qdel(I)
|
||||
broken = !broken
|
||||
update_icon()
|
||||
else if(I.w_class + space <= maxspace)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
space += I.w_class
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
else
|
||||
if(istype(I, /obj/item/clothing/accessory/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/thermal_drill))
|
||||
if(drill)
|
||||
to_chat(user, "<span class='warning'>There is already a drill attached!</span>")
|
||||
else if(do_after(user, 2 SECONDS, target = src))
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.forceMove(src)
|
||||
drill = I
|
||||
time_to_drill = 300 SECONDS * drill.time_multiplier
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't put [I] into the safe while it is closed!</span>")
|
||||
return
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
density = FALSE
|
||||
level = 1 //Under the floor
|
||||
layer = LOW_OBJ_LAYER
|
||||
drill_x_offset = -1
|
||||
drill_y_offset = 20
|
||||
|
||||
/obj/structure/safe/floor/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
/obj/structure/safe/floor/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
|
||||
/obj/item/safe_internals
|
||||
name = "safe internals"
|
||||
desc = "The mechanism and locking bolts for a Scarborough Arms - 2 tumbler safe"
|
||||
icon_state = "safe_internals"
|
||||
|
||||
/obj/item/paper/safe_code
|
||||
name = "safe codes"
|
||||
var/owner
|
||||
info = "<div style='text-align:center;'><img src='ntlogo.png'><center><h3>Safe Codes</h3></center>"
|
||||
|
||||
/obj/item/paper/safe_code/Initialize(mapload)
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/item/paper/safe_code/LateInitialize(mapload)
|
||||
. = ..()
|
||||
for(var/safe in GLOB.safes)
|
||||
var/obj/structure/safe/S = safe
|
||||
if(owner in S.known_by)
|
||||
info += "<br> The combination for the safe located in the [get_area(S).name] is: [S.get_combination()]<br>"
|
||||
info_links = info
|
||||
update_icon()
|
||||
/*
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
SAFE INTERNALS
|
||||
SAFE CODES
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_EMPTY(safes)
|
||||
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "\improper Safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
var/open = FALSE
|
||||
var/locked = TRUE
|
||||
var/dial = 0 // The position the dial is pointing to.
|
||||
|
||||
var/number_of_tumblers = 3 // The amount of tumblers that will be generated.
|
||||
var/list/tumblers = list() // The list of tumbler dial positions that need to be hit.
|
||||
var/list/current_tumbler_index = 1 // The index in the tumblers list of the tumbler dial position that needs to be hit.
|
||||
|
||||
var/space = 0 // The combined w_class of everything in the safe.
|
||||
var/maxspace = 24 // The maximum combined w_class of stuff in the safe.
|
||||
|
||||
var/obj/item/thermal_drill/drill = null
|
||||
var/drill_timer
|
||||
var/time_to_drill
|
||||
var/image/bar
|
||||
var/drill_start_time
|
||||
var/drill_x_offset = -13
|
||||
var/drill_y_offset = -3
|
||||
var/known_by = list()
|
||||
|
||||
var/image/progress_bar
|
||||
var/image/drill_overlay
|
||||
|
||||
/obj/structure/safe/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
GLOB.safes += src
|
||||
|
||||
for(var/i in 1 to number_of_tumblers)
|
||||
tumblers.Add(rand(0, 99))
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.forceMove(src)
|
||||
|
||||
/obj/structure/safe/Destroy()
|
||||
GLOB.safes -= src
|
||||
drill?.soundloop?.stop()
|
||||
drill?.forceMove(loc)
|
||||
drill = null
|
||||
|
||||
qdel(progress_bar)
|
||||
qdel(drill_overlay)
|
||||
return ..()
|
||||
|
||||
/obj/structure/safe/process()
|
||||
if(drill_timer)
|
||||
cut_overlay(progress_bar)
|
||||
progress_bar = image('icons/effects/progessbar.dmi', src, "prog_bar_[round((((world.time - drill_start_time) / time_to_drill) * 100), 5)]", HUD_LAYER)
|
||||
add_overlay(progress_bar)
|
||||
if(prob(15))
|
||||
drill.spark_system.start()
|
||||
|
||||
/obj/structure/safe/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
. += "This model appears to have [number_of_tumblers] tumblers."
|
||||
if(open)
|
||||
. += "The inside of the the door has numbers written on it: <b>[get_combination()]</b>"
|
||||
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity)
|
||||
return
|
||||
|
||||
/obj/structure/safe/examine_status(mob/user)
|
||||
return
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked()
|
||||
if(current_tumbler_index > number_of_tumblers)
|
||||
locked = FALSE
|
||||
visible_message("<span class='boldnotice'>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</span>")
|
||||
return TRUE
|
||||
|
||||
locked = TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/safe/proc/get_combination()
|
||||
var/combination = ""
|
||||
var/looped = 0
|
||||
|
||||
for(var/tumbler in tumblers)
|
||||
looped++
|
||||
combination += "[tumbler]"
|
||||
|
||||
if(looped < LAZYLEN(tumblers))
|
||||
combination += ", "
|
||||
|
||||
return combination
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
if(broken)
|
||||
icon_state = "[initial(icon_state)]-open-broken"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
if(broken)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
var/list/overlays_to_cut = list(drill_overlay)
|
||||
if(!drill_timer)
|
||||
overlays_to_cut += progress_bar
|
||||
|
||||
cut_overlay(overlays_to_cut)
|
||||
|
||||
if(istype(drill, /obj/item/thermal_drill))
|
||||
var/drill_icon = istype(drill, /obj/item/thermal_drill/diamond_drill) ? "d" : "h"
|
||||
if(drill_timer)
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_[drill_icon]-drill-on", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
else
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_[drill_icon]-drill-off", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
|
||||
add_overlay(drill_overlay)
|
||||
|
||||
/obj/structure/safe/attack_ghost(mob/user)
|
||||
if(..() || drill)
|
||||
return TRUE
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if(drill)
|
||||
switch(alert("What would you like to do?", "Thermal Drill", "Turn [drill_timer ? "Off" : "On"]", "Remove Drill", "Cancel"))
|
||||
if("Turn On")
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
drill_timer = addtimer(CALLBACK(src, .proc/drill_open), time_to_drill, TIMER_STOPPABLE)
|
||||
drill_start_time = world.time
|
||||
drill.soundloop.start()
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
if("Turn Off")
|
||||
if(do_after(user, 2 SECONDS, target = src))
|
||||
deltimer(drill_timer)
|
||||
drill_timer = null
|
||||
drill.soundloop.stop()
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if("Remove Drill")
|
||||
if(drill_timer)
|
||||
to_chat(user, "<span class='warning'>You cant remove the drill while it's running!</span>")
|
||||
else if(do_after(user, 2 SECONDS, target = src))
|
||||
user.put_in_hands(drill)
|
||||
drill = null
|
||||
update_icon()
|
||||
if("Cancel")
|
||||
return
|
||||
else
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/safe/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "safe.tmpl", name, 600, 750)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/structure/safe/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
var/list/contents_names = list()
|
||||
if(open)
|
||||
for(var/obj/O in contents)
|
||||
contents_names[++contents_names.len] = list("name" = O.name, "index" = contents.Find(O), "sprite" = O.icon_state)
|
||||
user << browse_rsc(icon(O.icon, O.icon_state), "[O.icon_state].png")
|
||||
|
||||
data["dial"] = dial
|
||||
data["open"] = open
|
||||
data["locked"] = locked
|
||||
data["rotation"] = "[-dial * 3.6]deg"
|
||||
data["contents"] = contents_names
|
||||
|
||||
return data
|
||||
|
||||
/obj/structure/safe/proc/notify_user(user, canhear, sounds, total_ticks, current_tick)
|
||||
if(!canhear)
|
||||
return
|
||||
|
||||
if(current_tick == 2)
|
||||
to_chat(user, "<span class='italics'>The sounds from [src] are too fast and blend together.</span>")
|
||||
|
||||
if(total_ticks == 1 || prob(10))
|
||||
to_chat(user, "<span class='italics'>You hear a [pick(sounds)] from [src].</span>")
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
var/mob/user = usr
|
||||
if(!user.IsAdvancedToolUser() && !isobserver(user))
|
||||
to_chat(user, "<span class='warning'>You're not able to operate the safe.</span>")
|
||||
return
|
||||
|
||||
var/canhear = FALSE
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.can_hear() && H.is_in_hands(/obj/item/clothing/accessory/stethoscope))
|
||||
canhear = TRUE
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked() || open || broken)
|
||||
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
|
||||
open = !open
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't open [src], as its lock is engaged!</span>")
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(href_list["turnright"])
|
||||
if(open)
|
||||
return
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>The dial will not turn, as the mechanism is destroyed.</span>")
|
||||
return
|
||||
|
||||
var/ticks = text2num(href_list["turnright"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial - 1, 0, 100)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
current_tumbler_index = 1
|
||||
|
||||
if(!invalid_turn && dial == tumblers[current_tumbler_index])
|
||||
notify_user(user, canhear, list("tink", "krink", "plink"), ticks, i)
|
||||
current_tumbler_index++
|
||||
else
|
||||
notify_user(user, canhear, list("clack", "scrape", "clank"), ticks, i)
|
||||
|
||||
sleep(1)
|
||||
check_unlocked(user, canhear)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(href_list["turnleft"])
|
||||
if(open)
|
||||
return
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "<span class='warning'>The dial will not turn, as the mechanism is destroyed.</span>")
|
||||
return
|
||||
|
||||
var/ticks = text2num(href_list["turnleft"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial + 1, 0, 100)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 != 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
current_tumbler_index = 1
|
||||
|
||||
if(!invalid_turn && dial == tumblers[current_tumbler_index])
|
||||
notify_user(user, canhear, list("tonk", "krunk", "plunk"), ticks, i)
|
||||
current_tumbler_index++
|
||||
else
|
||||
notify_user(user, canhear, list("click", "chink", "clink"), ticks, i)
|
||||
|
||||
sleep(1)
|
||||
check_unlocked(user, canhear)
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(href_list["retrieve"])
|
||||
var/index = text2num(href_list["retrieve"])
|
||||
if(index > 0 && index <= contents.len)
|
||||
var/obj/item/P = contents[index]
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
space -= P.w_class
|
||||
. = TRUE
|
||||
|
||||
/obj/structure/safe/proc/drill_open()
|
||||
broken = TRUE
|
||||
drill_timer = null
|
||||
drill.soundloop.stop()
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
if(broken && istype(I, /obj/item/safe_internals) && do_after(user, 2 SECONDS, target = src))
|
||||
to_chat(user, "<span class='notice'>You replace the broken mechanism.</span>")
|
||||
qdel(I)
|
||||
broken = !broken
|
||||
update_icon()
|
||||
else if(I.w_class + space <= maxspace)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
space += I.w_class
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
else
|
||||
if(istype(I, /obj/item/clothing/accessory/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/thermal_drill))
|
||||
if(drill)
|
||||
to_chat(user, "<span class='warning'>There is already a drill attached!</span>")
|
||||
else if(do_after(user, 2 SECONDS, target = src))
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.forceMove(src)
|
||||
drill = I
|
||||
time_to_drill = 300 SECONDS * drill.time_multiplier
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't put [I] into the safe while it is closed!</span>")
|
||||
return
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
density = FALSE
|
||||
level = 1 //Under the floor
|
||||
layer = LOW_OBJ_LAYER
|
||||
drill_x_offset = -1
|
||||
drill_y_offset = 20
|
||||
|
||||
/obj/structure/safe/floor/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
/obj/structure/safe/floor/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
|
||||
/obj/item/safe_internals
|
||||
name = "safe internals"
|
||||
desc = "The mechanism and locking bolts for a Scarborough Arms - 2 tumbler safe"
|
||||
icon_state = "safe_internals"
|
||||
|
||||
/obj/item/paper/safe_code
|
||||
name = "safe codes"
|
||||
var/owner
|
||||
info = "<div style='text-align:center;'><img src='ntlogo.png'><center><h3>Safe Codes</h3></center>"
|
||||
|
||||
/obj/item/paper/safe_code/Initialize(mapload)
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/item/paper/safe_code/LateInitialize(mapload)
|
||||
. = ..()
|
||||
for(var/safe in GLOB.safes)
|
||||
var/obj/structure/safe/S = safe
|
||||
if(owner in S.known_by)
|
||||
info += "<br> The combination for the safe located in the [get_area(S).name] is: [S.get_combination()]<br>"
|
||||
info_links = info
|
||||
update_icon()
|
||||
|
||||
@@ -1,326 +1,326 @@
|
||||
/obj/structure/sign
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 0
|
||||
layer = 3.5
|
||||
max_integrity = 100
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
|
||||
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/sign/screwdriver_act(mob/user, obj/item/I)
|
||||
if(istype(src, /obj/structure/sign/double))
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "You unfasten the sign with [I].")
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
resistance_flags = FLAMMABLE
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
if(istype(tool, /obj/item/screwdriver) && isturf(user.loc))
|
||||
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
|
||||
if(direction == "Cancel")
|
||||
return
|
||||
if(QDELETED(src))
|
||||
return
|
||||
var/obj/structure/sign/S = new(user.loc)
|
||||
switch(direction)
|
||||
if("North")
|
||||
S.pixel_y = 32
|
||||
if("East")
|
||||
S.pixel_x = 32
|
||||
if("South")
|
||||
S.pixel_y = -32
|
||||
if("West")
|
||||
S.pixel_x = -32
|
||||
else
|
||||
return
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = sign_state
|
||||
to_chat(user, "You fasten \the [S] with your [tool].")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/double/map
|
||||
name = "station map"
|
||||
desc = "A framed picture of the station."
|
||||
max_integrity = 500
|
||||
|
||||
/obj/structure/sign/double/map/left
|
||||
icon_state = "map-left"
|
||||
|
||||
/obj/structure/sign/double/map/right
|
||||
icon_state = "map-right"
|
||||
|
||||
/obj/structure/sign/securearea
|
||||
name = "\improper SECURE AREA"
|
||||
desc = "A warning sign which reads 'SECURE AREA'"
|
||||
icon_state = "securearea"
|
||||
|
||||
/obj/structure/sign/biohazard
|
||||
name = "\improper BIOHAZARD"
|
||||
desc = "A warning sign which reads 'BIOHAZARD'"
|
||||
icon_state = "bio"
|
||||
|
||||
/obj/structure/sign/electricshock
|
||||
name = "\improper HIGH VOLTAGE"
|
||||
desc = "A warning sign which reads 'HIGH VOLTAGE'"
|
||||
icon_state = "shock"
|
||||
|
||||
/obj/structure/sign/examroom
|
||||
name = "\improper EXAM"
|
||||
desc = "A guidance sign which reads 'EXAM ROOM'"
|
||||
icon_state = "examroom"
|
||||
|
||||
/obj/structure/sign/vacuum
|
||||
name = "\improper HARD VACUUM AHEAD"
|
||||
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
|
||||
icon_state = "space"
|
||||
|
||||
/obj/structure/sign/vacuum/external
|
||||
name = "\improper EXTERNAL AIRLOCK"
|
||||
desc = "A warning sign which reads 'EXTERNAL AIRLOCK'."
|
||||
layer = MOB_LAYER
|
||||
|
||||
/obj/structure/sign/deathsposal
|
||||
name = "\improper DISPOSAL LEADS TO SPACE"
|
||||
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
|
||||
icon_state = "deathsposal"
|
||||
|
||||
/obj/structure/sign/pods
|
||||
name = "\improper ESCAPE PODS"
|
||||
desc = "A warning sign which reads 'ESCAPE PODS'"
|
||||
icon_state = "pods"
|
||||
|
||||
/obj/structure/sign/fire
|
||||
name = "\improper DANGER: FIRE"
|
||||
desc = "A warning sign which reads 'DANGER: FIRE'"
|
||||
icon_state = "fire"
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/sign/nosmoking_1
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
icon_state = "nosmoking"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/structure/sign/nosmoking_2
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
icon_state = "nosmoking2"
|
||||
|
||||
/obj/structure/sign/radiation
|
||||
name = "\improper HAZARDOUS RADIATION"
|
||||
desc = "A warning sign alerting the user of potential radiation hazards."
|
||||
icon_state = "radiation"
|
||||
|
||||
/obj/structure/sign/radiation/rad_area
|
||||
name = "\improper RADIOACTIVE AREA"
|
||||
desc = "A warning sign which reads 'RADIOACTIVE AREA'."
|
||||
|
||||
/obj/structure/sign/xeno_warning_mining
|
||||
name = "DANGEROUS ALIEN LIFE"
|
||||
desc = "A sign that warns would be travellers of hostile alien life in the vicinity."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "xeno_warning"
|
||||
|
||||
/obj/structure/sign/redcross
|
||||
name = "medbay"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
|
||||
icon_state = "redcross"
|
||||
|
||||
/obj/structure/sign/greencross
|
||||
name = "medbay"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
|
||||
icon_state = "greencross"
|
||||
|
||||
/obj/structure/sign/goldenplaque
|
||||
name = "The Most Robust Men Award for Robustness"
|
||||
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
|
||||
icon_state = "goldenplaque"
|
||||
|
||||
/obj/structure/sign/kiddieplaque
|
||||
name = "AI developers plaque"
|
||||
desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child appears to be retarded. Beneath the image, someone has scratched the word \"PACKETS\"."
|
||||
icon_state = "kiddieplaque"
|
||||
|
||||
/obj/structure/sign/atmosplaque
|
||||
name = "\improper ZAS Atmospherics Division plaque"
|
||||
desc = "This plaque commemorates the fall of the Atmos ZAS division. For all the charred, dizzy, and brittle men who have died in its horrible hands."
|
||||
icon_state = "atmosplaque"
|
||||
|
||||
/obj/structure/sign/kidanplaque
|
||||
name = "Kidan wall trophy"
|
||||
desc = "A dead and stuffed Diona nymph, mounted on a board."
|
||||
icon_state = "kidanplaque"
|
||||
|
||||
/obj/structure/sign/mech
|
||||
name = "\improper mech painting"
|
||||
desc = "A painting of a mech"
|
||||
icon_state = "mech"
|
||||
|
||||
/obj/structure/sign/nuke
|
||||
name = "\improper nuke painting"
|
||||
desc = "A painting of a nuke"
|
||||
icon_state = "nuke"
|
||||
|
||||
/obj/structure/sign/clown
|
||||
name = "\improper clown painting"
|
||||
desc = "A painting of the clown and mime. Awwww."
|
||||
icon_state = "clown"
|
||||
|
||||
/obj/structure/sign/bobross
|
||||
name = "\improper calming painting"
|
||||
desc = "We don't make mistakes, just happy little accidents."
|
||||
icon_state = "bob"
|
||||
|
||||
/obj/structure/sign/singulo
|
||||
name = "\improper singulo painting"
|
||||
desc = "A mesmerizing painting of a singularity. It seems to suck you in..."
|
||||
icon_state = "singulo"
|
||||
|
||||
/obj/structure/sign/barber
|
||||
name = "\improper barber shop sign"
|
||||
desc = "A spinning sign indicating a barbershop is near."
|
||||
icon_state = "barber"
|
||||
|
||||
/obj/structure/sign/chinese
|
||||
name = "\improper chinese restaurant sign"
|
||||
desc = "A glowing dragon invites you in."
|
||||
icon_state = "chinese"
|
||||
|
||||
/obj/structure/sign/science
|
||||
name = "\improper SCIENCE!"
|
||||
desc = "A warning sign which reads 'SCIENCE!'"
|
||||
icon_state = "science1"
|
||||
|
||||
/obj/structure/sign/chemistry
|
||||
name = "\improper CHEMISTRY"
|
||||
desc = "A warning sign which reads 'CHEMISTRY'"
|
||||
icon_state = "chemistry1"
|
||||
|
||||
/obj/structure/sign/botany
|
||||
name = "\improper HYDROPONICS"
|
||||
desc = "A warning sign which reads 'HYDROPONICS'"
|
||||
icon_state = "hydro1"
|
||||
|
||||
/obj/structure/sign/xenobio
|
||||
name = "\improper XENOBIOLOGY"
|
||||
desc = "A sign labelling an area as a place where xenobiological entities are researched."
|
||||
icon_state = "xenobio"
|
||||
|
||||
/obj/structure/sign/evac
|
||||
name = "\improper EVACUATION"
|
||||
desc = "A sign labelling an area where evacuation procedures take place."
|
||||
icon_state = "evac"
|
||||
|
||||
/obj/structure/sign/drop
|
||||
name = "\improper DROP PODS"
|
||||
desc = "A sign labelling an area where drop pod loading procedures take place."
|
||||
icon_state = "drop"
|
||||
|
||||
/obj/structure/sign/custodian
|
||||
name = "\improper CUSTODIAN"
|
||||
desc = "A sign labelling an area where the custodian works."
|
||||
icon_state = "custodian"
|
||||
|
||||
/obj/structure/sign/engineering
|
||||
name = "\improper ENGINEERING"
|
||||
desc = "A sign labelling an area where engineers work."
|
||||
icon_state = "engine"
|
||||
|
||||
/obj/structure/sign/cargo
|
||||
name = "\improper CARGO"
|
||||
desc = "A sign labelling an area where cargo ships dock."
|
||||
icon_state = "cargo"
|
||||
|
||||
/obj/structure/sign/security
|
||||
name = "\improper SECURITY"
|
||||
desc = "A sign labelling an area where the law is law."
|
||||
icon_state = "security"
|
||||
|
||||
/obj/structure/sign/holy
|
||||
name = "\improper HOLY"
|
||||
desc = "A sign labelling a religious area."
|
||||
icon_state = "holy"
|
||||
|
||||
/obj/structure/sign/restroom
|
||||
name = "\improper RESTROOM"
|
||||
desc = "A sign labelling a restroom."
|
||||
icon_state = "restroom"
|
||||
|
||||
/obj/structure/sign/medbay
|
||||
name = "\improper MEDBAY"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
|
||||
icon_state = "bluecross"
|
||||
|
||||
/obj/structure/sign/medbay/alt
|
||||
icon_state = "bluecross2"
|
||||
|
||||
/obj/structure/sign/directions/science
|
||||
name = "\improper Research Division"
|
||||
desc = "A direction sign, pointing out which way the Research Division is."
|
||||
icon_state = "direction_sci"
|
||||
|
||||
/obj/structure/sign/directions/engineering
|
||||
name = "\improper Engineering Department"
|
||||
desc = "A direction sign, pointing out which way the Engineering department is."
|
||||
icon_state = "direction_eng"
|
||||
|
||||
/obj/structure/sign/directions/security
|
||||
name = "\improper Security Department"
|
||||
desc = "A direction sign, pointing out which way the Security department is."
|
||||
icon_state = "direction_sec"
|
||||
|
||||
/obj/structure/sign/directions/medical
|
||||
name = "\improper Medical Bay"
|
||||
desc = "A direction sign, pointing out which way Medical Bay is."
|
||||
icon_state = "direction_med"
|
||||
|
||||
/obj/structure/sign/directions/evac
|
||||
name = "\improper Escape Arm"
|
||||
desc = "A direction sign, pointing out which way escape shuttle dock is."
|
||||
icon_state = "direction_evac"
|
||||
|
||||
/obj/structure/sign/directions/cargo
|
||||
name = "\improper Cargo Department"
|
||||
desc = "A direction sign, pointing out which way the Cargo department is."
|
||||
icon_state = "direction_supply"
|
||||
|
||||
/obj/structure/sign/explosives
|
||||
name = "\improper HIGH EXPLOSIVES"
|
||||
desc = "A warning sign which reads 'HIGH EXPLOSIVES'."
|
||||
icon_state = "explosives"
|
||||
|
||||
/obj/structure/sign/explosives/alt
|
||||
name = "\improper HIGH EXPLOSIVES"
|
||||
desc = "A warning sign which reads 'HIGH EXPLOSIVES'."
|
||||
icon_state = "explosives2"
|
||||
/obj/structure/sign
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 0
|
||||
layer = 3.5
|
||||
max_integrity = 100
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
|
||||
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/sign/screwdriver_act(mob/user, obj/item/I)
|
||||
if(istype(src, /obj/structure/sign/double))
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "You unfasten the sign with [I].")
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
resistance_flags = FLAMMABLE
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
if(istype(tool, /obj/item/screwdriver) && isturf(user.loc))
|
||||
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
|
||||
if(direction == "Cancel")
|
||||
return
|
||||
if(QDELETED(src))
|
||||
return
|
||||
var/obj/structure/sign/S = new(user.loc)
|
||||
switch(direction)
|
||||
if("North")
|
||||
S.pixel_y = 32
|
||||
if("East")
|
||||
S.pixel_x = 32
|
||||
if("South")
|
||||
S.pixel_y = -32
|
||||
if("West")
|
||||
S.pixel_x = -32
|
||||
else
|
||||
return
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = sign_state
|
||||
to_chat(user, "You fasten \the [S] with your [tool].")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/double/map
|
||||
name = "station map"
|
||||
desc = "A framed picture of the station."
|
||||
max_integrity = 500
|
||||
|
||||
/obj/structure/sign/double/map/left
|
||||
icon_state = "map-left"
|
||||
|
||||
/obj/structure/sign/double/map/right
|
||||
icon_state = "map-right"
|
||||
|
||||
/obj/structure/sign/securearea
|
||||
name = "\improper SECURE AREA"
|
||||
desc = "A warning sign which reads 'SECURE AREA'"
|
||||
icon_state = "securearea"
|
||||
|
||||
/obj/structure/sign/biohazard
|
||||
name = "\improper BIOHAZARD"
|
||||
desc = "A warning sign which reads 'BIOHAZARD'"
|
||||
icon_state = "bio"
|
||||
|
||||
/obj/structure/sign/electricshock
|
||||
name = "\improper HIGH VOLTAGE"
|
||||
desc = "A warning sign which reads 'HIGH VOLTAGE'"
|
||||
icon_state = "shock"
|
||||
|
||||
/obj/structure/sign/examroom
|
||||
name = "\improper EXAM"
|
||||
desc = "A guidance sign which reads 'EXAM ROOM'"
|
||||
icon_state = "examroom"
|
||||
|
||||
/obj/structure/sign/vacuum
|
||||
name = "\improper HARD VACUUM AHEAD"
|
||||
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
|
||||
icon_state = "space"
|
||||
|
||||
/obj/structure/sign/vacuum/external
|
||||
name = "\improper EXTERNAL AIRLOCK"
|
||||
desc = "A warning sign which reads 'EXTERNAL AIRLOCK'."
|
||||
layer = MOB_LAYER
|
||||
|
||||
/obj/structure/sign/deathsposal
|
||||
name = "\improper DISPOSAL LEADS TO SPACE"
|
||||
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
|
||||
icon_state = "deathsposal"
|
||||
|
||||
/obj/structure/sign/pods
|
||||
name = "\improper ESCAPE PODS"
|
||||
desc = "A warning sign which reads 'ESCAPE PODS'"
|
||||
icon_state = "pods"
|
||||
|
||||
/obj/structure/sign/fire
|
||||
name = "\improper DANGER: FIRE"
|
||||
desc = "A warning sign which reads 'DANGER: FIRE'"
|
||||
icon_state = "fire"
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/sign/nosmoking_1
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
icon_state = "nosmoking"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/structure/sign/nosmoking_2
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
icon_state = "nosmoking2"
|
||||
|
||||
/obj/structure/sign/radiation
|
||||
name = "\improper HAZARDOUS RADIATION"
|
||||
desc = "A warning sign alerting the user of potential radiation hazards."
|
||||
icon_state = "radiation"
|
||||
|
||||
/obj/structure/sign/radiation/rad_area
|
||||
name = "\improper RADIOACTIVE AREA"
|
||||
desc = "A warning sign which reads 'RADIOACTIVE AREA'."
|
||||
|
||||
/obj/structure/sign/xeno_warning_mining
|
||||
name = "DANGEROUS ALIEN LIFE"
|
||||
desc = "A sign that warns would be travellers of hostile alien life in the vicinity."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "xeno_warning"
|
||||
|
||||
/obj/structure/sign/redcross
|
||||
name = "medbay"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
|
||||
icon_state = "redcross"
|
||||
|
||||
/obj/structure/sign/greencross
|
||||
name = "medbay"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
|
||||
icon_state = "greencross"
|
||||
|
||||
/obj/structure/sign/goldenplaque
|
||||
name = "The Most Robust Men Award for Robustness"
|
||||
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
|
||||
icon_state = "goldenplaque"
|
||||
|
||||
/obj/structure/sign/kiddieplaque
|
||||
name = "AI developers plaque"
|
||||
desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child appears to be retarded. Beneath the image, someone has scratched the word \"PACKETS\"."
|
||||
icon_state = "kiddieplaque"
|
||||
|
||||
/obj/structure/sign/atmosplaque
|
||||
name = "\improper ZAS Atmospherics Division plaque"
|
||||
desc = "This plaque commemorates the fall of the Atmos ZAS division. For all the charred, dizzy, and brittle men who have died in its horrible hands."
|
||||
icon_state = "atmosplaque"
|
||||
|
||||
/obj/structure/sign/kidanplaque
|
||||
name = "Kidan wall trophy"
|
||||
desc = "A dead and stuffed Diona nymph, mounted on a board."
|
||||
icon_state = "kidanplaque"
|
||||
|
||||
/obj/structure/sign/mech
|
||||
name = "\improper mech painting"
|
||||
desc = "A painting of a mech"
|
||||
icon_state = "mech"
|
||||
|
||||
/obj/structure/sign/nuke
|
||||
name = "\improper nuke painting"
|
||||
desc = "A painting of a nuke"
|
||||
icon_state = "nuke"
|
||||
|
||||
/obj/structure/sign/clown
|
||||
name = "\improper clown painting"
|
||||
desc = "A painting of the clown and mime. Awwww."
|
||||
icon_state = "clown"
|
||||
|
||||
/obj/structure/sign/bobross
|
||||
name = "\improper calming painting"
|
||||
desc = "We don't make mistakes, just happy little accidents."
|
||||
icon_state = "bob"
|
||||
|
||||
/obj/structure/sign/singulo
|
||||
name = "\improper singulo painting"
|
||||
desc = "A mesmerizing painting of a singularity. It seems to suck you in..."
|
||||
icon_state = "singulo"
|
||||
|
||||
/obj/structure/sign/barber
|
||||
name = "\improper barber shop sign"
|
||||
desc = "A spinning sign indicating a barbershop is near."
|
||||
icon_state = "barber"
|
||||
|
||||
/obj/structure/sign/chinese
|
||||
name = "\improper chinese restaurant sign"
|
||||
desc = "A glowing dragon invites you in."
|
||||
icon_state = "chinese"
|
||||
|
||||
/obj/structure/sign/science
|
||||
name = "\improper SCIENCE!"
|
||||
desc = "A warning sign which reads 'SCIENCE!'"
|
||||
icon_state = "science1"
|
||||
|
||||
/obj/structure/sign/chemistry
|
||||
name = "\improper CHEMISTRY"
|
||||
desc = "A warning sign which reads 'CHEMISTRY'"
|
||||
icon_state = "chemistry1"
|
||||
|
||||
/obj/structure/sign/botany
|
||||
name = "\improper HYDROPONICS"
|
||||
desc = "A warning sign which reads 'HYDROPONICS'"
|
||||
icon_state = "hydro1"
|
||||
|
||||
/obj/structure/sign/xenobio
|
||||
name = "\improper XENOBIOLOGY"
|
||||
desc = "A sign labelling an area as a place where xenobiological entities are researched."
|
||||
icon_state = "xenobio"
|
||||
|
||||
/obj/structure/sign/evac
|
||||
name = "\improper EVACUATION"
|
||||
desc = "A sign labelling an area where evacuation procedures take place."
|
||||
icon_state = "evac"
|
||||
|
||||
/obj/structure/sign/drop
|
||||
name = "\improper DROP PODS"
|
||||
desc = "A sign labelling an area where drop pod loading procedures take place."
|
||||
icon_state = "drop"
|
||||
|
||||
/obj/structure/sign/custodian
|
||||
name = "\improper CUSTODIAN"
|
||||
desc = "A sign labelling an area where the custodian works."
|
||||
icon_state = "custodian"
|
||||
|
||||
/obj/structure/sign/engineering
|
||||
name = "\improper ENGINEERING"
|
||||
desc = "A sign labelling an area where engineers work."
|
||||
icon_state = "engine"
|
||||
|
||||
/obj/structure/sign/cargo
|
||||
name = "\improper CARGO"
|
||||
desc = "A sign labelling an area where cargo ships dock."
|
||||
icon_state = "cargo"
|
||||
|
||||
/obj/structure/sign/security
|
||||
name = "\improper SECURITY"
|
||||
desc = "A sign labelling an area where the law is law."
|
||||
icon_state = "security"
|
||||
|
||||
/obj/structure/sign/holy
|
||||
name = "\improper HOLY"
|
||||
desc = "A sign labelling a religious area."
|
||||
icon_state = "holy"
|
||||
|
||||
/obj/structure/sign/restroom
|
||||
name = "\improper RESTROOM"
|
||||
desc = "A sign labelling a restroom."
|
||||
icon_state = "restroom"
|
||||
|
||||
/obj/structure/sign/medbay
|
||||
name = "\improper MEDBAY"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
|
||||
icon_state = "bluecross"
|
||||
|
||||
/obj/structure/sign/medbay/alt
|
||||
icon_state = "bluecross2"
|
||||
|
||||
/obj/structure/sign/directions/science
|
||||
name = "\improper Research Division"
|
||||
desc = "A direction sign, pointing out which way the Research Division is."
|
||||
icon_state = "direction_sci"
|
||||
|
||||
/obj/structure/sign/directions/engineering
|
||||
name = "\improper Engineering Department"
|
||||
desc = "A direction sign, pointing out which way the Engineering department is."
|
||||
icon_state = "direction_eng"
|
||||
|
||||
/obj/structure/sign/directions/security
|
||||
name = "\improper Security Department"
|
||||
desc = "A direction sign, pointing out which way the Security department is."
|
||||
icon_state = "direction_sec"
|
||||
|
||||
/obj/structure/sign/directions/medical
|
||||
name = "\improper Medical Bay"
|
||||
desc = "A direction sign, pointing out which way Medical Bay is."
|
||||
icon_state = "direction_med"
|
||||
|
||||
/obj/structure/sign/directions/evac
|
||||
name = "\improper Escape Arm"
|
||||
desc = "A direction sign, pointing out which way escape shuttle dock is."
|
||||
icon_state = "direction_evac"
|
||||
|
||||
/obj/structure/sign/directions/cargo
|
||||
name = "\improper Cargo Department"
|
||||
desc = "A direction sign, pointing out which way the Cargo department is."
|
||||
icon_state = "direction_supply"
|
||||
|
||||
/obj/structure/sign/explosives
|
||||
name = "\improper HIGH EXPLOSIVES"
|
||||
desc = "A warning sign which reads 'HIGH EXPLOSIVES'."
|
||||
icon_state = "explosives"
|
||||
|
||||
/obj/structure/sign/explosives/alt
|
||||
name = "\improper HIGH EXPLOSIVES"
|
||||
desc = "A warning sign which reads 'HIGH EXPLOSIVES'."
|
||||
icon_state = "explosives2"
|
||||
|
||||
@@ -97,4 +97,4 @@
|
||||
spawn_time = 600
|
||||
mob_types = list(/mob/living/simple_animal/hostile/headcrab, /mob/living/simple_animal/hostile/headcrab/fast, /mob/living/simple_animal/hostile/headcrab/poison)
|
||||
spawn_text = "crawls out of"
|
||||
faction = list("hostile")
|
||||
faction = list("hostile")
|
||||
|
||||
@@ -77,4 +77,4 @@
|
||||
to_chat(M, "<span class='warning'>There aren't enough people to use the [src.name]!</span>")
|
||||
return 0
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -335,4 +335,4 @@
|
||||
icon = 'icons/obj/decorations.dmi'
|
||||
icon_state = "chickenstatue"
|
||||
anchored = 1
|
||||
density = 1
|
||||
density = 1
|
||||
|
||||
@@ -1,91 +1,91 @@
|
||||
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
|
||||
|
||||
/obj/structure/bed/nest
|
||||
name = "alien nest"
|
||||
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "nest"
|
||||
max_integrity = 120
|
||||
var/image/nest_overlay
|
||||
comfort = 0
|
||||
flags = NODECONSTRUCT
|
||||
|
||||
/obj/structure/bed/nest/New()
|
||||
nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=MOB_LAYER - 0.2)
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/user)
|
||||
if(has_buckled_mobs())
|
||||
for(var/buck in buckled_mobs) //breaking a nest releases all the buckled mobs, because the nest isn't holding them down anymore
|
||||
var/mob/living/M = buck
|
||||
|
||||
if(user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
if(M != user)
|
||||
M.visible_message("<span class='notice'>[user.name] pulls [M.name] free from the sticky nest!</span>",\
|
||||
"<span class='notice'>[user.name] pulls you free from the gelatinous resin.</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M.name] struggles to break free from the gelatinous resin!</span>",\
|
||||
"<span class='notice'>You struggle to break free from the gelatinous resin... (Stay still for two minutes.)</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
if(!do_after(M, 1200, target = src))
|
||||
if(M && M.buckled)
|
||||
to_chat(M, "<span class='warning'>You fail to escape \the [src]!</span>")
|
||||
return
|
||||
if(!M.buckled)
|
||||
return
|
||||
M.visible_message("<span class='warning'>[M.name] breaks free from the gelatinous resin!</span>",\
|
||||
"<span class='notice'>You break free from the gelatinous resin!</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/user)
|
||||
if (!ismob(M) || (get_dist(src, user) > 1) || (M.loc != loc) || user.incapacitated() || M.buckled)
|
||||
return
|
||||
|
||||
if(M.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
return
|
||||
|
||||
if(!user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
return
|
||||
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs()
|
||||
|
||||
if(buckle_mob(M))
|
||||
M.visible_message("<span class='notice'>[user.name] secretes a thick vile goo, securing [M.name] into [src]!</span>",\
|
||||
"<span class='danger'>[user.name] drenches you in a foul-smelling resin, trapping you in [src]!</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
|
||||
|
||||
/obj/structure/bed/nest/post_buckle_mob(mob/living/M)
|
||||
M.pixel_y = 0
|
||||
M.pixel_x = initial(M.pixel_x) + 2
|
||||
M.layer = BELOW_MOB_LAYER
|
||||
add_overlay(nest_overlay)
|
||||
|
||||
/obj/structure/bed/nest/post_unbuckle_mob(mob/living/M)
|
||||
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
|
||||
M.layer = initial(M.layer)
|
||||
cut_overlay(nest_overlay)
|
||||
|
||||
/obj/structure/bed/nest/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
return attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
|
||||
|
||||
/obj/structure/bed/nest
|
||||
name = "alien nest"
|
||||
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "nest"
|
||||
max_integrity = 120
|
||||
var/image/nest_overlay
|
||||
comfort = 0
|
||||
flags = NODECONSTRUCT
|
||||
|
||||
/obj/structure/bed/nest/New()
|
||||
nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=MOB_LAYER - 0.2)
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/user)
|
||||
if(has_buckled_mobs())
|
||||
for(var/buck in buckled_mobs) //breaking a nest releases all the buckled mobs, because the nest isn't holding them down anymore
|
||||
var/mob/living/M = buck
|
||||
|
||||
if(user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
if(M != user)
|
||||
M.visible_message("<span class='notice'>[user.name] pulls [M.name] free from the sticky nest!</span>",\
|
||||
"<span class='notice'>[user.name] pulls you free from the gelatinous resin.</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M.name] struggles to break free from the gelatinous resin!</span>",\
|
||||
"<span class='notice'>You struggle to break free from the gelatinous resin... (Stay still for two minutes.)</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
if(!do_after(M, 1200, target = src))
|
||||
if(M && M.buckled)
|
||||
to_chat(M, "<span class='warning'>You fail to escape \the [src]!</span>")
|
||||
return
|
||||
if(!M.buckled)
|
||||
return
|
||||
M.visible_message("<span class='warning'>[M.name] breaks free from the gelatinous resin!</span>",\
|
||||
"<span class='notice'>You break free from the gelatinous resin!</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/living/M, mob/living/user)
|
||||
if (!ismob(M) || (get_dist(src, user) > 1) || (M.loc != loc) || user.incapacitated() || M.buckled)
|
||||
return
|
||||
|
||||
if(M.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
return
|
||||
|
||||
if(!user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
return
|
||||
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs()
|
||||
|
||||
if(buckle_mob(M))
|
||||
M.visible_message("<span class='notice'>[user.name] secretes a thick vile goo, securing [M.name] into [src]!</span>",\
|
||||
"<span class='danger'>[user.name] drenches you in a foul-smelling resin, trapping you in [src]!</span>",\
|
||||
"<span class='italics'>You hear squelching...</span>")
|
||||
|
||||
|
||||
/obj/structure/bed/nest/post_buckle_mob(mob/living/M)
|
||||
M.pixel_y = 0
|
||||
M.pixel_x = initial(M.pixel_x) + 2
|
||||
M.layer = BELOW_MOB_LAYER
|
||||
add_overlay(nest_overlay)
|
||||
|
||||
/obj/structure/bed/nest/post_unbuckle_mob(mob/living/M)
|
||||
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
|
||||
M.layer = initial(M.layer)
|
||||
cut_overlay(nest_overlay)
|
||||
|
||||
/obj/structure/bed/nest/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
return attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -1,176 +1,176 @@
|
||||
/* Beds... get your mind out of the gutter, they're for sleeping!
|
||||
* Contains:
|
||||
* Beds
|
||||
* Roller beds
|
||||
* Dog Beds
|
||||
*/
|
||||
|
||||
/*
|
||||
* Beds
|
||||
*/
|
||||
|
||||
/obj/structure/bed
|
||||
name = "bed"
|
||||
desc = "This is used to lie in, sleep in or strap on."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "bed"
|
||||
can_buckle = TRUE
|
||||
anchored = TRUE
|
||||
buckle_lying = TRUE
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 100
|
||||
integrity_failure = 30
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 2
|
||||
buckle_offset = -6
|
||||
var/comfort = 2 // default comfort
|
||||
|
||||
/obj/structure/bed/psych
|
||||
name = "psych bed"
|
||||
desc = "For prime comfort during psychiatric evaluations."
|
||||
icon_state = "psychbed"
|
||||
buildstackamount = 5
|
||||
|
||||
/obj/structure/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from Earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
comfort = 0.3
|
||||
|
||||
/obj/structure/bed/proc/handle_rotation()
|
||||
return
|
||||
|
||||
/obj/structure/bed/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(flags & NODECONSTRUCT)
|
||||
to_chat(user, "<span class='warning'>You can't figure out how to deconstruct [src]!</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/bed/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(buildstacktype)
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
..()
|
||||
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
*/
|
||||
|
||||
/obj/structure/bed/roller
|
||||
name = "roller bed"
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
resistance_flags = NONE
|
||||
anchored = FALSE
|
||||
comfort = 1
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/roller_holder))
|
||||
if(has_buckled_mobs())
|
||||
if(buckled_mobs.len > 1)
|
||||
unbuckle_all_mobs()
|
||||
user.visible_message("<span class='notice'>[user] unbuckles all creatures from [src].</span>")
|
||||
else
|
||||
user_unbuckle_mob(buckled_mobs[1], user)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
|
||||
density = TRUE
|
||||
icon_state = "up"
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
|
||||
/obj/structure/bed/roller/post_unbuckle_mob(mob/living/M)
|
||||
density = FALSE
|
||||
icon_state = "down"
|
||||
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
|
||||
|
||||
/obj/item/roller
|
||||
name = "roller bed"
|
||||
desc = "A collapsed roller bed that can be carried around."
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
w_class = WEIGHT_CLASS_BULKY // Can't be put in backpacks.
|
||||
|
||||
/obj/item/roller/attack_self(mob/user)
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/roller/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/roller_holder))
|
||||
var/obj/item/roller_holder/RH = W
|
||||
if(!RH.held)
|
||||
user.visible_message("<span class='notice'>[user] collects \the [name].</span>", "<span class='notice'>You collect \the [name].</span>")
|
||||
forceMove(RH)
|
||||
RH.held = src
|
||||
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
return 0
|
||||
usr.visible_message("<span class='notice'>[usr] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/roller_holder
|
||||
name = "roller bed rack"
|
||||
desc = "A rack for carrying a collapsed roller bed."
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
var/obj/item/roller/held
|
||||
|
||||
/obj/item/roller_holder/New()
|
||||
..()
|
||||
held = new /obj/item/roller(src)
|
||||
|
||||
/obj/item/roller_holder/attack_self(mob/user as mob)
|
||||
if(!held)
|
||||
to_chat(user, "<span class='info'> The rack is empty.</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You deploy the roller bed.</span>")
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
QDEL_NULL(held)
|
||||
|
||||
/*
|
||||
* Dog beds
|
||||
*/
|
||||
|
||||
/obj/structure/bed/dogbed
|
||||
name = "dog bed"
|
||||
icon_state = "dogbed"
|
||||
desc = "A comfy-looking dog bed. You can even strap your pet in, just in case the gravity turns off."
|
||||
anchored = FALSE
|
||||
buildstackamount = 10
|
||||
buildstacktype = /obj/item/stack/sheet/wood
|
||||
buckle_offset = 0
|
||||
comfort = 0.5
|
||||
|
||||
/obj/structure/bed/dogbed/ian
|
||||
name = "Ian's bed"
|
||||
desc = "Ian's bed! Looks comfy."
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/bed/dogbed/renault
|
||||
desc = "Renault's bed! Looks comfy. A foxy person needs a foxy pet."
|
||||
name = "Renault's bed"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/bed/dogbed/runtime
|
||||
desc = "A comfy-looking cat bed. You can even strap your pet in, in case the gravity turns off."
|
||||
name = "Runtime's bed"
|
||||
anchored = TRUE
|
||||
/* Beds... get your mind out of the gutter, they're for sleeping!
|
||||
* Contains:
|
||||
* Beds
|
||||
* Roller beds
|
||||
* Dog Beds
|
||||
*/
|
||||
|
||||
/*
|
||||
* Beds
|
||||
*/
|
||||
|
||||
/obj/structure/bed
|
||||
name = "bed"
|
||||
desc = "This is used to lie in, sleep in or strap on."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "bed"
|
||||
can_buckle = TRUE
|
||||
anchored = TRUE
|
||||
buckle_lying = TRUE
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 100
|
||||
integrity_failure = 30
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 2
|
||||
buckle_offset = -6
|
||||
var/comfort = 2 // default comfort
|
||||
|
||||
/obj/structure/bed/psych
|
||||
name = "psych bed"
|
||||
desc = "For prime comfort during psychiatric evaluations."
|
||||
icon_state = "psychbed"
|
||||
buildstackamount = 5
|
||||
|
||||
/obj/structure/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from Earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
comfort = 0.3
|
||||
|
||||
/obj/structure/bed/proc/handle_rotation()
|
||||
return
|
||||
|
||||
/obj/structure/bed/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(flags & NODECONSTRUCT)
|
||||
to_chat(user, "<span class='warning'>You can't figure out how to deconstruct [src]!</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/bed/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(buildstacktype)
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
..()
|
||||
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
*/
|
||||
|
||||
/obj/structure/bed/roller
|
||||
name = "roller bed"
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
resistance_flags = NONE
|
||||
anchored = FALSE
|
||||
comfort = 1
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/roller_holder))
|
||||
if(has_buckled_mobs())
|
||||
if(buckled_mobs.len > 1)
|
||||
unbuckle_all_mobs()
|
||||
user.visible_message("<span class='notice'>[user] unbuckles all creatures from [src].</span>")
|
||||
else
|
||||
user_unbuckle_mob(buckled_mobs[1], user)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
|
||||
density = TRUE
|
||||
icon_state = "up"
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
|
||||
/obj/structure/bed/roller/post_unbuckle_mob(mob/living/M)
|
||||
density = FALSE
|
||||
icon_state = "down"
|
||||
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
|
||||
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
|
||||
|
||||
/obj/item/roller
|
||||
name = "roller bed"
|
||||
desc = "A collapsed roller bed that can be carried around."
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
w_class = WEIGHT_CLASS_BULKY // Can't be put in backpacks.
|
||||
|
||||
/obj/item/roller/attack_self(mob/user)
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/roller/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/roller_holder))
|
||||
var/obj/item/roller_holder/RH = W
|
||||
if(!RH.held)
|
||||
user.visible_message("<span class='notice'>[user] collects \the [name].</span>", "<span class='notice'>You collect \the [name].</span>")
|
||||
forceMove(RH)
|
||||
RH.held = src
|
||||
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
return 0
|
||||
usr.visible_message("<span class='notice'>[usr] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/roller_holder
|
||||
name = "roller bed rack"
|
||||
desc = "A rack for carrying a collapsed roller bed."
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
var/obj/item/roller/held
|
||||
|
||||
/obj/item/roller_holder/New()
|
||||
..()
|
||||
held = new /obj/item/roller(src)
|
||||
|
||||
/obj/item/roller_holder/attack_self(mob/user as mob)
|
||||
if(!held)
|
||||
to_chat(user, "<span class='info'> The rack is empty.</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You deploy the roller bed.</span>")
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
QDEL_NULL(held)
|
||||
|
||||
/*
|
||||
* Dog beds
|
||||
*/
|
||||
|
||||
/obj/structure/bed/dogbed
|
||||
name = "dog bed"
|
||||
icon_state = "dogbed"
|
||||
desc = "A comfy-looking dog bed. You can even strap your pet in, just in case the gravity turns off."
|
||||
anchored = FALSE
|
||||
buildstackamount = 10
|
||||
buildstacktype = /obj/item/stack/sheet/wood
|
||||
buckle_offset = 0
|
||||
comfort = 0.5
|
||||
|
||||
/obj/structure/bed/dogbed/ian
|
||||
name = "Ian's bed"
|
||||
desc = "Ian's bed! Looks comfy."
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/bed/dogbed/renault
|
||||
desc = "Renault's bed! Looks comfy. A foxy person needs a foxy pet."
|
||||
name = "Renault's bed"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/bed/dogbed/runtime
|
||||
desc = "A comfy-looking cat bed. You can even strap your pet in, in case the gravity turns off."
|
||||
name = "Runtime's bed"
|
||||
anchored = TRUE
|
||||
|
||||
@@ -1,465 +1,465 @@
|
||||
/obj/structure/chair // fuck you Pete
|
||||
name = "chair"
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon = 'icons/obj/chairs.dmi'
|
||||
icon_state = "chair"
|
||||
layer = OBJ_LAYER
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE // you sit in a chair, not lay
|
||||
anchored = TRUE
|
||||
resistance_flags = NONE
|
||||
max_integrity = 250
|
||||
integrity_failure = 25
|
||||
buckle_offset = 0
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 1
|
||||
var/item_chair = /obj/item/chair // if null it can't be picked up
|
||||
var/movable = FALSE // For mobility checks
|
||||
var/propelled = FALSE // Check for fire-extinguisher-driven chairs
|
||||
var/comfort = 0
|
||||
|
||||
/obj/structure/chair/New()
|
||||
..()
|
||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||
handle_rotation()
|
||||
return
|
||||
|
||||
/obj/structure/chair/narsie_act()
|
||||
if(prob(20))
|
||||
var/obj/structure/chair/wood/W = new/obj/structure/chair/wood(get_turf(src))
|
||||
W.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/ratvar_act()
|
||||
var/obj/structure/chair/brass/B = new(get_turf(src))
|
||||
B.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/Move(atom/newloc, direct)
|
||||
..()
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
if(!SK.status)
|
||||
to_chat(user, "<span class='notice'>[SK] is not ready to be attached!</span>")
|
||||
return
|
||||
user.drop_item()
|
||||
var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(src.loc)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
E.dir = dir
|
||||
E.part = SK
|
||||
SK.loc = E
|
||||
SK.master = E
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(flags & NODECONSTRUCT)
|
||||
to_chat(user, "<span class='warning'>Try as you might, you can't figure out how to deconstruct [src].</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/chair/deconstruct()
|
||||
// If we have materials, and don't have the NOCONSTRUCT flag
|
||||
if(buildstacktype && (!(flags & NODECONSTRUCT)))
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
..()
|
||||
|
||||
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || has_buckled_mobs())
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!usr.has_right_hand() && !usr.has_left_hand())
|
||||
to_chat(usr, "<span class='warning'>You try to grab the chair, but you are missing both of your hands!</span>")
|
||||
return
|
||||
if(usr.get_active_hand() && usr.get_inactive_hand())
|
||||
to_chat(usr, "<span class='warning'>You try to grab the chair, but your hands are already full!</span>")
|
||||
return
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] grabs \the [src.name].</span>", "<span class='notice'>You grab \the [src.name].</span>")
|
||||
var/C = new item_chair(loc)
|
||||
usr.put_in_hands(C)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/attack_tk(mob/user as mob)
|
||||
if(!anchored || has_buckled_mobs() || !isturf(user.loc))
|
||||
..()
|
||||
else
|
||||
rotate()
|
||||
|
||||
/obj/structure/chair/proc/handle_rotation(direction)
|
||||
handle_layer()
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.setDir(direction)
|
||||
|
||||
/obj/structure/chair/proc/handle_layer()
|
||||
if(has_buckled_mobs() && dir == NORTH)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/structure/chair/post_buckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
handle_layer()
|
||||
|
||||
/obj/structure/chair/post_unbuckle_mob()
|
||||
. = ..()
|
||||
handle_layer()
|
||||
|
||||
/obj/structure/chair/setDir(newdir)
|
||||
..()
|
||||
handle_rotation(newdir)
|
||||
|
||||
/obj/structure/chair/verb/rotate()
|
||||
set name = "Rotate Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(config.ghost_interaction)
|
||||
setDir(turn(dir, 90))
|
||||
handle_rotation()
|
||||
return
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
setDir(turn(dir, 90))
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/chair/AltClick(mob/user)
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
rotate()
|
||||
|
||||
// Chair types
|
||||
/obj/structure/chair/wood
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
icon_state = "wooden_chair"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
buildstackamount = 3
|
||||
buildstacktype = /obj/item/stack/sheet/wood
|
||||
item_chair = /obj/item/chair/wood
|
||||
|
||||
/obj/structure/chair/wood/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
item_chair = /obj/item/chair/wood/wings
|
||||
|
||||
/obj/structure/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255, 255, 255)
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
buildstackamount = 2
|
||||
item_chair = null
|
||||
var/image/armrest = null
|
||||
|
||||
/obj/structure/chair/comfy/Initialize(mapload)
|
||||
armrest = GetArmrest()
|
||||
armrest.layer = ABOVE_MOB_LAYER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/comfy/proc/GetArmrest()
|
||||
return mutable_appearance('icons/obj/chairs.dmi', "comfychair_armrest")
|
||||
|
||||
/obj/structure/chair/comfy/Destroy()
|
||||
QDEL_NULL(armrest)
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/comfy/post_buckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
update_armrest()
|
||||
|
||||
/obj/structure/chair/comfy/post_unbuckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
update_armrest()
|
||||
|
||||
/obj/structure/chair/comfy/proc/update_armrest()
|
||||
if(has_buckled_mobs())
|
||||
add_overlay(armrest)
|
||||
else
|
||||
cut_overlay(armrest)
|
||||
|
||||
/obj/structure/chair/comfy/brown
|
||||
color = rgb(141,70,0)
|
||||
|
||||
/obj/structure/chair/comfy/red
|
||||
color = rgb(218,2,10)
|
||||
|
||||
/obj/structure/chair/comfy/teal
|
||||
color = rgb(0,234,250)
|
||||
|
||||
/obj/structure/chair/comfy/black
|
||||
color = rgb(60,60,60)
|
||||
|
||||
/obj/structure/chair/comfy/green
|
||||
color = rgb(1,196,8)
|
||||
|
||||
/obj/structure/chair/comfy/purp
|
||||
color = rgb(112,2,176)
|
||||
|
||||
/obj/structure/chair/comfy/blue
|
||||
color = rgb(2,9,210)
|
||||
|
||||
/obj/structure/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/chair/office
|
||||
anchored = FALSE
|
||||
movable = TRUE
|
||||
item_chair = null
|
||||
buildstackamount = 5
|
||||
|
||||
/obj/structure/chair/comfy/shuttle
|
||||
name = "shuttle seat"
|
||||
desc = "A comfortable, secure seat. It has a more sturdy looking buckling system, for smoother flights."
|
||||
icon_state = "shuttle_chair"
|
||||
|
||||
/obj/structure/chair/comfy/shuttle/GetArmrest()
|
||||
return mutable_appearance('icons/obj/chairs.dmi', "shuttle_chair_armrest")
|
||||
|
||||
/obj/structure/chair/office/Bump(atom/A)
|
||||
..()
|
||||
if(!has_buckled_mobs())
|
||||
return
|
||||
|
||||
if(propelled)
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
unbuckle_mob(buckled_mob)
|
||||
buckled_mob.throw_at(A, 3, propelled)
|
||||
buckled_mob.apply_effect(6, STUN, 0)
|
||||
buckled_mob.apply_effect(6, WEAKEN, 0)
|
||||
buckled_mob.apply_effect(6, STUTTER, 0)
|
||||
buckled_mob.take_organ_damage(10)
|
||||
playsound(loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
buckled_mob.visible_message("<span class='danger'>[buckled_mob] crashed into [A]!</span>")
|
||||
|
||||
/obj/structure/chair/office/light
|
||||
icon_state = "officechair_white"
|
||||
|
||||
/obj/structure/chair/office/dark
|
||||
icon_state = "officechair_dark"
|
||||
|
||||
/obj/structure/chair/barber
|
||||
icon_state = "barber_chair"
|
||||
buildstackamount = 1
|
||||
item_chair = null
|
||||
|
||||
// Sofas
|
||||
|
||||
/obj/structure/chair/sofa
|
||||
name = "sofa"
|
||||
icon_state = "sofamiddle"
|
||||
anchored = TRUE
|
||||
item_chair = null
|
||||
buildstackamount = 1
|
||||
|
||||
/obj/structure/chair/sofa/left
|
||||
icon_state = "sofaend_left"
|
||||
|
||||
/obj/structure/chair/sofa/right
|
||||
icon_state = "sofaend_right"
|
||||
|
||||
/obj/structure/chair/sofa/corner
|
||||
icon_state = "sofacorner"
|
||||
|
||||
/obj/structure/chair/stool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
icon_state = "stool"
|
||||
can_buckle = FALSE
|
||||
item_chair = /obj/item/chair/stool
|
||||
|
||||
/obj/structure/chair/stool/bar
|
||||
name = "bar stool"
|
||||
desc = "It has some unsavory stains on it..."
|
||||
icon_state = "bar"
|
||||
item_chair = /obj/item/chair/stool/bar
|
||||
|
||||
/obj/item/chair
|
||||
name = "chair"
|
||||
desc = "Bar brawl essential."
|
||||
icon = 'icons/obj/chairs.dmi'
|
||||
icon_state = "chair_toppled"
|
||||
item_state = "chair"
|
||||
lefthand_file = 'icons/mob/inhands/chairs_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/chairs_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 8
|
||||
throwforce = 10
|
||||
throw_range = 3
|
||||
hitsound = 'sound/items/trayhit1.ogg'
|
||||
hit_reaction_chance = 50
|
||||
materials = list(MAT_METAL = 2000)
|
||||
var/break_chance = 5 //Likely hood of smashing the chair.
|
||||
var/obj/structure/chair/origin_type = /obj/structure/chair
|
||||
|
||||
/obj/item/chair/stool
|
||||
name = "stool"
|
||||
icon = 'icons/obj/chairs.dmi'
|
||||
icon_state = "stool_toppled"
|
||||
item_state = "stool"
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
origin_type = /obj/structure/chair/stool
|
||||
break_chance = 0 //It's too sturdy.
|
||||
|
||||
/obj/item/chair/stool/bar
|
||||
name = "bar stool"
|
||||
icon_state = "bar_toppled"
|
||||
item_state = "stool_bar"
|
||||
origin_type = /obj/structure/chair/stool/bar
|
||||
|
||||
/obj/item/chair/attack_self(mob/user)
|
||||
plant(user)
|
||||
|
||||
/obj/item/chair/proc/plant(mob/user)
|
||||
for(var/obj/A in get_turf(loc))
|
||||
if(istype(A, /obj/structure/chair))
|
||||
to_chat(user, "<span class='danger'>There is already a chair here.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] rights \the [src.name].</span>", "<span class='notice'>You right \the [name].</span>")
|
||||
var/obj/structure/chair/C = new origin_type(get_turf(loc))
|
||||
C.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/chair/proc/smash(mob/living/user)
|
||||
var/stack_type = initial(origin_type.buildstacktype)
|
||||
if(!stack_type)
|
||||
return
|
||||
var/remaining_mats = initial(origin_type.buildstackamount)
|
||||
remaining_mats-- //Part of the chair was rendered completely unusable. It magically dissapears. Maybe make some dirt?
|
||||
if(remaining_mats)
|
||||
for(var/M=1 to remaining_mats)
|
||||
new stack_type(get_turf(loc))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == UNARMED_ATTACK && prob(hit_reaction_chance))
|
||||
owner.visible_message("<span class='danger'>[owner] fends off [attack_text] with [src]!</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/chair/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(prob(break_chance))
|
||||
user.visible_message("<span class='danger'>[user] smashes \the [src] to pieces against \the [target]</span>")
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.health < C.maxHealth*0.5)
|
||||
C.apply_effect(6, STUN, 0)
|
||||
C.apply_effect(6, WEAKEN, 0)
|
||||
C.apply_effect(6, STUTTER, 0)
|
||||
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
smash(user)
|
||||
|
||||
/obj/item/chair/stool/attack_self(mob/user as mob)
|
||||
..()
|
||||
new origin_type(get_turf(loc))
|
||||
user.unEquip(src)
|
||||
user.visible_message("<span class='notice'>[user] puts [src] down.</span>", "<span class='notice'>You put [src] down.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/chair/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if(prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!.</span>")
|
||||
user.unEquip(src)
|
||||
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
|
||||
m.loc = get_turf(src)
|
||||
qdel(src)
|
||||
var/mob/living/T = M
|
||||
T.Weaken(5)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/chair/wood
|
||||
name = "wooden chair"
|
||||
icon_state = "wooden_chair_toppled"
|
||||
item_state = "woodenchair"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
origin_type = /obj/structure/chair/wood
|
||||
materials = null
|
||||
break_chance = 50
|
||||
|
||||
/obj/item/chair/wood/narsie_act()
|
||||
return
|
||||
|
||||
/obj/item/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings_toppled"
|
||||
origin_type = /obj/structure/chair/wood/wings
|
||||
|
||||
/obj/structure/chair/old
|
||||
name = "strange chair"
|
||||
desc = "You sit in this. Either by will or force. Looks REALLY uncomfortable."
|
||||
icon_state = "chairold"
|
||||
item_chair = null
|
||||
|
||||
// Brass chair
|
||||
/obj/structure/chair/brass
|
||||
name = "brass chair"
|
||||
desc = "A spinny chair made of brass. It looks uncomfortable."
|
||||
icon_state = "brass_chair"
|
||||
max_integrity = 150
|
||||
buildstacktype = /obj/item/stack/tile/brass
|
||||
buildstackamount = 1
|
||||
item_chair = null
|
||||
var/turns = 0
|
||||
|
||||
/obj/structure/chair/brass/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/chair/brass/process()
|
||||
setDir(turn(dir,-90))
|
||||
playsound(src, 'sound/effects/servostep.ogg', 50, FALSE)
|
||||
turns++
|
||||
if(turns >= 8)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/structure/chair/brass/ratvar_act()
|
||||
return
|
||||
|
||||
/obj/structure/chair/brass/AltClick(mob/living/user)
|
||||
turns = 0
|
||||
if(!istype(user) || user.incapacitated() || !in_range(src, user))
|
||||
return
|
||||
if(!isprocessing)
|
||||
user.visible_message("<span class='notice'>[user] spins [src] around, and Ratvarian technology keeps it spinning FOREVER.</span>", \
|
||||
"<span class='notice'>Automated spinny chairs. The pinnacle of Ratvarian technology.</span>")
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] stops [src]'s uncontrollable spinning.</span>", \
|
||||
"<span class='notice'>You grab [src] and stop its wild spinning.</span>")
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
/obj/structure/chair // fuck you Pete
|
||||
name = "chair"
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon = 'icons/obj/chairs.dmi'
|
||||
icon_state = "chair"
|
||||
layer = OBJ_LAYER
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE // you sit in a chair, not lay
|
||||
anchored = TRUE
|
||||
resistance_flags = NONE
|
||||
max_integrity = 250
|
||||
integrity_failure = 25
|
||||
buckle_offset = 0
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 1
|
||||
var/item_chair = /obj/item/chair // if null it can't be picked up
|
||||
var/movable = FALSE // For mobility checks
|
||||
var/propelled = FALSE // Check for fire-extinguisher-driven chairs
|
||||
var/comfort = 0
|
||||
|
||||
/obj/structure/chair/New()
|
||||
..()
|
||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||
handle_rotation()
|
||||
return
|
||||
|
||||
/obj/structure/chair/narsie_act()
|
||||
if(prob(20))
|
||||
var/obj/structure/chair/wood/W = new/obj/structure/chair/wood(get_turf(src))
|
||||
W.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/ratvar_act()
|
||||
var/obj/structure/chair/brass/B = new(get_turf(src))
|
||||
B.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/Move(atom/newloc, direct)
|
||||
..()
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
if(!SK.status)
|
||||
to_chat(user, "<span class='notice'>[SK] is not ready to be attached!</span>")
|
||||
return
|
||||
user.drop_item()
|
||||
var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(src.loc)
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
E.dir = dir
|
||||
E.part = SK
|
||||
SK.loc = E
|
||||
SK.master = E
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(flags & NODECONSTRUCT)
|
||||
to_chat(user, "<span class='warning'>Try as you might, you can't figure out how to deconstruct [src].</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/chair/deconstruct()
|
||||
// If we have materials, and don't have the NOCONSTRUCT flag
|
||||
if(buildstacktype && (!(flags & NODECONSTRUCT)))
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
..()
|
||||
|
||||
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || has_buckled_mobs())
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!usr.has_right_hand() && !usr.has_left_hand())
|
||||
to_chat(usr, "<span class='warning'>You try to grab the chair, but you are missing both of your hands!</span>")
|
||||
return
|
||||
if(usr.get_active_hand() && usr.get_inactive_hand())
|
||||
to_chat(usr, "<span class='warning'>You try to grab the chair, but your hands are already full!</span>")
|
||||
return
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] grabs \the [src.name].</span>", "<span class='notice'>You grab \the [src.name].</span>")
|
||||
var/C = new item_chair(loc)
|
||||
usr.put_in_hands(C)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/attack_tk(mob/user as mob)
|
||||
if(!anchored || has_buckled_mobs() || !isturf(user.loc))
|
||||
..()
|
||||
else
|
||||
rotate()
|
||||
|
||||
/obj/structure/chair/proc/handle_rotation(direction)
|
||||
handle_layer()
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.setDir(direction)
|
||||
|
||||
/obj/structure/chair/proc/handle_layer()
|
||||
if(has_buckled_mobs() && dir == NORTH)
|
||||
layer = ABOVE_MOB_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/structure/chair/post_buckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
handle_layer()
|
||||
|
||||
/obj/structure/chair/post_unbuckle_mob()
|
||||
. = ..()
|
||||
handle_layer()
|
||||
|
||||
/obj/structure/chair/setDir(newdir)
|
||||
..()
|
||||
handle_rotation(newdir)
|
||||
|
||||
/obj/structure/chair/verb/rotate()
|
||||
set name = "Rotate Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(config.ghost_interaction)
|
||||
setDir(turn(dir, 90))
|
||||
handle_rotation()
|
||||
return
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
setDir(turn(dir, 90))
|
||||
handle_rotation()
|
||||
|
||||
/obj/structure/chair/AltClick(mob/user)
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
rotate()
|
||||
|
||||
// Chair types
|
||||
/obj/structure/chair/wood
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
icon_state = "wooden_chair"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
buildstackamount = 3
|
||||
buildstacktype = /obj/item/stack/sheet/wood
|
||||
item_chair = /obj/item/chair/wood
|
||||
|
||||
/obj/structure/chair/wood/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
item_chair = /obj/item/chair/wood/wings
|
||||
|
||||
/obj/structure/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255, 255, 255)
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
buildstackamount = 2
|
||||
item_chair = null
|
||||
var/image/armrest = null
|
||||
|
||||
/obj/structure/chair/comfy/Initialize(mapload)
|
||||
armrest = GetArmrest()
|
||||
armrest.layer = ABOVE_MOB_LAYER
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/comfy/proc/GetArmrest()
|
||||
return mutable_appearance('icons/obj/chairs.dmi', "comfychair_armrest")
|
||||
|
||||
/obj/structure/chair/comfy/Destroy()
|
||||
QDEL_NULL(armrest)
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/comfy/post_buckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
update_armrest()
|
||||
|
||||
/obj/structure/chair/comfy/post_unbuckle_mob(mob/living/M)
|
||||
. = ..()
|
||||
update_armrest()
|
||||
|
||||
/obj/structure/chair/comfy/proc/update_armrest()
|
||||
if(has_buckled_mobs())
|
||||
add_overlay(armrest)
|
||||
else
|
||||
cut_overlay(armrest)
|
||||
|
||||
/obj/structure/chair/comfy/brown
|
||||
color = rgb(141,70,0)
|
||||
|
||||
/obj/structure/chair/comfy/red
|
||||
color = rgb(218,2,10)
|
||||
|
||||
/obj/structure/chair/comfy/teal
|
||||
color = rgb(0,234,250)
|
||||
|
||||
/obj/structure/chair/comfy/black
|
||||
color = rgb(60,60,60)
|
||||
|
||||
/obj/structure/chair/comfy/green
|
||||
color = rgb(1,196,8)
|
||||
|
||||
/obj/structure/chair/comfy/purp
|
||||
color = rgb(112,2,176)
|
||||
|
||||
/obj/structure/chair/comfy/blue
|
||||
color = rgb(2,9,210)
|
||||
|
||||
/obj/structure/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/chair/office
|
||||
anchored = FALSE
|
||||
movable = TRUE
|
||||
item_chair = null
|
||||
buildstackamount = 5
|
||||
|
||||
/obj/structure/chair/comfy/shuttle
|
||||
name = "shuttle seat"
|
||||
desc = "A comfortable, secure seat. It has a more sturdy looking buckling system, for smoother flights."
|
||||
icon_state = "shuttle_chair"
|
||||
|
||||
/obj/structure/chair/comfy/shuttle/GetArmrest()
|
||||
return mutable_appearance('icons/obj/chairs.dmi', "shuttle_chair_armrest")
|
||||
|
||||
/obj/structure/chair/office/Bump(atom/A)
|
||||
..()
|
||||
if(!has_buckled_mobs())
|
||||
return
|
||||
|
||||
if(propelled)
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
unbuckle_mob(buckled_mob)
|
||||
buckled_mob.throw_at(A, 3, propelled)
|
||||
buckled_mob.apply_effect(6, STUN, 0)
|
||||
buckled_mob.apply_effect(6, WEAKEN, 0)
|
||||
buckled_mob.apply_effect(6, STUTTER, 0)
|
||||
buckled_mob.take_organ_damage(10)
|
||||
playsound(loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
buckled_mob.visible_message("<span class='danger'>[buckled_mob] crashed into [A]!</span>")
|
||||
|
||||
/obj/structure/chair/office/light
|
||||
icon_state = "officechair_white"
|
||||
|
||||
/obj/structure/chair/office/dark
|
||||
icon_state = "officechair_dark"
|
||||
|
||||
/obj/structure/chair/barber
|
||||
icon_state = "barber_chair"
|
||||
buildstackamount = 1
|
||||
item_chair = null
|
||||
|
||||
// Sofas
|
||||
|
||||
/obj/structure/chair/sofa
|
||||
name = "sofa"
|
||||
icon_state = "sofamiddle"
|
||||
anchored = TRUE
|
||||
item_chair = null
|
||||
buildstackamount = 1
|
||||
|
||||
/obj/structure/chair/sofa/left
|
||||
icon_state = "sofaend_left"
|
||||
|
||||
/obj/structure/chair/sofa/right
|
||||
icon_state = "sofaend_right"
|
||||
|
||||
/obj/structure/chair/sofa/corner
|
||||
icon_state = "sofacorner"
|
||||
|
||||
/obj/structure/chair/stool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
icon_state = "stool"
|
||||
can_buckle = FALSE
|
||||
item_chair = /obj/item/chair/stool
|
||||
|
||||
/obj/structure/chair/stool/bar
|
||||
name = "bar stool"
|
||||
desc = "It has some unsavory stains on it..."
|
||||
icon_state = "bar"
|
||||
item_chair = /obj/item/chair/stool/bar
|
||||
|
||||
/obj/item/chair
|
||||
name = "chair"
|
||||
desc = "Bar brawl essential."
|
||||
icon = 'icons/obj/chairs.dmi'
|
||||
icon_state = "chair_toppled"
|
||||
item_state = "chair"
|
||||
lefthand_file = 'icons/mob/inhands/chairs_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/chairs_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 8
|
||||
throwforce = 10
|
||||
throw_range = 3
|
||||
hitsound = 'sound/items/trayhit1.ogg'
|
||||
hit_reaction_chance = 50
|
||||
materials = list(MAT_METAL = 2000)
|
||||
var/break_chance = 5 //Likely hood of smashing the chair.
|
||||
var/obj/structure/chair/origin_type = /obj/structure/chair
|
||||
|
||||
/obj/item/chair/stool
|
||||
name = "stool"
|
||||
icon = 'icons/obj/chairs.dmi'
|
||||
icon_state = "stool_toppled"
|
||||
item_state = "stool"
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
origin_type = /obj/structure/chair/stool
|
||||
break_chance = 0 //It's too sturdy.
|
||||
|
||||
/obj/item/chair/stool/bar
|
||||
name = "bar stool"
|
||||
icon_state = "bar_toppled"
|
||||
item_state = "stool_bar"
|
||||
origin_type = /obj/structure/chair/stool/bar
|
||||
|
||||
/obj/item/chair/attack_self(mob/user)
|
||||
plant(user)
|
||||
|
||||
/obj/item/chair/proc/plant(mob/user)
|
||||
for(var/obj/A in get_turf(loc))
|
||||
if(istype(A, /obj/structure/chair))
|
||||
to_chat(user, "<span class='danger'>There is already a chair here.</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] rights \the [src.name].</span>", "<span class='notice'>You right \the [name].</span>")
|
||||
var/obj/structure/chair/C = new origin_type(get_turf(loc))
|
||||
C.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/chair/proc/smash(mob/living/user)
|
||||
var/stack_type = initial(origin_type.buildstacktype)
|
||||
if(!stack_type)
|
||||
return
|
||||
var/remaining_mats = initial(origin_type.buildstackamount)
|
||||
remaining_mats-- //Part of the chair was rendered completely unusable. It magically dissapears. Maybe make some dirt?
|
||||
if(remaining_mats)
|
||||
for(var/M=1 to remaining_mats)
|
||||
new stack_type(get_turf(loc))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == UNARMED_ATTACK && prob(hit_reaction_chance))
|
||||
owner.visible_message("<span class='danger'>[owner] fends off [attack_text] with [src]!</span>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/chair/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(prob(break_chance))
|
||||
user.visible_message("<span class='danger'>[user] smashes \the [src] to pieces against \the [target]</span>")
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.health < C.maxHealth*0.5)
|
||||
C.apply_effect(6, STUN, 0)
|
||||
C.apply_effect(6, WEAKEN, 0)
|
||||
C.apply_effect(6, STUTTER, 0)
|
||||
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
smash(user)
|
||||
|
||||
/obj/item/chair/stool/attack_self(mob/user as mob)
|
||||
..()
|
||||
new origin_type(get_turf(loc))
|
||||
user.unEquip(src)
|
||||
user.visible_message("<span class='notice'>[user] puts [src] down.</span>", "<span class='notice'>You put [src] down.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/chair/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if(prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!.</span>")
|
||||
user.unEquip(src)
|
||||
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
|
||||
m.loc = get_turf(src)
|
||||
qdel(src)
|
||||
var/mob/living/T = M
|
||||
T.Weaken(5)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/chair/wood
|
||||
name = "wooden chair"
|
||||
icon_state = "wooden_chair_toppled"
|
||||
item_state = "woodenchair"
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
origin_type = /obj/structure/chair/wood
|
||||
materials = null
|
||||
break_chance = 50
|
||||
|
||||
/obj/item/chair/wood/narsie_act()
|
||||
return
|
||||
|
||||
/obj/item/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings_toppled"
|
||||
origin_type = /obj/structure/chair/wood/wings
|
||||
|
||||
/obj/structure/chair/old
|
||||
name = "strange chair"
|
||||
desc = "You sit in this. Either by will or force. Looks REALLY uncomfortable."
|
||||
icon_state = "chairold"
|
||||
item_chair = null
|
||||
|
||||
// Brass chair
|
||||
/obj/structure/chair/brass
|
||||
name = "brass chair"
|
||||
desc = "A spinny chair made of brass. It looks uncomfortable."
|
||||
icon_state = "brass_chair"
|
||||
max_integrity = 150
|
||||
buildstacktype = /obj/item/stack/tile/brass
|
||||
buildstackamount = 1
|
||||
item_chair = null
|
||||
var/turns = 0
|
||||
|
||||
/obj/structure/chair/brass/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/chair/brass/process()
|
||||
setDir(turn(dir,-90))
|
||||
playsound(src, 'sound/effects/servostep.ogg', 50, FALSE)
|
||||
turns++
|
||||
if(turns >= 8)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/structure/chair/brass/ratvar_act()
|
||||
return
|
||||
|
||||
/obj/structure/chair/brass/AltClick(mob/living/user)
|
||||
turns = 0
|
||||
if(!istype(user) || user.incapacitated() || !in_range(src, user))
|
||||
return
|
||||
if(!isprocessing)
|
||||
user.visible_message("<span class='notice'>[user] spins [src] around, and Ratvarian technology keeps it spinning FOREVER.</span>", \
|
||||
"<span class='notice'>Automated spinny chairs. The pinnacle of Ratvarian technology.</span>")
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] stops [src]'s uncontrollable spinning.</span>", \
|
||||
"<span class='notice'>You grab [src] and stop its wild spinning.</span>")
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
@@ -155,4 +155,4 @@
|
||||
. = 0
|
||||
|
||||
else
|
||||
. = 1
|
||||
. = 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,132 +1,132 @@
|
||||
/obj/structure/dispenser
|
||||
name = "tank storage unit"
|
||||
desc = "A simple yet bulky storage device for gas tanks. Has room for up to ten oxygen tanks, and ten plasma tanks."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "dispenser"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/oxygentanks = 10
|
||||
var/plasmatanks = 10
|
||||
var/list/oxytanks = list() //sorry for the similar var names
|
||||
var/list/platanks = list()
|
||||
|
||||
/obj/structure/dispenser/oxygen
|
||||
plasmatanks = 0
|
||||
|
||||
/obj/structure/dispenser/plasma
|
||||
oxygentanks = 0
|
||||
|
||||
/obj/structure/dispenser/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/dispenser/update_icon()
|
||||
overlays.Cut()
|
||||
switch(oxygentanks)
|
||||
if(1 to 3) overlays += "oxygen-[oxygentanks]"
|
||||
if(4 to INFINITY) overlays += "oxygen-4"
|
||||
switch(plasmatanks)
|
||||
if(1 to 4) overlays += "plasma-[plasmatanks]"
|
||||
if(5 to INFINITY) overlays += "plasma-5"
|
||||
|
||||
/obj/structure/dispenser/attack_hand(mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/dispenser/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "tank_dispenser.tmpl", name, 275, 100, state = state)
|
||||
ui.open()
|
||||
|
||||
/obj/structure/dispenser/ui_data(user)
|
||||
var/list/data = list()
|
||||
data["o_tanks"] = oxygentanks
|
||||
data["p_tanks"] = plasmatanks
|
||||
return data
|
||||
|
||||
/obj/structure/dispenser/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/tank/oxygen) || istype(I, /obj/item/tank/air) || istype(I, /obj/item/tank/anesthetic))
|
||||
if(oxygentanks < 10)
|
||||
user.drop_item()
|
||||
I.forceMove(src)
|
||||
oxytanks.Add(I)
|
||||
oxygentanks++
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
if(istype(I, /obj/item/tank/plasma))
|
||||
if(plasmatanks < 10)
|
||||
user.drop_item()
|
||||
I.forceMove(src)
|
||||
platanks.Add(I)
|
||||
plasmatanks++
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
|
||||
anchored = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
|
||||
anchored = 1
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/dispenser/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(Adjacent(usr))
|
||||
usr.set_machine(src)
|
||||
if(href_list["oxygen"])
|
||||
if(oxygentanks > 0)
|
||||
var/obj/item/tank/oxygen/O
|
||||
if(oxytanks.len == oxygentanks)
|
||||
O = oxytanks[1]
|
||||
oxytanks.Remove(O)
|
||||
else
|
||||
O = new /obj/item/tank/oxygen(loc)
|
||||
O.loc = loc
|
||||
to_chat(usr, "<span class='notice'>You take [O] out of [src].</span>")
|
||||
oxygentanks--
|
||||
update_icon()
|
||||
if(href_list["plasma"])
|
||||
if(plasmatanks > 0)
|
||||
var/obj/item/tank/plasma/P
|
||||
if(platanks.len == plasmatanks)
|
||||
P = platanks[1]
|
||||
platanks.Remove(P)
|
||||
else
|
||||
P = new /obj/item/tank/plasma(loc)
|
||||
P.loc = loc
|
||||
to_chat(usr, "<span class='notice'>You take [P] out of [src].</span>")
|
||||
plasmatanks--
|
||||
update_icon()
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
SSnanoui.update_uis(src)
|
||||
else
|
||||
SSnanoui.close_user_uis(usr,src)
|
||||
return 1
|
||||
|
||||
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
for(var/X in src)
|
||||
var/obj/item/I = X
|
||||
I.forceMove(loc)
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
qdel(src)
|
||||
/obj/structure/dispenser
|
||||
name = "tank storage unit"
|
||||
desc = "A simple yet bulky storage device for gas tanks. Has room for up to ten oxygen tanks, and ten plasma tanks."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "dispenser"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/oxygentanks = 10
|
||||
var/plasmatanks = 10
|
||||
var/list/oxytanks = list() //sorry for the similar var names
|
||||
var/list/platanks = list()
|
||||
|
||||
/obj/structure/dispenser/oxygen
|
||||
plasmatanks = 0
|
||||
|
||||
/obj/structure/dispenser/plasma
|
||||
oxygentanks = 0
|
||||
|
||||
/obj/structure/dispenser/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/dispenser/update_icon()
|
||||
overlays.Cut()
|
||||
switch(oxygentanks)
|
||||
if(1 to 3) overlays += "oxygen-[oxygentanks]"
|
||||
if(4 to INFINITY) overlays += "oxygen-4"
|
||||
switch(plasmatanks)
|
||||
if(1 to 4) overlays += "plasma-[plasmatanks]"
|
||||
if(5 to INFINITY) overlays += "plasma-5"
|
||||
|
||||
/obj/structure/dispenser/attack_hand(mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/dispenser/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "tank_dispenser.tmpl", name, 275, 100, state = state)
|
||||
ui.open()
|
||||
|
||||
/obj/structure/dispenser/ui_data(user)
|
||||
var/list/data = list()
|
||||
data["o_tanks"] = oxygentanks
|
||||
data["p_tanks"] = plasmatanks
|
||||
return data
|
||||
|
||||
/obj/structure/dispenser/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/tank/oxygen) || istype(I, /obj/item/tank/air) || istype(I, /obj/item/tank/anesthetic))
|
||||
if(oxygentanks < 10)
|
||||
user.drop_item()
|
||||
I.forceMove(src)
|
||||
oxytanks.Add(I)
|
||||
oxygentanks++
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
if(istype(I, /obj/item/tank/plasma))
|
||||
if(plasmatanks < 10)
|
||||
user.drop_item()
|
||||
I.forceMove(src)
|
||||
platanks.Add(I)
|
||||
plasmatanks++
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
|
||||
anchored = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
|
||||
anchored = 1
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/dispenser/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(Adjacent(usr))
|
||||
usr.set_machine(src)
|
||||
if(href_list["oxygen"])
|
||||
if(oxygentanks > 0)
|
||||
var/obj/item/tank/oxygen/O
|
||||
if(oxytanks.len == oxygentanks)
|
||||
O = oxytanks[1]
|
||||
oxytanks.Remove(O)
|
||||
else
|
||||
O = new /obj/item/tank/oxygen(loc)
|
||||
O.loc = loc
|
||||
to_chat(usr, "<span class='notice'>You take [O] out of [src].</span>")
|
||||
oxygentanks--
|
||||
update_icon()
|
||||
if(href_list["plasma"])
|
||||
if(plasmatanks > 0)
|
||||
var/obj/item/tank/plasma/P
|
||||
if(platanks.len == plasmatanks)
|
||||
P = platanks[1]
|
||||
platanks.Remove(P)
|
||||
else
|
||||
P = new /obj/item/tank/plasma(loc)
|
||||
P.loc = loc
|
||||
to_chat(usr, "<span class='notice'>You take [P] out of [src].</span>")
|
||||
plasmatanks--
|
||||
update_icon()
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
SSnanoui.update_uis(src)
|
||||
else
|
||||
SSnanoui.close_user_uis(usr,src)
|
||||
return 1
|
||||
|
||||
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
for(var/X in src)
|
||||
var/obj/item/I = X
|
||||
I.forceMove(loc)
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
qdel(src)
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
// Basically they are for the firing range
|
||||
/obj/structure/target_stake
|
||||
name = "target stake"
|
||||
desc = "A thin platform with negatively-magnetized wheels."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_stake"
|
||||
density = 1
|
||||
flags = CONDUCT
|
||||
var/obj/item/target/pinned_target // the current pinned target
|
||||
|
||||
/obj/structure/target_stake/Destroy()
|
||||
QDEL_NULL(pinned_target)
|
||||
return ..()
|
||||
|
||||
/obj/structure/target_stake/Move()
|
||||
. = ..()
|
||||
// Move the pinned target along with the stake
|
||||
if(pinned_target in view(3, src))
|
||||
pinned_target.loc = loc
|
||||
|
||||
else // Sanity check: if the pinned target can't be found in immediate view
|
||||
pinned_target = null
|
||||
density = 1
|
||||
|
||||
/obj/structure/target_stake/attackby(obj/item/W, mob/user, params)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(istype(W, /obj/item/target) && !pinned_target)
|
||||
density = 0
|
||||
W.density = 1
|
||||
user.drop_item(src)
|
||||
W.loc = loc
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
to_chat(user, "You slide the target into the stake.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/target_stake/attack_hand(mob/user)
|
||||
// taking pinned targets off!
|
||||
if(pinned_target)
|
||||
density = 1
|
||||
pinned_target.density = 0
|
||||
pinned_target.layer = OBJ_LAYER
|
||||
|
||||
pinned_target.loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(pinned_target)
|
||||
to_chat(user, "You take the target out of the stake.")
|
||||
else
|
||||
pinned_target.loc = get_turf(user)
|
||||
to_chat(user, "You take the target out of the stake.")
|
||||
|
||||
pinned_target = null
|
||||
// Basically they are for the firing range
|
||||
/obj/structure/target_stake
|
||||
name = "target stake"
|
||||
desc = "A thin platform with negatively-magnetized wheels."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_stake"
|
||||
density = 1
|
||||
flags = CONDUCT
|
||||
var/obj/item/target/pinned_target // the current pinned target
|
||||
|
||||
/obj/structure/target_stake/Destroy()
|
||||
QDEL_NULL(pinned_target)
|
||||
return ..()
|
||||
|
||||
/obj/structure/target_stake/Move()
|
||||
. = ..()
|
||||
// Move the pinned target along with the stake
|
||||
if(pinned_target in view(3, src))
|
||||
pinned_target.loc = loc
|
||||
|
||||
else // Sanity check: if the pinned target can't be found in immediate view
|
||||
pinned_target = null
|
||||
density = 1
|
||||
|
||||
/obj/structure/target_stake/attackby(obj/item/W, mob/user, params)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(istype(W, /obj/item/target) && !pinned_target)
|
||||
density = 0
|
||||
W.density = 1
|
||||
user.drop_item(src)
|
||||
W.loc = loc
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
to_chat(user, "You slide the target into the stake.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/target_stake/attack_hand(mob/user)
|
||||
// taking pinned targets off!
|
||||
if(pinned_target)
|
||||
density = 1
|
||||
pinned_target.density = 0
|
||||
pinned_target.layer = OBJ_LAYER
|
||||
|
||||
pinned_target.loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(pinned_target)
|
||||
to_chat(user, "You take the target out of the stake.")
|
||||
else
|
||||
pinned_target.loc = get_turf(user)
|
||||
to_chat(user, "You take the target out of the stake.")
|
||||
|
||||
pinned_target = null
|
||||
|
||||
@@ -139,4 +139,4 @@
|
||||
// Tube station directions are simply 90 to either side of
|
||||
// the exit.
|
||||
/obj/structure/transit_tube/station/init_dirs()
|
||||
tube_dirs = list(turn(dir, 90), turn(dir, -90))
|
||||
tube_dirs = list(turn(dir, 90), turn(dir, -90))
|
||||
|
||||
@@ -174,4 +174,4 @@
|
||||
if(dir in tube.directions())
|
||||
if(tube.has_exit(direction))
|
||||
dir = direction
|
||||
return
|
||||
return
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user