initial commit - cross reference with 5th port - obviously has compile errors
This commit is contained in:
@@ -0,0 +1,254 @@
|
||||
/obj/structure/AIcore
|
||||
density = 1
|
||||
anchored = 0
|
||||
name = "\improper AI core"
|
||||
icon = 'icons/mob/AI.dmi'
|
||||
icon_state = "0"
|
||||
var/state = 0
|
||||
var/datum/ai_laws/laws = new()
|
||||
var/obj/item/weapon/circuitboard/circuit = null
|
||||
var/obj/item/device/mmi/brain = null
|
||||
|
||||
/obj/structure/AIcore/New()
|
||||
..()
|
||||
laws.set_laws_config()
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P, mob/user, params)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start wrenching the frame into place...</span>"
|
||||
if(do_after(user, 20/P.toolspeed, target = src))
|
||||
user << "<span class='notice'>You wrench the frame into place.</span>"
|
||||
anchored = 1
|
||||
state = 1
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = P
|
||||
if(!WT.isOn())
|
||||
user << "<span class='warning'>The welder must be on for this task!</span>"
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to deconstruct the frame...</span>"
|
||||
if(do_after(user, 20/P.toolspeed, target = src))
|
||||
if(!src || !WT.remove_fuel(0, user)) return
|
||||
user << "<span class='notice'>You deconstruct the frame.</span>"
|
||||
new /obj/item/stack/sheet/plasteel( loc, 4)
|
||||
qdel(src)
|
||||
return
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to unfasten the frame...</span>"
|
||||
if(do_after(user, 20/P.toolspeed, target = src))
|
||||
user << "<span class='notice'>You unfasten the frame.</span>"
|
||||
anchored = 0
|
||||
state = 0
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You place the circuit board inside the frame.</span>"
|
||||
icon_state = "1"
|
||||
circuit = P
|
||||
P.loc = src
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You screw the circuit board into place.</span>"
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
return
|
||||
if(istype(P, /obj/item/weapon/crowbar) && circuit)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the circuit board.</span>"
|
||||
state = 1
|
||||
icon_state = "0"
|
||||
circuit.loc = loc
|
||||
circuit = null
|
||||
return
|
||||
if(2)
|
||||
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You unfasten the circuit board.</span>"
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
return
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = P
|
||||
if(C.get_amount() >= 5)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to add cables to the frame...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
if (C.get_amount() >= 5 && state == 2)
|
||||
C.use(5)
|
||||
user << "<span class='notice'>You add cables to the frame.</span>"
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
else
|
||||
user << "<span class='warning'>You need five lengths of cable to wire the AI core!</span>"
|
||||
return
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if (brain)
|
||||
user << "<span class='warning'>Get that brain out of there first!</span>"
|
||||
else
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the cables.</span>"
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
|
||||
A.amount = 5
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||
var/obj/item/stack/sheet/rglass/G = P
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start to put in the glass panel...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
if (G.get_amount() >= 2 && state == 3)
|
||||
G.use(2)
|
||||
user << "<span class='notice'>You put in the glass panel.</span>"
|
||||
state = 4
|
||||
icon_state = "4"
|
||||
else
|
||||
user << "<span class='warning'>You need two sheets of reinforced glass to insert them into AI core!</span>"
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule))
|
||||
var/obj/item/weapon/aiModule/module = P
|
||||
module.install(laws, user)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/M = P
|
||||
if(!M.brainmob)
|
||||
user << "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose!</span>"
|
||||
return
|
||||
if(M.brainmob.stat == DEAD)
|
||||
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
|
||||
return
|
||||
|
||||
if(!M.brainmob.client)
|
||||
user << "<span class='warning'>Sticking an inactive brain into the frame would sort of defeat the purpose.</span>"
|
||||
return
|
||||
|
||||
if((config) && (!config.allow_ai))
|
||||
user << "<span class='warning'>This MMI does not seem to fit!</span>"
|
||||
return
|
||||
|
||||
if(jobban_isbanned(M.brainmob, "AI"))
|
||||
user << "<span class='warning'>This MMI does not seem to fit!</span>"
|
||||
return
|
||||
|
||||
if(M.hacked || M.clockwork)
|
||||
user << "<span class='warning'>This MMI does not seem to fit!</span>"
|
||||
return
|
||||
|
||||
if(!M.brainmob.mind)
|
||||
user << "<span class='warning'>This MMI is mindless!</span>"
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
return
|
||||
|
||||
ticker.mode.remove_antag_for_borging(M.brainmob.mind)
|
||||
M.loc = src
|
||||
brain = M
|
||||
user << "<span class='notice'>Added a brain.</span>"
|
||||
icon_state = "3b"
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/crowbar) && brain)
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the brain.</span>"
|
||||
brain.loc = loc
|
||||
brain = null
|
||||
icon_state = "3"
|
||||
return
|
||||
|
||||
if(4)
|
||||
if(istype(P, /obj/item/weapon/crowbar))
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the glass panel.</span>"
|
||||
state = 3
|
||||
if (brain)
|
||||
icon_state = "3b"
|
||||
else
|
||||
icon_state = "3"
|
||||
new /obj/item/stack/sheet/rglass(loc, 2)
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You connect the monitor.</span>"
|
||||
new /mob/living/silicon/ai (loc, laws, brain)
|
||||
feedback_inc("cyborg_ais_created",1)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/AIcore/deactivated
|
||||
name = "inactive AI"
|
||||
icon = 'icons/mob/AI.dmi'
|
||||
icon_state = "ai-empty"
|
||||
anchored = 1
|
||||
state = 20//So it doesn't interact based on the above. Not really necessary.
|
||||
|
||||
/obj/structure/AIcore/deactivated/attackby(obj/item/A, mob/user, params)
|
||||
if(istype(A, /obj/item/device/aicard))//Is it?
|
||||
A.transfer_ai("INACTIVE","AICARD",src,user)
|
||||
else if(istype(A, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user.visible_message("[user] [anchored ? "fastens" : "unfastens"] [src].", \
|
||||
"<span class='notice'>You start to [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor...</span>")
|
||||
switch(anchored)
|
||||
if(0)
|
||||
if(do_after(user, 20, target = src))
|
||||
user << "<span class='notice'>You fasten the core into place.</span>"
|
||||
anchored = 1
|
||||
if(1)
|
||||
if(do_after(user, 20, target = src))
|
||||
user << "<span class='notice'>You unfasten the core.</span>"
|
||||
anchored = 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*
|
||||
This is a good place for AI-related object verbs so I'm sticking it here.
|
||||
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
|
||||
That prevents a few funky behaviors.
|
||||
*/
|
||||
//The type of interaction, the player performing the operation, the AI itself, and the card object, if any.
|
||||
|
||||
|
||||
atom/proc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
|
||||
if(istype(card))
|
||||
if(card.flush)
|
||||
user << "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol."
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/AIcore/deactivated/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
|
||||
if(!..())
|
||||
return
|
||||
//Transferring a carded AI to a core.
|
||||
if(interaction == AI_TRANS_FROM_CARD)
|
||||
AI.control_disabled = 0
|
||||
AI.radio_enabled = 1
|
||||
AI.loc = loc//To replace the terminal.
|
||||
AI << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
user << "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
card.AI = null
|
||||
qdel(src)
|
||||
else //If for some reason you use an empty card on an empty AI terminal.
|
||||
user << "There is no AI loaded on this terminal!"
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/aicore
|
||||
name = "circuit board (AI core)"
|
||||
origin_tech = "programming=3"
|
||||
@@ -0,0 +1,348 @@
|
||||
/* Alien shit!
|
||||
* Contains:
|
||||
* structure/alien
|
||||
* Resin
|
||||
* Weeds
|
||||
* Egg
|
||||
*/
|
||||
|
||||
|
||||
/obj/structure/alien
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
var/health = 100
|
||||
|
||||
/obj/structure/alien/attacked_by(obj/item/I, mob/user)
|
||||
..()
|
||||
var/damage = I.force
|
||||
switch(I.damtype)
|
||||
if(BRUTE)
|
||||
damage *= 0.25
|
||||
if(BURN)
|
||||
damage *= 2
|
||||
else
|
||||
damage = 0 //stamina damage does no damage
|
||||
take_damage(damage, I.damtype)
|
||||
|
||||
/obj/structure/alien/proc/take_damage(amount, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
health = max(health - amount, 0)
|
||||
if(!health)
|
||||
Break()
|
||||
|
||||
/obj/structure/alien/proc/Break()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/alien/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type)
|
||||
|
||||
/*
|
||||
* 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 = 1
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
canSmoothWith = list(/obj/structure/alien/resin)
|
||||
health = 200
|
||||
smooth = SMOOTH_TRUE
|
||||
var/resintype = null
|
||||
|
||||
|
||||
|
||||
/obj/structure/alien/resin/New(location)
|
||||
..()
|
||||
air_update_turf(1)
|
||||
return
|
||||
|
||||
/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/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
|
||||
health = 160
|
||||
resintype = "membrane"
|
||||
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
|
||||
|
||||
/obj/structure/alien/resin/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
take_damage(150, BRUTE, 0)
|
||||
if(2)
|
||||
take_damage(100, BRUTE, 0)
|
||||
if(3)
|
||||
take_damage(50, BRUTE, 0)
|
||||
|
||||
/obj/structure/alien/blob_act(obj/effect/blob/B)
|
||||
take_damage(50, BRUTE, 0)
|
||||
|
||||
/obj/structure/alien/resin/hitby(atom/movable/AM)
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(!isobj(AM))
|
||||
tforce = 10
|
||||
else
|
||||
var/obj/O = AM
|
||||
tforce = O.throwforce
|
||||
take_damage(tforce)
|
||||
|
||||
/obj/structure/alien/resin/attack_hulk(mob/living/carbon/human/user)
|
||||
..(user, 1)
|
||||
user.visible_message("<span class='danger'>[user] destroys [src]!</span>")
|
||||
take_damage(200)
|
||||
|
||||
/obj/structure/alien/resin/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/alien/resin/attack_alien(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] claws at the resin!</span>")
|
||||
take_damage(50)
|
||||
|
||||
/obj/structure/alien/resin/attack_animal(mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if(!M.melee_damage_upper)
|
||||
return
|
||||
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>")
|
||||
take_damage(M.melee_damage_upper, M.melee_damage_type)
|
||||
|
||||
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
return !density
|
||||
|
||||
|
||||
/*
|
||||
* Weeds
|
||||
*/
|
||||
|
||||
#define NODERANGE 3
|
||||
|
||||
/obj/structure/alien/weeds
|
||||
gender = PLURAL
|
||||
name = "resin floor"
|
||||
desc = "A thick resin surface covers the floor."
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = TURF_LAYER
|
||||
icon_state = "weeds"
|
||||
health = 15
|
||||
var/obj/structure/alien/weeds/node/linked_node = null
|
||||
canSmoothWith = list(/obj/structure/alien/weeds, /turf/closed/wall)
|
||||
smooth = SMOOTH_MORE
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/New(pos, node)
|
||||
pixel_x = -4
|
||||
pixel_y = -4 //so the sprites line up right in the map editor
|
||||
..()
|
||||
if(!luminosity) //weed nodes have luminosity, but normal weeds don't!
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
icon = 'icons/obj/smooth_structures/alien/weeds1.dmi'
|
||||
if(2)
|
||||
icon = 'icons/obj/smooth_structures/alien/weeds2.dmi'
|
||||
if(3)
|
||||
icon = 'icons/obj/smooth_structures/alien/weeds3.dmi'
|
||||
linked_node = node
|
||||
if(istype(loc, /turf/open/space))
|
||||
qdel(src)
|
||||
return
|
||||
addtimer(src, "Life", rand(150, 200))
|
||||
|
||||
/obj/structure/alien/weeds/Destroy()
|
||||
linked_node = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/alien/weeds/proc/Life()
|
||||
set background = BACKGROUND_ENABLED
|
||||
var/turf/U = get_turf(src)
|
||||
|
||||
if(istype(U, /turf/open/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/open/space))
|
||||
continue
|
||||
|
||||
new /obj/structure/alien/weeds(T, linked_node)
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/ex_act(severity, target)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0)
|
||||
|
||||
|
||||
//Weed nodes
|
||||
/obj/structure/alien/weeds/node
|
||||
name = "glowing resin"
|
||||
desc = "Blue bioluminescence shines from beneath the surface."
|
||||
icon_state = "weednode"
|
||||
luminosity = 1
|
||||
var/node_range = NODERANGE
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/node/New()
|
||||
icon = 'icons/obj/smooth_structures/alien/weednode.dmi'
|
||||
..(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 900 //time it takes to grow a hugger
|
||||
#define MAX_GROWTH_TIME 1500
|
||||
|
||||
/obj/structure/alien/egg
|
||||
name = "egg"
|
||||
desc = "A large mottled egg."
|
||||
icon_state = "egg_growing"
|
||||
density = 0
|
||||
anchored = 1
|
||||
health = 100
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
layer = MOB_LAYER
|
||||
|
||||
|
||||
/obj/structure/alien/egg/New()
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
..()
|
||||
addtimer(src, "Grow", rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
|
||||
|
||||
/obj/structure/alien/egg/Destroy()
|
||||
remove_from_proximity_list(src, 1)
|
||||
..()
|
||||
|
||||
/obj/structure/alien/egg/attack_paw(mob/living/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/alien/egg/attack_hand(mob/living/user)
|
||||
if(user.getorgan(/obj/item/organ/alien/plasmavessel))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
user << "<span class='notice'>You clear the hatched egg.</span>"
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(GROWING)
|
||||
user << "<span class='notice'>The child is not developed yet.</span>"
|
||||
return
|
||||
if(GROWN)
|
||||
user << "<span class='notice'>You retrieve the child.</span>"
|
||||
Burst(0)
|
||||
return
|
||||
else
|
||||
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
|
||||
add_to_proximity_list(src, 1)
|
||||
|
||||
/obj/structure/alien/egg/proc/Burst(kill = 1) //drops and kills the hugger if any is remaining
|
||||
if(status == GROWN || status == GROWING)
|
||||
remove_from_proximity_list(src, 1)
|
||||
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/Move()
|
||||
remove_from_proximity_list(src, 1)
|
||||
..()
|
||||
|
||||
/obj/structure/alien/egg/Break()
|
||||
if(status != BURST && status != BURSTING)
|
||||
Burst()
|
||||
else if(status == BURST)
|
||||
qdel(src) //Remove the egg after it has been hit after bursting.
|
||||
|
||||
|
||||
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 500)
|
||||
take_damage(5, BURN, 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.getorgan(/obj/item/organ/body_egg/alien_embryo))
|
||||
return
|
||||
|
||||
Burst(0)
|
||||
|
||||
#undef BURST
|
||||
#undef BURSTING
|
||||
#undef GROWING
|
||||
#undef GROWN
|
||||
#undef MIN_GROWTH_TIME
|
||||
#undef MAX_GROWTH_TIME
|
||||
@@ -0,0 +1,128 @@
|
||||
|
||||
///////////
|
||||
// EASEL //
|
||||
///////////
|
||||
|
||||
/obj/structure/easel
|
||||
name = "easel"
|
||||
desc = "only for the finest of art!"
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "easel"
|
||||
density = 1
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 15
|
||||
var/obj/item/weapon/canvas/painting = null
|
||||
|
||||
|
||||
//Adding canvases
|
||||
/obj/structure/easel/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/canvas))
|
||||
var/obj/item/weapon/canvas/C = I
|
||||
user.unEquip(C)
|
||||
painting = C
|
||||
C.loc = get_turf(src)
|
||||
C.layer = layer+0.1
|
||||
user.visible_message("<span class='notice'>[user] puts \the [C] on \the [src].</span>","<span class='notice'>You place \the [C] on \the [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//Stick to the easel like glue
|
||||
/obj/structure/easel/Move()
|
||||
var/turf/T = get_turf(src)
|
||||
..()
|
||||
if(painting && painting.loc == T) //Only move if it's near us.
|
||||
painting.loc = get_turf(src)
|
||||
else
|
||||
painting = null
|
||||
|
||||
|
||||
//////////////
|
||||
// CANVASES //
|
||||
//////////////
|
||||
|
||||
#define AMT_OF_CANVASES 4 //Keep this up to date or shit will break.
|
||||
|
||||
//To safe memory on making /icons we cache the blanks..
|
||||
var/global/list/globalBlankCanvases[AMT_OF_CANVASES]
|
||||
|
||||
/obj/item/weapon/canvas
|
||||
name = "canvas"
|
||||
desc = "draw out your soul on this canvas!"
|
||||
icon = 'icons/obj/artstuff.dmi'
|
||||
icon_state = "11x11"
|
||||
burn_state = FLAMMABLE
|
||||
var/whichGlobalBackup = 1 //List index
|
||||
|
||||
/obj/item/weapon/canvas/nineteenXnineteen
|
||||
icon_state = "19x19"
|
||||
whichGlobalBackup = 2
|
||||
|
||||
/obj/item/weapon/canvas/twentythreeXnineteen
|
||||
icon_state = "23x19"
|
||||
whichGlobalBackup = 3
|
||||
|
||||
/obj/item/weapon/canvas/twentythreeXtwentythree
|
||||
icon_state = "23x23"
|
||||
whichGlobalBackup = 4
|
||||
|
||||
|
||||
//Find the right size blank canvas
|
||||
/obj/item/weapon/canvas/proc/getGlobalBackup()
|
||||
. = null
|
||||
if(globalBlankCanvases[whichGlobalBackup])
|
||||
. = globalBlankCanvases[whichGlobalBackup]
|
||||
else
|
||||
var/icon/I = icon(initial(icon),initial(icon_state))
|
||||
globalBlankCanvases[whichGlobalBackup] = I
|
||||
. = I
|
||||
|
||||
|
||||
|
||||
//One pixel increments
|
||||
/obj/item/weapon/canvas/attackby(obj/item/I, mob/user, params)
|
||||
//Click info
|
||||
var/list/click_params = params2list(params)
|
||||
var/pixX = text2num(click_params["icon-x"])
|
||||
var/pixY = text2num(click_params["icon-y"])
|
||||
|
||||
//Should always be true, otherwise you didn't click the object, but let's check because SS13~
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
|
||||
//Cleaning one pixel with a soap or rag
|
||||
if(istype(I, /obj/item/weapon/soap) || istype(I, /obj/item/weapon/reagent_containers/glass/rag))
|
||||
//Pixel info created only when needed
|
||||
var/icon/masterpiece = icon(icon,icon_state)
|
||||
var/thePix = masterpiece.GetPixel(pixX,pixY)
|
||||
var/icon/Ico = getGlobalBackup()
|
||||
if(!Ico)
|
||||
qdel(masterpiece)
|
||||
return
|
||||
|
||||
var/theOriginalPix = Ico.GetPixel(pixX,pixY)
|
||||
if(thePix != theOriginalPix) //colour changed
|
||||
DrawPixelOn(theOriginalPix,pixX,pixY)
|
||||
qdel(masterpiece)
|
||||
|
||||
//Drawing one pixel with a crayon
|
||||
else if(istype(I, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = I
|
||||
DrawPixelOn(C.paint_color, pixX, pixY)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//Clean the whole canvas
|
||||
/obj/item/weapon/canvas/attack_self(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
var/icon/blank = getGlobalBackup()
|
||||
if(blank)
|
||||
//it's basically a giant etch-a-sketch
|
||||
icon = blank
|
||||
user.visible_message("<span class='notice'>[user] cleans the canvas.</span>","<span class='notice'>You clean the canvas.</span>")
|
||||
|
||||
|
||||
|
||||
#undef AMT_OF_CANVASES
|
||||
@@ -0,0 +1,309 @@
|
||||
/obj/structure/sign/barsign // All Signs are 64 by 32 pixels, they take two tiles
|
||||
name = "Bar Sign"
|
||||
desc = "A bar sign with no writing on it"
|
||||
icon = 'icons/obj/barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
req_access = list(access_bar)
|
||||
var/list/barsigns=list()
|
||||
var/list/hiddensigns
|
||||
var/broken = 0
|
||||
var/emagged = 0
|
||||
var/state = 0
|
||||
var/prev_sign = ""
|
||||
var/panel_open = 0
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/New()
|
||||
..()
|
||||
|
||||
|
||||
//filling the barsigns list
|
||||
for(var/bartype in subtypesof(/datum/barsign))
|
||||
var/datum/barsign/signinfo = new bartype
|
||||
if(!signinfo.hidden)
|
||||
barsigns += signinfo
|
||||
|
||||
|
||||
//randomly assigning a sign
|
||||
set_sign(pick(barsigns))
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/proc/set_sign(datum/barsign/sign)
|
||||
if(!istype(sign))
|
||||
return
|
||||
icon_state = sign.icon
|
||||
name = sign.name
|
||||
if(sign.desc)
|
||||
desc = sign.desc
|
||||
else
|
||||
desc = "It displays \"[name]\"."
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attack_hand(mob/user)
|
||||
if (!src.allowed(user))
|
||||
user << "<span class='info'>Access denied.</span>"
|
||||
return
|
||||
if (broken)
|
||||
user << "<span class ='danger'>The controls seem unresponsive.</span>"
|
||||
return
|
||||
pick_sign()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(!allowed(user))
|
||||
user << "<span class='info'>Access denied.</span>"
|
||||
return
|
||||
if(!panel_open)
|
||||
user << "<span class='notice'>You open the maintenance panel.</span>"
|
||||
set_sign(new /datum/barsign/hiddensigns/signoff)
|
||||
panel_open = 1
|
||||
else
|
||||
user << "<span class='notice'>You close the maintenance panel.</span>"
|
||||
if(!broken && !emagged)
|
||||
set_sign(pick(barsigns))
|
||||
else if(emagged)
|
||||
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
|
||||
else
|
||||
set_sign(new /datum/barsign/hiddensigns/empbarsign)
|
||||
panel_open = 0
|
||||
|
||||
else if(istype(I, /obj/item/stack/cable_coil) && panel_open)
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
if(emagged) //Emagged, not broken by EMP
|
||||
user << "<span class='warning'>Sign has been damaged beyond repair!</span>"
|
||||
return
|
||||
else if(!broken)
|
||||
user << "<span class='warning'>This sign is functioning properly!</span>"
|
||||
return
|
||||
|
||||
if(C.use(2))
|
||||
user << "<span class='notice'>You replace the burnt wiring.</span>"
|
||||
broken = 0
|
||||
else
|
||||
user << "<span class='warning'>You need at least two lengths of cable!</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/emp_act(severity)
|
||||
set_sign(new /datum/barsign/hiddensigns/empbarsign)
|
||||
broken = 1
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/emag_act(mob/user)
|
||||
if(broken || emagged)
|
||||
user << "<span class='warning'>Nothing interesting happens!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You emag the barsign. Takeover in progress...</span>"
|
||||
sleep(100) //10 seconds
|
||||
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
|
||||
emagged = 1
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/proc/pick_sign()
|
||||
var/picked_name = input("Available Signage", "Bar Sign") as null|anything in barsigns
|
||||
if(!picked_name)
|
||||
return
|
||||
set_sign(picked_name)
|
||||
|
||||
|
||||
|
||||
//Code below is to define useless variables for datums. It errors without these
|
||||
|
||||
|
||||
|
||||
/datum/barsign
|
||||
var/name = "Name"
|
||||
var/icon = "Icon"
|
||||
var/desc = "desc"
|
||||
var/hidden = 0
|
||||
|
||||
|
||||
//Anything below this is where all the specific signs are. If people want to add more signs, add them below.
|
||||
|
||||
|
||||
|
||||
/datum/barsign/maltesefalcon
|
||||
name = "Maltese Falcon"
|
||||
icon = "maltesefalcon"
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
|
||||
|
||||
/datum/barsign/thebark
|
||||
name = "The Bark"
|
||||
icon = "thebark"
|
||||
desc = "Ian's bar of choice."
|
||||
|
||||
|
||||
/datum/barsign/harmbaton
|
||||
name = "The Harmbaton"
|
||||
icon = "theharmbaton"
|
||||
desc = "A great dining experience for both security members and assistants."
|
||||
|
||||
|
||||
/datum/barsign/thesingulo
|
||||
name = "The Singulo"
|
||||
icon = "thesingulo"
|
||||
desc = "Where people go that'd rather not be called by their name."
|
||||
|
||||
|
||||
/datum/barsign/thedrunkcarp
|
||||
name = "The Drunk Carp"
|
||||
icon = "thedrunkcarp"
|
||||
desc = "Don't drink and swim."
|
||||
|
||||
|
||||
/datum/barsign/scotchservinwill
|
||||
name = "Scotch Servin Willy's"
|
||||
icon = "scotchservinwill"
|
||||
desc = "Willy sure moved up in the world from clown to bartender."
|
||||
|
||||
|
||||
/datum/barsign/officerbeersky
|
||||
name = "Officer Beersky's"
|
||||
icon = "officerbeersky"
|
||||
desc = "Man eat a dong, these drinks are great."
|
||||
|
||||
|
||||
/datum/barsign/thecavern
|
||||
name = "The Cavern"
|
||||
icon = "thecavern"
|
||||
desc = "Fine drinks while listening to some fine tunes."
|
||||
|
||||
|
||||
/datum/barsign/theouterspess
|
||||
name = "The Outer Spess"
|
||||
icon = "theouterspess"
|
||||
desc = "This bar isn't actually located in outer space."
|
||||
|
||||
|
||||
/datum/barsign/slipperyshots
|
||||
name = "Slippery Shots"
|
||||
icon = "slipperyshots"
|
||||
desc = "Slippery slope to drunkeness with our shots!"
|
||||
|
||||
|
||||
/datum/barsign/thegreytide
|
||||
name = "The Grey Tide"
|
||||
icon = "thegreytide"
|
||||
desc = "Abandon your toolboxing ways and enjoy a lazy beer!"
|
||||
|
||||
|
||||
/datum/barsign/honkednloaded
|
||||
name = "Honked 'n' Loaded"
|
||||
icon = "honkednloaded"
|
||||
desc = "Honk."
|
||||
|
||||
|
||||
/datum/barsign/thenest
|
||||
name = "The Nest"
|
||||
icon = "thenest"
|
||||
desc = "A good place to retire for a drink after a long night of crime fighting."
|
||||
|
||||
|
||||
/datum/barsign/thecoderbus
|
||||
name = "The Coderbus"
|
||||
icon = "thecoderbus"
|
||||
desc = "A very controversial bar known for its wide variety of constantly-changing drinks."
|
||||
|
||||
|
||||
/datum/barsign/theadminbus
|
||||
name = "The Adminbus"
|
||||
icon = "theadminbus"
|
||||
desc = "An establishment visited mainly by space-judges. It isn't bombed nearly as much as court hearings."
|
||||
|
||||
/datum/barsign/oldcockinn
|
||||
name = "The Old Cock Inn"
|
||||
icon = "oldcockinn"
|
||||
desc = "Something about this sign fills you with despair."
|
||||
|
||||
/datum/barsign/thewretchedhive
|
||||
name = "The Wretched Hive"
|
||||
icon = "thewretchedhive"
|
||||
desc = "Legally obligated to instruct you to check your drinks for acid before consumption."
|
||||
|
||||
/datum/barsign/robustacafe
|
||||
name = "The Robusta Cafe"
|
||||
icon = "robustacafe"
|
||||
desc = "Holder of the 'Most Lethal Barfights' record 5 years uncontested."
|
||||
|
||||
/datum/barsign/emergencyrumparty
|
||||
name = "The Emergency Rum Party"
|
||||
icon = "emergencyrumparty"
|
||||
desc = "Recently relicensed after a long closure."
|
||||
|
||||
/datum/barsign/combocafe
|
||||
name = "The Combo Cafe"
|
||||
icon = "combocafe"
|
||||
desc = "Renowned system-wide for their utterly uncreative drink combinations."
|
||||
|
||||
/datum/barsign/vladssaladbar
|
||||
name = "Vlad's Salad Bar"
|
||||
icon = "vladssaladbar"
|
||||
desc = "Under new management. Vlad was always a bit too trigger happy with that shotgun."
|
||||
|
||||
/datum/barsign/theshaken
|
||||
name = "The Shaken"
|
||||
icon = "theshaken"
|
||||
desc = "This establishment does not serve stirred drinks."
|
||||
|
||||
/datum/barsign/thealenath
|
||||
name = "The Ale' Nath"
|
||||
icon = "thealenath"
|
||||
desc = "All right, buddy. I think you've had EI NATH. Time to get a cab."
|
||||
|
||||
/datum/barsign/thealohasnackbar
|
||||
name = "The Aloha Snackbar"
|
||||
icon = "alohasnackbar"
|
||||
desc = "A tasteful, inoffensive tiki bar sign."
|
||||
|
||||
/datum/barsign/thenet
|
||||
name = "The Net"
|
||||
icon = "thenet"
|
||||
desc = "You just seem to get caught up in it for hours."
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns
|
||||
hidden = 1
|
||||
|
||||
|
||||
//Hidden signs list below this point
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/empbarsign
|
||||
name = "Haywire Barsign"
|
||||
icon = "empbarsign"
|
||||
desc = "Something has gone very wrong."
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/syndibarsign
|
||||
name = "Syndi Cat Takeover"
|
||||
icon = "syndibarsign"
|
||||
desc = "Syndicate or die."
|
||||
|
||||
|
||||
|
||||
/datum/barsign/hiddensigns/signoff
|
||||
name = "Bar Sign"
|
||||
icon = "empty"
|
||||
desc = "This sign doesn't seem to be on."
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
//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/obj/smooth_structures/alien/nest.dmi'
|
||||
icon_state = "nest"
|
||||
var/health = 100
|
||||
smooth = SMOOTH_TRUE
|
||||
can_be_unanchored = 0
|
||||
canSmoothWith = null
|
||||
buildstacktype = null
|
||||
flags = NODECONSTRUCT
|
||||
var/image/nest_overlay
|
||||
|
||||
/obj/structure/bed/nest/New()
|
||||
nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=LYING_MOB_LAYER)
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/living/buckled_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.getorgan(/obj/item/organ/alien/plasmavessel))
|
||||
unbuckle_mob(M)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
if(M != user)
|
||||
M.visible_message(\
|
||||
"[user.name] pulls [M.name] free from the sticky nest!",\
|
||||
"<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)
|
||||
M << "<span class='warning'>You fail to unbuckle yourself!</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 != src.loc) || user.incapacitated() || M.buckled )
|
||||
return
|
||||
|
||||
if(M.getorgan(/obj/item/organ/alien/plasmavessel))
|
||||
return
|
||||
if(!user.getorgan(/obj/item/organ/alien/plasmavessel))
|
||||
return
|
||||
|
||||
if(has_buckled_mobs())
|
||||
unbuckle_all_mobs()
|
||||
|
||||
if(buckle_mob(M))
|
||||
M.visible_message(\
|
||||
"[user.name] secretes a thick vile goo, securing [M.name] into [src]!",\
|
||||
"<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)
|
||||
if(M in buckled_mobs)
|
||||
M.pixel_y = 0
|
||||
M.pixel_x = initial(M.pixel_x) + 2
|
||||
M.layer = BELOW_MOB_LAYER
|
||||
add_overlay(nest_overlay)
|
||||
else
|
||||
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)
|
||||
overlays -= nest_overlay
|
||||
|
||||
/obj/structure/bed/nest/attacked_by(obj/item/I, mob/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/bed/nest/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <=0)
|
||||
density = 0
|
||||
qdel(src)
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
/* Beds... get your mind out of the gutter, they're for sleeping!
|
||||
* Contains:
|
||||
* Beds
|
||||
* Roller beds
|
||||
*/
|
||||
|
||||
/*
|
||||
* Beds
|
||||
*/
|
||||
/obj/structure/bed
|
||||
name = "bed"
|
||||
desc = "This is used to lie in, sleep in or strap on."
|
||||
icon_state = "bed"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 2
|
||||
|
||||
/obj/structure/bed/deconstruct()
|
||||
if(buildstacktype)
|
||||
new buildstacktype(loc,buildstackamount)
|
||||
..()
|
||||
|
||||
/obj/structure/bed/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/bed/attack_animal(mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
|
||||
if(M.environment_smash)
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/bed/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2)
|
||||
if(prob(70))
|
||||
deconstruct()
|
||||
return
|
||||
if(3)
|
||||
if(prob(50))
|
||||
deconstruct()
|
||||
return
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
deconstruct()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
*/
|
||||
/obj/structure/bed/roller
|
||||
name = "roller bed"
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
burn_state = FIRE_PROOF
|
||||
var/foldabletype = /obj/item/roller
|
||||
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!ishuman(usr))
|
||||
return 0
|
||||
if(buckled_mobs.len)
|
||||
return 0
|
||||
if(usr.incapacitated())
|
||||
usr << "<span class='warning'>You can't do that right now!</span>"
|
||||
return 0
|
||||
usr.visible_message("[usr] collapses \the [src.name].", "<span class='notice'>You collapse \the [src.name].</span>")
|
||||
new foldabletype(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
|
||||
if(M in buckled_mobs)
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
else
|
||||
density = 0
|
||||
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 = 4 // 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/robo //ROLLER ROBO DA!
|
||||
name = "roller bed dock"
|
||||
var/loaded = null
|
||||
|
||||
/obj/item/roller/robo/New()
|
||||
loaded = new /obj/structure/bed/roller(src)
|
||||
desc = "A collapsed roller bed that can be ejected for emergency use. Must be collected or replaced after use."
|
||||
..()
|
||||
|
||||
/obj/item/roller/robo/examine(mob/user)
|
||||
..()
|
||||
user << "The dock is [loaded ? "loaded" : "empty"]"
|
||||
|
||||
/obj/item/roller/robo/attack_self(mob/user)
|
||||
if(loaded)
|
||||
var/obj/structure/bed/roller/R = loaded
|
||||
R.loc = user.loc
|
||||
user.visible_message("[user] deploys [loaded].", "<span class='notice'>You deploy [loaded].</span>")
|
||||
loaded = null
|
||||
else
|
||||
user << "<span class='warning'>The dock is empty!</span>"
|
||||
|
||||
/obj/item/roller/robo/afterattack(obj/target, mob/user , proximity)
|
||||
if(istype(target,/obj/structure/bed/roller))
|
||||
if(!proximity)
|
||||
return
|
||||
if(loaded)
|
||||
user << "<span class='warning'>You already have a roller bed docked!</span>"
|
||||
return
|
||||
|
||||
var/obj/structure/bed/roller/R = target
|
||||
if(R.has_buckled_mobs())
|
||||
if(R.buckled_mobs.len > 1)
|
||||
R.unbuckle_all_mobs()
|
||||
user.visible_message("<span class='notice'>[user] unbuckles all creatures from [R].</span>")
|
||||
else
|
||||
R.user_unbuckle_mob(R.buckled_mobs[1],user)
|
||||
|
||||
loaded = target
|
||||
target.loc = src
|
||||
user.visible_message("[user] collects [loaded].", "<span class='notice'>You collect [loaded].</span>")
|
||||
..()
|
||||
|
||||
|
||||
//Dog bed
|
||||
|
||||
/obj/structure/bed/dogbed
|
||||
name = "dog bed"
|
||||
icon_state = "dogbed"
|
||||
desc = "A comfy-looking dog bed. You can even strap your pet in, in case the gravity turns off."
|
||||
anchored = 0
|
||||
buildstacktype = /obj/item/stack/sheet/mineral/wood
|
||||
buildstackamount = 10
|
||||
|
||||
|
||||
/obj/structure/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
@@ -0,0 +1,332 @@
|
||||
/obj/structure/chair
|
||||
name = "chair"
|
||||
desc = "You sit in this. Either by will or force.\n<span class='notice'>Drag your sprite to sit in the chair. Alt-click to rotate it clockwise.</span>"
|
||||
icon = 'icons/obj/chairs.dmi'
|
||||
icon_state = "chair"
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_lying = 0 //you sit in a chair, not lay
|
||||
burn_state = FIRE_PROOF
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 1
|
||||
var/item_chair = /obj/item/chair // if null it can't be picked up
|
||||
|
||||
/obj/structure/chair/New()
|
||||
..()
|
||||
handle_layer()
|
||||
|
||||
/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/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/chair/attack_animal(mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
|
||||
if(M.environment_smash)
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/chair/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2)
|
||||
if(prob(70))
|
||||
deconstruct()
|
||||
return
|
||||
if(3)
|
||||
if(prob(50))
|
||||
deconstruct()
|
||||
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/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
deconstruct()
|
||||
else if(istype(W, /obj/item/assembly/shock_kit))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
var/obj/structure/chair/e_chair/E = new /obj/structure/chair/e_chair(src.loc)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
E.setDir(dir)
|
||||
E.part = SK
|
||||
SK.loc = E
|
||||
SK.master = E
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/attack_tk(mob/user)
|
||||
if(has_buckled_mobs())
|
||||
..()
|
||||
else
|
||||
rotate()
|
||||
return
|
||||
|
||||
/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(dir == NORTH)
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/structure/chair/proc/spin()
|
||||
setDir(turn(dir, 90))
|
||||
|
||||
/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)
|
||||
spin()
|
||||
else
|
||||
if(!usr || !isturf(usr.loc))
|
||||
return
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
spin()
|
||||
|
||||
/obj/structure/chair/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
else
|
||||
rotate()
|
||||
|
||||
// Chair types
|
||||
/obj/structure/chair/wood
|
||||
icon_state = "wooden_chair"
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
buildstacktype = /obj/item/stack/sheet/mineral/wood
|
||||
buildstackamount = 3
|
||||
item_chair = /obj/item/chair/wood
|
||||
|
||||
/obj/structure/chair/wood/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/chair/wood/normal //Kept for map compatibility
|
||||
|
||||
|
||||
/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.\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
buildstackamount = 2
|
||||
var/image/armrest = null
|
||||
item_chair = null
|
||||
|
||||
/obj/structure/chair/comfy/New()
|
||||
armrest = image("icons/obj/chairs.dmi", "comfychair_armrest")
|
||||
armrest.layer = ABOVE_MOB_LAYER
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/comfy/post_buckle_mob(mob/living/M)
|
||||
if(has_buckled_mobs())
|
||||
add_overlay(armrest)
|
||||
else
|
||||
overlays -= armrest
|
||||
|
||||
|
||||
/obj/structure/chair/comfy/brown
|
||||
color = rgb(255,113,0)
|
||||
|
||||
/obj/structure/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/chair/comfy/teal
|
||||
color = rgb(0,255,255)
|
||||
|
||||
/obj/structure/chair/comfy/black
|
||||
color = rgb(167,164,153)
|
||||
|
||||
/obj/structure/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/chair/office
|
||||
anchored = 0
|
||||
buildstackamount = 5
|
||||
item_chair = null
|
||||
|
||||
/obj/structure/chair/office/light
|
||||
icon_state = "officechair_white"
|
||||
|
||||
/obj/structure/chair/office/dark
|
||||
icon_state = "officechair_dark"
|
||||
|
||||
//Stool
|
||||
|
||||
/obj/structure/chair/stool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
icon_state = "stool"
|
||||
can_buckle = 0
|
||||
buildstackamount = 1
|
||||
item_chair = /obj/item/chair/stool
|
||||
|
||||
/obj/structure/chair/stool/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || !ishuman(usr) || has_buckled_mobs() || src.flags & NODECONSTRUCT)
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
usr << "<span class='warning'>You can't do that right now!</span>"
|
||||
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/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"
|
||||
w_class = 5
|
||||
force = 8
|
||||
throwforce = 10
|
||||
throw_range = 3
|
||||
hitsound = 'sound/items/trayhit1.ogg'
|
||||
hit_reaction_chance = 50
|
||||
var/break_chance = 5 //Likely hood of smashing the chair.
|
||||
var/obj/structure/chair/origin_type = /obj/structure/chair
|
||||
|
||||
/obj/item/chair/narsie_act()
|
||||
if(prob(20))
|
||||
var/obj/item/chair/wood/W = new/obj/item/chair/wood(get_turf(src))
|
||||
W.setDir(dir)
|
||||
qdel(src)
|
||||
|
||||
/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))
|
||||
user << "<span class='danger'>There is already a chair here.</span>"
|
||||
return
|
||||
if(A.density && !(A.flags & ON_BORDER))
|
||||
user << "<span class='danger'>There is already something 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))
|
||||
user.unEquip(src,1) //Even NODROP chairs are destroyed.
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/chair/hit_reaction(mob/living/carbon/human/owner, 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.Weaken(1)
|
||||
smash(user)
|
||||
|
||||
|
||||
/obj/item/chair/stool
|
||||
name = "stool"
|
||||
icon_state = "stool_toppled"
|
||||
item_state = "stool"
|
||||
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/stool/narsie_act()
|
||||
return //sturdy enough to ignore a god
|
||||
|
||||
/obj/item/chair/wood
|
||||
name = "wooden chair"
|
||||
icon_state = "wooden_chair_toppled"
|
||||
item_state = "woodenchair"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
origin_type = /obj/structure/chair/wood
|
||||
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
|
||||
@@ -0,0 +1,308 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
BEDSHEETS
|
||||
LINEN BINS
|
||||
*/
|
||||
|
||||
/obj/item/weapon/bedsheet
|
||||
name = "bedsheet"
|
||||
desc = "A surprisingly soft linen bedsheet."
|
||||
icon = 'icons/obj/bedsheets.dmi'
|
||||
icon_state = "sheetwhite"
|
||||
item_state = "bedsheet"
|
||||
slot_flags = SLOT_BACK
|
||||
layer = MOB_LAYER
|
||||
throwforce = 0
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = 1
|
||||
item_color = "white"
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
dog_fashion = /datum/dog_fashion/head/ghost
|
||||
|
||||
/obj/item/weapon/bedsheet/attack(mob/living/M, mob/user)
|
||||
if(!attempt_initiate_surgery(src, M, user))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bedsheet/attack_self(mob/user)
|
||||
user.drop_item()
|
||||
if(layer == initial(layer))
|
||||
layer = ABOVE_MOB_LAYER
|
||||
user << "<span class='notice'>You cover yourself with [src].</span>"
|
||||
else
|
||||
layer = initial(layer)
|
||||
user << "<span class='notice'>You smooth [src] out beneath you.</span>"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wirecutters) || I.is_sharp())
|
||||
var/obj/item/stack/sheet/cloth/C = new (loc, 3)
|
||||
transfer_fingerprints_to(C)
|
||||
C.add_fingerprint(user)
|
||||
qdel(src)
|
||||
user << "<span class='notice'>You tear [src] up.</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/bedsheet/blue
|
||||
icon_state = "sheetblue"
|
||||
item_color = "blue"
|
||||
|
||||
/obj/item/weapon/bedsheet/green
|
||||
icon_state = "sheetgreen"
|
||||
item_color = "green"
|
||||
|
||||
/obj/item/weapon/bedsheet/orange
|
||||
icon_state = "sheetorange"
|
||||
item_color = "orange"
|
||||
|
||||
/obj/item/weapon/bedsheet/purple
|
||||
icon_state = "sheetpurple"
|
||||
item_color = "purple"
|
||||
|
||||
/obj/item/weapon/bedsheet/patriot
|
||||
name = "patriotic bedsheet"
|
||||
desc = "You've never felt more free than when sleeping on this."
|
||||
icon_state = "sheetUSA"
|
||||
item_color = "sheetUSA"
|
||||
|
||||
/obj/item/weapon/bedsheet/rainbow
|
||||
name = "rainbow bedsheet"
|
||||
desc = "A multicolored blanket. It's actually several different sheets cut up and sewn together."
|
||||
icon_state = "sheetrainbow"
|
||||
item_color = "rainbow"
|
||||
|
||||
/obj/item/weapon/bedsheet/red
|
||||
icon_state = "sheetred"
|
||||
item_color = "red"
|
||||
|
||||
/obj/item/weapon/bedsheet/yellow
|
||||
icon_state = "sheetyellow"
|
||||
item_color = "yellow"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/bedsheet/brown
|
||||
icon_state = "sheetbrown"
|
||||
item_color = "cargo"
|
||||
|
||||
/obj/item/weapon/bedsheet/black
|
||||
icon_state = "sheetblack"
|
||||
item_color = "black"
|
||||
|
||||
/obj/item/weapon/bedsheet/centcom
|
||||
name = "\improper 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"
|
||||
|
||||
/obj/item/weapon/bedsheet/syndie
|
||||
name = "syndicate bedsheet"
|
||||
desc = "It has a syndicate emblem and it has an aura of evil."
|
||||
icon_state = "sheetsyndie"
|
||||
item_color = "syndie"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/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"
|
||||
|
||||
/obj/item/weapon/bedsheet/ian
|
||||
icon_state = "sheetian"
|
||||
item_color = "ian"
|
||||
|
||||
/obj/item/weapon/bedsheet/random
|
||||
icon_state = "sheetrainbow"
|
||||
item_color = "rainbow"
|
||||
name = "random bedsheet"
|
||||
desc = "If you're reading this description ingame, something has gone wrong! Honk!"
|
||||
|
||||
/obj/item/weapon/bedsheet/random/New()
|
||||
var/obj/item/weapon/bedsheet/B = pick(subtypesof(/obj/item/weapon/bedsheet) - /obj/item/weapon/bedsheet/random)
|
||||
name = initial(B.name)
|
||||
desc = initial(B.desc)
|
||||
icon_state = initial(B.icon_state)
|
||||
item_state = initial(B.item_state)
|
||||
item_color = initial(B.item_color)
|
||||
|
||||
/obj/structure/bedsheetbin
|
||||
name = "linen bin"
|
||||
desc = "It looks rather cosy."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "linenbin-full"
|
||||
anchored = 1
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
var/amount = 10
|
||||
var/list/sheets = list()
|
||||
var/obj/item/hidden = null
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/examine(mob/user)
|
||||
..()
|
||||
if(amount < 1)
|
||||
user << "There are no bed sheets in the bin."
|
||||
else if(amount == 1)
|
||||
user << "There is one bed sheet in the bin."
|
||||
else
|
||||
user << "There are [amount] bed sheets in the bin."
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/update_icon()
|
||||
switch(amount)
|
||||
if(0)
|
||||
icon_state = "linenbin-empty"
|
||||
if(1 to 5)
|
||||
icon_state = "linenbin-half"
|
||||
else
|
||||
icon_state = "linenbin-full"
|
||||
|
||||
/obj/structure/bedsheetbin/fire_act()
|
||||
if(!amount)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bedsheetbin/burn()
|
||||
amount = 0
|
||||
extinguish()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bedsheetbin/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/bedsheet))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
sheets.Add(I)
|
||||
amount++
|
||||
user << "<span class='notice'>You put [I] in [src].</span>"
|
||||
update_icon()
|
||||
else if(amount && !hidden && I.w_class < 4) //make sure there's sheets to hide it among, make sure nothing else is hidden in there.
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [I] is stuck to your hand, you cannot hide it among the sheets!</span>"
|
||||
return
|
||||
I.loc = src
|
||||
hidden = I
|
||||
user << "<span class='notice'>You hide [I] among the sheets.</span>"
|
||||
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/attack_hand(mob/user)
|
||||
if(user.lying)
|
||||
return
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/weapon/bedsheet/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/weapon/bedsheet(loc)
|
||||
|
||||
B.loc = user.loc
|
||||
user.put_in_hands(B)
|
||||
user << "<span class='notice'>You take [B] out of [src].</span>"
|
||||
update_icon()
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = user.loc
|
||||
user << "<span class='notice'>[hidden] falls out of [B]!</span>"
|
||||
hidden = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
/obj/structure/bedsheetbin/attack_tk(mob/user)
|
||||
if(amount >= 1)
|
||||
amount--
|
||||
|
||||
var/obj/item/weapon/bedsheet/B
|
||||
if(sheets.len > 0)
|
||||
B = sheets[sheets.len]
|
||||
sheets.Remove(B)
|
||||
|
||||
else
|
||||
B = new /obj/item/weapon/bedsheet(loc)
|
||||
|
||||
B.loc = loc
|
||||
user << "<span class='notice'>You telekinetically remove [B] from [src].</span>"
|
||||
update_icon()
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = loc
|
||||
hidden = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
@@ -0,0 +1,434 @@
|
||||
/obj/structure/closet
|
||||
name = "closet"
|
||||
desc = "It's a basic storage unit."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "generic"
|
||||
density = 1
|
||||
var/icon_door = null
|
||||
var/icon_door_override = FALSE //override to have open overlay use icon different to its base's
|
||||
var/secure = FALSE //secure locker or not, also used if overriding a non-secure locker with a secure door overlay to add fancy lights
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/broken = FALSE
|
||||
var/large = TRUE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/breakout_time = 2
|
||||
var/lastbang
|
||||
var/can_weld_shut = TRUE
|
||||
var/horizontal = FALSE
|
||||
var/allow_objects = FALSE
|
||||
var/allow_dense = FALSE
|
||||
var/dense_when_open = FALSE //if it's dense when open or not
|
||||
var/max_mob_size = MOB_SIZE_HUMAN //Biggest mob_size accepted by the container
|
||||
var/mob_storage_capacity = 3 // how many human sized mob/living can fit together inside a closet.
|
||||
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/cutting_tool = /obj/item/weapon/weldingtool
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.ogg'
|
||||
var/cutting_sound = 'sound/items/Welder.ogg'
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/closet/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/initialize()
|
||||
..()
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
take_contents()
|
||||
|
||||
/obj/structure/closet/Destroy()
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/update_icon()
|
||||
cut_overlays()
|
||||
if(!opened)
|
||||
if(icon_door)
|
||||
add_overlay("[icon_door]_door")
|
||||
else
|
||||
add_overlay("[icon_state]_door")
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
if(secure)
|
||||
if(!broken)
|
||||
if(locked)
|
||||
add_overlay("locked")
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
else
|
||||
add_overlay("off")
|
||||
|
||||
else
|
||||
if(icon_door_override)
|
||||
add_overlay("[icon_door]_open")
|
||||
else
|
||||
add_overlay("[icon_state]_open")
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
..()
|
||||
if(broken)
|
||||
user << "<span class='notice'>It appears to be broken.</span>"
|
||||
else if(secure && !opened)
|
||||
user << "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>"
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0 || wall_mounted)
|
||||
return 1
|
||||
return !density
|
||||
|
||||
/obj/structure/closet/proc/can_open(mob/living/user)
|
||||
if(welded || locked)
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
|
||||
if(user)
|
||||
user << "<span class='danger'>There's something large on top of [src], preventing it from opening.</span>" //you... think? there's something standing on it ffs
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/can_close(mob/living/user)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/structure/closet/closet in T)
|
||||
if(closet != src && !closet.wall_mounted)
|
||||
return 0
|
||||
for(var/mob/living/L in T)
|
||||
if(L.anchored || horizontal && L.mob_size > MOB_SIZE_TINY && L.density)
|
||||
if(user)
|
||||
user << "<span class='danger'>There's something too large in [src], preventing it from closing.</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/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 = 0
|
||||
|
||||
/obj/structure/closet/proc/take_contents()
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/AM in T)
|
||||
if(insert(AM) == -1) // limit reached
|
||||
break
|
||||
|
||||
/obj/structure/closet/proc/open(mob/living/user)
|
||||
if(opened || !can_open(user))
|
||||
return
|
||||
playsound(loc, open_sound, 15, 1, -3)
|
||||
opened = 1
|
||||
if(!dense_when_open)
|
||||
density = 0
|
||||
climb_time *= 0.5 //it's faster to climb onto an open thing
|
||||
dump_contents()
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/insert(atom/movable/AM)
|
||||
if(contents.len >= storage_capacity)
|
||||
return -1
|
||||
|
||||
|
||||
if(ismob(AM))
|
||||
if(!isliving(AM)) //let's not put ghosts or camera mobs inside closets...
|
||||
return
|
||||
var/mob/living/L = AM
|
||||
if(L.anchored || L.buckled || L.incorporeal_move || L.has_buckled_mobs())
|
||||
return
|
||||
if(L.mob_size > MOB_SIZE_TINY) // Tiny mobs are treated as items.
|
||||
if(horizontal && L.density)
|
||||
return
|
||||
if(L.mob_size > max_mob_size)
|
||||
return
|
||||
var/mobs_stored = 0
|
||||
for(var/mob/living/M in contents)
|
||||
if(++mobs_stored >= mob_storage_capacity)
|
||||
return
|
||||
L.stop_pulling()
|
||||
else if(istype(AM, /obj/structure/closet))
|
||||
return
|
||||
else if(isobj(AM))
|
||||
if(!allow_objects && !istype(AM, /obj/item) && !istype(AM, /obj/effect/dummy/chameleon))
|
||||
return
|
||||
if(!allow_dense && AM.density)
|
||||
return
|
||||
if(AM.anchored || AM.has_buckled_mobs() || (AM.flags & NODROP))
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
AM.forceMove(src)
|
||||
if(AM.pulledby)
|
||||
AM.pulledby.stop_pulling()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/close(mob/living/user)
|
||||
if(!opened || !can_close(user))
|
||||
return 0
|
||||
take_contents()
|
||||
playsound(loc, close_sound, 15, 1, -3)
|
||||
climb_time = initial(climb_time)
|
||||
opened = 0
|
||||
density = 1
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/living/user)
|
||||
if(opened)
|
||||
return close(user)
|
||||
else
|
||||
return open(user)
|
||||
|
||||
/obj/structure/closet/ex_act(severity, target)
|
||||
contents_explosion(severity, target)
|
||||
if(loc && ispath(material_drop) && !(flags & NODECONSTRUCT))
|
||||
new material_drop(loc)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/structure/closet/bullet_act(obj/item/projectile/P)
|
||||
..()
|
||||
if(P.damage_type == BRUTE || P.damage_type == BURN)
|
||||
health -= P.damage
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] destroys \the [src].</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/blob_act(obj/effect/blob/B)
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(user in src)
|
||||
return
|
||||
if(opened)
|
||||
if(istype(W, cutting_tool))
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
user << "<span class='notice'>You begin cutting \the [src] apart...</span>"
|
||||
playsound(loc, cutting_sound, 40, 1)
|
||||
if(do_after(user, 40/WT.toolspeed, 1, target = src))
|
||||
if(!opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, cutting_sound, 50, 1)
|
||||
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
|
||||
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
new material_drop(T)
|
||||
qdel(src)
|
||||
return 0
|
||||
else if(user.drop_item())
|
||||
W.forceMove(loc)
|
||||
return 1
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && can_weld_shut)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
user << "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>"
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 40, 1)
|
||||
if(do_after(user, 40/WT.toolspeed, 1, target = src))
|
||||
if(opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, 'sound/items/welder.ogg', 50, 1)
|
||||
welded = !welded
|
||||
visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
update_icon()
|
||||
else if(user.a_intent != "harm" && !(W.flags & NOBLUDGEON))
|
||||
if(W.GetID() || !toggle(user))
|
||||
togglelock(user)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
|
||||
if(!istype(O) || O.anchored || istype(O, /obj/screen))
|
||||
return
|
||||
if(!istype(user) || user.incapacitated() || user.lying)
|
||||
return
|
||||
if(!Adjacent(user) || !user.Adjacent(O))
|
||||
return
|
||||
if(user == O) //try to climb onto it
|
||||
return ..()
|
||||
if(!opened)
|
||||
return
|
||||
if(!isturf(O.loc))
|
||||
return
|
||||
|
||||
var/actuallyismob = 0
|
||||
if(isliving(O))
|
||||
actuallyismob = 1
|
||||
else if(!istype(O, /obj/item))
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/list/targets = list(O, src)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='warning'>[user] [actuallyismob ? "tries to ":""]stuff [O] into [src].</span>", \
|
||||
"<span class='warning'>You [actuallyismob ? "try to ":""]stuff [O] into [src].</span>", \
|
||||
"<span class='italics'>You hear clanging.</span>")
|
||||
if(actuallyismob)
|
||||
if(do_after_mob(user, targets, 40))
|
||||
user.visible_message("<span class='notice'>[user] stuffs [O] into [src].</span>", \
|
||||
"<span class='notice'>You stuff [O] into [src].</span>", \
|
||||
"<span class='italics'>You hear a loud metal bang.</span>")
|
||||
var/mob/living/L = O
|
||||
if(!issilicon(L))
|
||||
L.Weaken(2)
|
||||
O.forceMove(T)
|
||||
close()
|
||||
else
|
||||
O.forceMove(T)
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc) || !isliving(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
if(!open())
|
||||
if(L.last_special <= world.time)
|
||||
container_resist(L)
|
||||
if(world.time > lastbang+5)
|
||||
lastbang = world.time
|
||||
for(var/mob/M in get_hearers_in_view(src, null))
|
||||
M.show_message("<FONT size=[max(0, 5 - get_dist(src, M))]>BANG, bang!</FONT>", 2)
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user)
|
||||
..()
|
||||
if(user.lying && get_dist(src, user) > 0)
|
||||
return
|
||||
|
||||
if(!toggle(user))
|
||||
togglelock(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_alien(mob/living/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Toggle Open"
|
||||
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if(iscarbon(usr) || issilicon(usr))
|
||||
attack_hand(usr)
|
||||
else
|
||||
usr << "<span class='warning'>This mob type can't use this verb.</span>"
|
||||
|
||||
// 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 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/container_resist(mob/living/user)
|
||||
if(opened)
|
||||
return
|
||||
if(istype(loc, /atom/movable))
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
var/atom/movable/AM = loc
|
||||
AM.relay_container_resist(user, src)
|
||||
return
|
||||
if(!welded && !locked)
|
||||
open()
|
||||
return
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user << "<span class='notice'>You lean on the back of [src] and start pushing the door open.</span>"
|
||||
visible_message("<span class='warning'>[src] begins to shake violently!</span>")
|
||||
if(do_after(user,(breakout_time * 60 * 10), target = src)) //minutes * 60seconds * 10deciseconds
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) )
|
||||
return
|
||||
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting
|
||||
welded = 0 //applies to all lockers lockers
|
||||
locked = 0 //applies to critter crates and secure lockers only
|
||||
broken = 1 //applies to secure lockers only
|
||||
user.visible_message("<span class='danger'>[user] successfully broke out of [src]!</span>",
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
open()
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
user << "<span class='warning'>You fail to break out of [src]!</span>"
|
||||
|
||||
/obj/structure/closet/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
return
|
||||
if(opened || !secure)
|
||||
return
|
||||
else
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/proc/togglelock(mob/living/user)
|
||||
if(secure && !broken)
|
||||
if(allowed(user))
|
||||
add_fingerprint(user)
|
||||
locked = !locked
|
||||
user.visible_message("<span class='notice'>[user] [locked ? null : "un"]locks [src].</span>",
|
||||
"<span class='notice'>You [locked ? null : "un"]lock [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>Access Denied</span>"
|
||||
else if(secure && broken)
|
||||
user << "<span class='warning'>\The [src] is broken!</span>"
|
||||
|
||||
/obj/structure/closet/emag_act(mob/user)
|
||||
if(secure && !broken)
|
||||
user.visible_message("<span class='warning'>Sparks fly from [src]!</span>",
|
||||
"<span class='warning'>You scramble [src]'s lock, breaking it open!</span>",
|
||||
"<span class='italics'>You hear a faint electrical spark.</span>")
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
||||
broken = 1
|
||||
locked = 0
|
||||
update_icon()
|
||||
|
||||
/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/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
O.emp_act(severity)
|
||||
if(secure && !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())
|
||||
..()
|
||||
@@ -0,0 +1,69 @@
|
||||
/obj/structure/closet/cardboard
|
||||
name = "large cardboard box"
|
||||
desc = "Just a box..."
|
||||
icon_state = "cardboard"
|
||||
health = 10
|
||||
mob_storage_capacity = 1
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
can_weld_shut = 0
|
||||
cutting_tool = /obj/item/weapon/wirecutters
|
||||
open_sound = 'sound/effects/rustle2.ogg'
|
||||
cutting_sound = 'sound/items/poster_ripped.ogg'
|
||||
material_drop = /obj/item/stack/sheet/cardboard
|
||||
var/move_speed_multiplier = 1
|
||||
var/move_delay = 0
|
||||
var/egged = 0
|
||||
|
||||
/obj/structure/closet/cardboard/relaymove(mob/user, direction)
|
||||
if(opened || move_delay || user.stat || user.stunned || user.weakened || user.paralysis || !isturf(loc) || !has_gravity(loc))
|
||||
return
|
||||
move_delay = 1
|
||||
if(step(src, direction))
|
||||
spawn(config.walk_speed*move_speed_multiplier)
|
||||
move_delay = 0
|
||||
else
|
||||
move_delay = 0
|
||||
|
||||
/obj/structure/closet/cardboard/open()
|
||||
if(opened || !can_open())
|
||||
return 0
|
||||
if(!egged)
|
||||
var/mob/living/Snake = null
|
||||
for(var/mob/living/L in src.contents)
|
||||
Snake = L
|
||||
break
|
||||
if(Snake)
|
||||
var/list/alerted = viewers(7,src)
|
||||
if(alerted)
|
||||
for(var/mob/living/L in alerted)
|
||||
if(!L.stat)
|
||||
L.do_alert_animation(L)
|
||||
egged = 1
|
||||
alerted << sound('sound/machines/chime.ogg')
|
||||
..()
|
||||
|
||||
/mob/living/proc/do_alert_animation(atom/A)
|
||||
var/image/I
|
||||
I = image('icons/obj/closet.dmi', A, "cardboard_special", A.layer+1)
|
||||
var/list/viewing = list()
|
||||
for(var/mob/M in viewers(A))
|
||||
if(M.client)
|
||||
viewing |= M.client
|
||||
flick_overlay(I,viewing,8)
|
||||
I.alpha = 0
|
||||
animate(I, pixel_z = 32, alpha = 255, time = 5, easing = ELASTIC_EASING)
|
||||
|
||||
|
||||
/obj/structure/closet/cardboard/metal
|
||||
name = "large metal box"
|
||||
desc = "THE COWARDS! THE FOOLS!"
|
||||
icon_state = "metalbox"
|
||||
health = 500
|
||||
mob_storage_capacity = 5
|
||||
burn_state = FIRE_PROOF
|
||||
move_speed_multiplier = 2
|
||||
cutting_tool = /obj/item/weapon/weldingtool
|
||||
open_sound = 'sound/machines/click.ogg'
|
||||
cutting_sound = 'sound/items/Welder.ogg'
|
||||
material_drop = /obj/item/stack/sheet/plasteel
|
||||
@@ -0,0 +1,64 @@
|
||||
/obj/structure/closet/athletic_mixed
|
||||
name = "athletic wardrobe"
|
||||
desc = "It's a storage unit for athletic wear."
|
||||
icon_door = "mixed"
|
||||
|
||||
/obj/structure/closet/athletic_mixed/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/shorts/purple(src)
|
||||
new /obj/item/clothing/under/shorts/grey(src)
|
||||
new /obj/item/clothing/under/shorts/black(src)
|
||||
new /obj/item/clothing/under/shorts/red(src)
|
||||
new /obj/item/clothing/under/shorts/blue(src)
|
||||
new /obj/item/clothing/under/shorts/green(src)
|
||||
|
||||
|
||||
/obj/structure/closet/boxinggloves
|
||||
name = "boxing gloves"
|
||||
desc = "It's a storage unit for gloves for use in the boxing ring."
|
||||
|
||||
/obj/structure/closet/boxinggloves/New()
|
||||
..()
|
||||
new /obj/item/clothing/gloves/boxing/blue(src)
|
||||
new /obj/item/clothing/gloves/boxing/green(src)
|
||||
new /obj/item/clothing/gloves/boxing/yellow(src)
|
||||
new /obj/item/clothing/gloves/boxing(src)
|
||||
|
||||
|
||||
/obj/structure/closet/masks
|
||||
name = "mask closet"
|
||||
desc = "IT'S A STORAGE UNIT FOR FIGHTER MASKS OLE!"
|
||||
|
||||
/obj/structure/closet/masks/New()
|
||||
..()
|
||||
new /obj/item/clothing/mask/luchador(src)
|
||||
new /obj/item/clothing/mask/luchador/rudos(src)
|
||||
new /obj/item/clothing/mask/luchador/tecnicos(src)
|
||||
|
||||
|
||||
/obj/structure/closet/lasertag/red
|
||||
name = "red laser tag equipment"
|
||||
desc = "It's a storage unit for laser tag equipment."
|
||||
icon_door = "red"
|
||||
|
||||
/obj/structure/closet/lasertag/red/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
new /obj/item/clothing/head/helmet/redtaghelm(src)
|
||||
|
||||
|
||||
/obj/structure/closet/lasertag/blue
|
||||
name = "blue laser tag equipment"
|
||||
desc = "It's a storage unit for laser tag equipment."
|
||||
icon_door = "blue"
|
||||
|
||||
/obj/structure/closet/lasertag/blue/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
new /obj/item/clothing/head/helmet/bluetaghelm(src)
|
||||
@@ -0,0 +1,107 @@
|
||||
/obj/structure/closet/cabinet
|
||||
name = "cabinet"
|
||||
desc = "Old will forever be in fashion."
|
||||
icon_state = "cabinet"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
|
||||
/obj/structure/closet/acloset
|
||||
name = "strange closet"
|
||||
desc = "It looks alien!"
|
||||
icon_state = "alien"
|
||||
|
||||
|
||||
/obj/structure/closet/gimmick
|
||||
name = "administrative supply closet"
|
||||
desc = "It's a storage unit for things that have no right being here."
|
||||
icon_state = "syndicate"
|
||||
|
||||
/obj/structure/closet/gimmick/russian
|
||||
name = "russian surplus closet"
|
||||
desc = "It's a storage unit for Russian standard-issue surplus."
|
||||
|
||||
/obj/structure/closet/gimmick/russian/New()
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/clothing/head/ushanka(src)
|
||||
for(var/i in 1 to 5)
|
||||
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."
|
||||
|
||||
/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/sechailer/swat(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/swat(src)
|
||||
new /obj/item/clothing/shoes/combat/swat(src)
|
||||
new /obj/item/clothing/shoes/combat/swat(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/deathsquad(src)
|
||||
new /obj/item/clothing/suit/space/hardsuit/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!"
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred
|
||||
name = "red-team Thunderdome closet"
|
||||
icon_door = "red"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdred/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/armor/tdome/red(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/melee/energy/sword/saber(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen
|
||||
name = "green-team Thunderdome closet"
|
||||
icon_door = "green"
|
||||
|
||||
/obj/structure/closet/thunderdome/tdgreen/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/armor/tdome/green(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/melee/energy/sword/saber(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/helmet/thunderdome(src)
|
||||
|
||||
/obj/structure/closet/malf/suits
|
||||
desc = "It's a storage unit for operational gear."
|
||||
icon_state = "syndicate"
|
||||
|
||||
/obj/structure/closet/malf/suits/New()
|
||||
..()
|
||||
new /obj/item/weapon/tank/jetpack/void(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/clothing/head/helmet/space/nasavoid(src)
|
||||
new /obj/item/clothing/suit/space/nasavoid(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/stock_parts/cell(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
@@ -0,0 +1,366 @@
|
||||
// Closets for specific jobs
|
||||
|
||||
/obj/structure/closet/gmcloset
|
||||
name = "formal closet"
|
||||
desc = "It's a storage unit for formal clothing."
|
||||
icon_door = "black"
|
||||
|
||||
/obj/structure/closet/gmcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/head/that(src)
|
||||
new /obj/item/device/radio/headset/headset_srv(src)
|
||||
new /obj/item/device/radio/headset/headset_srv(src)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
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/tie/waistcoat(src)
|
||||
new /obj/item/clothing/tie/waistcoat(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/rag(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/rag(src)
|
||||
new /obj/item/weapon/storage/box/beanbag(src)
|
||||
new /obj/item/clothing/suit/armor/vest/alt(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/reagent(src)
|
||||
new /obj/item/weapon/storage/belt/bandolier(src)
|
||||
|
||||
/obj/structure/closet/chefcloset
|
||||
name = "\proper chef's closet"
|
||||
desc = "It's a storage unit for foodservice garments and mouse traps."
|
||||
icon_door = "black"
|
||||
|
||||
/obj/structure/closet/chefcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/waiter(src)
|
||||
new /obj/item/clothing/under/waiter(src)
|
||||
new /obj/item/device/radio/headset/headset_srv(src)
|
||||
new /obj/item/device/radio/headset/headset_srv(src)
|
||||
new /obj/item/clothing/tie/waistcoat(src)
|
||||
new /obj/item/clothing/tie/waistcoat(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/apron/chef(src)
|
||||
new /obj/item/clothing/head/soft/mime(src)
|
||||
new /obj/item/clothing/head/soft/mime(src)
|
||||
new /obj/item/weapon/storage/box/mousetraps(src)
|
||||
new /obj/item/weapon/storage/box/mousetraps(src)
|
||||
new /obj/item/clothing/suit/toggle/chef(src)
|
||||
new /obj/item/clothing/under/rank/chef(src)
|
||||
new /obj/item/clothing/head/chefhat(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/rag(src)
|
||||
|
||||
/obj/structure/closet/jcloset
|
||||
name = "custodial closet"
|
||||
desc = "It's a storage unit for janitorial clothes and gear."
|
||||
icon_door = "mixed"
|
||||
|
||||
/obj/structure/closet/jcloset/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/janitor(src)
|
||||
new /obj/item/weapon/cartridge/janitor(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/holosign_creator(src)
|
||||
new /obj/item/device/lightreplacer(src)
|
||||
new /obj/item/weapon/soap(src)
|
||||
new /obj/item/weapon/storage/bag/trash(src)
|
||||
new /obj/item/clothing/shoes/galoshes(src)
|
||||
new /obj/item/weapon/watertank/janitor(src)
|
||||
new /obj/item/weapon/storage/belt/janitor(src)
|
||||
|
||||
|
||||
/obj/structure/closet/lawcloset
|
||||
name = "legal closet"
|
||||
desc = "It's a storage unit for courtroom apparel and items."
|
||||
icon_door = "blue"
|
||||
|
||||
/obj/structure/closet/lawcloset/New()
|
||||
..()
|
||||
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/toggle/lawyer(src)
|
||||
new /obj/item/clothing/under/lawyer/purpsuit(src)
|
||||
new /obj/item/clothing/suit/toggle/lawyer/purple(src)
|
||||
new /obj/item/clothing/under/lawyer/blacksuit(src)
|
||||
new /obj/item/clothing/suit/toggle/lawyer/black(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black
|
||||
name = "chapel wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-approved religious attire."
|
||||
icon_door = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/under/rank/chaplain(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/suit/nun(src)
|
||||
new /obj/item/clothing/head/nun_hood(src)
|
||||
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
|
||||
new /obj/item/clothing/suit/holidaypriest(src)
|
||||
new /obj/item/weapon/storage/backpack/cultpack (src)
|
||||
new /obj/item/clothing/head/helmet/knight/templar(src)
|
||||
new /obj/item/clothing/suit/armor/riot/knight/templar(src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/coffin
|
||||
name = "coffin"
|
||||
desc = "It's a burial receptacle for the dearly departed."
|
||||
icon_state = "coffin"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_door = "red"
|
||||
|
||||
/obj/structure/closet/wardrobe/red/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/security(src)
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/sec(src)
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/sec(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/security(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/jackboots(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/soft/sec(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/cargotech
|
||||
name = "cargo wardrobe"
|
||||
icon_door = "orange"
|
||||
|
||||
/obj/structure/closet/wardrobe/cargotech/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/cargo(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/cargotech(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/gloves/fingerless(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/soft(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow
|
||||
name = "atmospherics wardrobe"
|
||||
icon_door = "atmos_wardrobe"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/atmospheric_technician(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow
|
||||
name = "engineering wardrobe"
|
||||
icon_door = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
|
||||
new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/engineering(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/engineer(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/workboots(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/white/medical
|
||||
name = "medical doctor's wardrobe"
|
||||
|
||||
/obj/structure/closet/wardrobe/white/medical/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/med(src)
|
||||
new /obj/item/weapon/storage/backpack/medic(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_med(src)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/medical(src)
|
||||
new /obj/item/clothing/under/rank/nursesuit (src)
|
||||
new /obj/item/clothing/head/nursehat (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)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/emt(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/emt(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/soft/emt(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black
|
||||
name = "robotics wardrobe"
|
||||
icon_door = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/robotics_black/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/glasses/hud/diagnostic(src)
|
||||
new /obj/item/clothing/glasses/hud/diagnostic(src)
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/under/rank/roboticist(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/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)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/mask/bandana/skull(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/mask/bandana/skull(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white
|
||||
name = "chemistry wardrobe"
|
||||
icon_door = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/chemist(src)
|
||||
new /obj/item/weapon/storage/backpack/chemistry(src)
|
||||
new /obj/item/weapon/storage/backpack/chemistry(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_chem(src)
|
||||
new /obj/item/weapon/storage/bag/chemistry(src)
|
||||
new /obj/item/weapon/storage/bag/chemistry(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white
|
||||
name = "genetics wardrobe"
|
||||
icon_door = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/genetics(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/genetics(src)
|
||||
new /obj/item/weapon/storage/backpack/genetics(src)
|
||||
new /obj/item/weapon/storage/backpack/genetics(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_gen(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_gen(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white
|
||||
name = "virology wardrobe"
|
||||
icon_door = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/virologist(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/virologist(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/clothing/mask/surgical(src)
|
||||
new /obj/item/weapon/storage/backpack/virology(src)
|
||||
new /obj/item/weapon/storage/backpack/virology(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_vir(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_vir(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/science_white
|
||||
name = "science wardrobe"
|
||||
icon_door = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/science_white/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/science(src)
|
||||
new /obj/item/weapon/storage/backpack/science(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_tox(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_tox(src)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/scientist(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
new /obj/item/device/radio/headset/headset_sci(src)
|
||||
new /obj/item/device/radio/headset/headset_sci(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/botanist
|
||||
name = "botanist wardrobe"
|
||||
icon_door = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/botanist/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/botany(src)
|
||||
new /obj/item/weapon/storage/backpack/botany(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_hyd(src)
|
||||
new /obj/item/weapon/storage/backpack/satchel_hyd(src)
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/hydro(src)
|
||||
new /obj/item/clothing/suit/apron(src)
|
||||
new /obj/item/clothing/suit/apron(src)
|
||||
new /obj/item/clothing/suit/apron/overalls(src)
|
||||
new /obj/item/clothing/suit/apron/overalls(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/hydroponics(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/mask/bandana(src)
|
||||
@@ -0,0 +1,53 @@
|
||||
/obj/structure/closet/l3closet
|
||||
name = "level-3 biohazard gear closet"
|
||||
desc = "It's a storage unit for level-3 biohazard gear."
|
||||
icon_state = "bio"
|
||||
|
||||
/obj/structure/closet/l3closet/New()
|
||||
..()
|
||||
new /obj/item/weapon/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/virology
|
||||
icon_state = "bio_viro"
|
||||
|
||||
/obj/structure/closet/l3closet/virology/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/security
|
||||
icon_state = "bio_sec"
|
||||
|
||||
/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_jan"
|
||||
|
||||
/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_viro"
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/bag/bio( src )
|
||||
new /obj/item/clothing/suit/bio_suit/scientist( src )
|
||||
new /obj/item/clothing/head/bio_hood/scientist( src )
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/obj/structure/closet/secure_closet/bar
|
||||
name = "booze storage"
|
||||
req_access = list(access_bar)
|
||||
icon_state = "cabinet"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
|
||||
/obj/structure/closet/secure_closet/bar/New()
|
||||
..()
|
||||
for(var/i in 1 to 10)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
|
||||
@@ -0,0 +1,19 @@
|
||||
/obj/structure/closet/secure_closet/quartermaster
|
||||
name = "\proper quartermaster's locker"
|
||||
req_access = list(access_qm)
|
||||
icon_state = "qm"
|
||||
|
||||
/obj/structure/closet/secure_closet/quartermaster/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/cloak/qm(src)
|
||||
new /obj/item/clothing/under/rank/cargo(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/gloves/fingerless(src)
|
||||
new /obj/item/device/megaphone/cargo(src)
|
||||
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/head/soft(src)
|
||||
new /obj/item/device/export_scanner(src)
|
||||
new /obj/item/weapon/door_remote/quartermaster(src)
|
||||
@@ -0,0 +1,93 @@
|
||||
/obj/structure/closet/secure_closet/engineering_chief
|
||||
name = "\proper chief engineer's locker"
|
||||
req_access = list(access_ce)
|
||||
icon_state = "ce"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_chief/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/cloak/ce(src)
|
||||
new /obj/item/clothing/under/rank/chief_engineer(src)
|
||||
new /obj/item/clothing/head/hardhat/white(src)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/hardsuit_jetpack(src)
|
||||
new /obj/item/weapon/cartridge/ce(src)
|
||||
new /obj/item/device/radio/headset/heads/ce(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
new /obj/item/device/megaphone/command(src)
|
||||
new /obj/item/weapon/storage/box/permits(src)
|
||||
new /obj/item/areaeditor/blueprints(src)
|
||||
new /obj/item/weapon/airlock_painter(src)
|
||||
new /obj/item/weapon/holosign_creator/engineering(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/assembly/flash/handheld(src)
|
||||
new /obj/item/clothing/glasses/meson/engine(src)
|
||||
new /obj/item/weapon/door_remote/chief_engineer(src)
|
||||
new /obj/item/weapon/pipe_dispenser(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
name = "electrical supplies locker"
|
||||
req_access = list(access_engine_equip)
|
||||
icon_state = "eng"
|
||||
icon_door = "eng_elec"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical/New()
|
||||
..()
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
new /obj/item/clothing/gloves/color/yellow(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/electronics/apc(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/device/multitool(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding
|
||||
name = "welding supplies locker"
|
||||
req_access = list(access_engine_equip)
|
||||
icon_state = "eng"
|
||||
icon_door = "eng_weld"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/welding(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/weldingtool/largetank(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal
|
||||
name = "engineer's locker"
|
||||
req_access = list(access_engine_equip)
|
||||
icon_state = "eng_secure"
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal/New()
|
||||
..()
|
||||
new /obj/item/device/radio/headset/headset_eng(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
|
||||
new /obj/item/weapon/holosign_creator/engineering(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/clothing/glasses/meson/engine(src)
|
||||
new /obj/item/weapon/storage/box/emptysandbags(src)
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/atmospherics
|
||||
name = "\proper atmospheric technician's locker"
|
||||
req_access = list(access_atmospherics)
|
||||
icon_state = "atmos"
|
||||
|
||||
/obj/structure/closet/secure_closet/atmospherics/New()
|
||||
..()
|
||||
new /obj/item/device/radio/headset/headset_eng(src)
|
||||
new /obj/item/weapon/pipe_dispenser(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
|
||||
new /obj/item/device/analyzer(src)
|
||||
new /obj/item/weapon/holosign_creator/engineering(src)
|
||||
new /obj/item/weapon/watertank/atmos(src)
|
||||
new /obj/item/clothing/suit/fire/atmos(src)
|
||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||
new /obj/item/clothing/glasses/meson/engine/tray(src)
|
||||
@@ -0,0 +1,72 @@
|
||||
/obj/structure/closet/secure_closet/freezer
|
||||
icon_state = "freezer"
|
||||
|
||||
/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 = 0, i < 3, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/flour(src)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/rice(src)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/sugar(src)
|
||||
|
||||
/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/weapon/reagent_containers/food/condiment/milk(src)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/soymilk(src)
|
||||
for(var/i = 0, i < 2, i++)
|
||||
new /obj/item/weapon/storage/fancy/egg_box(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/kitchen/mining
|
||||
req_access = list()
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat
|
||||
name = "meat fridge"
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/meat/New()
|
||||
..()
|
||||
for(var/i = 0, i < 4, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/slab/monkey(src)
|
||||
/obj/structure/closet/secure_closet/freezer/fridge
|
||||
name = "refrigerator"
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/fridge/New()
|
||||
..()
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/milk(src)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/soymilk(src)
|
||||
for(var/i = 0, i < 2, i++)
|
||||
new /obj/item/weapon/storage/fancy/egg_box(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/money
|
||||
name = "freezer"
|
||||
desc = "This contains cold hard cash."
|
||||
req_access = list(access_heads_vault)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/money/New()
|
||||
..()
|
||||
for(var/i = 0, i < 3, i++)
|
||||
new /obj/item/stack/spacecash/c1000(src)
|
||||
for(var/i = 0, i < 5, i++)
|
||||
new /obj/item/stack/spacecash/c500(src)
|
||||
for(var/i = 0, i < 6, i++)
|
||||
new /obj/item/stack/spacecash/c200(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/cream_pie
|
||||
name = "cream pie closet"
|
||||
desc = "Contains pies filled with cream and/or custard, you sickos."
|
||||
req_access = list(access_theatre)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/pie/New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/pie/cream(src)
|
||||
@@ -0,0 +1,13 @@
|
||||
/obj/structure/closet/secure_closet/hydroponics
|
||||
name = "botanist's locker"
|
||||
req_access = list(access_hydroponics)
|
||||
icon_state = "hydro"
|
||||
|
||||
/obj/structure/closet/secure_closet/hydroponics/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/bag/plants/portaseeder(src)
|
||||
new /obj/item/device/plant_analyzer(src)
|
||||
new /obj/item/device/radio/headset/headset_srv(src)
|
||||
new /obj/item/weapon/cultivator(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/storage/box/disks_plantgene(src)
|
||||
@@ -0,0 +1,93 @@
|
||||
/obj/structure/closet/secure_closet/medical1
|
||||
name = "medicine closet"
|
||||
desc = "Filled to the brim with medical junk."
|
||||
icon_state = "med"
|
||||
req_access = list(access_medical)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical1/New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/beaker(src)
|
||||
new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
new /obj/item/weapon/reagent_containers/dropper(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
new /obj/item/weapon/storage/box/syringes(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/toxin(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/morphine(src)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/morphine(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/epinephrine(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/glass/bottle/charcoal(src)
|
||||
new /obj/item/weapon/storage/box/rxglasses(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical2
|
||||
name = "anesthetic closet"
|
||||
desc = "Used to knock people out."
|
||||
req_access = list(access_surgery)
|
||||
|
||||
/obj/structure/closet/secure_closet/medical2/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/tank/internals/anesthetic(src)
|
||||
for(var/i in 1 to 3)
|
||||
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 = "med_secure"
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3/New()
|
||||
..()
|
||||
new /obj/item/device/radio/headset/headset_med(src)
|
||||
new /obj/item/weapon/defibrillator/loaded(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
new /obj/item/clothing/glasses/hud/health(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO
|
||||
name = "\proper chief medical officer's locker"
|
||||
req_access = list(access_cmo)
|
||||
icon_state = "cmo"
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/cloak/cmo(src)
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/med(src)
|
||||
new /obj/item/clothing/suit/bio_suit/cmo(src)
|
||||
new /obj/item/clothing/head/bio_hood/cmo(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/cmo(src)
|
||||
new /obj/item/clothing/under/rank/chief_medical_officer(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown (src)
|
||||
new /obj/item/weapon/cartridge/cmo(src)
|
||||
new /obj/item/device/radio/headset/heads/cmo(src)
|
||||
new /obj/item/device/megaphone/command(src)
|
||||
new /obj/item/weapon/defibrillator/compact/loaded(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/weapon/storage/belt/medical(src)
|
||||
new /obj/item/device/assembly/flash/handheld(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/CMO(src)
|
||||
new /obj/item/device/autoimplanter/cmo(src)
|
||||
new /obj/item/weapon/door_remote/chief_medical_officer(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/animal
|
||||
name = "animal control"
|
||||
req_access = list(access_surgery)
|
||||
|
||||
/obj/structure/closet/secure_closet/animal/New()
|
||||
..()
|
||||
new /obj/item/device/assembly/signaler(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/device/electropack(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/chemical
|
||||
name = "chemical closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_door = "chemical"
|
||||
|
||||
/obj/structure/closet/secure_closet/chemical/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/box/pillbottles(src)
|
||||
new /obj/item/weapon/storage/box/pillbottles(src)
|
||||
@@ -0,0 +1,67 @@
|
||||
/obj/structure/closet/secure_closet/ertCom
|
||||
name = "commander's closet"
|
||||
desc = "Emergency Response Team equipment locker."
|
||||
req_access = list(access_cent_captain)
|
||||
icon_state = "cap"
|
||||
|
||||
/obj/structure/closet/secure_closet/ertCom/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/firstaid/regular(src)
|
||||
new /obj/item/weapon/storage/box/handcuffs(src)
|
||||
new /obj/item/device/aicard(src)
|
||||
new /obj/item/device/assembly/flash/handheld(src)
|
||||
if(prob(50))
|
||||
new /obj/item/ammo_box/magazine/m50(src)
|
||||
new /obj/item/ammo_box/magazine/m50(src)
|
||||
new /obj/item/weapon/gun/projectile/automatic/pistol/deagle(src)
|
||||
else
|
||||
new /obj/item/ammo_box/a357(src)
|
||||
new /obj/item/ammo_box/a357(src)
|
||||
new /obj/item/weapon/gun/projectile/revolver/mateba(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/ertSec
|
||||
name = "security closet"
|
||||
desc = "Emergency Response Team equipment locker."
|
||||
req_access = list(access_cent_specops)
|
||||
icon_state = "hos"
|
||||
|
||||
/obj/structure/closet/secure_closet/ertSec/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/box/teargas(src)
|
||||
new /obj/item/weapon/storage/box/flashes(src)
|
||||
new /obj/item/weapon/storage/box/handcuffs(src)
|
||||
new /obj/item/weapon/shield/riot/tele(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/ertMed
|
||||
name = "medical closet"
|
||||
desc = "Emergency Response Team equipment locker."
|
||||
req_access = list(access_cent_medical)
|
||||
icon_state = "cmo"
|
||||
|
||||
/obj/structure/closet/secure_closet/ertMed/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||
new /obj/item/weapon/storage/firstaid/toxin(src)
|
||||
new /obj/item/weapon/storage/firstaid/fire(src)
|
||||
new /obj/item/weapon/storage/firstaid/brute(src)
|
||||
new /obj/item/weapon/storage/firstaid/regular(src)
|
||||
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
|
||||
new /mob/living/simple_animal/bot/medbot(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/ertEngi
|
||||
name = "engineer closet"
|
||||
desc = "Emergency Response Team equipment locker."
|
||||
req_access = list(access_cent_storage)
|
||||
icon_state = "ce"
|
||||
|
||||
/obj/structure/closet/secure_closet/ertEngi/New()
|
||||
..()
|
||||
new /obj/item/stack/sheet/plasteel(src, 50)
|
||||
new /obj/item/stack/sheet/metal(src, 50)
|
||||
new /obj/item/stack/sheet/glass(src, 50)
|
||||
new /obj/item/stack/sheet/mineral/sandbags(src, 30)
|
||||
new /obj/item/clothing/shoes/magboots(src)
|
||||
new /obj/item/weapon/storage/box/metalfoam(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/rcd_ammo/large(src)
|
||||
@@ -0,0 +1,56 @@
|
||||
/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/weapon/storage/backpack/dufflebag(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_norm(src)
|
||||
new /obj/item/device/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/sneakers/white( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet
|
||||
icon_state = "cabinet"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/device/radio/headset( src )
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W, mob/user, params)
|
||||
var/obj/item/weapon/card/id/I = W.GetID()
|
||||
if(istype(I))
|
||||
if(broken)
|
||||
user << "<span class='danger'>It appears to be broken.</span>"
|
||||
return
|
||||
if(!I || !I.registered_name)
|
||||
return
|
||||
if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
locked = !locked
|
||||
update_icon()
|
||||
|
||||
if(!registered_name)
|
||||
registered_name = I.registered_name
|
||||
desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
user << "<span class='danger'>Access Denied.</span>"
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,26 @@
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "\proper research director's locker"
|
||||
req_access = list(access_rd)
|
||||
icon_state = "rd"
|
||||
|
||||
/obj/structure/closet/secure_closet/RD/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/cloak/rd(src)
|
||||
new /obj/item/clothing/suit/bio_suit/scientist(src)
|
||||
new /obj/item/clothing/head/bio_hood/scientist(src)
|
||||
new /obj/item/clothing/suit/toggle/labcoat(src)
|
||||
new /obj/item/clothing/under/rank/research_director(src)
|
||||
new /obj/item/clothing/under/rank/research_director/alt(src)
|
||||
new /obj/item/clothing/under/rank/research_director/turtleneck(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/weapon/cartridge/rd(src)
|
||||
new /obj/item/clothing/gloves/color/latex(src)
|
||||
new /obj/item/device/radio/headset/heads/rd(src)
|
||||
new /obj/item/weapon/tank/internals/air(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/megaphone/command(src)
|
||||
new /obj/item/clothing/suit/armor/reactive/teleport(src)
|
||||
new /obj/item/device/assembly/flash/handheld(src)
|
||||
new /obj/item/device/laser_pointer(src)
|
||||
new /obj/item/weapon/door_remote/research_director(src)
|
||||
new /obj/item/weapon/storage/box/firingpins(src)
|
||||
@@ -0,0 +1,7 @@
|
||||
/obj/structure/closet/secure_closet
|
||||
name = "secure locker"
|
||||
desc = "It's a card-locked storage unit."
|
||||
locked = 1
|
||||
icon_state = "secure"
|
||||
health = 200
|
||||
secure = 1
|
||||
@@ -0,0 +1,279 @@
|
||||
/obj/structure/closet/secure_closet/captains
|
||||
name = "\proper captain's locker"
|
||||
req_access = list(access_captain)
|
||||
icon_state = "cap"
|
||||
|
||||
/obj/structure/closet/secure_closet/captains/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/hooded/wintercoat/captain(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/captain(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/clothing/suit/cloak/cap(src)
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/captain(src)
|
||||
new /obj/item/clothing/suit/captunic(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/suit/armor/vest/capcarapace/alt(src)
|
||||
new /obj/item/weapon/cartridge/captain(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/weapon/storage/box/silver_ids(src)
|
||||
new /obj/item/device/radio/headset/heads/captain/alt(src)
|
||||
new /obj/item/device/radio/headset/heads/captain(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/gar/supergar(src)
|
||||
new /obj/item/clothing/gloves/color/captain(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/door_remote/captain(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/hop
|
||||
name = "\proper head of personnel's locker"
|
||||
req_access = list(access_hop)
|
||||
icon_state = "hop"
|
||||
|
||||
/obj/structure/closet/secure_closet/hop/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/head_of_personnel(src)
|
||||
new /obj/item/clothing/head/hopcap(src)
|
||||
new /obj/item/weapon/cartridge/hop(src)
|
||||
new /obj/item/device/radio/headset/heads/hop(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/weapon/storage/box/ids(src)
|
||||
new /obj/item/weapon/storage/box/ids(src)
|
||||
new /obj/item/device/megaphone/command(src)
|
||||
new /obj/item/clothing/suit/armor/vest/alt(src)
|
||||
new /obj/item/device/assembly/flash/handheld(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/weapon/restraints/handcuffs/cable/zipties(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/clothing/tie/petcollar(src)
|
||||
new /obj/item/weapon/door_remote/civillian(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/hos
|
||||
name = "\proper head of security's locker"
|
||||
req_access = list(access_hos)
|
||||
icon_state = "hos"
|
||||
|
||||
/obj/structure/closet/secure_closet/hos/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/cloak/hos(src)
|
||||
new /obj/item/weapon/cartridge/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/clothing/under/hosparadefem(src)
|
||||
new /obj/item/clothing/under/hosparademale(src)
|
||||
new /obj/item/clothing/suit/armor/vest/leather(src)
|
||||
new /obj/item/clothing/suit/armor/hos(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/alt(src)
|
||||
new /obj/item/clothing/head/HoS(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses/eyepatch(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses/gars/supergars(src)
|
||||
new /obj/item/device/megaphone/sec(src)
|
||||
new /obj/item/weapon/holosign_creator/security(src)
|
||||
new /obj/item/weapon/storage/lockbox/loyalty(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer/swat(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/shield/riot/tele(src)
|
||||
new /obj/item/weapon/storage/belt/security/full(src)
|
||||
new /obj/item/weapon/gun/energy/gun/hos(src)
|
||||
new /obj/item/device/flashlight/seclite(src)
|
||||
new /obj/item/weapon/pinpointer(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "\proper warden's locker"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "warden"
|
||||
|
||||
/obj/structure/closet/secure_closet/warden/New()
|
||||
..()
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/warden(src)
|
||||
new /obj/item/clothing/head/beret/sec/navywarden(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden/alt(src)
|
||||
new /obj/item/clothing/under/rank/warden/navyblue(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/weapon/holosign_creator/security(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer(src)
|
||||
new /obj/item/weapon/storage/box/zipties(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/belt/security/full(src)
|
||||
new /obj/item/device/flashlight/seclite(src)
|
||||
new /obj/item/clothing/gloves/color/black/krav_maga/sec(src)
|
||||
new /obj/item/weapon/door_remote/head_of_security(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "security officer's locker"
|
||||
req_access = list(access_security)
|
||||
icon_state = "sec"
|
||||
|
||||
/obj/structure/closet/secure_closet/security/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/head/helmet/sec(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/device/radio/headset/headset_sec/alt(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
|
||||
new /obj/item/device/flashlight/seclite(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/security/sec
|
||||
|
||||
/obj/structure/closet/secure_closet/security/sec/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/belt/security/full(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/security/cargo
|
||||
|
||||
/obj/structure/closet/secure_closet/security/cargo/New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/cargo(src)
|
||||
new /obj/item/device/encryptionkey/headset_cargo(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/security/engine
|
||||
|
||||
/obj/structure/closet/secure_closet/security/engine/New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/engine(src)
|
||||
new /obj/item/device/encryptionkey/headset_eng(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/security/science
|
||||
|
||||
/obj/structure/closet/secure_closet/security/science/New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/science(src)
|
||||
new /obj/item/device/encryptionkey/headset_sci(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/security/med
|
||||
|
||||
/obj/structure/closet/secure_closet/security/med/New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/medblue(src)
|
||||
new /obj/item/device/encryptionkey/headset_med(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/detective
|
||||
name = "\proper detective's cabinet"
|
||||
req_access = list(access_forensics_lockers)
|
||||
icon_state = "cabinet"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/rank/det(src)
|
||||
new /obj/item/clothing/suit/det_suit(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/gloves/color/black(src)
|
||||
new /obj/item/clothing/under/rank/det/grey(src)
|
||||
new /obj/item/clothing/tie/waistcoat(src)
|
||||
new /obj/item/clothing/suit/det_suit/grey(src)
|
||||
new /obj/item/clothing/head/fedora(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/device/detective_scanner(src)
|
||||
new /obj/item/weapon/holosign_creator/security(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(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/weapon/storage/belt/holster(src)
|
||||
new /obj/item/weapon/gun/projectile/revolver/detective(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/injection
|
||||
name = "lethal injections"
|
||||
req_access = list(access_hos)
|
||||
|
||||
/obj/structure/closet/secure_closet/injection/New()
|
||||
..()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/weapon/reagent_containers/syringe/lethal/choral(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/rank/prisoner( src )
|
||||
new /obj/item/clothing/shoes/sneakers/orange( 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/sneakers/brown(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/paper/Court (src)
|
||||
new /obj/item/weapon/pen (src)
|
||||
new /obj/item/clothing/suit/judgerobe (src)
|
||||
new /obj/item/clothing/head/powdered_wig (src)
|
||||
new /obj/item/weapon/storage/briefcase(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/armory1
|
||||
name = "armory armor locker"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "armory"
|
||||
|
||||
/obj/structure/closet/secure_closet/armory1/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/armor/laserproof(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/suit/armor/riot(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/helmet/riot(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/shield/riot(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/armory2
|
||||
name = "armory ballistics locker"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "armory"
|
||||
|
||||
/obj/structure/closet/secure_closet/armory2/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/box/firingpins(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/storage/box/rubbershot(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/gun/projectile/shotgun/riot(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/armory3
|
||||
name = "armory energy gun locker"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "armory"
|
||||
|
||||
/obj/structure/closet/secure_closet/armory3/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/box/firingpins(src)
|
||||
new /obj/item/weapon/gun/energy/ionrifle(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/gun/energy/laser(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/tac
|
||||
name = "armory tac locker"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "tac"
|
||||
|
||||
/obj/structure/closet/secure_closet/tac/New()
|
||||
..()
|
||||
new /obj/item/weapon/gun/projectile/automatic/wt550(src)
|
||||
new /obj/item/clothing/head/helmet/alt(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer(src)
|
||||
new /obj/item/clothing/suit/armor/bulletproof(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/lethalshots
|
||||
name = "shotgun lethal rounds"
|
||||
req_access = list(access_armory)
|
||||
icon_state = "tac"
|
||||
|
||||
/obj/structure/closet/secure_closet/lethalshots/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/storage/box/lethalshot(src)
|
||||
@@ -0,0 +1,162 @@
|
||||
/obj/structure/closet/statue
|
||||
name = "statue"
|
||||
desc = "An incredibly lifelike marble carving."
|
||||
icon = 'icons/obj/statue.dmi'
|
||||
icon_state = "human_male"
|
||||
density = 1
|
||||
anchored = 1
|
||||
health = 0 //destroying the statue kills the mob within
|
||||
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
|
||||
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
|
||||
var/intialBrute = 0
|
||||
var/intialOxy = 0
|
||||
var/timer = 240 //eventually the person will be freed
|
||||
|
||||
/obj/structure/closet/statue/New(loc, var/mob/living/L)
|
||||
|
||||
if(ishuman(L) || ismonkey(L) || iscorgi(L))
|
||||
if(L.buckled)
|
||||
L.buckled.unbuckle_mob(L,force=1)
|
||||
L.reset_perspective(src)
|
||||
L.loc = src
|
||||
L.disabilities += MUTE
|
||||
L.faction += "mimic" //Stops mimics from instaqdeling people in statues
|
||||
L.visible_message("<span class='warning'>[L]'s skin rapidly turns to marble!</span>", "<span class='userdanger'>Your body freezes up! Can't... move... can't... think...</span>")
|
||||
|
||||
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
intialFire = L.getFireLoss()
|
||||
intialBrute = L.getBruteLoss()
|
||||
intialOxy = L.getOxyLoss()
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
name = "statue of [H.name]"
|
||||
H.bleedsuppress = 1
|
||||
if(H.gender == "female")
|
||||
icon_state = "human_female"
|
||||
else if(ismonkey(L))
|
||||
name = "statue of a monkey"
|
||||
icon_state = "monkey"
|
||||
else if(iscorgi(L))
|
||||
name = "statue of a corgi"
|
||||
icon_state = "corgi"
|
||||
desc = "If it takes forever, I will wait for you..."
|
||||
|
||||
if(health == 0) //meaning if the statue didn't find a valid target
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
icon = L.icon
|
||||
icon_state = L.icon_state
|
||||
overlays = L.overlays
|
||||
color = list(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
|
||||
|
||||
/obj/structure/closet/statue/process()
|
||||
timer--
|
||||
for(var/mob/living/M in src) //Go-go gadget stasis field
|
||||
M.setToxLoss(intialTox)
|
||||
M.adjustFireLoss(intialFire - M.getFireLoss())
|
||||
M.adjustBruteLoss(intialBrute - M.getBruteLoss())
|
||||
M.setOxyLoss(intialOxy)
|
||||
M.Stun(1) //So they can't do anything while petrified
|
||||
if(timer <= 0)
|
||||
dump_contents()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/statue/dump_contents()
|
||||
|
||||
if(istype(src.loc, /mob/living/simple_animal/hostile/statue))
|
||||
var/mob/living/simple_animal/hostile/statue/S = src.loc
|
||||
src.loc = S.loc
|
||||
if(S.mind)
|
||||
for(var/mob/M in contents)
|
||||
S.mind.transfer_to(M)
|
||||
M.Weaken(5)
|
||||
M << "<span class='notice'>You slowly come back to your senses. You are in control of yourself again!</span>"
|
||||
break
|
||||
qdel(S)
|
||||
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
|
||||
for(var/mob/living/M in src)
|
||||
M.loc = src.loc
|
||||
M.disabilities -= MUTE
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
M.faction -= "mimic"
|
||||
M.reset_perspective(null)
|
||||
|
||||
/obj/structure/closet/statue/take_contents()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/open()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/take_contents()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/open()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/insert()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/close()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/toggle()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/bullet_act(obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
if(health <= 0)
|
||||
shatter()
|
||||
|
||||
/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
shatter()
|
||||
|
||||
/obj/structure/closet/statue/blob_act(obj/effect/blob/B)
|
||||
shatter()
|
||||
|
||||
/obj/structure/closet/statue/attacked_by(obj/item/I, mob/living/user)
|
||||
if(I.damtype != STAMINA)
|
||||
health -= I.force
|
||||
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
||||
if(health <= 0)
|
||||
shatter()
|
||||
|
||||
/obj/structure/closet/statue/MouseDrop_T()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/relaymove()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/attack_hand()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/verb_toggleopen()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/proc/shatter()
|
||||
for(var/mob/living/M in src)
|
||||
M.dust()
|
||||
dump_contents()
|
||||
visible_message("<span class='danger'>[src] shatters!.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/statue/container_resist()
|
||||
return
|
||||
|
||||
/mob/living/proc/petrify()
|
||||
if(istype(loc, /obj/structure/closet/statue)) //If they're already petrified
|
||||
return 0
|
||||
new /obj/structure/closet/statue(get_turf(src), src)
|
||||
return 1
|
||||
@@ -0,0 +1,115 @@
|
||||
/obj/structure/closet/syndicate
|
||||
name = "armory closet"
|
||||
desc = "Why is this here?"
|
||||
icon_state = "syndicate"
|
||||
|
||||
/obj/structure/closet/syndicate/personal
|
||||
desc = "It's a personal storage unit for operative gear."
|
||||
|
||||
/obj/structure/closet/syndicate/personal/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/syndicate(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/device/radio/headset/syndicate(src)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/weapon/storage/belt/military(src)
|
||||
new /obj/item/weapon/crowbar/red(src)
|
||||
new /obj/item/clothing/glasses/night(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
desc = "It's a storage unit for a Syndicate boarding party."
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/ammo_box/magazine/m10mm(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/box/teargas(src)
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/syndie/med(src)
|
||||
new /obj/item/device/pda/syndicate(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/resources
|
||||
desc = "An old, dusty locker."
|
||||
|
||||
/obj/structure/closet/syndicate/resources/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/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.name = "\improper 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))
|
||||
|
||||
//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/weapon/tank/jetpack/carbondioxide(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/syndicate/resources/everything
|
||||
desc = "It's an emergency storage closet for repairs."
|
||||
|
||||
/obj/structure/closet/syndicate/resources/everything/New()
|
||||
..()
|
||||
contents = list()
|
||||
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/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
for(var/i = 0, i<2, i++)
|
||||
for(var/res in resources)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = R.max_amount
|
||||
|
||||
return
|
||||
@@ -0,0 +1,178 @@
|
||||
/* 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 breath masks and O2 tanks."
|
||||
icon_state = "emergency"
|
||||
|
||||
/obj/structure/closet/emcloset/New()
|
||||
..()
|
||||
|
||||
if (prob(40))
|
||||
new /obj/item/weapon/storage/toolbox/emergency(src)
|
||||
|
||||
switch (pickweight(list("small" = 40, "aid" = 25, "tank" = 20, "both" = 10, "nothing" = 4, "delete" = 1)))
|
||||
if ("small")
|
||||
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
|
||||
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
|
||||
|
||||
if ("aid")
|
||||
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
|
||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||
|
||||
if ("tank")
|
||||
new /obj/item/weapon/tank/internals/air(src)
|
||||
|
||||
if ("both")
|
||||
new /obj/item/weapon/tank/internals/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
|
||||
if ("nothing")
|
||||
// doot
|
||||
|
||||
// teehee
|
||||
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)*/
|
||||
|
||||
/*
|
||||
* Fire Closet
|
||||
*/
|
||||
/obj/structure/closet/firecloset
|
||||
name = "fire-safety closet"
|
||||
desc = "It's a storage unit for fire-fighting supplies."
|
||||
icon_state = "fire"
|
||||
|
||||
/obj/structure/closet/firecloset/New()
|
||||
..()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/tank/internals/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/full/New()
|
||||
..()
|
||||
contents = list()
|
||||
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/tank/internals/oxygen/red(src)
|
||||
new /obj/item/weapon/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 = "eng"
|
||||
icon_door = "eng_tool"
|
||||
|
||||
/obj/structure/closet/toolcloset/New()
|
||||
..()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/hazardvest(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/flashlight(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wrench(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
if(prob(70))
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
if(prob(70))
|
||||
new /obj/item/device/t_scanner(src)
|
||||
if(prob(20))
|
||||
new /obj/item/weapon/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/device/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 = "eng"
|
||||
icon_door = "eng_rad"
|
||||
|
||||
/obj/structure/closet/radiation/New()
|
||||
..()
|
||||
new /obj/item/device/geiger_counter(src)
|
||||
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 = "bomb"
|
||||
|
||||
/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/sneakers/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 = "bomb"
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity/New()
|
||||
..()
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bomb_suit/security( src )
|
||||
new /obj/item/clothing/under/rank/security( src )
|
||||
new /obj/item/clothing/shoes/sneakers/brown( src )
|
||||
new /obj/item/clothing/head/bomb_hood/security( src )
|
||||
|
||||
/*
|
||||
* Ammunition
|
||||
*/
|
||||
/obj/structure/closet/ammunitionlocker
|
||||
name = "ammunition locker"
|
||||
|
||||
/obj/structure/closet/ammunitionlocker/New()
|
||||
..()
|
||||
for(var/i in 1 to 8)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
@@ -0,0 +1,197 @@
|
||||
/obj/structure/closet/wardrobe
|
||||
name = "wardrobe"
|
||||
desc = "It's a storage unit for standard-issue Nanotrasen attire."
|
||||
icon_door = "blue"
|
||||
|
||||
/obj/structure/closet/wardrobe/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/color/blue(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/pink
|
||||
name = "pink wardrobe"
|
||||
icon_door = "pink"
|
||||
|
||||
/obj/structure/closet/wardrobe/pink/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/color/pink(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/black
|
||||
name = "black wardrobe"
|
||||
icon_door = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/black/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/color/black(src)
|
||||
if(prob(25))
|
||||
new /obj/item/clothing/suit/jacket/leather(src)
|
||||
if(prob(20))
|
||||
new /obj/item/clothing/suit/jacket/leather/overcoat(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/that(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/soft/black(src)
|
||||
new /obj/item/clothing/mask/bandana/black(src)
|
||||
new /obj/item/clothing/mask/bandana/black(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/mask/bandana/skull(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/green
|
||||
name = "green wardrobe"
|
||||
icon_door = "green"
|
||||
|
||||
/obj/structure/closet/wardrobe/green/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/color/green(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/mask/bandana/green(src)
|
||||
new /obj/item/clothing/mask/bandana/green(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/orange
|
||||
name = "prison wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
|
||||
icon_door = "orange"
|
||||
|
||||
/obj/structure/closet/wardrobe/orange/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/rank/prisoner(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow
|
||||
name = "yellow wardrobe"
|
||||
icon_door = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/yellow/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/color/yellow(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/orange(src)
|
||||
new /obj/item/clothing/mask/bandana/gold(src)
|
||||
new /obj/item/clothing/mask/bandana/gold(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/white
|
||||
name = "white wardrobe"
|
||||
icon_door = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/white/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/soft/mime(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs
|
||||
name = "pajama wardrobe"
|
||||
icon_door = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/pjs/New()
|
||||
..()
|
||||
contents = list()
|
||||
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)
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/grey
|
||||
name = "grey wardrobe"
|
||||
icon_door = "grey"
|
||||
|
||||
/obj/structure/closet/wardrobe/grey/New()
|
||||
..()
|
||||
contents = list()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/head/soft/grey(src)
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/dufflebag(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/mask/bandana/black(src)
|
||||
new /obj/item/clothing/mask/bandana/black(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/under/assistantformal(src)
|
||||
if(prob(30))
|
||||
new /obj/item/clothing/suit/hooded/wintercoat(src)
|
||||
new /obj/item/clothing/shoes/winterboots(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed
|
||||
name = "mixed wardrobe"
|
||||
icon_door = "mixed"
|
||||
|
||||
/obj/structure/closet/wardrobe/mixed/New()
|
||||
..()
|
||||
contents = list()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/jacket(src)
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/jacket(src)
|
||||
new /obj/item/clothing/under/color/white(src)
|
||||
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/color/red(src)
|
||||
new /obj/item/clothing/under/color/lightblue(src)
|
||||
new /obj/item/clothing/under/color/aqua(src)
|
||||
new /obj/item/clothing/under/color/purple(src)
|
||||
new /obj/item/clothing/under/color/lightpurple(src)
|
||||
new /obj/item/clothing/under/color/lightgreen(src)
|
||||
new /obj/item/clothing/under/color/darkblue(src)
|
||||
new /obj/item/clothing/under/color/darkred(src)
|
||||
new /obj/item/clothing/under/color/lightred(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/red(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/blue(src)
|
||||
new /obj/item/clothing/mask/bandana/gold(src)
|
||||
new /obj/item/clothing/mask/bandana/gold(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/shoes/sneakers/brown(src)
|
||||
new /obj/item/clothing/shoes/sneakers/white(src)
|
||||
if(prob(30))
|
||||
new /obj/item/clothing/suit/hooded/wintercoat(src)
|
||||
new /obj/item/clothing/shoes/winterboots(src)
|
||||
return
|
||||
@@ -0,0 +1,117 @@
|
||||
/obj/structure/closet/crate
|
||||
name = "crate"
|
||||
desc = "A rectangular steel crate."
|
||||
icon = 'icons/obj/crates.dmi'
|
||||
icon_state = "crate"
|
||||
req_access = null
|
||||
can_weld_shut = FALSE
|
||||
horizontal = TRUE
|
||||
allow_objects = TRUE
|
||||
allow_dense = TRUE
|
||||
dense_when_open = TRUE
|
||||
climbable = TRUE
|
||||
climb_time = 10 //real fast, because let's be honest stepping into or onto a crate is easy
|
||||
climb_stun = 0 //climbing onto crates isn't hard, guys
|
||||
var/obj/item/weapon/paper/manifest/manifest
|
||||
|
||||
/obj/structure/closet/crate/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(!istype(mover, /obj/structure/closet))
|
||||
var/obj/structure/closet/crate/locatedcrate = locate(/obj/structure/closet/crate) in get_turf(mover)
|
||||
if(locatedcrate) //you can walk on it like tables, if you're not in an open crate trying to move to a closed crate
|
||||
if(opened) //if we're open, allow entering regardless of located crate openness
|
||||
return 1
|
||||
if(!locatedcrate.opened) //otherwise, if the located crate is closed, allow entering
|
||||
return 1
|
||||
return !density
|
||||
|
||||
/obj/structure/closet/crate/update_icon()
|
||||
icon_state = "[initial(icon_state)][opened ? "open" : ""]"
|
||||
|
||||
cut_overlays()
|
||||
if(manifest)
|
||||
add_overlay("manifest")
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/proc/tear_manifest(mob/user)
|
||||
user << "<span class='notice'>You tear the manifest off of the crate.</span>"
|
||||
playsound(src, 'sound/items/poster_ripped.ogg', 75, 1)
|
||||
|
||||
manifest.loc = loc
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(manifest)
|
||||
manifest = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/internals
|
||||
desc = "A internals crate."
|
||||
name = "internals crate"
|
||||
icon_state = "o2crate"
|
||||
|
||||
/obj/structure/closet/crate/trashcart
|
||||
desc = "A heavy, metal trashcart with wheels."
|
||||
name = "trash cart"
|
||||
icon_state = "trashcart"
|
||||
|
||||
/obj/structure/closet/crate/medical
|
||||
desc = "A medical crate."
|
||||
name = "medical crate"
|
||||
icon_state = "medicalcrate"
|
||||
|
||||
/obj/structure/closet/crate/freezer
|
||||
desc = "A freezer."
|
||||
name = "freezer"
|
||||
icon_state = "freezer"
|
||||
|
||||
/obj/structure/closet/crate/freezer/blood
|
||||
name = "blood freezer"
|
||||
desc = "A freezer containing packs of blood."
|
||||
|
||||
/obj/structure/closet/crate/freezer/blood/New()
|
||||
. = ..()
|
||||
new /obj/item/weapon/reagent_containers/blood/empty(src)
|
||||
new /obj/item/weapon/reagent_containers/blood/empty(src)
|
||||
new /obj/item/weapon/reagent_containers/blood/AMinus(src)
|
||||
new /obj/item/weapon/reagent_containers/blood/BMinus(src)
|
||||
new /obj/item/weapon/reagent_containers/blood/BPlus(src)
|
||||
new /obj/item/weapon/reagent_containers/blood/OMinus(src)
|
||||
new /obj/item/weapon/reagent_containers/blood/OPlus(src)
|
||||
new /obj/item/weapon/reagent_containers/blood/lizard(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/weapon/reagent_containers/blood/random(src)
|
||||
|
||||
/obj/structure/closet/crate/radiation
|
||||
desc = "A crate with a radiation sign on it."
|
||||
name = "radiation crate"
|
||||
icon_state = "radiation"
|
||||
|
||||
/obj/structure/closet/crate/hydroponics
|
||||
name = "hydroponics crate"
|
||||
desc = "All you need to destroy those pesky weeds and pests."
|
||||
icon_state = "hydrocrate"
|
||||
|
||||
/obj/structure/closet/crate/engineering
|
||||
name = "engineering crate"
|
||||
icon_state = "engi_crate"
|
||||
|
||||
/obj/structure/closet/crate/engineering/electrical
|
||||
icon_state = "engi_e_crate"
|
||||
|
||||
/obj/structure/closet/crate/rcd
|
||||
desc = "A crate for the storage of an RCD."
|
||||
name = "\improper RCD crate"
|
||||
icon_state = "engi_crate"
|
||||
|
||||
/obj/structure/closet/crate/rcd/New()
|
||||
..()
|
||||
for(var/i in 1 to 4)
|
||||
new /obj/item/weapon/rcd_ammo(src)
|
||||
new /obj/item/weapon/rcd(src)
|
||||
@@ -0,0 +1,44 @@
|
||||
/obj/structure/closet/crate/bin
|
||||
desc = "A trash bin, place your trash here for the janitor to collect."
|
||||
name = "trash bin"
|
||||
icon_state = "largebins"
|
||||
open_sound = 'sound/effects/bin_open.ogg'
|
||||
close_sound = 'sound/effects/bin_close.ogg'
|
||||
anchored = TRUE
|
||||
horizontal = FALSE
|
||||
|
||||
/obj/structure/closet/crate/bin/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/bin/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
if(contents.len == 0)
|
||||
add_overlay("largebing")
|
||||
else if(contents.len >= storage_capacity)
|
||||
add_overlay("largebinr")
|
||||
else
|
||||
add_overlay("largebino")
|
||||
|
||||
/obj/structure/closet/crate/bin/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/storage/bag/trash))
|
||||
var/obj/item/weapon/storage/bag/trash/T = W
|
||||
user << "<span class='notice'>You fill the bag.</span>"
|
||||
for(var/obj/item/O in src)
|
||||
if(T.can_be_inserted(O, 1))
|
||||
O.loc = T
|
||||
T.update_icon()
|
||||
do_animate()
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
anchored = !anchored
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/bin/proc/do_animate()
|
||||
playsound(loc, open_sound, 15, 1, -3)
|
||||
flick("animate_largebins", src)
|
||||
spawn(13)
|
||||
playsound(loc, close_sound, 15, 1, -3)
|
||||
update_icon()
|
||||
@@ -0,0 +1,38 @@
|
||||
/obj/structure/closet/crate/critter
|
||||
name = "critter crate"
|
||||
desc = "A crate designed for safe transport of animals. It has an oxygen tank for safe transport in space."
|
||||
icon_state = "crittercrate"
|
||||
horizontal = FALSE
|
||||
allow_objects = FALSE
|
||||
breakout_time = 1
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
var/obj/item/weapon/tank/internals/emergency_oxygen/tank
|
||||
|
||||
/obj/structure/closet/crate/critter/New()
|
||||
..()
|
||||
tank = new
|
||||
|
||||
/obj/structure/closet/crate/critter/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
tank.loc = T
|
||||
tank = null
|
||||
|
||||
for(var/i in 1 to rand(2, 5))
|
||||
new material_drop(T)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/critter/update_icon()
|
||||
cut_overlays()
|
||||
if(opened)
|
||||
add_overlay("crittercrate_door_open")
|
||||
else
|
||||
add_overlay("crittercrate_door")
|
||||
if(manifest)
|
||||
add_overlay("manifest")
|
||||
|
||||
/obj/structure/closet/crate/critter/return_air()
|
||||
if(tank)
|
||||
return tank.air_contents
|
||||
else
|
||||
return loc.return_air()
|
||||
@@ -0,0 +1,33 @@
|
||||
/obj/structure/closet/crate/large
|
||||
name = "large crate"
|
||||
desc = "A hefty wooden crate."
|
||||
icon_state = "largecrate"
|
||||
density = 1
|
||||
material_drop = /obj/item/stack/sheet/mineral/wood
|
||||
|
||||
/obj/structure/closet/crate/large/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
else
|
||||
user << "<span class='warning'>You need a crowbar to pry this open!</span>"
|
||||
|
||||
/obj/structure/closet/crate/large/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
var/turf/T = get_turf(src)
|
||||
if(manifest)
|
||||
tear_manifest(user)
|
||||
|
||||
user.visible_message("[user] pries \the [src] open.", \
|
||||
"<span class='notice'>You pry open \the [src].</span>", \
|
||||
"<span class='italics'>You hear splitting wood.</span>")
|
||||
playsound(src.loc, 'sound/weapons/slashmiss.ogg', 75, 1)
|
||||
|
||||
for(var/i in 1 to rand(2, 5))
|
||||
new material_drop(src)
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.forceMove(T)
|
||||
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,41 @@
|
||||
/obj/structure/closet/crate/secure
|
||||
desc = "A secure crate."
|
||||
name = "secure crate"
|
||||
icon_state = "securecrate"
|
||||
secure = 1
|
||||
locked = 1
|
||||
health = 1000
|
||||
|
||||
/obj/structure/closet/crate/secure/update_icon()
|
||||
..()
|
||||
if(broken)
|
||||
add_overlay("securecrateemag")
|
||||
else if(locked)
|
||||
add_overlay("securecrater")
|
||||
else
|
||||
add_overlay("securecrateg")
|
||||
|
||||
/obj/structure/closet/crate/secure/weapon
|
||||
desc = "A secure weapons crate."
|
||||
name = "weapons crate"
|
||||
icon_state = "weaponcrate"
|
||||
|
||||
/obj/structure/closet/crate/secure/plasma
|
||||
desc = "A secure plasma crate."
|
||||
name = "plasma crate"
|
||||
icon_state = "plasmacrate"
|
||||
|
||||
/obj/structure/closet/crate/secure/gear
|
||||
desc = "A secure gear crate."
|
||||
name = "gear crate"
|
||||
icon_state = "secgearcrate"
|
||||
|
||||
/obj/structure/closet/crate/secure/hydroponics
|
||||
desc = "A crate with a lock on it, painted in the scheme of the station's botanists."
|
||||
name = "secure hydroponics crate"
|
||||
icon_state = "hydrosecurecrate"
|
||||
|
||||
/obj/structure/closet/crate/secure/engineering
|
||||
desc = "A crate with a lock on it, painted in the scheme of the station's engineers."
|
||||
name = "secure engineering crate"
|
||||
icon_state = "engi_secure_crate"
|
||||
@@ -0,0 +1,260 @@
|
||||
/obj/structure/displaycase
|
||||
name = "display case"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox0"
|
||||
desc = "A display case for prized possessions."
|
||||
density = 1
|
||||
anchored = 1
|
||||
unacidable = 1//Dissolving the case would also delete the gun.
|
||||
var/health = 30
|
||||
var/destroyed = 0
|
||||
var/obj/item/showpiece = null
|
||||
var/alert = 0
|
||||
var/open = 0
|
||||
var/obj/item/weapon/electronics/airlock/electronics
|
||||
var/start_showpiece_type = null //add type for items on display
|
||||
|
||||
/obj/structure/displaycase/New()
|
||||
..()
|
||||
if(start_showpiece_type)
|
||||
showpiece = new start_showpiece_type (src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
dump()
|
||||
qdel(src)
|
||||
if (2)
|
||||
take_damage(rand(10,20), BRUTE, 0)
|
||||
if (3)
|
||||
take_damage(5, BRUTE, 0)
|
||||
|
||||
/obj/structure/displaycase/examine(mob/user)
|
||||
..()
|
||||
if(showpiece)
|
||||
user << "<span class='notice'>There's [showpiece] inside.</span>"
|
||||
if(alert)
|
||||
user << "<span class='notice'>Hooked up with an anti-theft system.</span>"
|
||||
|
||||
|
||||
/obj/structure/displaycase/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
/obj/structure/displaycase/proc/dump()
|
||||
if (showpiece)
|
||||
showpiece.loc = src.loc
|
||||
showpiece = null
|
||||
|
||||
/obj/structure/displaycase/blob_act(obj/effect/blob/B)
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
dump()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/displaycase/hitby(atom/movable/AM)
|
||||
..()
|
||||
if(isobj(AM))
|
||||
var/obj/item/I = AM
|
||||
take_damage(I.throwforce * 0.2)
|
||||
|
||||
/obj/structure/displaycase/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
health = max( health - damage, 0)
|
||||
if(!health && !destroyed)
|
||||
density = 0
|
||||
destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
update_icon()
|
||||
|
||||
//Activate Anti-theft
|
||||
if(alert)
|
||||
var/area/alarmed = get_area(src)
|
||||
alarmed.burglaralert(src)
|
||||
playsound(src, "sound/effects/alert.ogg", 50, 1)
|
||||
|
||||
|
||||
/obj/structure/displaycase/proc/is_directional(atom/A)
|
||||
try
|
||||
getFlatIcon(A,defdir=4)
|
||||
catch
|
||||
return 0
|
||||
return 1
|
||||
/obj/structure/displaycase/proc/get_flat_icon_directional(atom/A)
|
||||
//Get flatIcon even if dir is mismatched for directionless icons
|
||||
//SLOW
|
||||
var/icon/I
|
||||
if(is_directional(A))
|
||||
I = getFlatIcon(A)
|
||||
else
|
||||
var/old_dir = A.dir
|
||||
A.setDir(2)
|
||||
I = getFlatIcon(A)
|
||||
A.setDir(old_dir)
|
||||
return I
|
||||
|
||||
/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(destroyed)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
|
||||
if(showpiece)
|
||||
var/icon/S = get_flat_icon_directional(showpiece)
|
||||
S.Scale(17,17)
|
||||
I.Blend(S,ICON_UNDERLAY,8,8)
|
||||
src.icon = I
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.GetID() && electronics && !destroyed)
|
||||
if(allowed(user))
|
||||
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
|
||||
open = !open
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
else if(!alert && istype(W,/obj/item/weapon/crowbar))
|
||||
if(destroyed)
|
||||
if(showpiece)
|
||||
user << "<span class='notice'>Remove the displayed object first.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You remove the destroyed case</span>"
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You start to [open ? "close":"open"] the [src]</span>"
|
||||
if(do_after(user, 20/W.toolspeed, target = src))
|
||||
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
|
||||
open = !open
|
||||
update_icon()
|
||||
else if(open && !showpiece)
|
||||
if(user.drop_item())
|
||||
W.loc = src
|
||||
showpiece = W
|
||||
user << "<span class='notice'>You put [W] on display</span>"
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/stack/sheet/glass) && destroyed)
|
||||
var/obj/item/stack/sheet/glass/G = W
|
||||
if(G.get_amount() < 2)
|
||||
user << "<span class='warning'>You need two glass sheets to fix the case!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start fixing the [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(2)
|
||||
destroyed = 0
|
||||
health = initial(health)
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/attacked_by(obj/item/weapon/W, mob/living/user)
|
||||
..()
|
||||
take_damage(W.force, W.damtype)
|
||||
|
||||
/obj/structure/displaycase/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/displaycase/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
take_damage(20, BRUTE, 0)
|
||||
|
||||
/obj/structure/displaycase/attack_animal(mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if(M.melee_damage_upper > 0)
|
||||
M.visible_message("<span class='danger'>[M.name] smashes against \the [src.name].</span>",\
|
||||
"<span class='danger'>You smash against the [src.name].</span>")
|
||||
take_damage(M.melee_damage_upper, M.melee_damage_type, 1)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if (showpiece && (destroyed || open))
|
||||
dump()
|
||||
user << "<span class='notice'>You deactivate the hover field built into the case.</span>"
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
//prevents remote "kicks" with TK
|
||||
if (!Adjacent(user))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] kicks the display case.</span>", \
|
||||
"<span class='notice'>You kick the display case.</span>")
|
||||
take_damage(2)
|
||||
|
||||
|
||||
|
||||
/obj/structure/displaycase_chassis
|
||||
anchored = 1
|
||||
density = 0
|
||||
name = "display case chassis"
|
||||
desc = "wooden base of display case"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox_chassis"
|
||||
var/obj/item/weapon/electronics/airlock/electronics
|
||||
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start disassembling [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 30/I.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/weapon/electronics/airlock))
|
||||
user << "<span class='notice'>You start installing the electronics into [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(user.unEquip(I) && do_after(user, 30, target = src))
|
||||
I.loc = src
|
||||
electronics = I
|
||||
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)
|
||||
user << "<span class='warning'>You need ten glass sheets to do this!</span>"
|
||||
return
|
||||
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.loc = display
|
||||
display.electronics = electronics
|
||||
if(electronics.one_access)
|
||||
display.req_one_access = electronics.accesses
|
||||
else
|
||||
display.req_access = electronics.accesses
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/displaycase/captain
|
||||
alert = 1
|
||||
start_showpiece_type = /obj/item/weapon/gun/energy/laser/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
|
||||
|
||||
@@ -0,0 +1,687 @@
|
||||
/obj/structure/door_assembly
|
||||
name = "airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/public.dmi'
|
||||
icon_state = "construction"
|
||||
var/overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/state = 0
|
||||
var/mineral = null
|
||||
var/typetext = ""
|
||||
var/icontext = ""
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/created_name = null
|
||||
var/heat_proof_finished = 0 //whether to heat-proof the finished airlock
|
||||
var/material = null //icon state logic
|
||||
|
||||
/obj/structure/door_assembly/New()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_0
|
||||
name = "airlock assembly"
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com
|
||||
name = "command airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/command.dmi'
|
||||
typetext = "command"
|
||||
icontext = "com"
|
||||
glass_type = /obj/machinery/door/airlock/glass_command
|
||||
airlock_type = /obj/machinery/door/airlock/command
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sec
|
||||
name = "security airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/security.dmi'
|
||||
typetext = "security"
|
||||
icontext = "sec"
|
||||
glass_type = /obj/machinery/door/airlock/glass_security
|
||||
airlock_type = /obj/machinery/door/airlock/security
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sec/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng
|
||||
name = "engineering airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/engineering.dmi'
|
||||
typetext = "engineering"
|
||||
icontext = "eng"
|
||||
glass_type = /obj/machinery/door/airlock/glass_engineering
|
||||
airlock_type = /obj/machinery/door/airlock/engineering
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min
|
||||
name = "mining airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/mining.dmi'
|
||||
typetext = "mining"
|
||||
icontext = "min"
|
||||
glass_type = /obj/machinery/door/airlock/glass_mining
|
||||
airlock_type = /obj/machinery/door/airlock/mining
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo
|
||||
name = "atmospherics airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/atmos.dmi'
|
||||
typetext = "atmos"
|
||||
icontext = "atmo"
|
||||
glass_type = /obj/machinery/door/airlock/glass_atmos
|
||||
airlock_type = /obj/machinery/door/airlock/atmos
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research
|
||||
name = "research airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/research.dmi'
|
||||
typetext = "research"
|
||||
icontext = "res"
|
||||
glass_type = /obj/machinery/door/airlock/glass_research
|
||||
airlock_type = /obj/machinery/door/airlock/research
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science
|
||||
name = "science airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/science.dmi'
|
||||
typetext = "science"
|
||||
icontext = "sci"
|
||||
glass_type = /obj/machinery/door/airlock/glass_science
|
||||
airlock_type = /obj/machinery/door/airlock/science
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med
|
||||
name = "medical airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/medical.dmi'
|
||||
typetext = "medical"
|
||||
icontext = "med"
|
||||
glass_type = /obj/machinery/door/airlock/glass_medical
|
||||
airlock_type = /obj/machinery/door/airlock/medical
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai
|
||||
name = "maintenance airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
|
||||
typetext = "maintenance"
|
||||
icontext = "mai"
|
||||
glass_type = /obj/machinery/door/airlock/glass_maintenance
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext
|
||||
name = "external airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/external/external.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/external/overlays.dmi'
|
||||
typetext = "external"
|
||||
icontext = "ext"
|
||||
glass_type = /obj/machinery/door/airlock/glass_external
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_fre
|
||||
name = "freezer airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/freezer.dmi'
|
||||
typetext = "freezer"
|
||||
icontext = "fre"
|
||||
airlock_type = /obj/machinery/door/airlock/freezer
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
name = "airtight hatch assembly"
|
||||
icon = 'icons/obj/doors/airlocks/hatch/centcom.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
|
||||
typetext = "hatch"
|
||||
icontext = "hatch"
|
||||
airlock_type = /obj/machinery/door/airlock/hatch
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mhatch
|
||||
name = "maintenance hatch assembly"
|
||||
icon = 'icons/obj/doors/airlocks/hatch/maintenance.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/hatch/overlays.dmi'
|
||||
typetext = "maintenance_hatch"
|
||||
icontext = "mhatch"
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_glass
|
||||
name = "glass airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station2/glass.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station2/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_gold
|
||||
name = "gold airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/gold.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "gold"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_silver
|
||||
name = "silver airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/silver.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "silver"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_diamond
|
||||
name = "diamond airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/diamond.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "diamond"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_uranium
|
||||
name = "uranium airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/uranium.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "uranium"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_plasma
|
||||
name = "plasma airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/plasma.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "plasma"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_clown
|
||||
name = "bananium airlock assembly"
|
||||
desc = "Honk"
|
||||
icon = 'icons/obj/doors/airlocks/station/bananium.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/clown
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "bananium"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sandstone
|
||||
name = "sandstone airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/sandstone.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "sandstone"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
|
||||
name = "high security airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/highsec/highsec.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/highsec/overlays.dmi'
|
||||
typetext = "highsecurity"
|
||||
icontext = "highsec"
|
||||
airlock_type = /obj/machinery/door/airlock/highsecurity
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_vault
|
||||
name = "vault door assembly"
|
||||
icon = 'icons/obj/doors/airlocks/vault/vault.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/vault/overlays.dmi'
|
||||
typetext = "vault"
|
||||
icontext = "vault"
|
||||
airlock_type = /obj/machinery/door/airlock/vault
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
name = "shuttle airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/shuttle/shuttle.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/shuttle/overlays.dmi'
|
||||
typetext = "shuttle"
|
||||
icontext = "shuttle"
|
||||
airlock_type = /obj/machinery/door/airlock/shuttle
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult
|
||||
name = "cult airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi'
|
||||
typetext = "cult"
|
||||
icontext = "cult"
|
||||
airlock_type = /obj/machinery/door/airlock/cult
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult/unruned
|
||||
icon = 'icons/obj/doors/airlocks/cult/unruned/cult.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/unruned/overlays.dmi'
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult/unruned/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_wood
|
||||
name = "wooden airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/wood.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/wood
|
||||
anchored = 1
|
||||
state = 1
|
||||
mineral = "wood"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_viro
|
||||
name = "virology airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/virology.dmi'
|
||||
typetext = "virology"
|
||||
icontext = "viro"
|
||||
glass_type = /obj/machinery/door/airlock/glass_virology
|
||||
airlock_type = /obj/machinery/door/airlock/virology
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_viro/glass
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_centcom
|
||||
typetext = "centcom"
|
||||
icon = 'icons/obj/doors/airlocks/centcom/centcom.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/centcom/overlays.dmi'
|
||||
icontext = "ele"
|
||||
airlock_type = /obj/machinery/door/airlock/centcom
|
||||
anchored = 1
|
||||
state = 1
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter the name for the door.", src.name, src.created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_painter)) // |- Ricotez
|
||||
//INFORMATION ABOUT ADDING A NEW AIRLOCK TO THE PAINT LIST:
|
||||
//If your airlock has a regular version, add it to the list with regular versions.
|
||||
//If your airlock has a glass version, add it to the list with glass versions.
|
||||
//Don't forget to also set has_solid and has_glass to the proper value.
|
||||
//Do NOT add your airlock to a list if it does not have a version for that list,
|
||||
// or you will get broken icons.
|
||||
var/obj/item/weapon/airlock_painter/WT = W
|
||||
if(WT.can_use(user))
|
||||
var/icontype
|
||||
var/optionlist
|
||||
if(mineral && mineral == "glass")
|
||||
//These airlocks have a glass version.
|
||||
optionlist = list("Public", "Public2", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Science", "Mining")
|
||||
else
|
||||
//These airlocks have a regular version.
|
||||
optionlist = list("Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Science", "Mining", "Maintenance", "External", "High Security")
|
||||
|
||||
|
||||
icontype = input(user, "Please select a paintjob for this airlock.") in optionlist
|
||||
if((!in_range(src, usr) && src.loc != usr) || !WT.use(user))
|
||||
return
|
||||
var/has_solid = 0
|
||||
var/has_glass = 0
|
||||
switch(icontype)
|
||||
if("Public")
|
||||
icon = 'icons/obj/doors/airlocks/station/public.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = ""
|
||||
icontext = ""
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Public2")
|
||||
icon = 'icons/obj/doors/airlocks/station2/glass.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station2/overlays.dmi'
|
||||
typetext = ""
|
||||
icontext = ""
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Engineering")
|
||||
icon = 'icons/obj/doors/airlocks/station/engineering.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "engineering"
|
||||
icontext = "eng"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Atmospherics")
|
||||
icon = 'icons/obj/doors/airlocks/station/atmos.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "atmos"
|
||||
icontext = "atmo"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Security")
|
||||
icon = 'icons/obj/doors/airlocks/station/security.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "security"
|
||||
icontext = "sec"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Command")
|
||||
icon = 'icons/obj/doors/airlocks/station/command.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "command"
|
||||
icontext = "com"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Medical")
|
||||
icon = 'icons/obj/doors/airlocks/station/medical.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "medical"
|
||||
icontext = "med"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Research")
|
||||
icon = 'icons/obj/doors/airlocks/station/research.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "research"
|
||||
icontext = "res"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Science")
|
||||
icon = 'icons/obj/doors/airlocks/station/science.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "research"
|
||||
icontext = "res"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Mining")
|
||||
icon = 'icons/obj/doors/airlocks/station/mining.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "mining"
|
||||
icontext = "min"
|
||||
has_solid = 1
|
||||
has_glass = 1
|
||||
if("Maintenance")
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
|
||||
typetext = "maintenance"
|
||||
icontext = "mai"
|
||||
has_solid = 1
|
||||
has_glass = 0
|
||||
if("External")
|
||||
icon = 'icons/obj/doors/airlocks/external/external.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/external/overlays.dmi'
|
||||
typetext = "external"
|
||||
icontext = "ext"
|
||||
has_solid = 1
|
||||
has_glass = 0
|
||||
if("High Security")
|
||||
icon = 'icons/obj/doors/airlocks/highsec/highsec.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/highsec/overlays.dmi'
|
||||
typetext = "highsecurity"
|
||||
icontext = "highsec"
|
||||
has_solid = 1
|
||||
has_glass = 0
|
||||
if(has_solid)
|
||||
airlock_type = text2path("/obj/machinery/door/airlock/[typetext]")
|
||||
else
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
|
||||
if(has_glass)
|
||||
glass_type = text2path("/obj/machinery/door/airlock/glass_[typetext]")
|
||||
else
|
||||
glass_type = /obj/machinery/door/airlock/glass
|
||||
|
||||
if(mineral && mineral != "glass")
|
||||
mineral = null //I know this is stupid, but until we change glass to a boolean it's how this code works.
|
||||
user << "<span class='notice'>You change the paintjob on the airlock assembly.</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("<span class='warning'>[user] disassembles the airlock assembly.</span>", \
|
||||
"You start to disassemble the airlock assembly...")
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if( !WT.isOn() )
|
||||
return
|
||||
user << "<span class='notice'>You disassemble the airlock assembly.</span>"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), 4)
|
||||
if (mineral)
|
||||
if (mineral == "glass")
|
||||
if (heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
else
|
||||
var/M = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
new M(get_turf(src))
|
||||
new M(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
if(!anchored )
|
||||
var/door_check = 1
|
||||
for(var/obj/machinery/door/D in loc)
|
||||
if(!D.sub_door)
|
||||
door_check = 0
|
||||
break
|
||||
|
||||
if(door_check)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", \
|
||||
"<span class='notice'>You start to secure the airlock assembly to the floor...</span>", \
|
||||
"<span class='italics'>You hear wrenching.</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if( src.anchored )
|
||||
return
|
||||
user << "<span class='notice'>You secure the airlock assembly.</span>"
|
||||
src.name = "secured airlock assembly"
|
||||
src.anchored = 1
|
||||
else
|
||||
user << "There is another door here!"
|
||||
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", \
|
||||
"<span class='notice'>You start to unsecure the airlock assembly from the floor...</span>", \
|
||||
"<span class='italics'>You hear wrenching.</span>")
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!anchored )
|
||||
return
|
||||
user << "<span class='notice'>You unsecure the airlock assembly.</span>"
|
||||
name = "airlock assembly"
|
||||
anchored = 0
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.get_amount() < 1)
|
||||
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.", \
|
||||
"<span class='notice'>You start to wire the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(C.get_amount() < 1 || state != 0) return
|
||||
C.use(1)
|
||||
src.state = 1
|
||||
user << "<span class='notice'>You wire the airlock assembly.</span>"
|
||||
src.name = "wired airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", \
|
||||
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if( src.state != 1 )
|
||||
return
|
||||
user << "<span class='notice'>You cut the wires from the airlock assembly.</span>"
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = 0
|
||||
src.name = "secured airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/electronics/airlock) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", \
|
||||
"<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if( src.state != 1 )
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
|
||||
W.loc = src
|
||||
user << "<span class='notice'>You install the airlock electronics.</span>"
|
||||
src.state = 2
|
||||
src.name = "near finished airlock assembly"
|
||||
src.electronics = W
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", \
|
||||
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if( src.state != 2 )
|
||||
return
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
src.state = 1
|
||||
src.name = "wired airlock assembly"
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
else if(istype(W, /obj/item/stack/sheet) && !mineral)
|
||||
var/obj/item/stack/sheet/G = W
|
||||
if(G)
|
||||
if(G.get_amount() >= 1)
|
||||
if(istype(G, /obj/item/stack/sheet/rglass) || istype(G, /obj/item/stack/sheet/glass))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
||||
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(G.get_amount() < 1 || mineral) return
|
||||
if (G.type == /obj/item/stack/sheet/rglass)
|
||||
user << "<span class='notice'>You install reinforced glass windows into the airlock assembly.</span>"
|
||||
heat_proof_finished = 1 //reinforced glass makes the airlock heat-proof
|
||||
name = "near finished heat-proofed window airlock assembly"
|
||||
else
|
||||
user << "<span class='notice'>You install regular glass windows into the airlock assembly.</span>"
|
||||
name = "near finished window airlock assembly"
|
||||
G.use(1)
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
//This list contains the airlock paintjobs that have a glass version:
|
||||
if(icontext in list("eng", "atmo", "sec", "com", "med", "res", "min"))
|
||||
src.airlock_type = text2path("/obj/machinery/door/airlock/[typetext]")
|
||||
src.glass_type = text2path("/obj/machinery/door/airlock/glass_[typetext]")
|
||||
else
|
||||
//This airlock is default or does not have a glass version, so we revert to the default glass airlock. |- Ricotez
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
glass_type = /obj/machinery/door/airlock/glass
|
||||
typetext = ""
|
||||
icontext = ""
|
||||
else if(istype(G, /obj/item/stack/sheet/mineral))
|
||||
var/M = G.sheettype
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
||||
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(G.get_amount() < 2 || mineral) return
|
||||
user << "<span class='notice'>You install [M] plating into the airlock assembly.</span>"
|
||||
G.use(2)
|
||||
mineral = "[M]"
|
||||
name = "near finished [M] airlock assembly"
|
||||
airlock_type = text2path ("/obj/machinery/door/airlock/[M]")
|
||||
glass_type = /obj/machinery/door/airlock/glass
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] finishes the airlock.", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(src.loc && state == 2)
|
||||
user << "<span class='notice'>You finish the airlock.</span>"
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(mineral == "glass")
|
||||
door = new src.glass_type( src.loc )
|
||||
else
|
||||
door = new src.airlock_type( src.loc )
|
||||
//door.req_access = src.req_access
|
||||
door.electronics = src.electronics
|
||||
door.heat_proof = src.heat_proof_finished
|
||||
if(src.electronics.one_access)
|
||||
door.req_one_access = src.electronics.accesses
|
||||
else
|
||||
door.req_access = src.electronics.accesses
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
src.electronics.loc = door
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/update_icon()
|
||||
cut_overlays()
|
||||
if(!material)
|
||||
add_overlay(get_airlock_overlay("fill_construction", icon))
|
||||
else
|
||||
add_overlay(get_airlock_overlay("[material]_construction", overlays_file))
|
||||
add_overlay(get_airlock_overlay("panel_c[state+1]", overlays_file))
|
||||
@@ -0,0 +1,35 @@
|
||||
/obj/structure/dresser
|
||||
name = "dresser"
|
||||
desc = "A nicely-crafted wooden dresser. It's filled with lots of undies."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "dresser"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user)
|
||||
if(!Adjacent(user))//no tele-grooming
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Undershirt","Socks")
|
||||
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
switch(choice)
|
||||
if("Underwear")
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list
|
||||
if(new_undies)
|
||||
H.underwear = new_undies
|
||||
|
||||
if("Undershirt")
|
||||
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list
|
||||
if(new_undershirt)
|
||||
H.undershirt = new_undershirt
|
||||
if("Socks")
|
||||
var/new_socks = input(user, "Select your socks", "Changing") as null|anything in socks_list
|
||||
if(new_socks)
|
||||
H.socks= new_socks
|
||||
|
||||
add_fingerprint(H)
|
||||
H.update_body()
|
||||
@@ -0,0 +1,47 @@
|
||||
/obj/structure/chair/e_chair
|
||||
name = "electric chair"
|
||||
desc = "Looks absolutely SHOCKING!\n<span class='notice'>Alt-click to rotate it clockwise.</span>"
|
||||
icon_state = "echair0"
|
||||
var/obj/item/assembly/shock_kit/part = null
|
||||
var/last_time = 1
|
||||
item_chair = null
|
||||
|
||||
/obj/structure/chair/e_chair/New()
|
||||
..()
|
||||
add_overlay(image('icons/obj/chairs.dmi', src, "echair_over", MOB_LAYER + 1))
|
||||
|
||||
/obj/structure/chair/e_chair/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/chair/C = new /obj/structure/chair(loc)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
C.setDir(dir)
|
||||
part.loc = loc
|
||||
part.master = null
|
||||
part = null
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/chair/e_chair/proc/shock()
|
||||
if(last_time + 50 > world.time)
|
||||
return
|
||||
last_time = world.time
|
||||
|
||||
// special power handling
|
||||
var/area/A = get_area(src)
|
||||
if(!isarea(A))
|
||||
return
|
||||
if(!A.powered(EQUIP))
|
||||
return
|
||||
A.use_power(EQUIP, 5000)
|
||||
|
||||
flick("echair_shock", src)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.electrocute_act(85, src, 1)
|
||||
buckled_mob << "<span class='userdanger'>You feel a deep shock course through your body!</span>"
|
||||
spawn(1)
|
||||
buckled_mob.electrocute_act(85, src, 1)
|
||||
visible_message("<span class='danger'>The electric chair went off!</span>", "<span class='italics'>You hear a deep sharp shock!</span>")
|
||||
@@ -0,0 +1,113 @@
|
||||
/obj/structure/extinguisher_cabinet
|
||||
name = "extinguisher cabinet"
|
||||
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
|
||||
icon = 'icons/obj/wallmounts.dmi'
|
||||
icon_state = "extinguisher_closed"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/obj/item/weapon/extinguisher/has_extinguisher
|
||||
var/opened = 0
|
||||
|
||||
/obj/structure/extinguisher_cabinet/New(loc, ndir, building)
|
||||
..()
|
||||
if(building)
|
||||
setDir(ndir)
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0
|
||||
opened = 1
|
||||
icon_state = "extinguisher_empty"
|
||||
else
|
||||
has_extinguisher = new /obj/item/weapon/extinguisher(src)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2)
|
||||
if(prob(50))
|
||||
if(has_extinguisher)
|
||||
has_extinguisher.loc = src.loc
|
||||
qdel(src)
|
||||
return
|
||||
if(3)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench) && !has_extinguisher)
|
||||
user << "<span class='notice'>You start unsecuring [name]...</span>"
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 60/I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You unsecure [name].</span>"
|
||||
new /obj/item/wallframe/extinguisher_cabinet(loc)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/extinguisher))
|
||||
if(!has_extinguisher && opened)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
contents += I
|
||||
has_extinguisher = I
|
||||
user << "<span class='notice'>You place [I] in [src].</span>"
|
||||
else
|
||||
opened = !opened
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if(has_extinguisher)
|
||||
user.put_in_hands(has_extinguisher)
|
||||
user << "<span class='notice'>You take [has_extinguisher] from [src].</span>"
|
||||
has_extinguisher = null
|
||||
opened = 1
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_tk(mob/user)
|
||||
if(has_extinguisher)
|
||||
has_extinguisher.loc = loc
|
||||
user << "<span class='notice'>You telekinetically remove [has_extinguisher] from [src].</span>"
|
||||
has_extinguisher = null
|
||||
opened = 1
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
|
||||
if(user.incapacitated() || !Adjacent(user) || !istype(user))
|
||||
return
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = "extinguisher_closed"
|
||||
return
|
||||
if(has_extinguisher)
|
||||
if(istype(has_extinguisher, /obj/item/weapon/extinguisher/mini))
|
||||
icon_state = "extinguisher_mini"
|
||||
else
|
||||
icon_state = "extinguisher_full"
|
||||
else
|
||||
icon_state = "extinguisher_empty"
|
||||
|
||||
/obj/item/wallframe/extinguisher_cabinet
|
||||
name = "extinguisher cabinet frame"
|
||||
desc = "Used for building wall-mounted extinguisher cabinets."
|
||||
icon = 'icons/obj/apc_repair.dmi'
|
||||
icon_state = "extinguisher_frame"
|
||||
result_path = /obj/structure/extinguisher_cabinet
|
||||
@@ -0,0 +1,303 @@
|
||||
/*
|
||||
* False Walls
|
||||
*/
|
||||
/obj/structure/falsewall
|
||||
name = "wall"
|
||||
desc = "A huge chunk of metal used to separate rooms."
|
||||
anchored = 1
|
||||
icon = 'icons/turf/walls/wall.dmi'
|
||||
icon_state = "wall"
|
||||
var/mineral = "metal"
|
||||
var/walltype = "metal"
|
||||
var/opening = 0
|
||||
density = 1
|
||||
opacity = 1
|
||||
|
||||
canSmoothWith = list(
|
||||
/turf/closed/wall,
|
||||
/turf/closed/wall/r_wall,
|
||||
/obj/structure/falsewall,
|
||||
/obj/structure/falsewall/reinforced,
|
||||
/turf/closed/wall/rust,
|
||||
/turf/closed/wall/r_wall/rust)
|
||||
smooth = SMOOTH_TRUE
|
||||
can_be_unanchored = 0
|
||||
|
||||
/obj/structure/falsewall/New(loc)
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/falsewall/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/falsewall/attack_hand(mob/user)
|
||||
if(opening)
|
||||
return
|
||||
|
||||
opening = 1
|
||||
if(density)
|
||||
do_the_flick()
|
||||
sleep(5)
|
||||
if(!qdeleted(src))
|
||||
density = 0
|
||||
SetOpacity(0)
|
||||
update_icon()
|
||||
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(5)
|
||||
if(!qdeleted(src))
|
||||
SetOpacity(1)
|
||||
update_icon()
|
||||
air_update_turf(1)
|
||||
opening = 0
|
||||
|
||||
/obj/structure/falsewall/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
qdel(src)
|
||||
|
||||
/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()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
||||
if(density)
|
||||
smooth = SMOOTH_TRUE
|
||||
queue_smooth(src)
|
||||
icon_state = "wall"
|
||||
else
|
||||
icon_state = "fwall_open"
|
||||
|
||||
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!walltype || walltype == "metal")
|
||||
T.ChangeTurf(/turf/closed/wall)
|
||||
else
|
||||
T.ChangeTurf(text2path("/turf/closed/wall/mineral/[walltype]"))
|
||||
if(delete)
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/obj/structure/falsewall/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(opening)
|
||||
user << "<span class='warning'>You must wait until the door has stopped moving!</span>"
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(density)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.density)
|
||||
user << "<span class='warning'>[src] is blocked!</span>"
|
||||
return
|
||||
if(!istype(T, /turf/open/floor))
|
||||
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='notice'>You tighten the bolts on the wall.</span>")
|
||||
ChangeToWall()
|
||||
else
|
||||
user << "<span class='warning'>You can't reach, close it first!</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
dismantle(user)
|
||||
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
|
||||
dismantle(user)
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
|
||||
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
|
||||
D.playDigSound()
|
||||
dismantle(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/proc/dismantle(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='notice'>You dismantle the false wall.</span>")
|
||||
new /obj/structure/girder/displaced(loc)
|
||||
if(mineral == "metal")
|
||||
if(istype(src, /obj/structure/falsewall/reinforced))
|
||||
new /obj/item/stack/sheet/plasteel(loc)
|
||||
new /obj/item/stack/sheet/plasteel(loc)
|
||||
else
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
else
|
||||
var/P = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
new P(loc)
|
||||
new P(loc)
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
return 0
|
||||
|
||||
/*
|
||||
* False R-Walls
|
||||
*/
|
||||
|
||||
/obj/structure/falsewall/reinforced
|
||||
name = "reinforced wall"
|
||||
desc = "A huge chunk of reinforced metal used to separate rooms."
|
||||
icon = 'icons/turf/walls/reinforced_wall.dmi'
|
||||
icon_state = "r_wall"
|
||||
walltype = "rwall"
|
||||
|
||||
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/closed/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 = "uranium"
|
||||
walltype = "uranium"
|
||||
var/active = null
|
||||
var/last_event = 0
|
||||
canSmoothWith = list(/obj/structure/falsewall/uranium, /turf/closed/wall/mineral/uranium)
|
||||
|
||||
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W, mob/user, params)
|
||||
radiate()
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/uranium/attack_hand(mob/user)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/uranium/proc/radiate()
|
||||
if(!active)
|
||||
if(world.time > last_event+15)
|
||||
active = 1
|
||||
radiation_pulse(get_turf(src), 0, 3, 15, 1)
|
||||
for(var/turf/closed/wall/mineral/uranium/T in orange(1,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 = "gold"
|
||||
walltype = "gold"
|
||||
canSmoothWith = list(/obj/structure/falsewall/gold, /turf/closed/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 = "silver"
|
||||
walltype = "silver"
|
||||
canSmoothWith = list(/obj/structure/falsewall/silver, /turf/closed/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 = "diamond"
|
||||
walltype = "diamond"
|
||||
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/closed/wall/mineral/diamond)
|
||||
|
||||
/obj/structure/falsewall/plasma
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definitely a bad idea."
|
||||
icon = 'icons/turf/walls/plasma_wall.dmi'
|
||||
icon_state = "plasma"
|
||||
mineral = "plasma"
|
||||
walltype = "plasma"
|
||||
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/closed/wall/mineral/plasma)
|
||||
|
||||
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.is_hot() > 300)
|
||||
message_admins("Plasma falsewall ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma falsewall ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
burnbabyburn()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
atmos_spawn_air("plasma=400;TEMP=1000")
|
||||
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/clown
|
||||
name = "bananium wall"
|
||||
desc = "A wall with bananium plating. Honk!"
|
||||
icon = 'icons/turf/walls/bananium_wall.dmi'
|
||||
icon_state = "bananium"
|
||||
mineral = "bananium"
|
||||
walltype = "bananium"
|
||||
canSmoothWith = list(/obj/structure/falsewall/clown, /turf/closed/wall/mineral/clown)
|
||||
|
||||
|
||||
/obj/structure/falsewall/sandstone
|
||||
name = "sandstone wall"
|
||||
desc = "A wall with sandstone plating. Rough."
|
||||
icon = 'icons/turf/walls/sandstone_wall.dmi'
|
||||
icon_state = "sandstone"
|
||||
mineral = "sandstone"
|
||||
walltype = "sandstone"
|
||||
canSmoothWith = list(/obj/structure/falsewall/sandstone, /turf/closed/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 = "wood"
|
||||
walltype = "wood"
|
||||
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/closed/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 = "metal"
|
||||
walltype = "iron"
|
||||
canSmoothWith = list(/obj/structure/falsewall/iron, /turf/closed/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 = "abductor"
|
||||
walltype = "abductor"
|
||||
canSmoothWith = list(/obj/structure/falsewall/abductor, /turf/closed/wall/mineral/abductor)
|
||||
@@ -0,0 +1,167 @@
|
||||
/obj/structure/fireaxecabinet
|
||||
name = "fire axe cabinet"
|
||||
desc = "There is a small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
var/obj/item/weapon/twohanded/fireaxe/fireaxe = new/obj/item/weapon/twohanded/fireaxe
|
||||
icon = 'icons/obj/wallmounts.dmi'
|
||||
icon_state = "fireaxe"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/locked = 1
|
||||
var/open = 0
|
||||
var/health = 60
|
||||
|
||||
/obj/structure/fireaxecabinet/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(isrobot(user) || istype(I,/obj/item/device/multitool))
|
||||
toggle_lock(user)
|
||||
return
|
||||
if(open || health <= 0)
|
||||
if(istype(I, /obj/item/weapon/twohanded/fireaxe) && !fireaxe)
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = I
|
||||
if(F.wielded)
|
||||
user << "<span class='warning'>Unwield the [F.name] first.</span>"
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
fireaxe = F
|
||||
src.contents += F
|
||||
user << "<span class='caution'>You place the [F.name] back in the [name].</span>"
|
||||
update_icon()
|
||||
return
|
||||
else if(health > 0)
|
||||
toggle_open()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/fireaxecabinet/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/fireaxecabinet/proc/take_damage(damage, damage_type, sound_effect = 1)
|
||||
if(open)
|
||||
return
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(health <= 0)
|
||||
playsound(loc, 'sound/effects/hit_on_shattered_glass.ogg', 90, 1)
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
if(damage < 10)
|
||||
return
|
||||
if(health > 0)
|
||||
health -= damage
|
||||
update_icon()
|
||||
if(health <= 0)
|
||||
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/fireaxecabinet/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50) && fireaxe)
|
||||
fireaxe.loc = src.loc
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(rand(30,70), BRUTE, 0)
|
||||
if(3)
|
||||
take_damage(rand(10,30), BRUTE, 0)
|
||||
|
||||
/obj/structure/fireaxecabinet/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
|
||||
/obj/structure/fireaxecabinet/blob_act(obj/effect/blob/B)
|
||||
if(fireaxe)
|
||||
fireaxe.loc = src.loc
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_hand(mob/user)
|
||||
if(open || health <= 0)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
user << "<span class='caution'>You take the fire axe from the [name].</span>"
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
if(locked)
|
||||
user <<"<span class='warning'> The [name] won't budge!</span>"
|
||||
return
|
||||
else
|
||||
open = !open
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_paw(mob/living/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_alien(mob/living/user)
|
||||
user.visible_message("<span class='warning'>[user] slashes [src].</span>")
|
||||
take_damage(20)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_animal(mob/living/simple_animal/M)
|
||||
if(!M.melee_damage_upper)
|
||||
return
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
"<span class='danger'>You smash against [src].</span>")
|
||||
take_damage(M.melee_damage_upper, M.melee_damage_type)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_ai(mob/user)
|
||||
toggle_lock(user)
|
||||
return
|
||||
|
||||
/obj/structure/fireaxecabinet/update_icon()
|
||||
cut_overlays()
|
||||
if(fireaxe)
|
||||
add_overlay("axe")
|
||||
if(!open)
|
||||
switch(health)
|
||||
if(-INFINITY to 0)
|
||||
add_overlay("glass4")
|
||||
if(1 to 20)
|
||||
add_overlay("glass3")
|
||||
if(21 to 40)
|
||||
add_overlay("glass2")
|
||||
if(41 to 59)
|
||||
add_overlay("glass1")
|
||||
if(60)
|
||||
add_overlay("glass")
|
||||
if(locked)
|
||||
add_overlay("locked")
|
||||
else
|
||||
add_overlay("unlocked")
|
||||
else
|
||||
add_overlay("glass_raised")
|
||||
|
||||
/obj/structure/fireaxecabinet/proc/toggle_lock(mob/user)
|
||||
user << "<span class = 'caution'> Resetting circuitry...</span>"
|
||||
playsound(src, 'sound/machines/locktoggle.ogg', 50, 1)
|
||||
if(do_after(user, 20, target = src))
|
||||
user << "<span class='caution'>You [locked ? "disable" : "re-enable"] the locking modules.</span>"
|
||||
locked = !locked
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/verb/toggle_open()
|
||||
set name = "Open/Close"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(locked)
|
||||
usr <<"<span class='warning'> The [name] won't budge!</span>"
|
||||
return
|
||||
else
|
||||
open = !open
|
||||
update_icon()
|
||||
return
|
||||
@@ -0,0 +1,296 @@
|
||||
/obj/structure/flora
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
|
||||
//trees
|
||||
/obj/structure/flora/tree
|
||||
name = "tree"
|
||||
anchored = 1
|
||||
density = 1
|
||||
pixel_x = -16
|
||||
layer = FLY_LAYER
|
||||
var/cut = FALSE
|
||||
var/log_amount = 10
|
||||
|
||||
/obj/structure/flora/tree/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(!cut && log_amount && (!(NODECONSTRUCT in flags)))
|
||||
if(W.sharpness && W.force > 0)
|
||||
if(W.hitsound)
|
||||
playsound(get_turf(src), W.hitsound, 100, 0, 0)
|
||||
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "You hear the sound of cutting a tree.")
|
||||
if(do_after(user, 1000/W.force, target = user)) //5 seconds with 20 force, 8 seconds with a hatchet, 20 seconds with a shard.
|
||||
if(cut)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] falls [src] with the [W].</span>","<span class='notice'>You fall [src] with the [W].</span>", "You hear the sound of a tree falling.")
|
||||
playsound(get_turf(src), 'sound/effects/meteorimpact.ogg', 100 , 0, 0)
|
||||
icon_state = "tree_stump"
|
||||
name = "stump"
|
||||
cut = TRUE
|
||||
for(var/i=1 to log_amount)
|
||||
new /obj/item/weapon/grown/log/tree(get_turf(src))
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
/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_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/festivus
|
||||
name = "festivus pole"
|
||||
icon = 'icons/obj/flora/pinetrees.dmi'
|
||||
icon_state = "festivus_pole"
|
||||
desc = "During last year's Feats of Strength the Research Director was able to suplex this passing immobile rod into a planter."
|
||||
|
||||
/obj/structure/flora/tree/dead/New()
|
||||
icon_state = "tree_[rand(1, 6)]"
|
||||
..()
|
||||
|
||||
|
||||
//grass
|
||||
/obj/structure/flora/grass
|
||||
name = "grass"
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
anchored = 1
|
||||
gender = PLURAL //"this is grass" not "this is a grass"
|
||||
|
||||
/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()
|
||||
if(icon_state == "firstbush_1")
|
||||
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, 3)]"
|
||||
..()
|
||||
|
||||
/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/weapon/twohanded/required/kirbyplants
|
||||
name = "potted plant"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "plant-01"
|
||||
w_class = 5
|
||||
force = 10
|
||||
throwforce = 13
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
|
||||
/obj/item/weapon/twohanded/flora/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, player_list)
|
||||
|
||||
/obj/item/weapon/twohanded/required/kirbyplants/dropped(mob/living/user)
|
||||
..()
|
||||
user.remove_alt_appearance("sneaking_mission")
|
||||
|
||||
/obj/item/weapon/twohanded/required/kirbyplants/random
|
||||
var/list/static/states
|
||||
|
||||
/obj/item/weapon/twohanded/required/kirbyplants/random/New()
|
||||
. = ..()
|
||||
if(!states)
|
||||
generate_states()
|
||||
icon_state = pick(states)
|
||||
|
||||
/obj/item/weapon/twohanded/required/kirbyplants/random/proc/generate_states()
|
||||
states = list()
|
||||
for(var/i in 1 to 25)
|
||||
var/number
|
||||
if(i < 10)
|
||||
number = "0[i]"
|
||||
else
|
||||
number = "[i]"
|
||||
states += "plant-[number]"
|
||||
states += "applebush"
|
||||
|
||||
|
||||
/obj/item/weapon/twohanded/required/kirbyplants/dead
|
||||
name = "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-25"
|
||||
|
||||
|
||||
//a rock is flora according to where the icon file is
|
||||
//and now these defines
|
||||
|
||||
/obj/structure/flora/rock
|
||||
icon_state = "basalt"
|
||||
desc = "A volcanic rock"
|
||||
icon = 'icons/obj/flora/rocks.dmi'
|
||||
anchored = 1
|
||||
burn_state = FIRE_PROOF
|
||||
density = 1
|
||||
|
||||
/obj/structure/flora/rock/New()
|
||||
..()
|
||||
icon_state = "[icon_state][rand(1,3)]"
|
||||
|
||||
/obj/structure/flora/rock/pile
|
||||
icon_state = "lavarocks"
|
||||
desc = "A pile of rocks"
|
||||
|
||||
/obj/structure/flora/rock/pile/New()
|
||||
..()
|
||||
icon_state = "[icon_state][rand(1,3)]"
|
||||
@@ -0,0 +1,57 @@
|
||||
//Fluff structures serve no purpose and exist only for enriching the environment. They can be destroyed with a wrench.
|
||||
|
||||
/obj/structure/fluff
|
||||
name = "fluff structure"
|
||||
desc = "Fluffier than a sheep. This shouldn't exist."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "minibar"
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/fluff/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user.visible_message("<span class='notice'>[user] starts disassembling [src]...</span>", "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(!do_after(user, 50, target = src))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] disassembles [src]!</span>", "<span class='notice'>You break down [src] into scrap metal.</span>")
|
||||
playsound(user, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new/obj/item/stack/sheet/metal(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/fluff/empty_terrarium //Empty terrariums are created when a preserved terrarium in a lavaland seed vault is activated.
|
||||
name = "empty terrarium"
|
||||
desc = "An ancient machine that seems to be used for storing plant matter. Its hatch is ajar."
|
||||
icon = 'icons/obj/lavaland/spawners.dmi'
|
||||
icon_state = "terrarium_open"
|
||||
density = TRUE
|
||||
|
||||
/obj/structure/fluff/empty_sleeper //Empty sleepers are created by a good few ghost roles in lavaland.
|
||||
name = "empty sleeper"
|
||||
desc = "An open sleeper. It looks as though it would be awaiting another patient, were it not broken."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "sleeper-open"
|
||||
|
||||
/obj/structure/fluff/empty_sleeper/nanotrasen
|
||||
name = "broken hypersleep chamber"
|
||||
desc = "A NanoTrasen hypersleep chamber - this one appears broken. \
|
||||
There are exposed bolts for easy disassembly using a wrench."
|
||||
icon_state = "sleeper-o"
|
||||
|
||||
/obj/structure/fluff/empty_sleeper/syndicate
|
||||
icon_state = "sleeper_s-open"
|
||||
|
||||
/obj/structure/fluff/empty_cryostasis_sleeper //Empty cryostasis sleepers are created when a malfunctioning cryostasis sleeper in a lavaland shelter is activated
|
||||
name = "empty cryostasis sleeper"
|
||||
desc = "Although comfortable, this sleeper won't function as anything but a bed ever again."
|
||||
icon = 'icons/obj/lavaland/spawners.dmi'
|
||||
icon_state = "cryostasis_sleeper_open"
|
||||
|
||||
/obj/structure/fluff/broken_flooring
|
||||
name = "broken tiling"
|
||||
desc = "A segment of broken flooring"
|
||||
icon = 'icons/obj/brokentiling.dmi'
|
||||
icon_state = "corner"
|
||||
@@ -0,0 +1,239 @@
|
||||
//Objects that spawn ghosts in as a certain role when they click on it, i.e. away mission bartenders.
|
||||
|
||||
//Preserved terrarium/seed vault: Spawns in seed vault structures in lavaland. Ghosts become plantpeople and are advised to begin growing plants in the room near them.
|
||||
/obj/effect/mob_spawn/human/seed_vault
|
||||
name = "preserved terrarium"
|
||||
desc = "An ancient machine that seems to be used for storing plant matter. The glass is obstructed by a mat of vines."
|
||||
mob_name = "a lifebringer"
|
||||
icon = 'icons/obj/lavaland/spawners.dmi'
|
||||
icon_state = "terrarium"
|
||||
density = TRUE
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
mob_species = /datum/species/pod
|
||||
flavour_text = "<font size=3><b>Y</b></font><b>ou are a sentient ecosystem - an example of the mastery over life that your creators possessed. Your masters, benevolent as they were, created uncounted \
|
||||
seed vaults and spread them across the universe to every planet they could chart. You are in one such seed vault. Your goal is to cultivate and spread life wherever it will go while waiting \
|
||||
for contact from your creators. Estimated time of last contact: Deployment, 5x10^3 millennia ago.</b>"
|
||||
|
||||
/obj/effect/mob_spawn/human/seed_vault/special(mob/living/new_spawn)
|
||||
var/plant_name = pick("Tomato", "Potato", "Brocolli", "Carrot", "Ambrosia", "Pumpkin", "Ivy", "Kudzu", "Bannana", "Moss", "Flower", "Bloom", "Root", "Bark", "Glowshroom", "Petal", "Leaf", \
|
||||
"Venus", "Sprout","Cocao", "Strawberry", "Citrus", "Oak", "Cactus", "Pepper", "Juniper")
|
||||
new_spawn.real_name = plant_name
|
||||
if(ishuman(new_spawn))
|
||||
var/mob/living/carbon/human/H = new_spawn
|
||||
H.underwear = "Nude" //You're a plant, partner
|
||||
H.update_body()
|
||||
|
||||
/obj/effect/mob_spawn/human/seed_vault/Destroy()
|
||||
new/obj/structure/fluff/empty_terrarium(get_turf(src))
|
||||
..()
|
||||
|
||||
//Ash walker eggs: Spawns in ash walker dens in lavaland. Ghosts become unbreathing lizards that worship the Necropolis and are advised to retrieve corpses to create more ash walkers.
|
||||
/obj/effect/mob_spawn/human/ash_walker
|
||||
name = "ash walker egg"
|
||||
desc = "A man-sized yellow egg, spawned from some unfathomable creature. A humanoid silhouette lurks within."
|
||||
mob_name = "an ash walker"
|
||||
icon = 'icons/mob/lavaland/lavaland_monsters.dmi'
|
||||
icon_state = "large_egg"
|
||||
mob_species = /datum/species/lizard/ashwalker
|
||||
helmet = /obj/item/clothing/head/helmet/gladiator
|
||||
uniform = /obj/item/clothing/under/gladiator
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
anchored = 0
|
||||
density = 0
|
||||
flavour_text = "<font size=3><b>Y</b></font><b>ou are an ash walker. Your tribe worships <span class='danger'>the Necropolis</span>. The wastes are sacred ground, its monsters a blessed bounty. \
|
||||
You have seen lights in the distance... they foreshadow the arrival of outsiders that seek to tear apart the Necropolis and its domain. Fresh sacrifices for your nest.</b>"
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker/special(mob/living/new_spawn)
|
||||
new_spawn.real_name = random_unique_lizard_name(gender)
|
||||
new_spawn << "<b>Drag the corpses of men and beasts to your nest. It will absorb them to create more of your kind. Glory to the Necropolis!</b>"
|
||||
if(ishuman(new_spawn))
|
||||
var/mob/living/carbon/human/H = new_spawn
|
||||
H.underwear = "Nude"
|
||||
H.update_body()
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker/New()
|
||||
..()
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action=NOTIFY_ATTACK)
|
||||
|
||||
//Timeless prisons: Spawns in Wish Granter prisons in lavaland. Ghosts become age-old users of the Wish Granter and are advised to seek repentance for their past.
|
||||
/obj/effect/mob_spawn/human/exile
|
||||
name = "timeless prison"
|
||||
desc = "Although this stasis pod looks medicinal, it seems as though it's meant to preserve something for a very long time."
|
||||
mob_name = "a penitent exile"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "sleeper"
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
mob_species = /datum/species/shadow
|
||||
flavour_text = "<font size=3><b>Y</b></font><b>ou are cursed. Years ago, you sacrificed the lives of your trusted friends and the humanity of yourself to reach the Wish Granter. Though you \
|
||||
did so, it has come at a cost: your very body rejects the light, dooming you to wander endlessly in this horrible wasteland.</b>"
|
||||
|
||||
/obj/effect/mob_spawn/human/exile/Destroy()
|
||||
new/obj/structure/fluff/empty_sleeper(get_turf(src))
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/exile/special(mob/living/new_spawn)
|
||||
new_spawn.real_name = "Wish Granter's Victim ([rand(0,999)])"
|
||||
var/wish = rand(1,4)
|
||||
switch(wish)
|
||||
if(1)
|
||||
new_spawn << "<b>You wished to kill, and kill you did. You've lost track of how many, but the spark of excitement that murder once held has winked out. You feel only regret.</b>"
|
||||
if(2)
|
||||
new_spawn << "<b>You wished for unending wealth, but no amount of money was worth this existence. Maybe charity might redeem your soul?</b>"
|
||||
if(3)
|
||||
new_spawn << "<b>You wished for power. Little good it did you, cast out of the light. You are the [gender == MALE ? "king" : "queen"] of a hell that holds no subjects. You feel only remorse.</b>"
|
||||
if(4)
|
||||
new_spawn << "<b>You wished for immortality, even as your friends lay dying behind you. No matter how many times you cast yourself into the lava, you awaken in this room again within a few days. There is no escape.</b>"
|
||||
|
||||
//Golem shells: Spawns in Free Golem ships in lavaland. Ghosts become mineral golems and are advised to spread personal freedom.
|
||||
/obj/effect/mob_spawn/human/golem
|
||||
name = "inert golem shell"
|
||||
desc = "A humanoid shape, empty, lifeless, and full of potential."
|
||||
mob_name = "a free golem"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "construct"
|
||||
mob_species = /datum/species/golem
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
anchored = 0
|
||||
density = 0
|
||||
flavour_text = "<font size=3><b>Y</b></font><b>ou are a Free Golem. Your family worships <span class='danger'>The Liberator</span>. In his infinite and divine wisdom, he set your clan free to \
|
||||
travel the stars with a single declaration: \"Yeah go do whatever.\" Though you are bound to the one who created you, it is customary in your society to repeat those same words to newborn \
|
||||
golems, so that no golem may ever be forced to serve again.</b>"
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/New()
|
||||
..()
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
notify_ghosts("A golem shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK)
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/special(mob/living/new_spawn)
|
||||
var/golem_surname = pick(golem_names)
|
||||
// 3% chance that our golem has a human surname, because
|
||||
// cultural contamination
|
||||
if(prob(3))
|
||||
golem_surname = pick(last_names)
|
||||
|
||||
var/datum/species/X = mob_species
|
||||
var/golem_forename = initial(X.id)
|
||||
|
||||
// The id of golem species is either their material "diamond","gold",
|
||||
// or just "golem" for the plain ones. So we're using it for naming.
|
||||
|
||||
if(golem_forename == "golem")
|
||||
golem_forename = "iron"
|
||||
|
||||
new_spawn.real_name = "[capitalize(golem_forename)] [golem_surname]"
|
||||
// This means golems have names like Iron Forge, or Diamond Quarry
|
||||
// also a tiny chance of being called "Plasma Meme"
|
||||
// which is clearly a feature
|
||||
|
||||
new_spawn << "Build golem shells in the autolathe, and feed refined mineral sheets to the shells to bring them to life! You are generally a peaceful group unless provoked."
|
||||
if(ishuman(new_spawn))
|
||||
var/mob/living/carbon/human/H = new_spawn
|
||||
H.set_cloned_appearance()
|
||||
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/adamantine
|
||||
name = "dust-caked golem shell"
|
||||
desc = "A humanoid shape, empty, lifeless, and full of potential."
|
||||
mob_name = "a free golem"
|
||||
anchored = 1
|
||||
density = 1
|
||||
mob_species = /datum/species/golem/adamantine
|
||||
|
||||
//Malfunctioning cryostasis sleepers: Spawns in makeshift shelters in lavaland. Ghosts become hermits with knowledge of how they got to where they are now.
|
||||
/obj/effect/mob_spawn/human/hermit
|
||||
name = "malfunctiong cryostasis sleeper"
|
||||
desc = "A humming sleeper with a silhoutted occupant inside. Its stasis function is broken and it's likely being used as a bed."
|
||||
mob_name = "a stranded hermit"
|
||||
icon = 'icons/obj/lavaland/spawners.dmi'
|
||||
icon_state = "cryostasis_sleeper"
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "<font size=3><b>Y</b></font><b>ou've been stranded in this godless prison of a planet for longer than you can remember. Each day you barely scrape by, and between the terrible \
|
||||
conditions of your makeshift shelter, the hostile creatures, and the ash drakes swooping down from the cloudless skies, all you can wish for is the feel of soft grass between your toes and \
|
||||
the fresh air of Earth. These thoughts are dispelled by yet another recollection of how you got here... "
|
||||
|
||||
/obj/effect/mob_spawn/human/hermit/New()
|
||||
var/arrpee = rand(1,4)
|
||||
switch(arrpee)
|
||||
if(1)
|
||||
flavour_text += "you were a [pick("arms dealer", "shipwright", "docking manager")]'s assistant on a small trading station several sectors from here. Raiders attacked, and there was \
|
||||
only one pod left when you got to the escape bay. You took it and launched it alone, and the crowd of terrified faces crowding at the airlock door as your pod's engines burst to \
|
||||
life and sent you to this hell are forever branded into your memory.</b>"
|
||||
uniform = /obj/item/clothing/under/assistantformal
|
||||
shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
back = /obj/item/weapon/storage/backpack
|
||||
if(2)
|
||||
flavour_text += "you're an exile from the Tiger Cooperative. Their technological fanaticism drove you to question the power and beliefs of the Exolitics, and they saw you as a \
|
||||
heretic and subjected you to hours of horrible torture. You were hours away from execution when a high-ranking friend of yours in the Cooperative managed to secure you a pod, \
|
||||
scrambled its destination's coordinates, and launched it. You awoke from stasis when you landed and have been surviving - barely - ever since.</b>"
|
||||
uniform = /obj/item/clothing/under/rank/prisoner
|
||||
shoes = /obj/item/clothing/shoes/sneakers/orange
|
||||
back = /obj/item/weapon/storage/backpack
|
||||
if(3)
|
||||
flavour_text += "you were a doctor on one of Nanotrasen's space stations, but you left behind that damn corporation's tyranny and everything it stood for. From a metaphorical hell \
|
||||
to a literal one, you find yourself nonetheless missing the recycled air and warm floors of what you left behind... but you'd still rather be here than there.</b>"
|
||||
uniform = /obj/item/clothing/under/rank/medical
|
||||
suit = /obj/item/clothing/suit/toggle/labcoat
|
||||
back = /obj/item/weapon/storage/backpack/medic
|
||||
shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
if(4)
|
||||
flavour_text += "you were always joked about by your friends for \"not playing with a full deck\", as they so <i>kindly</i> put it. It seems that they were right when you, on a tour \
|
||||
at one of Nanotrasen's state-of-the-art research facilities, were in one of the escape pods alone and saw the red button. It was big and shiny, and it caught your eye. You pressed \
|
||||
it, and after a terrifying and fast ride for days, you landed here. You've had time to wisen up since then, and you think that your old friends wouldn't be laughing now.</b>"
|
||||
uniform = /obj/item/clothing/under/color/grey/glorf
|
||||
shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
back = /obj/item/weapon/storage/backpack
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/hermit/Destroy()
|
||||
new/obj/structure/fluff/empty_cryostasis_sleeper(get_turf(src))
|
||||
..()
|
||||
|
||||
//Broken rejuvenation pod: Spawns in animal hospitals in lavaland. Ghosts become disoriented interns and are advised to search for help.
|
||||
/obj/effect/mob_spawn/human/doctor/alive/lavaland
|
||||
name = "broken rejuvenation pod"
|
||||
desc = "A small sleeper typically used to instantly restore minor wounds. This one seems broken, and its occupant is comatose."
|
||||
mob_name = "a translocated vet"
|
||||
flavour_text = "<font size=3><b>W</b></font><b>hat...? Where are you? Where are the others? This is still the animal hospital - you should know, you've been an intern here for weeks - but \
|
||||
everyone's gone. One of the cats scratched you just a few minutes ago. That's why you were in the pod - to heal the scratch. The scabs are still fresh; you see them right now. So where is \
|
||||
everyone? Where did they go? What happened to the hospital? And is that <i>smoke</i> you smell? You need to find someone else. Maybe they can tell you what happened.</b>"
|
||||
|
||||
//Prisoner containment sleeper: Spawns in crashed prison ships in lavaland. Ghosts become escaped prisoners and are advised to find a way out of the mess they've gotten themselves into.
|
||||
/obj/effect/mob_spawn/human/prisoner_transport
|
||||
name = "prisoner containment sleeper"
|
||||
desc = "A sleeper designed to put its occupant into a deep coma, unbreakable until the sleeper turns off. This one's glass is cracked and you can see a pale, sleeping face staring out."
|
||||
mob_name = "an escaped prisoner"
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "sleeper_s"
|
||||
uniform = /obj/item/clothing/under/rank/prisoner
|
||||
mask = /obj/item/clothing/mask/breath
|
||||
shoes = /obj/item/clothing/shoes/sneakers/orange
|
||||
pocket1 = /obj/item/weapon/tank/internals/emergency_oxygen
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
flavour_text = "<font size=3><b>G</b></font><b>ood. It seems as though your ship crashed. You're a prisoner, sentenced to hard work in one of Nanotrasen's labor camps, but it seems as \
|
||||
though fate has other plans for you. You remember that you were convicted of "
|
||||
|
||||
/obj/effect/mob_spawn/human/prisoner_transport/special(mob/living/L)
|
||||
L.real_name = "NTP #LL-0[rand(111,999)]" //Nanotrasen Prisoner #Lavaland-(numbers)
|
||||
L.name = L.real_name
|
||||
|
||||
/obj/effect/mob_spawn/human/prisoner_transport/New()
|
||||
var/list/crimes = list("murder", "larceny", "embezzlement", "unionization", "dereliction of duty", "kidnapping", "gross incompetence", "grand theft", "collaboration with the Syndicate", \
|
||||
"worship of a forbidden deity", "interspecies relations", "mutiny")
|
||||
flavour_text += "[pick(crimes)]. but regardless of that, it seems like your crime doesn't matter now. You don't know where you are, but you know that it's out to kill you, and you're not going \
|
||||
to lose this opportunity. Find a way to get out of this mess and back to where you rightfully belong - your [pick("house", "apartment", "spaceship", "station")]</b>."
|
||||
..()
|
||||
|
||||
/obj/effect/mob_spawn/human/prisoner_transport/Destroy()
|
||||
new/obj/structure/fluff/empty_sleeper/syndicate(get_turf(src))
|
||||
..()
|
||||
@@ -0,0 +1,398 @@
|
||||
#define GIRDER_NORMAL 0
|
||||
#define GIRDER_REINF_STRUTS 1
|
||||
#define GIRDER_REINF 2
|
||||
#define GIRDER_DISPLACED 3
|
||||
#define GIRDER_DISASSEMBLED 4
|
||||
|
||||
/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.
|
||||
var/can_displace = TRUE //If the girder can be moved around by wrenching it
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the girder.</span>", \
|
||||
"<span class='notice'>You start to disassemble the girder...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(state != GIRDER_DISPLACED)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
user << "<span class='notice'>You disassemble the girder.</span>"
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else if(state == GIRDER_REINF)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start unsecuring support struts...</span>"
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(state != GIRDER_REINF)
|
||||
return
|
||||
user << "<span class='notice'>You unsecure the support struts.</span>"
|
||||
state = GIRDER_REINF_STRUTS
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(!istype(loc, /turf/open/floor))
|
||||
user << "<span class='warning'>A floor must be present to secure the girder!</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start securing the girder...</span>"
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
user << "<span class='notice'>You secure the girder.</span>"
|
||||
var/obj/structure/girder/G = new (loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
else if(state == GIRDER_NORMAL && can_displace)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start unsecuring the girder...</span>"
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
user << "<span class='notice'>You unsecure the girder.</span>"
|
||||
var/obj/structure/girder/displaced/D = new (loc)
|
||||
transfer_fingerprints_to(D)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
|
||||
user << "<span class='notice'>You start slicing apart the girder...</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(do_after(user, 30, target = src))
|
||||
user << "<span class='notice'>You slice apart the girder.</span>"
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
|
||||
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
|
||||
user << "<span class='notice'>You smash through the girder!</span>"
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
D.playDigSound()
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == GIRDER_REINF_STRUTS)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start removing support struts...</span>"
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
user << "<span class='notice'>You remove the support struts.</span>"
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(src))
|
||||
var/obj/structure/girder/G = new (loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack))
|
||||
if (istype(src.loc, /turf/closed/wall))
|
||||
user << "<span class='warning'>There is already a wall present!</span>"
|
||||
return
|
||||
if (!istype(src.loc, /turf/open/floor))
|
||||
user << "<span class='warning'>A floor must be present to build a false wall!</span>"
|
||||
return
|
||||
if (locate(/obj/structure/falsewall) in src.loc.contents)
|
||||
user << "<span class='warning'>There is already a false wall present!</span>"
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/S = W
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.amount < 2)
|
||||
user << "<span class='warning'>You need at least two rods to create a false wall!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start building a reinforced false wall...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src.loc || !S || S.amount < 2)
|
||||
return
|
||||
S.use(2)
|
||||
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.amount < 5)
|
||||
user << "<span class='warning'>You need at least five rods to add plating!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding plating...</span>"
|
||||
if (do_after(user, 40, target = src))
|
||||
if(!src.loc || !S || S.amount < 5)
|
||||
return
|
||||
S.use(5)
|
||||
user << "<span class='notice'>You add the plating.</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/closed/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(istype(S,/obj/item/stack/sheet/metal))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
user << "<span class='warning'>You need two sheets of metal to create a false wall!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start building a false wall...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
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)
|
||||
user << "<span class='warning'>You need two sheets of metal to finish a wall!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding plating...</span>"
|
||||
if (do_after(user, 40, target = src))
|
||||
if(loc == null || S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
user << "<span class='notice'>You add the plating.</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/closed/wall)
|
||||
transfer_fingerprints_to(T)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(istype(S,/obj/item/stack/sheet/plasteel))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.amount < 2)
|
||||
user << "<span class='warning'>You need at least two sheets to create a false wall!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start building a reinforced false wall...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src.loc || !S || S.amount < 2)
|
||||
return
|
||||
S.use(2)
|
||||
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.amount < 1)
|
||||
return
|
||||
user << "<span class='notice'>You start finalizing the reinforced wall...</span>"
|
||||
if(do_after(user, 50, target = src))
|
||||
if(!src.loc || !S || S.amount < 1)
|
||||
return
|
||||
S.use(1)
|
||||
user << "<span class='notice'>You fully reinforce the wall.</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/closed/wall/r_wall)
|
||||
transfer_fingerprints_to(T)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
if(S.amount < 1)
|
||||
return
|
||||
user << "<span class='notice'>You start reinforcing the girder...</span>"
|
||||
if (do_after(user, 60, target = src))
|
||||
if(!src.loc || !S || S.amount < 1)
|
||||
return
|
||||
S.use(1)
|
||||
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.amount < 2)
|
||||
user << "<span class='warning'>You need at least two sheets to create a false wall!</span>"
|
||||
return
|
||||
S.use(2)
|
||||
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.amount < 2)
|
||||
user << "<span class='warning'>You need at least two sheets to add plating!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding plating...</span>"
|
||||
if (do_after(user, 40, target = src))
|
||||
if(!src.loc || !S || S.amount < 2)
|
||||
return
|
||||
S.use(2)
|
||||
user << "<span class='notice'>You add the plating.</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(text2path("/turf/closed/wall/mineral/[M]"))
|
||||
transfer_fingerprints_to(T)
|
||||
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
|
||||
user << "<span class='notice'>You fit the pipe into \the [src].</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/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/blob_act(obj/effect/blob/B)
|
||||
if(prob(40))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if (prob(70))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
if(3)
|
||||
if (prob(40))
|
||||
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
|
||||
|
||||
/obj/structure/girder/reinforced
|
||||
name = "reinforced girder"
|
||||
icon_state = "reinforced"
|
||||
state = GIRDER_REINF
|
||||
girderpasschance = 0
|
||||
|
||||
/obj/structure/girder/reinforced/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if (prob(50))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
if(3)
|
||||
if (prob(20))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
|
||||
|
||||
//////////////////////////////////////////// cult girder //////////////////////////////////////////////
|
||||
|
||||
/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
|
||||
|
||||
/obj/structure/girder/cult/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/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>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 1
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user << "<span class='notice'>You start slicing apart the girder...</span>"
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if( !WT.isOn() )
|
||||
return
|
||||
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/weapon/gun/energy/plasmacutter))
|
||||
user << "<span class='notice'>You start slicing apart the girder...</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(do_after(user, 30, target = src))
|
||||
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/weapon/pickaxe/drill/jackhammer))
|
||||
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
|
||||
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 = 2
|
||||
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.amount < 1)
|
||||
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))
|
||||
return 0
|
||||
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/closed/wall/mineral/cult)
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/cult/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/girder/cult/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(30))
|
||||
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,311 @@
|
||||
/obj/structure/grille
|
||||
desc = "A flimsy lattice of metal rods, with screws to secure it to the floor."
|
||||
name = "grille"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "grille"
|
||||
density = 1
|
||||
anchored = 1
|
||||
flags = CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/health = 10
|
||||
var/destroyed = 0
|
||||
var/obj/item/stack/rods/stored
|
||||
|
||||
/obj/structure/grille/New()
|
||||
..()
|
||||
stored = new/obj/item/stack/rods(src)
|
||||
stored.amount = 2
|
||||
|
||||
/obj/structure/grille/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(rand(5,10), BRUTE, 0)
|
||||
|
||||
/obj/structure/grille/ratvar_act()
|
||||
if(prob(20))
|
||||
if(destroyed)
|
||||
new /obj/structure/grille/ratvar/broken(src.loc)
|
||||
else
|
||||
new /obj/structure/grille/ratvar(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/blob_act(obj/effect/blob/B)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/Bumped(atom/user)
|
||||
if(ismob(user))
|
||||
shock(user, 70)
|
||||
|
||||
|
||||
/obj/structure/grille/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user)
|
||||
..(user, 1)
|
||||
shock(user, 70)
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='warning'>[user] hits [src].</span>", \
|
||||
"<span class='danger'>You hit [src].</span>", \
|
||||
"<span class='italics'>You hear twisting metal.</span>")
|
||||
if(!shock(user, 70))
|
||||
take_damage(rand(1,2))
|
||||
|
||||
/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>", \
|
||||
"<span class='danger'>You mangle [src].</span>", \
|
||||
"<span class='italics'>You hear twisting metal.</span>")
|
||||
if(!shock(user, 70))
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/grille/attack_slime(mob/living/simple_animal/slime/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(!user.is_adult)
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
|
||||
"<span class='danger'>You smash against [src].</span>", \
|
||||
"<span class='italics'>You hear twisting metal.</span>")
|
||||
take_damage(rand(1,2))
|
||||
|
||||
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
|
||||
return
|
||||
M.do_attack_animation(src)
|
||||
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
|
||||
"<span class='danger'>You smash against [src].</span>", \
|
||||
"<span class='italics'>You hear twisting metal.</span>")
|
||||
take_damage(M.melee_damage_upper, M.melee_damage_type)
|
||||
|
||||
|
||||
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
take_damage(M.force * 0.5, M.damtype)
|
||||
|
||||
/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) && density)
|
||||
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/bullet_act(var/obj/item/projectile/Proj)
|
||||
. = ..()
|
||||
take_damage(Proj.damage*0.3, Proj.damage_type)
|
||||
|
||||
/obj/structure/grille/Deconstruct()
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(!(flags&NODECONSTRUCT))
|
||||
transfer_fingerprints_to(stored)
|
||||
var/turf/T = loc
|
||||
stored.loc = T
|
||||
..()
|
||||
|
||||
/obj/structure/grille/proc/Break()
|
||||
icon_state = "broken[initial(icon_state)]"
|
||||
density = 0
|
||||
destroyed = 1
|
||||
stored.amount = 1
|
||||
if(!(flags&NODECONSTRUCT))
|
||||
var/obj/item/stack/rods/newrods = new(loc)
|
||||
transfer_fingerprints_to(newrods)
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
Deconstruct()
|
||||
else if((istype(W, /obj/item/weapon/screwdriver)) && (istype(loc, /turf) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
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>")
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/rods) && destroyed)
|
||||
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>")
|
||||
health = 10
|
||||
density = 1
|
||||
destroyed = 0
|
||||
icon_state = initial(icon_state)
|
||||
R.use(1)
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if(istype(W, /obj/item/stack/sheet/rglass) || istype(W, /obj/item/stack/sheet/glass))
|
||||
if (!destroyed)
|
||||
var/obj/item/stack/ST = W
|
||||
if (ST.get_amount() < 2)
|
||||
user << "<span class='warning'>You need at least two sheets of glass for that!</span>"
|
||||
return
|
||||
var/dir_to_set = SOUTHWEST
|
||||
if(!anchored)
|
||||
user << "<span class='warning'>[src] needs to be fastened to the floor first!</span>"
|
||||
return
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
user << "<span class='warning'>There is already a window there!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start placing the window...</span>"
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src.loc || !anchored) //Grille destroyed or unanchored while waiting
|
||||
return
|
||||
for(var/obj/structure/window/WINDOW in loc) //Another window already installed on grille
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W, /obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced/fulltile(loc) //reinforced window
|
||||
else
|
||||
WD = new/obj/structure/window/fulltile(loc) //normal window
|
||||
WD.setDir(dir_to_set)
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
ST.use(2)
|
||||
user << "<span class='notice'>You place [WD] on [src].</span>"
|
||||
return
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/grille/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force * 0.3, I.damtype)
|
||||
|
||||
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
if(!destroyed)
|
||||
Break()
|
||||
else
|
||||
if(health <= -6)
|
||||
Deconstruct()
|
||||
|
||||
|
||||
// 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 || destroyed) // anchored/destroyed grilles are never connected
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
if(!in_range(src, user))//To prevent TK and mech users from getting shocked
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if(electrocute_mob(user, C, src))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!destroyed)
|
||||
if(exposed_temperature > T0C + 1500)
|
||||
take_damage(1)
|
||||
..()
|
||||
|
||||
/obj/structure/grille/hitby(AM as mob|obj)
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 5
|
||||
else if(isobj(AM))
|
||||
if(prob(50))
|
||||
var/obj/item/I = AM
|
||||
tforce = max(0, I.throwforce * 0.5)
|
||||
else if(anchored && !destroyed)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src.loc, 'sound/magic/LightningShock.ogg', 100, 1, extrarange = 5)
|
||||
tesla_zap(src, 3, C.powernet.avail * 0.08) //ZAP for 1/5000 of the amount of power, which is from 15-25 with 200000W
|
||||
take_damage(tforce)
|
||||
|
||||
/obj/structure/grille/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
return 0
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
density = 0
|
||||
health = 0
|
||||
destroyed = 1
|
||||
|
||||
/obj/structure/grille/broken/New()
|
||||
..()
|
||||
stored.amount = 1
|
||||
icon_state = "brokengrille"
|
||||
|
||||
/obj/structure/grille/ratvar
|
||||
icon_state = "ratvargrille"
|
||||
desc = "A strangely-shaped grille."
|
||||
|
||||
/obj/structure/grille/ratvar/New()
|
||||
..()
|
||||
if(destroyed)
|
||||
PoolOrNew(/obj/effect/overlay/temp/ratvar/grille/broken, get_turf(src))
|
||||
else
|
||||
PoolOrNew(/obj/effect/overlay/temp/ratvar/grille, get_turf(src))
|
||||
PoolOrNew(/obj/effect/overlay/temp/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
|
||||
density = 0
|
||||
health = 0
|
||||
destroyed = 1
|
||||
|
||||
/obj/structure/grille/ratvar/broken/New()
|
||||
..()
|
||||
stored.amount = 1
|
||||
icon_state = "brokenratvargrille"
|
||||
@@ -0,0 +1,100 @@
|
||||
//GUNCASES//
|
||||
/obj/structure/guncase
|
||||
name = "gun locker"
|
||||
desc = "A locker that holds guns."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "shotguncase"
|
||||
anchored = 0
|
||||
density = 1
|
||||
opacity = 0
|
||||
var/case_type = null
|
||||
var/gun_category = /obj/item/weapon/gun
|
||||
var/open = 1
|
||||
var/capacity = 4
|
||||
|
||||
/obj/structure/guncase/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/guncase/initialize()
|
||||
..()
|
||||
for(var/obj/item/I in loc.contents)
|
||||
if(istype(I, gun_category))
|
||||
I.loc = src
|
||||
if(contents.len >= capacity)
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/obj/structure/guncase/update_icon()
|
||||
cut_overlays()
|
||||
for(var/i = contents.len, i >= 1, i--)
|
||||
add_overlay(image(icon = src.icon, icon_state = "[case_type]", pixel_x = 4 * (i -1) ))
|
||||
if(open)
|
||||
add_overlay("[icon_state]_open")
|
||||
else
|
||||
add_overlay("[icon_state]_door")
|
||||
|
||||
/obj/structure/guncase/attackby(obj/item/I, mob/user, params)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if(istype(I, gun_category))
|
||||
if(contents.len < capacity && open)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
contents += I
|
||||
user << "<span class='notice'>You place [I] in [src].</span>"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if(user.a_intent != "harm")
|
||||
open = !open
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/guncase/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if(contents.len && open)
|
||||
ShowWindow(user)
|
||||
else
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/guncase/proc/ShowWindow(mob/user)
|
||||
var/dat = {"<div class='block'>
|
||||
<h3>Stored Guns</h3>
|
||||
<table align='center'>"}
|
||||
for(var/i = contents.len, i >= 1, i--)
|
||||
var/obj/item/I = contents[i]
|
||||
dat += "<tr><A href='?src=\ref[src];retrieve=\ref[I]'>[I.name]</A><br>"
|
||||
dat += "</table></div>"
|
||||
|
||||
var/datum/browser/popup = new(user, "gunlocker", "<div align='center'>[name]</div>", 350, 300)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
|
||||
/obj/structure/guncase/Topic(href, href_list)
|
||||
if(href_list["retrieve"])
|
||||
var/obj/item/O = locate(href_list["retrieve"])
|
||||
if(!usr.canUseTopic(src))
|
||||
return
|
||||
if(ishuman(usr))
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hands(O)
|
||||
else
|
||||
O.loc = get_turf(src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/guncase/shotgun
|
||||
name = "shotgun locker"
|
||||
desc = "A locker that holds shotguns."
|
||||
case_type = "shotgun"
|
||||
gun_category = /obj/item/weapon/gun/projectile/shotgun
|
||||
|
||||
/obj/structure/guncase/ecase
|
||||
name = "energy gun locker"
|
||||
desc = "A locker that holds energy guns."
|
||||
icon_state = "ecase"
|
||||
case_type = "egun"
|
||||
gun_category = /obj/item/weapon/gun/energy/gun
|
||||
@@ -0,0 +1,36 @@
|
||||
/obj/structure/hivebot_beacon
|
||||
name = "beacon"
|
||||
desc = "Some odd beacon thing."
|
||||
icon = 'icons/mob/hivebot.dmi'
|
||||
icon_state = "def_radar-off"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/bot_type = "norm"
|
||||
var/bot_amt = 10
|
||||
|
||||
/obj/structure/hivebot_beacon/New()
|
||||
..()
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(2, loc)
|
||||
smoke.start()
|
||||
visible_message("<span class='boldannounce'>The [src] warps in!</span>")
|
||||
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
|
||||
addtimer(src, "warpbots", rand(10, 600))
|
||||
|
||||
/obj/structure/hivebot_beacon/proc/warpbots()
|
||||
icon_state = "def_radar"
|
||||
visible_message("<span class='danger'>The [src] turns on!</span>")
|
||||
while(bot_amt > 0)
|
||||
bot_amt--
|
||||
switch(bot_type)
|
||||
if("norm")
|
||||
new /mob/living/simple_animal/hostile/hivebot(get_turf(src))
|
||||
if("range")
|
||||
new /mob/living/simple_animal/hostile/hivebot/range(get_turf(src))
|
||||
if("rapid")
|
||||
new /mob/living/simple_animal/hostile/hivebot/rapid(get_turf(src))
|
||||
sleep(100)
|
||||
visible_message("<span class='boldannounce'>The [src] warps out!</span>")
|
||||
playsound(src.loc, 'sound/effects/EMPulse.ogg', 25, 1)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -0,0 +1,163 @@
|
||||
/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
|
||||
flags = OPENCONTAINER
|
||||
//copypaste sorry
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
var/obj/item/weapon/storage/bag/trash/mybag = null
|
||||
var/obj/item/weapon/mop/mymop = null
|
||||
var/obj/item/weapon/reagent_containers/spray/cleaner/myspray = null
|
||||
var/obj/item/device/lightreplacer/myreplacer = null
|
||||
var/signs = 0
|
||||
var/const/max_signs = 4
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/New()
|
||||
create_reagents(100)
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user)
|
||||
if(reagents.total_volume < 1)
|
||||
user << "<span class='warning'>[src] is out of water!</span>"
|
||||
return 0
|
||||
else
|
||||
reagents.trans_to(mop, 5)
|
||||
user << "<span class='notice'>You wet [mop] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return 1
|
||||
|
||||
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
updateUsrDialog()
|
||||
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='warning'>There is already one of those in [src]!</span>"
|
||||
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
var/obj/item/weapon/mop/m=I
|
||||
if(m.reagents.total_volume < m.reagents.maximum_volume)
|
||||
if (wet_mop(m, user))
|
||||
return
|
||||
if(!mymop)
|
||||
m.janicart_insert(user, src)
|
||||
else
|
||||
user << fail_msg
|
||||
|
||||
else if(istype(I, /obj/item/weapon/storage/bag/trash))
|
||||
if(!mybag)
|
||||
var/obj/item/weapon/storage/bag/trash/t=I
|
||||
t.janicart_insert(user, src)
|
||||
else
|
||||
user << fail_msg
|
||||
else if(istype(I, /obj/item/weapon/reagent_containers/spray/cleaner))
|
||||
if(!myspray)
|
||||
put_in_cart(I, user)
|
||||
myspray=I
|
||||
update_icon()
|
||||
else
|
||||
user << fail_msg
|
||||
else if(istype(I, /obj/item/device/lightreplacer))
|
||||
if(!myreplacer)
|
||||
var/obj/item/device/lightreplacer/l=I
|
||||
l.janicart_insert(user,src)
|
||||
else
|
||||
user << fail_msg
|
||||
else if(istype(I, /obj/item/weapon/caution))
|
||||
if(signs < max_signs)
|
||||
put_in_cart(I, user)
|
||||
signs++
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>[src] can't hold any more signs!</span>"
|
||||
else if(mybag)
|
||||
mybag.attackby(I, user)
|
||||
else if(istype(I, /obj/item/weapon/crowbar))
|
||||
user.visible_message("[user] begins to empty the contents of [src].", "<span class='notice'>You begin to empty the contents of [src]...</span>")
|
||||
if(do_after(user, 30/I.toolspeed, target = src))
|
||||
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
|
||||
return ..()
|
||||
|
||||
/obj/structure/janitorialcart/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if(mybag)
|
||||
dat += "<a href='?src=\ref[src];garbage=1'>[mybag.name]</a><br>"
|
||||
if(mymop)
|
||||
dat += "<a href='?src=\ref[src];mop=1'>[mymop.name]</a><br>"
|
||||
if(myspray)
|
||||
dat += "<a href='?src=\ref[src];spray=1'>[myspray.name]</a><br>"
|
||||
if(myreplacer)
|
||||
dat += "<a href='?src=\ref[src];replacer=1'>[myreplacer.name]</a><br>"
|
||||
if(signs)
|
||||
dat += "<a href='?src=\ref[src];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)
|
||||
user << "<span class='notice'>You take [mybag] from [src].</span>"
|
||||
mybag = null
|
||||
if(href_list["mop"])
|
||||
if(mymop)
|
||||
user.put_in_hands(mymop)
|
||||
user << "<span class='notice'>You take [mymop] from [src].</span>"
|
||||
mymop = null
|
||||
if(href_list["spray"])
|
||||
if(myspray)
|
||||
user.put_in_hands(myspray)
|
||||
user << "<span class='notice'>You take [myspray] from [src].</span>"
|
||||
myspray = null
|
||||
if(href_list["replacer"])
|
||||
if(myreplacer)
|
||||
user.put_in_hands(myreplacer)
|
||||
user << "<span class='notice'>You take [myreplacer] from [src].</span>"
|
||||
myreplacer = null
|
||||
if(href_list["sign"])
|
||||
if(signs)
|
||||
var/obj/item/weapon/caution/Sign = locate() in src
|
||||
if(Sign)
|
||||
user.put_in_hands(Sign)
|
||||
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()
|
||||
cut_overlays()
|
||||
if(mybag)
|
||||
add_overlay("cart_garbage")
|
||||
if(mymop)
|
||||
add_overlay("cart_mop")
|
||||
if(myspray)
|
||||
add_overlay("cart_spray")
|
||||
if(myreplacer)
|
||||
add_overlay("cart_replacer")
|
||||
if(signs)
|
||||
add_overlay("cart_sign[signs]")
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
//////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
|
||||
|
||||
/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(default_unfasten_wrench(user, I))
|
||||
return
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
if(R.get_amount() >= 4)
|
||||
R.use(4)
|
||||
user << "<span class='notice'>You add spikes to the frame.</span>"
|
||||
var/obj/F = new /obj/structure/kitchenspike(src.loc,)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
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 = 0
|
||||
can_buckle = 1
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/attack_paw(mob/user)
|
||||
return src.attack_hand(usr)
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(!has_buckled_mobs())
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
if(do_after(user, 20/I.toolspeed, target = src))
|
||||
user << "<span class='notice'>You pry the spikes out of the frame.</span>"
|
||||
new /obj/item/stack/rods(loc, 4)
|
||||
var/obj/F = new /obj/structure/kitchenspike_frame(src.loc,)
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You can't do that while something's on the spike!</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user)
|
||||
if(isliving(user.pulling) && user.a_intent == "grab" && !has_buckled_mobs())
|
||||
var/mob/living/L = user.pulling
|
||||
if(do_mob(user, src, 120))
|
||||
if(has_buckled_mobs()) //to prevent spam/queing up attacks
|
||||
return
|
||||
if(L.buckled)
|
||||
return
|
||||
playsound(src.loc, "sound/effects/splat.ogg", 25, 1)
|
||||
L.visible_message("<span class='danger'>[user] slams [L] 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>")
|
||||
L.loc = src.loc
|
||||
L.emote("scream")
|
||||
L.add_splatter_floor()
|
||||
L.adjustBruteLoss(30)
|
||||
L.buckled = src
|
||||
L.setDir(2)
|
||||
buckle_mob(L, force=1)
|
||||
var/matrix/m180 = matrix(L.transform)
|
||||
m180.Turn(180)
|
||||
animate(L, transform = m180, time = 3)
|
||||
L.pixel_y = L.get_standard_pixel_y_offset(180)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/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(\
|
||||
"[user.name] tries to pull [M.name] free of the [src]!",\
|
||||
"<span class='notice'>[user.name] is trying to pull you off the [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(\
|
||||
"[user.name] fails to free [M.name]!",\
|
||||
"<span class='notice'>[user.name] fails to pull you off of the [src].</span>")
|
||||
return
|
||||
|
||||
else
|
||||
M.visible_message(\
|
||||
"<span class='warning'>[M.name] struggles to break free from the [src]!</span>",\
|
||||
"<span class='notice'>You struggle to break free from the [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)
|
||||
M << "<span class='warning'>You fail to free yourself!</span>"
|
||||
return
|
||||
if(!M.buckled)
|
||||
return
|
||||
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 the [src]!</span>"))
|
||||
unbuckle_mob(M,force=1)
|
||||
M.emote("scream")
|
||||
M.AdjustWeakened(10)
|
||||
@@ -0,0 +1,99 @@
|
||||
/obj/structure/ladder
|
||||
name = "ladder"
|
||||
desc = "A sturdy metal ladder."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "ladder11"
|
||||
var/id = null
|
||||
var/height = 0 //the 'height' of the ladder. higher numbers are considered physically higher
|
||||
var/obj/structure/ladder/down = null //the ladder below this one
|
||||
var/obj/structure/ladder/up = null //the ladder above this one
|
||||
|
||||
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
|
||||
name = "sturdy ladder"
|
||||
desc = "An extremely sturdy metal ladder."
|
||||
|
||||
|
||||
/obj/structure/ladder/New()
|
||||
spawn(8)
|
||||
for(var/obj/structure/ladder/L in world)
|
||||
if(L.id == id)
|
||||
if(L.height == (height - 1))
|
||||
down = L
|
||||
continue
|
||||
if(L.height == (height + 1))
|
||||
up = L
|
||||
continue
|
||||
|
||||
if(up && down) //if both our connections are filled
|
||||
break
|
||||
update_icon()
|
||||
|
||||
/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/proc/go_up(mob/user,is_ghost)
|
||||
if(!is_ghost)
|
||||
show_fluff_message(1,user)
|
||||
up.add_fingerprint(user)
|
||||
user.loc = get_turf(up)
|
||||
|
||||
/obj/structure/ladder/proc/go_down(mob/user,is_ghost)
|
||||
if(!is_ghost)
|
||||
show_fluff_message(0,user)
|
||||
down.add_fingerprint(user)
|
||||
user.loc = get_turf(down)
|
||||
|
||||
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
|
||||
if(up && down)
|
||||
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
|
||||
if("Up")
|
||||
go_up(user,is_ghost)
|
||||
if("Down")
|
||||
go_down(user,is_ghost)
|
||||
if("Cancel")
|
||||
return
|
||||
else if(up)
|
||||
go_up(user,is_ghost)
|
||||
else if(down)
|
||||
go_down(user,is_ghost)
|
||||
|
||||
if(!is_ghost)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attack_hand(mob/user)
|
||||
if(can_use(user))
|
||||
use(user)
|
||||
|
||||
/obj/structure/ladder/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user, params)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
|
||||
use(user,1)
|
||||
|
||||
/obj/structure/ladder/proc/show_fluff_message(up,mob/user)
|
||||
if(up)
|
||||
user.visible_message("[user] climbs up \the [src].","<span class='notice'>You climb up \the [src].</span>")
|
||||
else
|
||||
user.visible_message("[user] climbs down \the [src].","<span class='notice'>You climb down \the [src].</span>")
|
||||
|
||||
/obj/structure/ladder/proc/can_use(mob/user)
|
||||
return 1
|
||||
|
||||
/obj/structure/ladder/unbreakable/Destroy(force)
|
||||
if(force)
|
||||
. = ..()
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
@@ -0,0 +1,85 @@
|
||||
/obj/structure/lattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice. These hold our station together."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = LATTICE_LAYER //under pipes
|
||||
var/obj/item/stack/rods/stored
|
||||
canSmoothWith = list(/obj/structure/lattice,
|
||||
/turf/open/floor,
|
||||
/turf/closed/wall,
|
||||
/obj/structure/falsewall)
|
||||
smooth = SMOOTH_MORE
|
||||
// flags = CONDUCT
|
||||
|
||||
/obj/structure/lattice/New()
|
||||
..()
|
||||
if(!(istype(src.loc, /turf/open/space)))
|
||||
qdel(src)
|
||||
for(var/obj/structure/lattice/LAT in src.loc)
|
||||
if(LAT != src)
|
||||
qdel(LAT)
|
||||
stored = new/obj/item/stack/rods(src)
|
||||
|
||||
/obj/structure/lattice/Destroy()
|
||||
qdel(stored)
|
||||
stored = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/lattice/blob_act(obj/effect/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/lattice/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2)
|
||||
qdel(src)
|
||||
return
|
||||
if(3)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
||||
if(istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
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()
|
||||
stored.loc = get_turf(src)
|
||||
stored = null
|
||||
..()
|
||||
|
||||
/obj/structure/lattice/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FOUR)
|
||||
Deconstruct()
|
||||
|
||||
/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"
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
|
||||
/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()
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,255 @@
|
||||
//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 = "mineral door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 1
|
||||
|
||||
icon = 'icons/obj/doors/mineral_doors.dmi'
|
||||
icon_state = "metal"
|
||||
|
||||
var/mineralType = "metal"
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/close_delay = -1 //-1 if does not auto close.
|
||||
var/hardness = 1
|
||||
var/oreAmount = 7
|
||||
var/openSound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
var/closeSound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
|
||||
/obj/structure/mineral_door/New(location)
|
||||
..()
|
||||
icon_state = mineralType
|
||||
name = "[mineralType] door"
|
||||
air_update_turf(1)
|
||||
return
|
||||
|
||||
/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)
|
||||
return
|
||||
|
||||
/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)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_paw(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_hand(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/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()
|
||||
return !density
|
||||
|
||||
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(world.time - M.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("[mineralType]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)
|
||||
if(!isSwitchingStates && state == 1)
|
||||
Close()
|
||||
|
||||
/obj/structure/mineral_door/proc/Close()
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/living/L in T)
|
||||
return
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, closeSound, 100, 1)
|
||||
flick("[mineralType]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 = "[mineralType]open"
|
||||
else
|
||||
icon_state = mineralType
|
||||
|
||||
/obj/structure/mineral_door/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "<span class='notice'>You start digging the [name]...</span>"
|
||||
if(do_after(user,digTool.digspeed*hardness, target = src) && src)
|
||||
user << "<span class='notice'>You finish digging.</span>"
|
||||
Dismantle()
|
||||
else if(user.a_intent != "harm")
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/mineral_door/attacked_by(obj/item/I, mob/user)
|
||||
..()
|
||||
if(I.damtype != STAMINA)
|
||||
hardness -= I.force/100
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/bullet_act(obj/item/projectile/Proj)
|
||||
hardness -= Proj.damage
|
||||
..()
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/mineral_door/proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
Dismantle(1)
|
||||
|
||||
/obj/structure/mineral_door/proc/Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
if (mineralType == "metal")
|
||||
var/ore = /obj/item/stack/sheet/metal
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
else
|
||||
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
else
|
||||
if (mineralType == "metal")
|
||||
var/ore = /obj/item/stack/sheet/metal
|
||||
for(var/i = 3, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
else
|
||||
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
|
||||
for(var/i = 3, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mineral_door/ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(1)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
Dismantle(1)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
mineralType = "metal"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
mineralType = "silver"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/gold
|
||||
mineralType = "gold"
|
||||
|
||||
/obj/structure/mineral_door/uranium
|
||||
mineralType = "uranium"
|
||||
hardness = 3
|
||||
luminosity = 2
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
mineralType = "sandstone"
|
||||
hardness = 0.5
|
||||
|
||||
/obj/structure/mineral_door/transparent
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/mineral_door/transparent/Close()
|
||||
..()
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma
|
||||
mineralType = "plasma"
|
||||
|
||||
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.is_hot())
|
||||
message_admins("Plasma mineral door ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma mineral door ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
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("plasma=500;TEMP=1000")
|
||||
hardness = 0
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/transparent/diamond
|
||||
mineralType = "diamond"
|
||||
hardness = 10
|
||||
|
||||
/obj/structure/mineral_door/wood
|
||||
mineralType = "wood"
|
||||
hardness = 1
|
||||
openSound = 'sound/effects/doorcreaky.ogg'
|
||||
closeSound = 'sound/effects/doorcreaky.ogg'
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
|
||||
/obj/structure/mineral_door/wood/Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new/obj/item/stack/sheet/mineral/wood(get_turf(src))
|
||||
qdel(src)
|
||||
@@ -0,0 +1,257 @@
|
||||
//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
|
||||
var/shattered = 0
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
if(shattered || !Adjacent(user))
|
||||
return
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
var/userloc = H.loc
|
||||
|
||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||
//this is largely copypasted from there.
|
||||
|
||||
//handle facial hair (if necessary)
|
||||
if(H.gender == MALE)
|
||||
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
|
||||
if(userloc != H.loc)
|
||||
return //no tele-grooming
|
||||
if(new_style)
|
||||
H.facial_hair_style = new_style
|
||||
else
|
||||
H.facial_hair_style = "Shaved"
|
||||
|
||||
//handle normal hair
|
||||
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in hair_styles_list
|
||||
if(userloc != H.loc)
|
||||
return //no tele-grooming
|
||||
if(new_style)
|
||||
H.hair_style = new_style
|
||||
|
||||
H.update_hair()
|
||||
|
||||
|
||||
/obj/structure/mirror/proc/shatter()
|
||||
icon_state = "mirror_broke"
|
||||
playsound(src, "shatter", 70, 1)
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
shattered = 1
|
||||
|
||||
|
||||
/obj/structure/mirror/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(shattered)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "<span class='notice'>You begin repairing [src]...</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(do_after(user, 10/I.toolspeed, target = src))
|
||||
if(!user || !WT || !WT.isOn())
|
||||
return
|
||||
user << "<span class='notice'>You repair [src].</span>"
|
||||
shattered = 0
|
||||
icon_state = initial(icon_state)
|
||||
desc = initial(desc)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/mirror/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/mirror/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(5)
|
||||
if(3)
|
||||
if(prob(75))
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/mirror/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(BURN)
|
||||
else
|
||||
return
|
||||
if(!shattered)
|
||||
if(damage)
|
||||
shatter()
|
||||
else if(sound_effect)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
|
||||
/obj/structure/mirror/proc/attack_generic(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
take_damage(5)
|
||||
|
||||
/obj/structure/mirror/attack_alien(mob/living/user)
|
||||
attack_generic(user)
|
||||
|
||||
/obj/structure/mirror/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.melee_damage_upper <= 0)
|
||||
return
|
||||
attack_generic(M)
|
||||
|
||||
/obj/structure/mirror/attack_slime(mob/living/user)
|
||||
attack_generic(user)
|
||||
|
||||
/obj/structure/mirror/magic
|
||||
name = "magic mirror"
|
||||
desc = "Turn and face the strange... face."
|
||||
icon_state = "magic_mirror"
|
||||
var/list/races_blacklist = list("skeleton", "agent", "angel", "military_synth")
|
||||
var/list/choosable_races = list()
|
||||
|
||||
/obj/structure/mirror/magic/New()
|
||||
if(!choosable_races.len)
|
||||
for(var/speciestype in subtypesof(/datum/species))
|
||||
var/datum/species/S = new speciestype()
|
||||
if(!(S.id in races_blacklist))
|
||||
choosable_races += S.id
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/lesser/New()
|
||||
choosable_races = roundstart_species
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/badmin/New()
|
||||
for(var/speciestype in subtypesof(/datum/species))
|
||||
var/datum/species/S = new speciestype()
|
||||
choosable_races += S.id
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes")
|
||||
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
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
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
H.real_name = newname
|
||||
H.name = newname
|
||||
if(H.dna)
|
||||
H.dna.real_name = newname
|
||||
if(H.mind)
|
||||
H.mind.name = newname
|
||||
|
||||
if("race")
|
||||
var/newrace
|
||||
var/racechoice = input(H, "What are we again?", "Race change") as null|anything in choosable_races
|
||||
newrace = species_list[racechoice]
|
||||
|
||||
if(!newrace)
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
H.set_species(newrace, icon_update=0)
|
||||
|
||||
if(H.dna.species.use_skintones)
|
||||
var/new_s_tone = input(user, "Choose your skin tone:", "Race change") as null|anything in skin_tones
|
||||
|
||||
if(new_s_tone)
|
||||
H.skin_tone = new_s_tone
|
||||
H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
|
||||
|
||||
if(MUTCOLORS in H.dna.species.specflags)
|
||||
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change") as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
|
||||
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
|
||||
H.dna.features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
|
||||
|
||||
else
|
||||
H << "<span class='notice'>Invalid color. Your color is not bright enough.</span>"
|
||||
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
H.update_body_parts()
|
||||
H.update_mutations_overlay() // no hulk lizard
|
||||
|
||||
if("gender")
|
||||
if(!(H.gender in list("male", "female"))) //blame the patriarchy
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(H.gender == "male")
|
||||
if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
|
||||
H.gender = "female"
|
||||
H << "<span class='notice'>Man, you feel like a woman!</span>"
|
||||
else
|
||||
return
|
||||
|
||||
else
|
||||
if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes")
|
||||
H.gender = "male"
|
||||
H << "<span class='notice'>Whoa man, you feel like a man!</span>"
|
||||
else
|
||||
return
|
||||
H.dna.update_ui_block(DNA_GENDER_BLOCK)
|
||||
H.update_body()
|
||||
H.update_mutations_overlay() //(hulk male/female)
|
||||
|
||||
if("hair")
|
||||
var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(hairchoice == "Style") //So you just want to use a mirror then?
|
||||
..()
|
||||
else
|
||||
var/new_hair_color = input(H, "Choose your hair color", "Hair Color") as null|color
|
||||
if(new_hair_color)
|
||||
H.hair_color = sanitize_hexcolor(new_hair_color)
|
||||
H.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK)
|
||||
if(H.gender == "male")
|
||||
var/new_face_color = input(H, "Choose your facial hair color", "Hair Color") as null|color
|
||||
if(new_face_color)
|
||||
H.facial_hair_color = sanitize_hexcolor(new_face_color)
|
||||
H.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK)
|
||||
H.update_hair()
|
||||
|
||||
if("eyes")
|
||||
var/new_eye_color = input(H, "Choose your eye color", "Eye Color") as null|color
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(new_eye_color)
|
||||
H.eye_color = sanitize_hexcolor(new_eye_color)
|
||||
H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
|
||||
H.update_body()
|
||||
if(choice)
|
||||
curse(user)
|
||||
|
||||
/obj/structure/mirror/magic/proc/curse(mob/living/user)
|
||||
return
|
||||
@@ -0,0 +1,23 @@
|
||||
/obj/structure/mopbucket
|
||||
name = "mop bucket"
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
flags = 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)
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(I, 5)
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,284 @@
|
||||
/* Morgue stuff
|
||||
* Contains:
|
||||
* Morgue
|
||||
* Morgue tray
|
||||
* Crematorium
|
||||
* Crematorium tray
|
||||
* Crematorium button
|
||||
*/
|
||||
|
||||
/*
|
||||
* Bodycontainer
|
||||
* Parent class for morgue and crematorium
|
||||
* For overriding only
|
||||
*/
|
||||
/obj/structure/bodycontainer
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morgue1"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
var/obj/structure/tray/connected = null
|
||||
var/locked = 0
|
||||
var/opendir = SOUTH
|
||||
|
||||
/obj/structure/bodycontainer/New()
|
||||
..()
|
||||
|
||||
/obj/structure/bodycontainer/Destroy()
|
||||
open()
|
||||
if(connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/bodycontainer/on_log()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bodycontainer/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bodycontainer/alter_health()
|
||||
return src.loc
|
||||
|
||||
/obj/structure/bodycontainer/relaymove(mob/user)
|
||||
if(user.stat || !isturf(loc))
|
||||
return
|
||||
open()
|
||||
|
||||
/obj/structure/bodycontainer/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/bodycontainer/attack_hand(mob/user)
|
||||
if(locked)
|
||||
user << "<span class='danger'>It's locked.</span>"
|
||||
return
|
||||
if(!connected)
|
||||
user << "That doesn't appear to have a tray."
|
||||
return
|
||||
if(connected.loc == src)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/bodycontainer/attackby(obj/P, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(P, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
if (t)
|
||||
name = text("[]- '[]'", initial(name), t)
|
||||
else
|
||||
name = initial(name)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/bodycontainer/container_resist()
|
||||
open()
|
||||
|
||||
/obj/structure/bodycontainer/proc/open()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
var/turf/T = get_step(src, opendir)
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.forceMove(T)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bodycontainer/proc/close()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
for(var/atom/movable/AM in connected.loc)
|
||||
if(!AM.anchored || AM == connected)
|
||||
AM.forceMove(src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bodycontainer/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
|
||||
*/
|
||||
/obj/structure/bodycontainer/morgue
|
||||
name = "morgue"
|
||||
desc = "Used to keep bodies in until someone fetches them."
|
||||
icon_state = "morgue1"
|
||||
opendir = EAST
|
||||
|
||||
/obj/structure/bodycontainer/morgue/New()
|
||||
connected = new/obj/structure/tray/m_tray(src)
|
||||
connected.connected = src
|
||||
..()
|
||||
|
||||
/obj/structure/bodycontainer/morgue/update_icon()
|
||||
if (!connected || connected.loc != src) // Open or tray is gone.
|
||||
icon_state = "morgue0"
|
||||
else
|
||||
if(contents.len == 1) // Empty
|
||||
icon_state = "morgue1"
|
||||
else
|
||||
icon_state = "morgue2" // Dead, brainded mob.
|
||||
var/list/compiled = recursive_mob_check(src, 0, 0) // Search for mobs in all contents.
|
||||
if(!length(compiled)) // No mobs?
|
||||
icon_state = "morgue3"
|
||||
return
|
||||
for(var/mob/living/M in compiled)
|
||||
if(M.client)
|
||||
icon_state = "morgue4" // Cloneable
|
||||
break
|
||||
|
||||
/*
|
||||
* Crematorium
|
||||
*/
|
||||
var/global/list/crematoriums = new/list()
|
||||
/obj/structure/bodycontainer/crematorium
|
||||
name = "crematorium"
|
||||
desc = "A human incinerator. Works well on barbeque nights."
|
||||
icon_state = "crema1"
|
||||
opendir = SOUTH
|
||||
var/id = 1
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/Destroy()
|
||||
crematoriums.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/New()
|
||||
connected = new/obj/structure/tray/c_tray(src)
|
||||
connected.connected = src
|
||||
|
||||
crematoriums.Add(src)
|
||||
..()
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/update_icon()
|
||||
if(!connected || connected.loc != src)
|
||||
icon_state = "crema0"
|
||||
else
|
||||
|
||||
if(src.contents.len > 1)
|
||||
src.icon_state = "crema2"
|
||||
else
|
||||
src.icon_state = "crema1"
|
||||
|
||||
if(locked)
|
||||
src.icon_state = "crema_active"
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/bodycontainer/crematorium/proc/cremate(mob/user)
|
||||
if(locked)
|
||||
return //don't let you cremate something twice or w/e
|
||||
|
||||
if(contents.len <= 1)
|
||||
audible_message("<span class='italics'>You hear a hollow crackle.</span>")
|
||||
return
|
||||
|
||||
else
|
||||
audible_message("<span class='italics'>You hear a roar as the crematorium activates.</span>")
|
||||
|
||||
locked = 1
|
||||
update_icon()
|
||||
|
||||
for(var/mob/living/M in contents)
|
||||
if (M.stat != DEAD)
|
||||
M.emote("scream")
|
||||
if(user)
|
||||
user.attack_log +="\[[time_stamp()]\] Cremated <b>[M]/[M.ckey]</b>"
|
||||
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
else
|
||||
log_attack("\[[time_stamp()]\] <b>UNKNOWN</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
M.death(1)
|
||||
if(M) //some animals get automatically deleted 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
|
||||
if(O != connected) //Creamtorium does not burn hot enough to destroy the tray
|
||||
qdel(O)
|
||||
|
||||
new /obj/effect/decal/cleanable/ash(src)
|
||||
sleep(30)
|
||||
locked = 0
|
||||
update_icon()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
|
||||
|
||||
|
||||
/*
|
||||
* Generic Tray
|
||||
* Parent class for morguetray and crematoriumtray
|
||||
* For overriding only
|
||||
*/
|
||||
/obj/structure/tray
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
density = 1
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/obj/structure/bodycontainer/connected = null
|
||||
anchored = 1
|
||||
pass_flags = LETPASSTHROW
|
||||
|
||||
/obj/structure/tray/Destroy()
|
||||
if(connected)
|
||||
connected.connected = null
|
||||
connected.update_icon()
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/tray/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/tray/attack_hand(mob/user)
|
||||
if (src.connected)
|
||||
connected.close()
|
||||
add_fingerprint(user)
|
||||
else
|
||||
user << "<span class='warning'>That's not connected to anything!</span>"
|
||||
|
||||
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
|
||||
if(!istype(O, /atom/movable) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
|
||||
return
|
||||
if(!ismob(O))
|
||||
if(!istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
else
|
||||
var/mob/M = O
|
||||
if(M.buckled)
|
||||
return
|
||||
if(!ismob(user) || user.lying || user.incapacitated())
|
||||
return
|
||||
O.loc = src.loc
|
||||
if (user != O)
|
||||
visible_message("<span class='warning'>[user] stuffs [O] into [src].</span>")
|
||||
return
|
||||
|
||||
/*
|
||||
* Crematorium tray
|
||||
*/
|
||||
/obj/structure/tray/c_tray
|
||||
name = "crematorium tray"
|
||||
desc = "Apply body before burning."
|
||||
icon_state = "cremat"
|
||||
|
||||
/*
|
||||
* Morgue tray
|
||||
*/
|
||||
/obj/structure/tray/m_tray
|
||||
name = "morgue tray"
|
||||
desc = "Apply corpse before closing."
|
||||
icon_state = "morguet"
|
||||
|
||||
/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)
|
||||
@@ -0,0 +1,368 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/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/edit = 1 // if we're in editing mode
|
||||
var/repeat = 0 // number of times remaining to repeat
|
||||
var/max_repeats = 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)
|
||||
tempo = sanitize_tempo(tempo)
|
||||
instrumentDir = dir
|
||||
instrumentObj = obj
|
||||
|
||||
/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/[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)
|
||||
for(var/mob/M in get_hearers_in_view(15, source))
|
||||
if(!M.client || !(M.client.prefs.toggles & SOUND_INSTRUMENTS))
|
||||
continue
|
||||
M.playsound_local(source, soundfile, 100, falloff = 5)
|
||||
|
||||
/datum/song/proc/updateDialog(mob/user)
|
||||
instrumentObj.updateDialog() // assumes it's an object in world, override if otherwise
|
||||
|
||||
/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)
|
||||
//world << line
|
||||
for(var/beat in splittext(lowertext(line), ","))
|
||||
//world << "beat: [beat]"
|
||||
var/list/notes = splittext(beat, "/")
|
||||
for(var/note in splittext(notes[1], "-"))
|
||||
//world << "note: [note]"
|
||||
if(!playing || shouldStopPlaying(user))//If the instrument is playing, or special case
|
||||
playing = 0
|
||||
return
|
||||
if(lentext(note) == 0)
|
||||
continue
|
||||
//world << "Parse: [copytext(note,1,2)]"
|
||||
var/cur_note = text2ascii(note) - 96
|
||||
if(cur_note < 1 || cur_note > 7)
|
||||
continue
|
||||
for(var/i=2 to lentext(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--
|
||||
if(repeat >= 0) // don't show the last -1 repeat
|
||||
updateDialog(user)
|
||||
playing = 0
|
||||
repeat = 0
|
||||
updateDialog(user)
|
||||
|
||||
/datum/song/proc/interact(mob/user)
|
||||
var/dat = ""
|
||||
|
||||
if(lines.len > 0)
|
||||
dat += "<H3>Playback</H3>"
|
||||
if(!playing)
|
||||
dat += "<A href='?src=\ref[src];play=1'>Play</A> <SPAN CLASS='linkOn'>Stop</SPAN><BR><BR>"
|
||||
dat += "Repeat Song: "
|
||||
dat += repeat > 0 ? "<A href='?src=\ref[src];repeat=-10'>-</A><A href='?src=\ref[src];repeat=-1'>-</A>" : "<SPAN CLASS='linkOff'>-</SPAN><SPAN CLASS='linkOff'>-</SPAN>"
|
||||
dat += " [repeat] times "
|
||||
dat += repeat < max_repeats ? "<A href='?src=\ref[src];repeat=1'>+</A><A href='?src=\ref[src];repeat=10'>+</A>" : "<SPAN CLASS='linkOff'>+</SPAN><SPAN CLASS='linkOff'>+</SPAN>"
|
||||
dat += "<BR>"
|
||||
else
|
||||
dat += "<SPAN CLASS='linkOn'>Play</SPAN> <A href='?src=\ref[src];stop=1'>Stop</A><BR>"
|
||||
dat += "Repeats left: <B>[repeat]</B><BR>"
|
||||
if(!edit)
|
||||
dat += "<BR><B><A href='?src=\ref[src];edit=2'>Show Editor</A></B><BR>"
|
||||
else
|
||||
dat += "<H3>Editing</H3>"
|
||||
dat += "<B><A href='?src=\ref[src];edit=1'>Hide Editor</A></B>"
|
||||
dat += " <A href='?src=\ref[src];newsong=1'>Start a New Song</A>"
|
||||
dat += " <A href='?src=\ref[src];import=1'>Import a Song</A><BR><BR>"
|
||||
var/bpm = round(600 / tempo)
|
||||
dat += "Tempo: <A href='?src=\ref[src];tempo=[world.tick_lag]'>-</A> [bpm] BPM <A href='?src=\ref[src];tempo=-[world.tick_lag]'>+</A><BR><BR>"
|
||||
var/linecount = 0
|
||||
for(var/line in lines)
|
||||
linecount += 1
|
||||
dat += "Line [linecount]: <A href='?src=\ref[src];modifyline=[linecount]'>Edit</A> <A href='?src=\ref[src];deleteline=[linecount]'>X</A> [line]<BR>"
|
||||
dat += "<A href='?src=\ref[src];newline=1'>Add Line</A><BR><BR>"
|
||||
if(help)
|
||||
dat += "<B><A href='?src=\ref[src];help=1'>Hide Help</A></B><BR>"
|
||||
dat += {"
|
||||
Lines are a series of chords, separated by commas (,), each with notes seperated by hyphens (-).<br>
|
||||
Every note in a chord will play together, with chord timed by the tempo.<br>
|
||||
<br>
|
||||
Notes are played by the names of the note, and optionally, the accidental, and/or the octave number.<br>
|
||||
By default, every note is natural and in octave 3. Defining otherwise is remembered for each note.<br>
|
||||
Example: <i>C,D,E,F,G,A,B</i> will play a C major scale.<br>
|
||||
After a note has an accidental placed, it will be remembered: <i>C,C4,C,C3</i> is C3,C4,C4,C3</i><br>
|
||||
Chords can be played simply by seperating each note with a hyphon: <i>A-C#,Cn-E,E-G#,Gn-B</i><br>
|
||||
A pause may be denoted by an empty chord: <i>C,E,,C,G</i><br>
|
||||
To make a chord be a different time, end it with /x, where the chord length will be length<br>
|
||||
defined by tempo / x: <i>C,G/2,E/4</i><br>
|
||||
Combined, an example is: <i>E-E4/4,F#/2,G#/8,B/8,E3-E4/4</i>
|
||||
<br>
|
||||
Lines may be up to 50 characters.<br>
|
||||
A song may only contain up to 50 lines.<br>
|
||||
"}
|
||||
else
|
||||
dat += "<B><A href='?src=\ref[src];help=2'>Show Help</A></B><BR>"
|
||||
|
||||
var/datum/browser/popup = new(user, "instrument", instrumentObj.name, 700, 500)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(instrumentObj.icon, instrumentObj.icon_state))
|
||||
popup.open()
|
||||
|
||||
|
||||
/datum/song/Topic(href, href_list)
|
||||
if(!usr.canUseTopic(instrumentObj))
|
||||
usr << browse(null, "window=instrument")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
instrumentObj.add_fingerprint(usr)
|
||||
|
||||
if(href_list["newsong"])
|
||||
lines = new()
|
||||
tempo = sanitize_tempo(5) // default 120 BPM
|
||||
name = ""
|
||||
|
||||
else if(href_list["import"])
|
||||
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(lentext(t) >= 3072)
|
||||
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(lentext(t) > 3072)
|
||||
|
||||
//split into lines
|
||||
spawn()
|
||||
lines = splittext(t, "\n")
|
||||
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 > 50)
|
||||
usr << "Too many lines!"
|
||||
lines.Cut(51)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(lentext(l) > 50)
|
||||
usr << "Line [linenum] too long!"
|
||||
lines.Remove(l)
|
||||
else
|
||||
linenum++
|
||||
updateDialog(usr) // make sure updates when complete
|
||||
|
||||
else if(href_list["help"])
|
||||
help = text2num(href_list["help"]) - 1
|
||||
|
||||
else if(href_list["edit"])
|
||||
edit = text2num(href_list["edit"]) - 1
|
||||
|
||||
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_repeats)
|
||||
repeat = max_repeats
|
||||
|
||||
else if(href_list["tempo"])
|
||||
tempo = sanitize_tempo(tempo + text2num(href_list["tempo"]))
|
||||
|
||||
else if(href_list["play"])
|
||||
playing = 1
|
||||
spawn()
|
||||
playsong(usr)
|
||||
|
||||
else if(href_list["newline"])
|
||||
var/newline = html_encode(input("Enter your line: ", instrumentObj.name) as text|null)
|
||||
if(!newline || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(lines.len > 50)
|
||||
return
|
||||
if(lentext(newline) > 50)
|
||||
newline = copytext(newline, 1, 50)
|
||||
lines.Add(newline)
|
||||
|
||||
else if(href_list["deleteline"])
|
||||
var/num = round(text2num(href_list["deleteline"]))
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
lines.Cut(num, num+1)
|
||||
|
||||
else if(href_list["modifyline"])
|
||||
var/num = round(text2num(href_list["modifyline"]),1)
|
||||
var/content = html_encode(input("Enter your line: ", instrumentObj.name, lines[num]) as text|null)
|
||||
if(!content || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(lentext(content) > 50)
|
||||
content = copytext(content, 1, 50)
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
lines[num] = content
|
||||
|
||||
else if(href_list["stop"])
|
||||
playing = 0
|
||||
|
||||
updateDialog(usr)
|
||||
return
|
||||
|
||||
/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/updateDialog(mob/user)
|
||||
instrumentObj.interact(user)
|
||||
|
||||
/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(song)
|
||||
song = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/piano/initialize()
|
||||
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
|
||||
..()
|
||||
|
||||
/obj/structure/piano/attack_hand(mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return 1
|
||||
interact(user)
|
||||
|
||||
/obj/structure/piano/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/structure/piano/interact(mob/user)
|
||||
if(!user || !anchored)
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
song.interact(user)
|
||||
|
||||
/obj/structure/piano/attackby(obj/item/O, mob/user, params)
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'> You begin to tighten \the [src] to the floor...</span>"
|
||||
if (do_after(user, 20/O.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'>You tighten \the [src]'s casters. Now it can be played again.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'> You begin to loosen \the [src]'s casters...</span>"
|
||||
if (do_after(user, 40/O.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'>You loosen \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = 0
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +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
|
||||
var/notices = 0
|
||||
|
||||
/obj/structure/noticeboard/initialize()
|
||||
for(var/obj/item/I in loc)
|
||||
if(notices > 4) break
|
||||
if(istype(I, /obj/item/weapon/paper))
|
||||
I.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
//attaching papers!!
|
||||
/obj/structure/noticeboard/attackby(obj/item/weapon/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(notices < 5)
|
||||
if(!user.drop_item())
|
||||
return
|
||||
O.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
O.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]" //update sprite
|
||||
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
|
||||
else
|
||||
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>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(mob/user)
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/weapon/paper/P in src)
|
||||
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
|
||||
|
||||
/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/weapon/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/weapon/pen)) //check other hand for pen
|
||||
add_fingerprint(usr)
|
||||
P.attackby(usr.l_hand, usr)
|
||||
else
|
||||
usr << "<span class='notice'>You'll need something to write with!</span>"
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||
if((P && P.loc == src))
|
||||
if(!( istype(usr, /mob/living/carbon/human) ))
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[stars(P.info)]</TT></BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
else
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[P.info]</TT></BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
return
|
||||
@@ -0,0 +1,71 @@
|
||||
/obj/structure/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
|
||||
name = "plastic flaps"
|
||||
desc = "Definitely can't get past those. No way."
|
||||
icon = 'icons/obj/stationobjs.dmi' //Change this.
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = ABOVE_MOB_LAYER
|
||||
|
||||
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
|
||||
if(istype(caller, /mob/living))
|
||||
if(istype(caller,/mob/living/simple_animal/bot))
|
||||
return 1
|
||||
|
||||
var/mob/living/M = caller
|
||||
if(!M.ventcrawler && M.mob_size != MOB_SIZE_TINY)
|
||||
return 0
|
||||
|
||||
return 1 //diseases, stings, etc can pass
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/movable/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/bed/B = A
|
||||
if (istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if (istype(A, /obj/structure/closet/cardboard))
|
||||
var/obj/structure/closet/cardboard/C = A
|
||||
if(C.move_delay)
|
||||
return 0
|
||||
|
||||
else if(istype(A, /mob/living)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(istype(A,/mob/living/simple_animal/bot)) //Bots understand the secrets
|
||||
return 1
|
||||
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
|
||||
return 1
|
||||
if(!M.lying && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
..()
|
||||
switch(severity)
|
||||
if (1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
if (3)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
/obj/structure/plasticflaps/mining/New() //set the turf below the flaps to block air
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
T.blocks_air = 1
|
||||
..()
|
||||
|
||||
/obj/structure/plasticflaps/mining/Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor //wow this is terrible
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
if(istype(T, /turf/open/floor))
|
||||
T.blocks_air = 0
|
||||
return ..()
|
||||
@@ -0,0 +1,217 @@
|
||||
/obj/structure/reflector
|
||||
name = "reflector frame"
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "box_0"
|
||||
desc = "An angled mirror for reflecting lasers. This one does so at a 90 degree angle."
|
||||
anchored = 0
|
||||
density = 1
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/finished = 0
|
||||
var/admin = 0 //Can't be rotated or deconstructed
|
||||
var/framebuildstacktype = /obj/item/stack/sheet/metal
|
||||
var/framebuildstackamount = 5
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 0
|
||||
|
||||
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
|
||||
var/turf/reflector_turf = get_turf(src)
|
||||
var/turf/reflect_turf
|
||||
var/new_dir = get_reflection(src.dir,P.dir)
|
||||
if(!istype(P, /obj/item/projectile/beam))
|
||||
return..()
|
||||
if(new_dir)
|
||||
reflect_turf = get_step(reflect_turf, new_dir)
|
||||
else
|
||||
visible_message("<span class='notice'>[src] is hit by the [P]!</span>")
|
||||
new_dir = 0
|
||||
return ..() //Hits as normal, explodes or emps or whatever
|
||||
|
||||
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.range = initial(P.range) //Keep the projectile healthy as long as its bouncing off things
|
||||
new_dir = 0
|
||||
return - 1
|
||||
|
||||
|
||||
/obj/structure/reflector/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(admin)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
user << "Unweld the [src] first!"
|
||||
if(do_after(user, 80/W.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "You dismantle the [src]."
|
||||
new framebuildstacktype(loc, framebuildstackamount)
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
switch(anchored)
|
||||
if(0)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
|
||||
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if (do_after(user,20/W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
anchored = 1
|
||||
user << "<span class='notice'>You weld \the [src] to the floor.</span>"
|
||||
if(1)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
|
||||
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if (do_after(user,20/W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
anchored = 0
|
||||
user << "<span class='notice'>You cut \the [src] free from the floor.</span>"
|
||||
//Finishing the frame
|
||||
else 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)
|
||||
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)
|
||||
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)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/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.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if (src.anchored)
|
||||
usr << "<span class='warning'>It is fastened to the floor!</span>"
|
||||
return 0
|
||||
src.setDir(turn(src.dir, 270))
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/reflector/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
return
|
||||
else
|
||||
rotate()
|
||||
|
||||
|
||||
//TYPES OF REFLECTORS, SINGLE, DOUBLE, BOX
|
||||
|
||||
//SINGLE
|
||||
|
||||
/obj/structure/reflector/single
|
||||
name = "reflector"
|
||||
icon = 'icons/obj/structures.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) )
|
||||
buildstacktype = /obj/item/stack/sheet/glass
|
||||
buildstackamount = 5
|
||||
|
||||
/obj/structure/reflector/single/get_reflection(srcdir,pdir)
|
||||
var/new_dir = rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
/obj/structure/reflector/single/mapping
|
||||
admin = 1
|
||||
anchored = 1
|
||||
|
||||
//DOUBLE
|
||||
|
||||
/obj/structure/reflector/double
|
||||
name = "double sided reflector"
|
||||
icon = 'icons/obj/structures.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) )
|
||||
buildstacktype = /obj/item/stack/sheet/rglass
|
||||
buildstackamount = 10
|
||||
|
||||
/obj/structure/reflector/double/get_reflection(srcdir,pdir)
|
||||
var/new_dir = double_rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
/obj/structure/reflector/double/mapping
|
||||
admin = 1
|
||||
anchored = 1
|
||||
|
||||
//BOX
|
||||
|
||||
/obj/structure/reflector/box
|
||||
name = "reflector box"
|
||||
icon = 'icons/obj/structures.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) )
|
||||
buildstacktype = /obj/item/stack/sheet/mineral/diamond
|
||||
buildstackamount = 1
|
||||
|
||||
/obj/structure/reflector/box/get_reflection(srcdir,pdir)
|
||||
var/new_dir = box_rotations["[srcdir]"]["[pdir]"]
|
||||
return new_dir
|
||||
|
||||
|
||||
/obj/structure/reflector/box/mapping
|
||||
admin = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/reflector/ex_act()
|
||||
if(admin)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/reflector/singularity_act()
|
||||
if(admin)
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
*/
|
||||
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/open = 0 //is the safe open?
|
||||
var/tumbler_1_pos //the tumbler position- from 0 to 72
|
||||
var/tumbler_1_open //the tumbler position to open at- 0 to 72
|
||||
var/tumbler_2_pos
|
||||
var/tumbler_2_open
|
||||
var/dial = 0 //where is the dial pointing?
|
||||
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
|
||||
|
||||
|
||||
/obj/structure/safe/New()
|
||||
tumbler_1_pos = rand(0, 71)
|
||||
tumbler_1_open = rand(0, 71)
|
||||
|
||||
tumbler_2_pos = rand(0, 71)
|
||||
tumbler_2_open = rand(0, 71)
|
||||
|
||||
|
||||
/obj/structure/safe/initialize()
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
|
||||
if(user && canhear)
|
||||
if(tumbler_1_pos == tumbler_1_open)
|
||||
user << "<span class='italics'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>"
|
||||
if(tumbler_2_pos == tumbler_2_open)
|
||||
user << "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>"
|
||||
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
|
||||
if(user) visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/safe/proc/decrement(num)
|
||||
num -= 1
|
||||
if(num < 0)
|
||||
num = 71
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/proc/increment(num)
|
||||
num += 1
|
||||
if(num > 71)
|
||||
num = 0
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<center>"
|
||||
dat += "<a href='?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='?src=\ref[src];increment=1'>+</a>"
|
||||
if(open)
|
||||
dat += "<table>"
|
||||
for(var/i = contents.len, i>=1, i--)
|
||||
var/obj/item/P = contents[i]
|
||||
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
|
||||
dat += "</table></center>"
|
||||
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
|
||||
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
var/canhear = 0
|
||||
if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
|
||||
canhear = 1
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked())
|
||||
user << "<span class='notice'>You [open ? "close" : "open"] [src].</span>"
|
||||
open = !open
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>You can't [open ? "close" : "open"] [src], the lock is engaged!</span>"
|
||||
return
|
||||
|
||||
if(href_list["decrement"])
|
||||
dial = decrement(dial)
|
||||
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
|
||||
tumbler_1_pos = decrement(tumbler_1_pos)
|
||||
if(canhear)
|
||||
user << "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>"
|
||||
if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
|
||||
tumbler_2_pos = decrement(tumbler_2_pos)
|
||||
if(canhear)
|
||||
user << "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>"
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["increment"])
|
||||
dial = increment(dial)
|
||||
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
|
||||
tumbler_1_pos = increment(tumbler_1_pos)
|
||||
if(canhear)
|
||||
user << "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>"
|
||||
if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
|
||||
tumbler_2_pos = increment(tumbler_2_pos)
|
||||
if(canhear)
|
||||
user << "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>"
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["retrieve"])
|
||||
user << browse("", "window=safe") // Close the menu
|
||||
|
||||
var/obj/item/P = locate(href_list["retrieve"]) in src
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
. = 1 //no afterattack
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>"
|
||||
return
|
||||
I.loc = src
|
||||
user << "<span class='notice'>You put [I] in [src].</span>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>[I] won't fit in [src].</span>"
|
||||
return
|
||||
else if(istype(I, /obj/item/clothing/tie/stethoscope))
|
||||
user << "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
obj/structure/safe/blob_act(obj/effect/blob/B)
|
||||
return
|
||||
|
||||
obj/structure/safe/ex_act(severity, target)
|
||||
return
|
||||
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
density = 0
|
||||
level = 1 //underfloor
|
||||
layer = LOW_OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/safe/floor/initialize()
|
||||
..()
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
/obj/structure/safe/floor/hide(var/intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
@@ -0,0 +1,76 @@
|
||||
#define SHOWCASE_CONSTRUCTED 1
|
||||
#define SHOWCASE_SCREWDRIVERED 2
|
||||
|
||||
/*Completely generic structures for use by mappers to create fake objects, i.e. display rooms*/
|
||||
/obj/structure/showcase
|
||||
name = "showcase"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "showcase_1"
|
||||
desc = "A stand with the empty body of a cyborg bolted to it."
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/deconstruction_state = SHOWCASE_CONSTRUCTED
|
||||
|
||||
/obj/structure/showcase/fakeid
|
||||
name = "\improper Centcom identification console"
|
||||
desc = "You can use this to change ID's."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "computer"
|
||||
|
||||
/obj/structure/showcase/fakeid/New()
|
||||
add_overlay("id")
|
||||
add_overlay("id_key")
|
||||
|
||||
/obj/structure/showcase/fakesec
|
||||
name = "\improper Centcom security records"
|
||||
desc = "Used to view and edit personnel's security records"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "computer"
|
||||
|
||||
/obj/structure/showcase/fakesec/New()
|
||||
add_overlay("security")
|
||||
add_overlay("security_key")
|
||||
|
||||
/obj/structure/showcase/horrific_experiment
|
||||
name = "horrific experiment"
|
||||
desc = "Some sort of pod filled with blood and viscera. You swear you can see it moving..."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "pod_g"
|
||||
|
||||
//Deconstructing
|
||||
//Showcases can be any sprite, so it makes sense that they can't be constructed.
|
||||
//However if a player wants to move an existing showcase or remove one, this is for that.
|
||||
|
||||
/obj/structure/showcase/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/screwdriver) && !anchored)
|
||||
if(deconstruction_state == SHOWCASE_SCREWDRIVERED)
|
||||
user << "<span class='notice'>You screw the screws back into the showcase.</span>"
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
deconstruction_state = SHOWCASE_CONSTRUCTED
|
||||
else if (deconstruction_state == SHOWCASE_CONSTRUCTED)
|
||||
user << "<span class='notice'>You unscrew the screws.</span>"
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
deconstruction_state = SHOWCASE_SCREWDRIVERED
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar) && deconstruction_state == SHOWCASE_SCREWDRIVERED)
|
||||
if(do_after(user, 20/W.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start to crowbar the showcase apart...</span>"
|
||||
new /obj/item/stack/sheet/metal (get_turf(src), 4)
|
||||
qdel(src)
|
||||
|
||||
if(deconstruction_state == SHOWCASE_CONSTRUCTED && default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
//Feedback is given in examine because showcases can basically have any sprite assigned to them
|
||||
|
||||
/obj/structure/showcase/examine(mob/user)
|
||||
..()
|
||||
|
||||
switch(deconstruction_state)
|
||||
if(SHOWCASE_CONSTRUCTED)
|
||||
user << "The showcase is fully constructed."
|
||||
if(SHOWCASE_SCREWDRIVERED)
|
||||
user << "The showcase has its screws loosened."
|
||||
else
|
||||
user << "If you see this, something is wrong."
|
||||
@@ -0,0 +1,257 @@
|
||||
/obj/structure/sign
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 0
|
||||
layer = SIGN_LAYER
|
||||
|
||||
/obj/structure/sign/basic
|
||||
name = "blank sign"
|
||||
desc = "How can signs be real if our eyes aren't real?"
|
||||
icon_state = "backing"
|
||||
|
||||
/obj/structure/sign/ex_act(severity, target)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/sign/blob_act(obj/effect/blob/B)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/wrench))
|
||||
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
|
||||
"<span class='notice'>You start unfastening [src].</span>")
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(!do_after(user, 30/O.toolspeed, target = src))
|
||||
return
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
|
||||
"<span class='notice'>You unfasten [src].</span>")
|
||||
var/obj/item/sign_backing/SB = new (get_turf(user))
|
||||
SB.icon_state = icon_state
|
||||
SB.sign_path = type
|
||||
qdel(src)
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
|
||||
"Hydroponics", "Xenobiology")
|
||||
var/obj/structure/sign/sign_type
|
||||
switch(input(user, "Select a sign type.", "Sign Customization") as null|anything in sign_types)
|
||||
if("Blank")
|
||||
sign_type = /obj/structure/sign/basic
|
||||
if("Secure Area")
|
||||
sign_type = /obj/structure/sign/securearea
|
||||
if("Biohazard")
|
||||
sign_type = /obj/structure/sign/biohazard
|
||||
if("High Voltage")
|
||||
sign_type = /obj/structure/sign/electricshock
|
||||
if("Radiation")
|
||||
sign_type = /obj/structure/sign/radiation
|
||||
if("Hard Vacuum Ahead")
|
||||
sign_type = /obj/structure/sign/vacuum
|
||||
if("Disposal: Leads To Space")
|
||||
sign_type = /obj/structure/sign/deathsposal
|
||||
if("Danger: Fire")
|
||||
sign_type = /obj/structure/sign/fire
|
||||
if("No Smoking")
|
||||
sign_type = /obj/structure/sign/nosmoking_1
|
||||
if("Medbay")
|
||||
sign_type = /obj/structure/sign/bluecross_2
|
||||
if("Science")
|
||||
sign_type = /obj/structure/sign/science
|
||||
if("Chemistry")
|
||||
sign_type = /obj/structure/sign/chemistry
|
||||
if("Hydroponics")
|
||||
sign_type = /obj/structure/sign/botany
|
||||
if("Xenobiology")
|
||||
sign_type = /obj/structure/sign/xenobio
|
||||
|
||||
//Make sure user is adjacent still
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
if(!sign_type)
|
||||
return
|
||||
|
||||
//It's import to clone the pixel layout information
|
||||
//Otherwise signs revert to being on the turf and
|
||||
//move jarringly
|
||||
var/obj/structure/sign/newsign = new sign_type(get_turf(src))
|
||||
newsign.pixel_x = pixel_x
|
||||
newsign.pixel_y = pixel_y
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/sign_backing
|
||||
name = "sign backing"
|
||||
desc = "A sign with adhesive backing."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "backing"
|
||||
w_class = 3
|
||||
burn_state = FLAMMABLE
|
||||
var/sign_path = /obj/structure/sign/basic //the type of sign that will be created when placed on a turf
|
||||
|
||||
/obj/item/sign_backing/afterattack(atom/target, mob/user, proximity)
|
||||
if(isturf(target) && proximity)
|
||||
var/turf/T = target
|
||||
user.visible_message("<span class='notice'>[user] fastens [src] to [T].</span>", \
|
||||
"<span class='notice'>You attach a blank sign to [T].</span>")
|
||||
playsound(T, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
new sign_path(T)
|
||||
user.drop_item()
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/map
|
||||
name = "station map"
|
||||
desc = "A framed picture of the station."
|
||||
|
||||
/obj/structure/sign/map/left
|
||||
icon_state = "map-left"
|
||||
|
||||
/obj/structure/sign/map/left/dream
|
||||
icon_state = "map-left-DS"
|
||||
|
||||
/obj/structure/sign/map/right
|
||||
icon_state = "map-right"
|
||||
|
||||
/obj/structure/sign/map/right/dream
|
||||
icon_state = "map-right-DS"
|
||||
|
||||
/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 ROOM"
|
||||
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/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"
|
||||
|
||||
|
||||
/obj/structure/sign/nosmoking_1
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
icon_state = "nosmoking"
|
||||
|
||||
|
||||
/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 = "HAZARDOUS RADIATION"
|
||||
desc = "A warning sign alerting the user of potential radiation hazards."
|
||||
icon_state = "radiation"
|
||||
|
||||
/obj/structure/sign/bluecross
|
||||
name = "medbay"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
|
||||
icon_state = "bluecross"
|
||||
|
||||
/obj/structure/sign/bluecross_2
|
||||
name = "medbay"
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
|
||||
icon_state = "bluecross2"
|
||||
|
||||
/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 FEA Atmospherics Division plaque"
|
||||
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
|
||||
icon_state = "atmosplaque"
|
||||
|
||||
/obj/structure/sign/maltesefalcon //The sign is 64x32, so it needs two tiles. ;3
|
||||
name = "The Maltese Falcon"
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
|
||||
/obj/structure/sign/maltesefalcon/left
|
||||
icon_state = "maltesefalcon-left"
|
||||
|
||||
/obj/structure/sign/maltesefalcon/right
|
||||
icon_state = "maltesefalcon-right"
|
||||
|
||||
/obj/structure/sign/science //These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
|
||||
name = "\improper SCIENCE"
|
||||
desc = "A sign labelling an area where research and science is performed."
|
||||
icon_state = "science1"
|
||||
|
||||
/obj/structure/sign/chemistry
|
||||
name = "\improper CHEMISTRY"
|
||||
desc = "A sign labelling an area containing chemical equipment."
|
||||
icon_state = "chemistry1"
|
||||
|
||||
/obj/structure/sign/botany
|
||||
name = "\improper HYDROPONICS"
|
||||
desc = "A sign labelling an area as a place where plants are grown."
|
||||
icon_state = "hydro1"
|
||||
|
||||
/obj/structure/sign/xenobio
|
||||
name = "\improper XENOBIOLOGY"
|
||||
desc = "A sign labelling an area as a place where xenobiological entites are researched."
|
||||
icon_state = "xenobio"
|
||||
|
||||
/obj/structure/sign/directions/science
|
||||
name = "science department"
|
||||
desc = "A direction sign, pointing out which way the Science department is."
|
||||
icon_state = "direction_sci"
|
||||
|
||||
/obj/structure/sign/directions/engineering
|
||||
name = "engineering department"
|
||||
desc = "A direction sign, pointing out which way the Engineering department is."
|
||||
icon_state = "direction_eng"
|
||||
|
||||
/obj/structure/sign/directions/security
|
||||
name = "security department"
|
||||
desc = "A direction sign, pointing out which way the Security department is."
|
||||
icon_state = "direction_sec"
|
||||
|
||||
/obj/structure/sign/directions/medical
|
||||
name = "medical bay"
|
||||
desc = "A direction sign, pointing out which way the Medical Bay is."
|
||||
icon_state = "direction_med"
|
||||
|
||||
/obj/structure/sign/directions/evac
|
||||
name = "escape arm"
|
||||
desc = "A direction sign, pointing out which way the escape shuttle dock is."
|
||||
icon_state = "direction_evac"
|
||||
@@ -0,0 +1,78 @@
|
||||
/obj/structure/spirit_board
|
||||
name = "spirit board"
|
||||
desc = "A wooden board with letters etched into it, used in seances."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "spirit_board"
|
||||
density = 1
|
||||
anchored = 0
|
||||
var/virgin = 1
|
||||
var/cooldown = 0
|
||||
var/planchette = "A"
|
||||
var/lastuser = null
|
||||
|
||||
/obj/structure/spirit_board/examine()
|
||||
desc = "[initial(desc)] The planchette is sitting at \"[planchette]\"."
|
||||
..()
|
||||
|
||||
/obj/structure/spirit_board/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
spirit_board_pick_letter(user)
|
||||
|
||||
|
||||
/obj/structure/spirit_board/attack_ghost(mob/dead/observer/user)
|
||||
spirit_board_pick_letter(user)
|
||||
|
||||
|
||||
/obj/structure/spirit_board/proc/spirit_board_pick_letter(mob/M)
|
||||
if(!spirit_board_checks(M))
|
||||
return 0
|
||||
|
||||
if(virgin)
|
||||
virgin = 0
|
||||
notify_ghosts("Someone has begun playing with a [src.name] in [get_area(src)]!", source = src)
|
||||
|
||||
planchette = input("Choose the letter.", "Seance!") in list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")
|
||||
add_logs(M, src, "picked a letter on", " which was \"[planchette]\".")
|
||||
cooldown = world.time
|
||||
lastuser = M.ckey
|
||||
|
||||
var/turf/T = loc
|
||||
sleep(rand(20,30))
|
||||
if(T == loc)
|
||||
visible_message("<span class='notice'>The planchette slowly moves... and stops at the letter \"[planchette]\".</span>")
|
||||
|
||||
|
||||
/obj/structure/spirit_board/proc/spirit_board_checks(mob/M)
|
||||
//cooldown
|
||||
var/bonus = 0
|
||||
if(M.ckey == lastuser)
|
||||
bonus = 10 //Give some other people a chance, hog.
|
||||
|
||||
if(cooldown > world.time - (30 + bonus))
|
||||
return 0 //No feedback here, hiding the cooldown a little makes it harder to tell who's really picking letters.
|
||||
|
||||
//lighting check
|
||||
var/light_amount = 0
|
||||
var/turf/T = get_turf(src)
|
||||
light_amount = T.get_lumcount()
|
||||
|
||||
|
||||
if(light_amount > 2)
|
||||
M << "<span class='warning'>It's too bright here to use [src.name]!</span>"
|
||||
return 0
|
||||
|
||||
//mobs in range check
|
||||
var/users_in_range = 0
|
||||
for(var/mob/living/L in orange(1,src))
|
||||
if(L.ckey && L.client)
|
||||
if((world.time - L.client.inactivity) < (world.time - 300) || L.stat != CONSCIOUS || L.restrained())//no playing with braindeads or corpses or handcuffed dudes.
|
||||
M << "<span class='warning'>[L] doesn't seem to be paying attention...</span>"
|
||||
else
|
||||
users_in_range++
|
||||
|
||||
if(users_in_range < 2)
|
||||
M << "<span class='warning'>There aren't enough people to use the [src.name]!</span>"
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,368 @@
|
||||
|
||||
|
||||
|
||||
/obj/structure/statue
|
||||
name = "Statue"
|
||||
desc = "Placeholder. Yell at Firecage if you SOMEHOW see this."
|
||||
icon = 'icons/obj/statue.dmi'
|
||||
icon_state = ""
|
||||
density = 1
|
||||
anchored = 0
|
||||
var/health = 100
|
||||
var/oreAmount = 7
|
||||
var/mineralType = "metal"
|
||||
|
||||
/obj/structure/statue/Destroy()
|
||||
density = 0
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/attackby(obj/item/weapon/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] is loosening the [name]'s bolts.", \
|
||||
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
|
||||
if(do_after(user,40/W.toolspeed, target = src))
|
||||
if(!src.loc || !anchored)
|
||||
return
|
||||
user.visible_message("[user] loosened the [name]'s bolts!", \
|
||||
"<span class='notice'>You loosen the [name]'s bolts!</span>")
|
||||
anchored = 0
|
||||
else
|
||||
if (!istype(src.loc, /turf/open/floor))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] is securing the [name]'s bolts...", \
|
||||
"<span class='notice'>You are securing the [name]'s bolts...</span>")
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!src.loc || anchored)
|
||||
return
|
||||
user.visible_message("[user] has secured the [name]'s bolts.", \
|
||||
"<span class='notice'>You have secured the [name]'s bolts.</span>")
|
||||
anchored = 1
|
||||
|
||||
else if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
user.visible_message("[user] is slicing apart the [name]...", \
|
||||
"<span class='notice'>You are slicing apart the [name]...</span>")
|
||||
if(do_after(user,30, target = src))
|
||||
if(!src.loc)
|
||||
return
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name].</span>")
|
||||
Dismantle(1)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
|
||||
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W
|
||||
if(!src.loc)
|
||||
return
|
||||
user.visible_message("[user] destroys the [name]!", \
|
||||
"<span class='notice'>You destroy the [name].</span>")
|
||||
D.playDigSound()
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool) && !anchored)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
user.visible_message("[user] is slicing apart the [name].", \
|
||||
"<span class='notice'>You are slicing apart the [name]...</span>")
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!src.loc)
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name]!</span>")
|
||||
Dismantle(1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/statue/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("[user] rubs some dust off from the [name]'s surface.", \
|
||||
"<span class='notice'>You rub some dust off from the [name]'s surface.</span>")
|
||||
|
||||
/obj/structure/statue/CanAtmosPass()
|
||||
return !density
|
||||
|
||||
/obj/structure/statue/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
/obj/structure/statue/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
Dismantle(1)
|
||||
|
||||
/obj/structure/statue/proc/Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
if (mineralType == "metal")
|
||||
var/ore = /obj/item/stack/sheet/metal
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
else
|
||||
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
else
|
||||
if (mineralType == "metal")
|
||||
var/ore = /obj/item/stack/sheet/metal
|
||||
for(var/i = 3, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
else
|
||||
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
|
||||
for(var/i = 3, i <= oreAmount, i++)
|
||||
new ore(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/statue/ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(1)
|
||||
if(2)
|
||||
take_damage(rand(60,110), BRUTE, 0)
|
||||
if(3)
|
||||
take_damage(10, BRUTE, 0)
|
||||
|
||||
//////////////////////////////////////STATUES/////////////////////////////////////////////////////////////
|
||||
////////////////////////uranium///////////////////////////////////
|
||||
|
||||
/obj/structure/statue/uranium
|
||||
health = 300
|
||||
luminosity = 2
|
||||
mineralType = "uranium"
|
||||
var/last_event = 0
|
||||
var/active = null
|
||||
|
||||
/obj/structure/statue/uranium/nuke
|
||||
name = "Statue of a Nuclear Fission Explosive"
|
||||
desc = "This is a grand statue of a Nuclear Explosive. It has a sickening green colour."
|
||||
icon_state = "nuke"
|
||||
|
||||
/obj/structure/statue/uranium/eng
|
||||
name = "Statue of an engineer"
|
||||
desc = "This statue has a sickening green colour."
|
||||
icon_state = "eng"
|
||||
|
||||
/obj/structure/statue/uranium/attackby(obj/item/weapon/W, mob/user, params)
|
||||
radiate()
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/uranium/Bumped(atom/user)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/uranium/attack_hand(mob/user)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/uranium/attack_paw(mob/user)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/uranium/proc/radiate()
|
||||
if(!active)
|
||||
if(world.time > last_event+15)
|
||||
active = 1
|
||||
radiation_pulse(get_turf(src), 3, 3, 12, 0)
|
||||
last_event = world.time
|
||||
active = null
|
||||
return
|
||||
return
|
||||
|
||||
////////////////////////////plasma///////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/structure/statue/plasma
|
||||
health = 200
|
||||
mineralType = "plasma"
|
||||
desc = "This statue is suitably made from plasma."
|
||||
|
||||
/obj/structure/statue/plasma/scientist
|
||||
name = "Statue of a Scientist"
|
||||
icon_state = "sci"
|
||||
|
||||
/obj/structure/statue/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
|
||||
/obj/structure/statue/plasma/bullet_act(obj/item/projectile/Proj)
|
||||
var/burn = FALSE
|
||||
if(istype(Proj,/obj/item/projectile/beam))
|
||||
PlasmaBurn(2500)
|
||||
burn = TRUE
|
||||
else if(istype(Proj,/obj/item/projectile/ion))
|
||||
PlasmaBurn(500)
|
||||
burn = TRUE
|
||||
if(burn)
|
||||
if(Proj.firer)
|
||||
message_admins("Plasma statue ignited by [key_name_admin(Proj.firer)](<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [key_name(Proj.firer)] in ([x],[y],[z])")
|
||||
else
|
||||
message_admins("Plasma statue ignited by [Proj]. No known firer.(<A HREF='?_src_=holder;adminmoreinfo=\ref[Proj.firer]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Proj.firer]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [Proj] in ([x],[y],[z]). No known firer.")
|
||||
..()
|
||||
|
||||
/obj/structure/statue/plasma/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite
|
||||
message_admins("Plasma statue ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma statue ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
ignite(W.is_hot())
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/plasma/proc/PlasmaBurn()
|
||||
atmos_spawn_air("plasma=400;TEMP=1000")
|
||||
Dismantle(1)
|
||||
|
||||
/obj/structure/statue/plasma/proc/ignite(exposed_temperature)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
//////////////////////gold///////////////////////////////////////
|
||||
|
||||
/obj/structure/statue/gold
|
||||
health = 300
|
||||
mineralType = "gold"
|
||||
desc = "This is a highly valuable statue made from gold."
|
||||
|
||||
/obj/structure/statue/gold/hos
|
||||
name = "Statue of the Head of Security"
|
||||
icon_state = "hos"
|
||||
|
||||
/obj/structure/statue/gold/hop
|
||||
name = "Statue of the Head of Personnel"
|
||||
icon_state = "hop"
|
||||
|
||||
/obj/structure/statue/gold/cmo
|
||||
name = "Statue of the Chief Medical Officer"
|
||||
icon_state = "cmo"
|
||||
|
||||
/obj/structure/statue/gold/ce
|
||||
name = "Statue of the Chief Engineer"
|
||||
icon_state = "ce"
|
||||
|
||||
/obj/structure/statue/gold/rd
|
||||
name = "Statue of the Research Director"
|
||||
icon_state = "rd"
|
||||
|
||||
//////////////////////////silver///////////////////////////////////////
|
||||
|
||||
/obj/structure/statue/silver
|
||||
health = 300
|
||||
mineralType = "silver"
|
||||
desc = "This is a valuable statue made from silver."
|
||||
|
||||
/obj/structure/statue/silver/md
|
||||
name = "Statue of a Medical Officer"
|
||||
icon_state = "md"
|
||||
|
||||
/obj/structure/statue/silver/janitor
|
||||
name = "Statue of a Janitor"
|
||||
icon_state = "jani"
|
||||
|
||||
/obj/structure/statue/silver/sec
|
||||
name = "Statue of a Security Officer"
|
||||
icon_state = "sec"
|
||||
|
||||
/obj/structure/statue/silver/secborg
|
||||
name = "Statue of a Security Cyborg"
|
||||
icon_state = "secborg"
|
||||
|
||||
/obj/structure/statue/silver/medborg
|
||||
name = "Statue of a Medical Cyborg"
|
||||
icon_state = "medborg"
|
||||
|
||||
/////////////////////////diamond/////////////////////////////////////////
|
||||
|
||||
/obj/structure/statue/diamond
|
||||
health = 1000
|
||||
mineralType = "diamond"
|
||||
desc = "This is a very expensive diamond statue"
|
||||
|
||||
/obj/structure/statue/diamond/captain
|
||||
name = "Statue of THE Captain."
|
||||
icon_state = "cap"
|
||||
|
||||
/obj/structure/statue/diamond/ai1
|
||||
name = "Statue of the AI hologram."
|
||||
icon_state = "ai1"
|
||||
|
||||
/obj/structure/statue/diamond/ai2
|
||||
name = "Statue of the AI core."
|
||||
icon_state = "ai2"
|
||||
|
||||
////////////////////////bananium///////////////////////////////////////
|
||||
|
||||
/obj/structure/statue/bananium
|
||||
health = 300
|
||||
mineralType = "bananium"
|
||||
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
|
||||
var/spam_flag = 0
|
||||
|
||||
/obj/structure/statue/bananium/clown
|
||||
name = "Statue of a clown"
|
||||
icon_state = "clown"
|
||||
|
||||
/obj/structure/statue/bananium/Bumped(atom/user)
|
||||
honk()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/bananium/attackby(obj/item/weapon/W, mob/user, params)
|
||||
honk()
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/bananium/attack_hand(mob/user)
|
||||
honk()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/bananium/attack_paw(mob/user)
|
||||
honk()
|
||||
..()
|
||||
|
||||
/obj/structure/statue/bananium/proc/honk()
|
||||
if(!spam_flag)
|
||||
spam_flag = 1
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
spawn(20)
|
||||
spam_flag = 0
|
||||
|
||||
/////////////////////sandstone/////////////////////////////////////////
|
||||
|
||||
/obj/structure/statue/sandstone
|
||||
health = 50
|
||||
mineralType = "sandstone"
|
||||
|
||||
/obj/structure/statue/sandstone/assistant
|
||||
name = "Statue of an assistant"
|
||||
desc = "A cheap statue of sandstone for a greyshirt."
|
||||
icon_state = "assist"
|
||||
|
||||
/////////////////////snow/////////////////////////////////////////
|
||||
|
||||
/obj/structure/statue/snow
|
||||
health = 50
|
||||
mineralType = "snow"
|
||||
|
||||
/obj/structure/statue/snow/snowman
|
||||
name = "snowman"
|
||||
desc = "Several lumps of snow put together to form a snowman."
|
||||
icon_state = "snowman"
|
||||
@@ -0,0 +1,134 @@
|
||||
/* Table Frames
|
||||
* Contains:
|
||||
* Frames
|
||||
* Wooden Frames
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Normal Frames
|
||||
*/
|
||||
|
||||
/obj/structure/table_frame
|
||||
name = "table frame"
|
||||
desc = "Four metal legs with four framing rods for a table. You could easily pass through this."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "table_frame"
|
||||
density = 0
|
||||
anchored = 0
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/framestackamount = 2
|
||||
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start disassembling [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 30/I.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
for(var/i = 1, i <= framestackamount, i++)
|
||||
new framestack(get_turf(src))
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
var/obj/item/stack/sheet/plasteel/P = I
|
||||
if(P.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one plasteel sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [P] to [src]...</span>"
|
||||
if(do_after(user, 50, target = src))
|
||||
P.use(1)
|
||||
new /obj/structure/table/reinforced(src.loc)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one metal sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [M] to [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
M.use(1)
|
||||
new /obj/structure/table(src.loc)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one glass sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [G] to [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(1)
|
||||
|
||||
new /obj/structure/table/glass(src.loc)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/stack/sheet/mineral/silver))
|
||||
var/obj/item/stack/sheet/mineral/silver/S = I
|
||||
if(S.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one silver sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [S] to [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
S.use(1)
|
||||
new /obj/structure/table/optable(src.loc)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/narsie_act()
|
||||
if(prob(20))
|
||||
new /obj/structure/table_frame/wood(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/ratvar_act()
|
||||
if(prob(20))
|
||||
new /obj/structure/table_frame/brass(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Wooden Frames
|
||||
*/
|
||||
|
||||
/obj/structure/table_frame/wood
|
||||
name = "wooden table frame"
|
||||
desc = "Four wooden legs with four framing wooden rods for a wooden table. You could easily pass through this."
|
||||
icon_state = "wood_frame"
|
||||
framestack = /obj/item/stack/sheet/mineral/wood
|
||||
framestackamount = 2
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/wood))
|
||||
var/obj/item/stack/sheet/mineral/wood/W = I
|
||||
if(W.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one wood sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [W] to [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
W.use(1)
|
||||
new /obj/structure/table/wood(src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one carpet sheet to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start adding [C] to [src]...</span>"
|
||||
if(do_after(user, 20, target = src))
|
||||
C.use(1)
|
||||
new /obj/structure/table/wood/poker(src.loc)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/brass
|
||||
name = "brass table frame"
|
||||
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
|
||||
icon_state = "brass_frame"
|
||||
framestackamount = 0
|
||||
|
||||
/obj/structure/table_frame/brass/narsie_act()
|
||||
..()
|
||||
if(src) //do we still exist?
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
@@ -0,0 +1,613 @@
|
||||
/* Tables and Racks
|
||||
* Contains:
|
||||
* Tables
|
||||
* Glass Tables
|
||||
* Wooden Tables
|
||||
* Reinforced Tables
|
||||
* Racks
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
/*
|
||||
* Tables
|
||||
*/
|
||||
|
||||
/obj/structure/table
|
||||
name = "table"
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/smooth_structures/table.dmi'
|
||||
icon_state = "table"
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = TABLE_LAYER
|
||||
climbable = TRUE
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.")
|
||||
var/frame = /obj/structure/table_frame
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/buildstack = /obj/item/stack/sheet/metal
|
||||
var/busy = 0
|
||||
var/buildstackamount = 1
|
||||
var/framestackamount = 2
|
||||
var/deconstruction_ready = 1
|
||||
var/health = 100
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced)
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in src.loc)
|
||||
if(T != src)
|
||||
qdel(T)
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
queue_smooth_neighbors(src)
|
||||
|
||||
/obj/structure/table/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
take_damage(rand(80,120), BRUTE, 0)
|
||||
if(3)
|
||||
take_damage(rand(40,80), BRUTE, 0)
|
||||
|
||||
/obj/structure/table/blob_act(obj/effect/blob/B)
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/narsie_act()
|
||||
if(prob(20))
|
||||
new /obj/structure/table/wood(src.loc)
|
||||
|
||||
/obj/structure/table/ratvar_act()
|
||||
if(prob(20))
|
||||
new /obj/structure/table/reinforced/brass(src.loc)
|
||||
|
||||
/obj/structure/table/mech_melee_attack(obj/mecha/M)
|
||||
playsound(src.loc, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[M.name] smashes [src]!</span>")
|
||||
take_damage(200, M.damtype, 0)
|
||||
|
||||
/obj/structure/table/attack_alien(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] slices [src]!</span>")
|
||||
take_damage(100, BRUTE, 0)
|
||||
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(user.melee_damage_upper)
|
||||
var/dmg_dealt = user.melee_damage_upper
|
||||
if(user.environment_smash)
|
||||
dmg_dealt = 100
|
||||
visible_message("<span class='warning'>[user] smashes [src]!</span>")
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
take_damage(dmg_dealt, user.melee_damage_type, 0)
|
||||
|
||||
|
||||
/obj/structure/table/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/table/attack_hulk(mob/living/carbon/human/user)
|
||||
..(user, 1)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
take_damage(rand(180,280), BRUTE, 0)
|
||||
return 1
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
if(user.a_intent == "grab" && user.pulling && isliving(user.pulling))
|
||||
var/mob/living/pushed_mob = user.pulling
|
||||
if(pushed_mob.buckled)
|
||||
user << "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>"
|
||||
return
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
user << "<span class='warning'>You need a better grip to do that!</span>"
|
||||
return
|
||||
tablepush(user, pushed_mob)
|
||||
user.stop_pulling()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/table/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(mover.throwing)
|
||||
return 1
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
else
|
||||
return !density
|
||||
|
||||
/obj/structure/table/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||
pushed_mob.forceMove(src.loc)
|
||||
pushed_mob.Weaken(2)
|
||||
pushed_mob.visible_message("<span class='danger'>[user] pushes [pushed_mob] onto [src].</span>", \
|
||||
"<span class='userdanger'>[user] pushes [pushed_mob] onto [src].</span>")
|
||||
add_logs(user, pushed_mob, "pushed")
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && deconstruction_ready)
|
||||
table_deconstruct(user, 1)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/wrench) && deconstruction_ready)
|
||||
table_deconstruct(user, 0)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/storage/bag/tray))
|
||||
var/obj/item/weapon/storage/bag/tray/T = I
|
||||
if(T.contents.len > 0) // If the tray isn't empty
|
||||
var/list/obj/item/oldContents = T.contents.Copy()
|
||||
T.quick_empty()
|
||||
|
||||
for(var/obj/item/C in oldContents)
|
||||
C.loc = src.loc
|
||||
|
||||
user.visible_message("[user] empties [I] on [src].")
|
||||
return
|
||||
// If the tray IS empty, continue on (tray will be placed on the table like other items)
|
||||
|
||||
if(user.a_intent != "harm" && !(I.flags & ABSTRACT))
|
||||
if(user.drop_item())
|
||||
I.Move(loc)
|
||||
var/list/click_params = params2list(params)
|
||||
//Center the icon where the user clicked.
|
||||
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
|
||||
return
|
||||
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
|
||||
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/table/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/weapons/smash.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
table_destroy()
|
||||
|
||||
/*
|
||||
* TABLE DESTRUCTION/DECONSTRUCTION
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/obj/structure/table/proc/table_destroy()
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/i = 1, i <= framestackamount, i++)
|
||||
new framestack(T)
|
||||
for(var/i = 1, i <= buildstackamount, i++)
|
||||
new buildstack(T)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/table/proc/table_deconstruct(mob/user, disassembling = 0)
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
if(disassembling)
|
||||
user << "<span class='notice'>You start disassembling [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20, target = src))
|
||||
new frame(src.loc)
|
||||
for(var/i = 1, i <= buildstackamount, i++)
|
||||
new buildstack(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You start deconstructing [src]...</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 40, target = src))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
table_destroy()
|
||||
|
||||
|
||||
/*
|
||||
* Glass tables
|
||||
*/
|
||||
/obj/structure/table/glass
|
||||
name = "glass table"
|
||||
desc = "What did I say about leaning on the glass tables? Now you need surgery."
|
||||
icon = 'icons/obj/smooth_structures/glass_table.dmi'
|
||||
icon_state = "glass_table"
|
||||
buildstack = /obj/item/stack/sheet/glass
|
||||
canSmoothWith = null
|
||||
health = 50
|
||||
var/list/debris = list()
|
||||
|
||||
/obj/structure/table/glass/New()
|
||||
. = ..()
|
||||
debris += new frame
|
||||
debris += new /obj/item/weapon/shard
|
||||
|
||||
/obj/structure/table/glass/Destroy()
|
||||
for(var/i in debris)
|
||||
qdel(i)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/table/glass/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
if(!isliving(AM))
|
||||
return
|
||||
// Don't break if they're just flying past
|
||||
if(AM.throwing)
|
||||
spawn(5)
|
||||
// Check again in a bit though
|
||||
if(AM.loc == get_turf(src))
|
||||
check_break(AM)
|
||||
else
|
||||
check_break(AM)
|
||||
|
||||
/obj/structure/table/glass/proc/check_break(mob/living/M)
|
||||
if(has_gravity(M) && M.mob_size > MOB_SIZE_SMALL)
|
||||
table_shatter(M)
|
||||
|
||||
/obj/structure/table/glass/proc/table_shatter(mob/M)
|
||||
visible_message("<span class='warning'>[src] breaks!</span>",
|
||||
"<span class='danger'>You hear breaking glass.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, "shatter", 50, 1)
|
||||
for(var/I in debris)
|
||||
var/atom/movable/AM = I
|
||||
AM.forceMove(T)
|
||||
debris -= AM
|
||||
if(istype(AM, /obj/item/weapon/shard))
|
||||
AM.throw_impact(M)
|
||||
M.Weaken(5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass/narsie_act()
|
||||
color = NARSIE_WINDOW_COLOUR
|
||||
for(var/obj/item/weapon/shard/S in debris)
|
||||
S.color = NARSIE_WINDOW_COLOUR
|
||||
|
||||
/*
|
||||
* Wooden tables
|
||||
*/
|
||||
|
||||
/obj/structure/table/wood
|
||||
name = "wooden table"
|
||||
desc = "Do not apply fire to this. Rumour says it burns easily."
|
||||
icon = 'icons/obj/smooth_structures/wood_table.dmi'
|
||||
icon_state = "wood_table"
|
||||
frame = /obj/structure/table_frame/wood
|
||||
framestack = /obj/item/stack/sheet/mineral/wood
|
||||
buildstack = /obj/item/stack/sheet/mineral/wood
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
canSmoothWith = list(/obj/structure/table/wood,
|
||||
/obj/structure/table/wood/poker,
|
||||
/obj/structure/table/wood/bar)
|
||||
|
||||
/obj/structure/table/wood/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/table/wood/poker //No specialties, Just a mapping object.
|
||||
name = "gambling table"
|
||||
desc = "A seedy table for seedy dealings in seedy places."
|
||||
icon = 'icons/obj/smooth_structures/poker_table.dmi'
|
||||
icon_state = "poker_table"
|
||||
buildstack = /obj/item/stack/tile/carpet
|
||||
|
||||
/obj/structure/table/wood/poker/narsie_act()
|
||||
new /obj/structure/table/wood(src.loc)
|
||||
|
||||
/*
|
||||
* Reinforced tables
|
||||
*/
|
||||
/obj/structure/table/reinforced
|
||||
name = "reinforced table"
|
||||
desc = "A reinforced version of the four legged table, much harder to simply deconstruct."
|
||||
icon = 'icons/obj/smooth_structures/reinforced_table.dmi'
|
||||
icon_state = "r_table"
|
||||
deconstruction_ready = 0
|
||||
buildstack = /obj/item/stack/sheet/plasteel
|
||||
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
|
||||
health = 200
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if(deconstruction_ready)
|
||||
user << "<span class='notice'>You start strengthening the reinforced table...</span>"
|
||||
if (do_after(user, 50/W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "<span class='notice'>You strengthen the table.</span>"
|
||||
deconstruction_ready = 0
|
||||
else
|
||||
user << "<span class='notice'>You start weakening the reinforced table...</span>"
|
||||
if (do_after(user, 50/W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "<span class='notice'>You weaken the table.</span>"
|
||||
deconstruction_ready = 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/reinforced/brass
|
||||
name = "brass table"
|
||||
desc = "A solid, slightly beveled brass table."
|
||||
icon = 'icons/obj/smooth_structures/brass_table.dmi'
|
||||
icon_state = "brass_table"
|
||||
frame = /obj/structure/table_frame/brass
|
||||
framestackamount = 0
|
||||
buildstackamount = 0
|
||||
canSmoothWith = list(/obj/structure/table/reinforced/brass)
|
||||
|
||||
/obj/structure/table/reinforced/brass/table_destroy()
|
||||
new frame(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/reinforced/brass/narsie_act()
|
||||
take_damage(rand(15, 45), BRUTE)
|
||||
if(src) //do we still exist?
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/table/reinforced/brass/ratvar_act()
|
||||
health = initial(health)
|
||||
|
||||
/*
|
||||
* Surgery Tables
|
||||
*/
|
||||
|
||||
/obj/structure/table/optable
|
||||
name = "operating table"
|
||||
desc = "Used for advanced medical procedures."
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "optable"
|
||||
buildstack = /obj/item/stack/sheet/mineral/silver
|
||||
smooth = SMOOTH_FALSE
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
buckle_requires_restraints = 1
|
||||
var/mob/living/carbon/human/patient = null
|
||||
var/obj/machinery/computer/operating/computer = null
|
||||
|
||||
/obj/structure/table/optable/New()
|
||||
..()
|
||||
for(var/dir in cardinal)
|
||||
computer = locate(/obj/machinery/computer/operating, get_step(src, dir))
|
||||
if(computer)
|
||||
computer.table = src
|
||||
break
|
||||
|
||||
/obj/structure/table/optable/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||
pushed_mob.forceMove(src.loc)
|
||||
pushed_mob.resting = 1
|
||||
pushed_mob.update_canmove()
|
||||
visible_message("<span class='notice'>[user] has laid [pushed_mob] on [src].</span>")
|
||||
check_patient()
|
||||
|
||||
/obj/structure/table/optable/proc/check_patient()
|
||||
var/mob/M = locate(/mob/living/carbon/human, loc)
|
||||
if(M)
|
||||
if(M.resting)
|
||||
patient = M
|
||||
return 1
|
||||
else
|
||||
patient = null
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Racks
|
||||
*/
|
||||
/obj/structure/rack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
density = 1
|
||||
anchored = 1
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
|
||||
var/health = 20
|
||||
|
||||
/obj/structure/rack/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
rack_destroy()
|
||||
else
|
||||
qdel(src)
|
||||
if(3)
|
||||
take_damage(rand(5,25), BRUTE, 0)
|
||||
|
||||
/obj/structure/rack/blob_act(obj/effect/blob/B)
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
else
|
||||
rack_destroy()
|
||||
|
||||
|
||||
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
take_damage(M.force*2)
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/structure/rack/CanAStarPass(ID, dir, caller)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
|
||||
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
rack_destroy()
|
||||
return
|
||||
if(user.a_intent == "harm")
|
||||
return ..()
|
||||
if(user.drop_item())
|
||||
W.Move(loc)
|
||||
return 1
|
||||
|
||||
/obj/structure/rack/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/rack/attack_paw(mob/living/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/rack/attack_hulk(mob/living/carbon/human/user)
|
||||
..(user, 1)
|
||||
rack_destroy()
|
||||
return 1
|
||||
|
||||
/obj/structure/rack/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
|
||||
"<span class='danger'>You kick [src].</span>")
|
||||
take_damage(rand(4,8), BRUTE)
|
||||
|
||||
/obj/structure/rack/attack_alien(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/bladeslice.ogg', 50, 1)
|
||||
visible_message("<span class='warning'>[user] slices [src] apart.</span>")
|
||||
rack_destroy()
|
||||
|
||||
|
||||
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(user.melee_damage_upper)
|
||||
if(user.environment_smash)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
visible_message("<span class='warning'>[user] smashes [src] apart.</span>")
|
||||
rack_destroy()
|
||||
else
|
||||
take_damage(user.melee_damage_upper, user.melee_damage_type)
|
||||
|
||||
|
||||
/obj/structure/rack/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
/obj/structure/rack/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
/obj/structure/rack/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
if(damage)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
rack_destroy()
|
||||
|
||||
|
||||
/*
|
||||
* Rack destruction
|
||||
*/
|
||||
|
||||
/obj/structure/rack/proc/rack_destroy()
|
||||
if(!(flags&NODECONSTRUCT))
|
||||
density = 0
|
||||
var/obj/item/weapon/rack_parts/newparts = new(loc)
|
||||
transfer_fingerprints_to(newparts)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/*
|
||||
* Rack Parts
|
||||
*/
|
||||
|
||||
/obj/item/weapon/rack_parts
|
||||
name = "rack parts"
|
||||
desc = "Parts of a rack."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rack_parts"
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=2000)
|
||||
|
||||
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( user.loc )
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/rack_parts/attack_self(mob/user)
|
||||
user << "<span class='notice'>You start constructing rack...</span>"
|
||||
if (do_after(user, 50, target = src))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
var/obj/structure/rack/R = new /obj/structure/rack( user.loc )
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
#define TANK_DISPENSER_CAPACITY 10
|
||||
|
||||
/obj/structure/tank_dispenser
|
||||
name = "tank dispenser"
|
||||
desc = "A simple yet bulky storage device for gas tanks. Holds up to 10 oxygen tanks and 10 plasma tanks."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "dispenser"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/oxygentanks = TANK_DISPENSER_CAPACITY
|
||||
var/plasmatanks = TANK_DISPENSER_CAPACITY
|
||||
|
||||
/obj/structure/tank_dispenser/oxygen
|
||||
plasmatanks = 0
|
||||
|
||||
/obj/structure/tank_dispenser/plasma
|
||||
oxygentanks = 0
|
||||
|
||||
/obj/structure/tank_dispenser/New()
|
||||
for(var/i in 1 to oxygentanks)
|
||||
new /obj/item/weapon/tank/internals/oxygen(src)
|
||||
for(var/i in 1 to plasmatanks)
|
||||
new /obj/item/weapon/tank/internals/plasma(src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/tank_dispenser/update_icon()
|
||||
cut_overlays()
|
||||
switch(oxygentanks)
|
||||
if(1 to 3)
|
||||
add_overlay("oxygen-[oxygentanks]")
|
||||
if(4 to TANK_DISPENSER_CAPACITY)
|
||||
add_overlay("oxygen-4")
|
||||
switch(plasmatanks)
|
||||
if(1 to 4)
|
||||
add_overlay("plasma-[plasmatanks]")
|
||||
if(5 to TANK_DISPENSER_CAPACITY)
|
||||
add_overlay("plasma-5")
|
||||
|
||||
/obj/structure/tank_dispenser/attackby(obj/item/I, mob/user, params)
|
||||
var/full
|
||||
if(istype(I, /obj/item/weapon/tank/internals/plasma))
|
||||
if(plasmatanks < TANK_DISPENSER_CAPACITY)
|
||||
plasmatanks++
|
||||
else
|
||||
full = TRUE
|
||||
else if(istype(I, /obj/item/weapon/tank/internals/oxygen))
|
||||
if(oxygentanks < TANK_DISPENSER_CAPACITY)
|
||||
oxygentanks++
|
||||
else
|
||||
full = TRUE
|
||||
else if(user.a_intent != "harm")
|
||||
user << "<span class='notice'>[I] does not fit into [src].</span>"
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
if(full)
|
||||
user << "<span class='notice'>[src] can't hold anymore of [I].</span>"
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
return
|
||||
I.loc = src
|
||||
user << "<span class='notice'>You put [I] in [src].</span>"
|
||||
update_icon()
|
||||
|
||||
/obj/structure/tank_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = physical_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "tank_dispenser", name, 275, 100, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/structure/tank_dispenser/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["oxygen"] = oxygentanks
|
||||
data["plasma"] = plasmatanks
|
||||
|
||||
return data
|
||||
|
||||
/obj/structure/tank_dispenser/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("plasma")
|
||||
var/obj/item/weapon/tank/internals/plasma/tank = locate() in src
|
||||
if(tank)
|
||||
usr.put_in_hands(tank)
|
||||
plasmatanks--
|
||||
. = TRUE
|
||||
if("oxygen")
|
||||
var/obj/item/weapon/tank/internals/oxygen/tank = locate() in src
|
||||
if(tank)
|
||||
usr.put_in_hands(tank)
|
||||
oxygentanks--
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
#undef TANK_DISPENSER_CAPACITY
|
||||
@@ -0,0 +1,55 @@
|
||||
/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
|
||||
|
||||
/obj/structure/target_stake/Destroy()
|
||||
if(pinned_target)
|
||||
pinned_target.nullPinnedLoc()
|
||||
return ..()
|
||||
|
||||
/obj/structure/target_stake/proc/nullPinnedTarget()
|
||||
pinned_target = null
|
||||
|
||||
/obj/structure/target_stake/Move()
|
||||
..()
|
||||
if(pinned_target)
|
||||
pinned_target.loc = loc
|
||||
|
||||
/obj/structure/target_stake/attackby(obj/item/target/T, mob/user)
|
||||
if(pinned_target)
|
||||
return
|
||||
if(istype(T) && user.drop_item())
|
||||
pinned_target = T
|
||||
T.pinnedLoc = src
|
||||
T.density = 1
|
||||
T.layer = OBJ_LAYER + 0.01
|
||||
T.loc = loc
|
||||
user << "<span class='notice'>You slide the target into the stake.</span>"
|
||||
|
||||
/obj/structure/target_stake/attack_hand(mob/user)
|
||||
if(pinned_target)
|
||||
removeTarget(user)
|
||||
|
||||
/obj/structure/target_stake/proc/removeTarget(mob/user)
|
||||
pinned_target.layer = OBJ_LAYER
|
||||
pinned_target.loc = user.loc
|
||||
pinned_target.nullPinnedLoc()
|
||||
nullPinnedTarget()
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(pinned_target)
|
||||
user << "<span class='notice'>You take the target out of the stake.</span>"
|
||||
else
|
||||
pinned_target.loc = get_turf(user)
|
||||
user << "<span class='notice'>You take the target out of the stake.</span>"
|
||||
|
||||
/obj/structure/target_stake/bullet_act(obj/item/projectile/P)
|
||||
if(pinned_target)
|
||||
pinned_target.bullet_act(P)
|
||||
else
|
||||
..()
|
||||
@@ -0,0 +1,161 @@
|
||||
|
||||
// A place where tube pods stop, and people can get in or out.
|
||||
// Mappers: use "Generate Instances from Directions" for this
|
||||
// one.
|
||||
/obj/structure/transit_tube/station
|
||||
name = "station tube station"
|
||||
icon = 'icons/obj/atmospherics/pipes/transit_tube_station.dmi'
|
||||
icon_state = "closed"
|
||||
exit_delay = 1
|
||||
enter_delay = 2
|
||||
tube_construction = /obj/structure/c_transit_tube/station
|
||||
var/pod_moving = 0
|
||||
var/cooldown_delay = 50
|
||||
var/launch_cooldown = 0
|
||||
var/reverse_launch = 0
|
||||
|
||||
var/const/OPEN_DURATION = 6
|
||||
var/const/CLOSE_DURATION = 6
|
||||
|
||||
/obj/structure/transit_tube/station/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/transit_tube/station/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
// Stations which will send the tube in the opposite direction after their stop.
|
||||
/obj/structure/transit_tube/station/reverse
|
||||
tube_construction = /obj/structure/c_transit_tube/station/reverse
|
||||
reverse_launch = 1
|
||||
|
||||
/obj/structure/transit_tube/station/should_stop_pod(pod, from_dir)
|
||||
return 1
|
||||
|
||||
/obj/structure/transit_tube/station/Bumped(mob/AM as mob|obj)
|
||||
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
AM.loc = pod
|
||||
return
|
||||
|
||||
|
||||
//pod insertion
|
||||
/obj/structure/transit_tube/station/MouseDrop_T(obj/structure/c_transit_tube_pod/R, mob/user)
|
||||
if(!user.canmove || user.stat || user.restrained())
|
||||
return
|
||||
if (!istype(R) || get_dist(user, src) > 1 || get_dist(src,R) > 1)
|
||||
return
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
return //no fun allowed
|
||||
var/obj/structure/transit_tube_pod/T = new/obj/structure/transit_tube_pod(src)
|
||||
R.transfer_fingerprints_to(T)
|
||||
T.add_fingerprint(user)
|
||||
T.loc = src.loc
|
||||
T.setDir(turn(src.dir, -90))
|
||||
user.visible_message("[user] inserts the [R].", "<span class='notice'>You insert the [R].</span>")
|
||||
qdel(R)
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attack_hand(mob/user)
|
||||
if(!pod_moving)
|
||||
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
|
||||
if(icon_state == "open")
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(GM.buckled || GM.has_buckled_mobs())
|
||||
user << "<span class='warning'>[GM] is attached to something!</span>"
|
||||
return
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
pod.visible_message("<span class='warning'>[user] starts putting [GM] into the [pod]!</span>")
|
||||
if(do_after(user, 15, target = src))
|
||||
if(GM && user.grab_state >= GRAB_AGGRESSIVE && user.pulling == GM && !GM.buckled && !GM.has_buckled_mobs())
|
||||
GM.Weaken(5)
|
||||
src.Bumped(GM)
|
||||
break
|
||||
else
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && pod.dir in directions())
|
||||
if(icon_state == "closed")
|
||||
open_animation()
|
||||
|
||||
else if(icon_state == "open")
|
||||
if(pod.contents.len && user.loc != pod)
|
||||
user.visible_message("[user] starts emptying [pod]'s contents onto the floor.", "<span class='notice'>You start emptying [pod]'s contents onto the floor...</span>")
|
||||
if(do_after(user, 10, target = src)) //So it doesn't default to close_animation() on fail
|
||||
if(pod.loc == loc)
|
||||
for(var/atom/movable/AM in pod)
|
||||
AM.loc = get_turf(user)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M.Weaken(5)
|
||||
|
||||
else
|
||||
close_animation()
|
||||
break
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(pod.contents)
|
||||
user << "<span class='warning'>Empty the pod first!</span>"
|
||||
return
|
||||
user.visible_message("[user] removes the [pod].", "<span class='notice'>You remove the [pod].</span>")
|
||||
var/obj/structure/c_transit_tube_pod/R = new/obj/structure/c_transit_tube_pod(src.loc)
|
||||
pod.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
qdel(pod)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube/station/proc/open_animation()
|
||||
if(icon_state == "closed")
|
||||
icon_state = "opening"
|
||||
spawn(OPEN_DURATION)
|
||||
if(icon_state == "opening")
|
||||
icon_state = "open"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/close_animation()
|
||||
if(icon_state == "open")
|
||||
icon_state = "closing"
|
||||
spawn(CLOSE_DURATION)
|
||||
if(icon_state == "closing")
|
||||
icon_state = "closed"
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/station/proc/launch_pod()
|
||||
if(launch_cooldown >= world.time)
|
||||
return
|
||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||
if(!pod.moving && turn(pod.dir, (reverse_launch ? 180 : 0)) in directions())
|
||||
pod_moving = 1
|
||||
close_animation()
|
||||
sleep(CLOSE_DURATION + 2)
|
||||
if(icon_state == "closed" && pod)
|
||||
pod.follow_tube(reverse_launch)
|
||||
pod_moving = 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/transit_tube/station/process()
|
||||
if(!pod_moving)
|
||||
launch_pod()
|
||||
|
||||
/obj/structure/transit_tube/station/pod_stopped(obj/structure/transit_tube_pod/pod, from_dir)
|
||||
pod_moving = 1
|
||||
spawn(5)
|
||||
launch_cooldown = world.time + cooldown_delay
|
||||
open_animation()
|
||||
sleep(OPEN_DURATION + 2)
|
||||
pod_moving = 0
|
||||
pod.mix_air()
|
||||
|
||||
// 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))
|
||||
@@ -0,0 +1,285 @@
|
||||
// Basic transit tubes. Straight pieces, curved sections,
|
||||
// and basic splits/joins (no routing logic).
|
||||
// Mappers: you can use "Generate Instances from Icon-states"
|
||||
// to get the different pieces.
|
||||
/obj/structure/transit_tube
|
||||
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
|
||||
icon_state = "E-W"
|
||||
density = 1
|
||||
layer = ABOVE_OBJ_LAYER
|
||||
anchored = 1
|
||||
var/tube_construction = /obj/structure/c_transit_tube
|
||||
var/list/tube_dirs = null
|
||||
var/exit_delay = 1
|
||||
var/enter_delay = 0
|
||||
|
||||
// alldirs in global.dm is the same list of directions, but since
|
||||
// the specific order matters to get a usable icon_state, it is
|
||||
// copied here so that, in the unlikely case that alldirs is changed,
|
||||
// this continues to work.
|
||||
var/global/list/tube_dir_list = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
|
||||
|
||||
/obj/structure/transit_tube/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
return !density
|
||||
|
||||
// When destroyed by explosions, properly handle contents.
|
||||
obj/structure/transit_tube/ex_act(severity, target)
|
||||
if(3 - severity >= 0)
|
||||
var/oldloc = loc
|
||||
..(severity + 1)
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.loc = oldloc
|
||||
|
||||
/obj/structure/transit_tube/New(loc)
|
||||
..(loc)
|
||||
|
||||
if(tube_dirs == null)
|
||||
init_dirs()
|
||||
|
||||
/obj/structure/transit_tube/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(copytext(icon_state, 1, 3) != "D-") //decorative diagonals cannot be unwrenched directly
|
||||
for(var/obj/structure/transit_tube_pod/pod in src.loc)
|
||||
user << "<span class='warning'>Remove the pod first!</span>"
|
||||
return
|
||||
user.visible_message("[user] starts to deattach \the [src].", "<span class='notice'>You start to deattach the [name]...</span>")
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 35/W.toolspeed, target = src))
|
||||
user << "<span class='notice'>You deattach the [name].</span>"
|
||||
var/obj/structure/R = new tube_construction(src.loc)
|
||||
R.icon_state = src.icon_state
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
src.destroy_diagonals()
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
for(var/obj/structure/transit_tube_pod/pod in src.loc)
|
||||
pod.attackby(W, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
//destroys disconnected decorative diagonals
|
||||
/obj/structure/transit_tube/proc/destroy_diagonals()
|
||||
for(var/obj/structure/transit_tube/D in orange(1, src))
|
||||
if(copytext(D.icon_state, 1, 3) == "D-") //is diagonal
|
||||
var/my_dir = text2dir_extended(copytext(D.icon_state, 3, 5))
|
||||
var/is_connecting = 0
|
||||
for(var/obj/structure/transit_tube/N in orange(1,D))
|
||||
if( (( get_dir(D,N) == turn(my_dir, -45) && D.has_exit(turn(my_dir, 90)) ) || \
|
||||
( get_dir(D,N) == turn(my_dir, 45) && D.has_exit(turn(my_dir, -90))) ) && \
|
||||
D != src )
|
||||
is_connecting = 1
|
||||
break
|
||||
if(!is_connecting)
|
||||
qdel(D)
|
||||
|
||||
// Called to check if a pod should stop upon entering this tube.
|
||||
/obj/structure/transit_tube/proc/should_stop_pod(pod, from_dir)
|
||||
return 0
|
||||
|
||||
// Called when a pod stops in this tube section.
|
||||
/obj/structure/transit_tube/proc/pod_stopped(pod, from_dir)
|
||||
return
|
||||
|
||||
// Returns a /list of directions this tube section can connect to.
|
||||
// Tubes that have some sort of logic or changing direction might
|
||||
// override it with additional logic.
|
||||
/obj/structure/transit_tube/proc/directions()
|
||||
return tube_dirs
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_entrance(from_dir)
|
||||
from_dir = turn(from_dir, 180)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == from_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/has_exit(in_dir)
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
// Searches for an exit direction within 45 degrees of the
|
||||
// specified dir. Returns that direction, or 0 if none match.
|
||||
/obj/structure/transit_tube/proc/get_exit(in_dir)
|
||||
var/near_dir = 0
|
||||
var/in_dir_cw = turn(in_dir, -45)
|
||||
var/in_dir_ccw = turn(in_dir, 45)
|
||||
|
||||
for(var/direction in directions())
|
||||
if(direction == in_dir)
|
||||
return direction
|
||||
|
||||
else if(direction == in_dir_cw)
|
||||
near_dir = direction
|
||||
|
||||
else if(direction == in_dir_ccw)
|
||||
near_dir = direction
|
||||
|
||||
return near_dir
|
||||
|
||||
|
||||
// Return how many BYOND ticks to wait before entering/exiting
|
||||
// the tube section. Default action is to return the value of
|
||||
// a var, which wouldn't need a proc, but it makes it possible
|
||||
// for later tube types to interact in more interesting ways
|
||||
// such as being very fast in one direction, but slow in others
|
||||
/obj/structure/transit_tube/proc/exit_delay(pod, to_dir)
|
||||
return exit_delay
|
||||
|
||||
/obj/structure/transit_tube/proc/enter_delay(pod, to_dir)
|
||||
return enter_delay
|
||||
|
||||
|
||||
// Parse the icon_state into a list of directions.
|
||||
// This means that mappers can use Dream Maker's built in
|
||||
// "Generate Instances from Icon-states" option to get all
|
||||
// variations. Additionally, as a separate proc, sub-types
|
||||
// can handle it more intelligently.
|
||||
/obj/structure/transit_tube/proc/init_dirs()
|
||||
if(icon_state == "auto")
|
||||
// Additional delay, for map loading.
|
||||
spawn(1)
|
||||
init_dirs_automatic()
|
||||
|
||||
else
|
||||
tube_dirs = parse_dirs(icon_state)
|
||||
|
||||
if(copytext(icon_state, 1, 3) == "D-" || findtextEx(icon_state, "Pass"))
|
||||
density = 0
|
||||
|
||||
|
||||
|
||||
|
||||
// Initialize dirs by searching for tubes that do/might connect
|
||||
// on nearby turfs. Create corner pieces if nessecary.
|
||||
// Pick two directions, preferring tubes that already connect
|
||||
// to loc, or other auto tubes if there aren't enough connections.
|
||||
/obj/structure/transit_tube/proc/init_dirs_automatic()
|
||||
var/list/connected = list()
|
||||
var/list/connected_auto = list()
|
||||
|
||||
for(var/direction in tube_dir_list)
|
||||
var/location = get_step(loc, direction)
|
||||
for(var/obj/structure/transit_tube/tube in location)
|
||||
if(tube.directions() == null && tube.icon_state == "auto")
|
||||
connected_auto += direction
|
||||
break
|
||||
|
||||
else if(turn(direction, 180) in tube.directions())
|
||||
connected += direction
|
||||
break
|
||||
|
||||
connected += connected_auto
|
||||
|
||||
tube_dirs = select_automatic_dirs(connected)
|
||||
|
||||
if(length(tube_dirs) == 2 && tube_dir_list.Find(tube_dirs[1]) > tube_dir_list.Find(tube_dirs[2]))
|
||||
tube_dirs.Swap(1, 2)
|
||||
|
||||
generate_automatic_corners(tube_dirs)
|
||||
select_automatic_icon_state(tube_dirs)
|
||||
|
||||
|
||||
|
||||
// Given a list of directions, look a pair that forms a 180 or
|
||||
// 135 degree angle, and return a list containing the pair.
|
||||
// If none exist, return list(connected[1], turn(connected[1], 180)
|
||||
/obj/structure/transit_tube/proc/select_automatic_dirs(connected)
|
||||
if(length(connected) < 1)
|
||||
return list()
|
||||
|
||||
for(var/i = 1, i <= length(connected), i++)
|
||||
for(var/j = i + 1, j <= length(connected), j++)
|
||||
var/d1 = connected[i]
|
||||
var/d2 = connected[j]
|
||||
|
||||
if(d1 == turn(d2, 135) || d1 == turn(d2, 180) || d1 == turn(d2, 225))
|
||||
return list(d1, d2)
|
||||
|
||||
return list(connected[1], turn(connected[1], 180))
|
||||
|
||||
|
||||
|
||||
/obj/structure/transit_tube/proc/select_automatic_icon_state(directions)
|
||||
if(length(directions) == 2)
|
||||
icon_state = "[dir2text_short(directions[1])]-[dir2text_short(directions[2])]"
|
||||
|
||||
|
||||
|
||||
// Look for diagonal directions, generate the decorative corners in each.
|
||||
/obj/structure/transit_tube/proc/generate_automatic_corners(directions)
|
||||
for(var/direction in directions)
|
||||
if(direction == 5 || direction == 6 || direction == 9 || direction == 10)
|
||||
if(direction & NORTH)
|
||||
create_automatic_decorative_corner(get_step(loc, NORTH), direction ^ 3)
|
||||
|
||||
else
|
||||
create_automatic_decorative_corner(get_step(loc, SOUTH), direction ^ 3)
|
||||
|
||||
if(direction & EAST)
|
||||
create_automatic_decorative_corner(get_step(loc, EAST), direction ^ 12)
|
||||
|
||||
else
|
||||
create_automatic_decorative_corner(get_step(loc, WEST), direction ^ 12)
|
||||
|
||||
|
||||
|
||||
// Generate a corner, if one doesn't exist for the direction on the turf.
|
||||
/obj/structure/transit_tube/proc/create_automatic_decorative_corner(location, direction)
|
||||
var/state = "D-[dir2text_short(direction)]"
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in location)
|
||||
if(tube.icon_state == state)
|
||||
return
|
||||
|
||||
var/obj/structure/transit_tube/tube = new(location)
|
||||
tube.icon_state = state
|
||||
tube.init_dirs()
|
||||
|
||||
|
||||
|
||||
// Uses a list() to cache return values. Since they should
|
||||
// never be edited directly, all tubes with a certain
|
||||
// icon_state can just reference the same list. In theory,
|
||||
// reduces memory usage, and improves CPU cache usage.
|
||||
// In reality, I don't know if that is quite how BYOND works,
|
||||
// but it is probably safer to assume the existence of, and
|
||||
// rely on, a sufficiently smart compiler/optimizer.
|
||||
/obj/structure/transit_tube/proc/parse_dirs(text)
|
||||
var/global/list/direction_table = list()
|
||||
|
||||
if(text in direction_table)
|
||||
return direction_table[text]
|
||||
|
||||
var/list/split_text = splittext(text, "-")
|
||||
|
||||
// If the first token is D, the icon_state represents
|
||||
// a purely decorative tube, and doesn't actually
|
||||
// connect to anything.
|
||||
if(split_text[1] == "D")
|
||||
direction_table[text] = list()
|
||||
return null
|
||||
|
||||
var/list/directions = list()
|
||||
|
||||
for(var/text_part in split_text)
|
||||
var/direction = text2dir_extended(text_part)
|
||||
|
||||
if(direction > 0)
|
||||
directions += direction
|
||||
|
||||
direction_table[text] = directions
|
||||
return directions
|
||||
@@ -0,0 +1,160 @@
|
||||
// transit tube construction
|
||||
|
||||
// normal transit tubes
|
||||
/obj/structure/c_transit_tube
|
||||
name = "unattached transit tube"
|
||||
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
|
||||
icon_state = "E-W" //icon_state decides which tube will be built
|
||||
density = 0
|
||||
layer = ABOVE_OBJ_LAYER //same as the built tube
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/c_transit_tube/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
|
||||
|
||||
//wrapper for turn that changes the transit tube formatted icon_state instead of the dir
|
||||
/obj/structure/c_transit_tube/proc/tube_turn(angle)
|
||||
var/list/badtubes = list("W-E", "W-E-Pass", "S-N", "S-N-Pass", "SW-NE", "SE-NW")
|
||||
var/list/split_text = splittext(icon_state, "-")
|
||||
for(var/i=1; i<=split_text.len; i++)
|
||||
var/curdir = text2dir_extended(split_text[i]) //0 if not a valid direction (e.g. Pass, Block)
|
||||
if(curdir)
|
||||
split_text[i] = dir2text_short(turn(curdir, angle))
|
||||
var/newdir = jointext(split_text, "-")
|
||||
if(badtubes.Find(newdir))
|
||||
split_text.Swap(1,2)
|
||||
newdir = jointext(split_text, "-")
|
||||
icon_state = newdir
|
||||
|
||||
/obj/structure/c_transit_tube/proc/tube_flip()
|
||||
var/list/split_text = splittext(icon_state, "-")
|
||||
//skip straight pipes
|
||||
if(length(split_text[2]) < 2)
|
||||
return
|
||||
//for junctions, just swap the diagonals with each other
|
||||
if(split_text.len == 3 && split_text[3] != "Pass")
|
||||
split_text.Swap(2,3)
|
||||
else if(length(split_text[1]) == 2 && length(split_text[2]) == 2) //diagonals
|
||||
split_text[1] = copytext(split_text[1],1,2) + copytext(split_text[2],2,3)
|
||||
split_text[2] = copytext(split_text[2],1,2) + ((copytext(split_text[2],2,3) == "E") ? "W" : "E")
|
||||
//for curves, swap the diagonal direction that is not in the same axis as the cardinal direction
|
||||
else
|
||||
if(split_text[1] == "N" || split_text[1] == "S")
|
||||
split_text[2] = copytext(split_text[2],1,2) + ((copytext(split_text[2],2,3) == "E") ? "W" : "E")
|
||||
else
|
||||
split_text[2] = ((copytext(split_text[2],1,2) == "N") ? "S" : "N") + copytext(split_text[2],2,3)
|
||||
icon_state = jointext(split_text, "-")
|
||||
|
||||
// disposals-style flip and rotate verbs
|
||||
/obj/structure/c_transit_tube/verb/rotate()
|
||||
set name = "Rotate Tube CW"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
tube_turn(-90)
|
||||
|
||||
/obj/structure/c_transit_tube/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
else
|
||||
rotate()
|
||||
|
||||
/obj/structure/c_transit_tube/verb/rotate_ccw()
|
||||
set name = "Rotate Tube CCW"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
tube_turn(90)
|
||||
|
||||
/obj/structure/c_transit_tube/verb/flip()
|
||||
set name = "Flip"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
tube_flip()
|
||||
|
||||
/obj/structure/c_transit_tube/proc/buildtube()
|
||||
var/obj/structure/transit_tube/R = new/obj/structure/transit_tube(src.loc)
|
||||
R.icon_state = src.icon_state
|
||||
R.init_dirs()
|
||||
R.generate_automatic_corners(R.tube_dirs)
|
||||
return R
|
||||
|
||||
/obj/structure/c_transit_tube/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start attaching the [name]...</span>"
|
||||
src.add_fingerprint(user)
|
||||
if(do_after(user, 40/I.toolspeed, target = src))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You attach the [name].</span>"
|
||||
var/obj/structure/transit_tube/R = src.buildtube()
|
||||
src.transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
// transit tube station
|
||||
/obj/structure/c_transit_tube/station
|
||||
name = "unattached through station"
|
||||
icon = 'icons/obj/atmospherics/pipes/transit_tube_station.dmi'
|
||||
icon_state = "closed"
|
||||
|
||||
/obj/structure/c_transit_tube/station/tube_turn(var/angle)
|
||||
src.setDir(turn(src.dir, angle))
|
||||
|
||||
/obj/structure/c_transit_tube/station/tube_flip()
|
||||
src.tube_turn(180)
|
||||
|
||||
/obj/structure/c_transit_tube/station/buildtube()
|
||||
var/obj/structure/transit_tube/station/R = new/obj/structure/transit_tube/station(src.loc)
|
||||
R.setDir(src.dir)
|
||||
R.init_dirs()
|
||||
return R
|
||||
|
||||
// reverser station, used for the terminus
|
||||
/obj/structure/c_transit_tube/station/reverse
|
||||
name = "unattached terminus station"
|
||||
|
||||
/obj/structure/c_transit_tube/station/reverse/buildtube()
|
||||
var/obj/structure/transit_tube/station/reverse/R = new/obj/structure/transit_tube/station/reverse(src.loc)
|
||||
R.setDir(src.dir)
|
||||
R.init_dirs()
|
||||
return R
|
||||
|
||||
// block, used after the terminus of a transit tube station, decorative only
|
||||
// code-wise they're normal tubes but they're ~speshul~ because they care about the dir instead of the icon_state
|
||||
// in that sense they're the same as stations and can reuse their flip and rotate verbs
|
||||
/obj/structure/c_transit_tube/station/block
|
||||
name = "unattached tube blocker"
|
||||
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
|
||||
icon_state = "Block"
|
||||
|
||||
/obj/structure/c_transit_tube/station/block/buildtube()
|
||||
var/obj/structure/transit_tube/R = new/obj/structure/transit_tube(src.loc)
|
||||
R.icon_state = src.icon_state
|
||||
R.setDir(src.dir)
|
||||
R.init_dirs()
|
||||
return R
|
||||
|
||||
//transit tube pod
|
||||
//see station.dm for the logic
|
||||
/obj/structure/c_transit_tube_pod
|
||||
name = "unattached transit tube pod"
|
||||
icon = 'icons/obj/atmospherics/pipes/transit_tube_pod.dmi'
|
||||
icon_state = "pod"
|
||||
anchored = 0
|
||||
density = 0
|
||||
@@ -0,0 +1,211 @@
|
||||
/obj/structure/transit_tube_pod
|
||||
icon = 'icons/obj/atmospherics/pipes/transit_tube_pod.dmi'
|
||||
icon_state = "pod"
|
||||
animate_movement = FORWARD_STEPS
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/moving = 0
|
||||
var/datum/gas_mixture/air_contents = new()
|
||||
|
||||
|
||||
/obj/structure/transit_tube_pod/New(loc)
|
||||
..(loc)
|
||||
|
||||
air_contents.assert_gases("o2", "n2")
|
||||
air_contents.gases["o2"][MOLES] = MOLES_O2STANDARD * 2
|
||||
air_contents.gases["n2"][MOLES] = MOLES_N2STANDARD
|
||||
air_contents.temperature = T20C
|
||||
|
||||
// Give auto tubes time to align before trying to start moving
|
||||
spawn(5)
|
||||
follow_tube()
|
||||
|
||||
/obj/structure/transit_tube_pod/Destroy()
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.loc = loc
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube_pod/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(!moving)
|
||||
for(var/obj/structure/transit_tube/station/T in loc)
|
||||
return
|
||||
if(src.contents.len)
|
||||
user.visible_message("[user] empties \the [src].", "<span class='notice'>You empty \the [src].</span>")
|
||||
src.empty()
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You free \the [src].</span>"
|
||||
var/obj/structure/c_transit_tube_pod/R = new/obj/structure/c_transit_tube_pod(src.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/transit_tube_pod/container_resist()
|
||||
var/mob/living/user = usr
|
||||
if(!moving)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user << "<span class='notice'>You start trying to escape from the pod...</span>"
|
||||
if(do_after(user, 600, target = src))
|
||||
user << "<span class='notice'>You manage to open the pod.</span>"
|
||||
src.empty()
|
||||
|
||||
/obj/structure/transit_tube_pod/proc/empty()
|
||||
for(var/atom/movable/M in src.contents)
|
||||
M.loc = src.loc
|
||||
|
||||
/obj/structure/transit_tube_pod/Process_Spacemove()
|
||||
if(moving) //No drifting while moving in the tubes
|
||||
return 1
|
||||
else return ..()
|
||||
|
||||
/obj/structure/transit_tube_pod/proc/follow_tube(reverse_launch)
|
||||
set waitfor = 0
|
||||
if(moving)
|
||||
return
|
||||
|
||||
moving = 1
|
||||
|
||||
|
||||
var/obj/structure/transit_tube/current_tube = null
|
||||
var/next_dir
|
||||
var/next_loc
|
||||
var/last_delay = 0
|
||||
var/exit_delay
|
||||
|
||||
if(reverse_launch)
|
||||
setDir(turn(dir, 180) )// Back it up
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in loc)
|
||||
if(tube.has_exit(dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
while(current_tube)
|
||||
next_dir = current_tube.get_exit(dir)
|
||||
|
||||
if(!next_dir)
|
||||
break
|
||||
|
||||
exit_delay = current_tube.exit_delay(src, dir)
|
||||
last_delay += exit_delay
|
||||
|
||||
sleep(exit_delay)
|
||||
|
||||
next_loc = get_step(loc, next_dir)
|
||||
|
||||
current_tube = null
|
||||
for(var/obj/structure/transit_tube/tube in next_loc)
|
||||
if(tube.has_entrance(next_dir))
|
||||
current_tube = tube
|
||||
break
|
||||
|
||||
if(current_tube == null)
|
||||
setDir(next_dir)
|
||||
Move(get_step(loc, dir), dir) // Allow collisions when leaving the tubes.
|
||||
break
|
||||
|
||||
last_delay = current_tube.enter_delay(src, next_dir)
|
||||
sleep(last_delay)
|
||||
setDir(next_dir)
|
||||
loc = next_loc // When moving from one tube to another, skip collision and such.
|
||||
density = current_tube.density
|
||||
|
||||
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
||||
current_tube.pod_stopped(src, dir)
|
||||
break
|
||||
|
||||
density = 1
|
||||
moving = 0
|
||||
|
||||
|
||||
// Should I return a copy here? If the caller edits or del()s the returned
|
||||
// datum, there might be problems if I don't...
|
||||
/obj/structure/transit_tube_pod/return_air()
|
||||
var/datum/gas_mixture/GM = new()
|
||||
GM.copy_from(air_contents)
|
||||
return GM
|
||||
|
||||
// For now, copying what I found in an unused FEA file (and almost identical in a
|
||||
// used ZAS file). Means that assume_air and remove_air don't actually alter the
|
||||
// air contents.
|
||||
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
|
||||
return air_contents.merge(giver)
|
||||
|
||||
/obj/structure/transit_tube_pod/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
|
||||
|
||||
// Called when a pod arrives at, and before a pod departs from a station,
|
||||
// giving it a chance to mix its internal air supply with the turf it is
|
||||
// currently on.
|
||||
/obj/structure/transit_tube_pod/proc/mix_air()
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/env_pressure = environment.return_pressure()
|
||||
var/int_pressure = air_contents.return_pressure()
|
||||
var/total_pressure = env_pressure + int_pressure
|
||||
|
||||
if(total_pressure == 0)
|
||||
return
|
||||
|
||||
// Math here: Completely made up, not based on realistic equasions.
|
||||
// Goal is to balance towards equal pressure, but ensure some gas
|
||||
// transfer in both directions regardless.
|
||||
// Feel free to rip this out and replace it with something better,
|
||||
// I don't really know muhch about how gas transfer rates work in
|
||||
// SS13.
|
||||
var/transfer_in = max(0.1, 0.5 * (env_pressure - int_pressure) / total_pressure)
|
||||
var/transfer_out = max(0.1, 0.3 * (int_pressure - env_pressure) / total_pressure)
|
||||
|
||||
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles() * transfer_in)
|
||||
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles() * transfer_out)
|
||||
|
||||
loc.assume_air(from_int)
|
||||
air_contents.merge(from_env)
|
||||
|
||||
|
||||
|
||||
// When the player moves, check if the pos is currently stopped at a station.
|
||||
// if it is, check the direction. If the direction matches the direction of
|
||||
// the station, try to exit. If the direction matches one of the station's
|
||||
// tube directions, launch the pod in that direction.
|
||||
/obj/structure/transit_tube_pod/relaymove(mob/mob, direction)
|
||||
if(istype(mob, /mob) && mob.client)
|
||||
// If the pod is not in a tube at all, you can get out at any time.
|
||||
if(!(locate(/obj/structure/transit_tube) in loc))
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_perspective(null)
|
||||
|
||||
//if(moving && istype(loc, /turf/open/space))
|
||||
// Todo: If you get out of a moving pod in space, you should move as well.
|
||||
// Same direction as pod? Direcion you moved? Halfway between?
|
||||
|
||||
if(!moving)
|
||||
for(var/obj/structure/transit_tube/station/station in loc)
|
||||
if(dir in station.directions())
|
||||
if(!station.pod_moving)
|
||||
if(direction == station.dir)
|
||||
if(station.icon_state == "open")
|
||||
mob.loc = loc
|
||||
mob.client.Move(get_step(loc, direction), direction)
|
||||
mob.reset_perspective(null)
|
||||
|
||||
else
|
||||
station.open_animation()
|
||||
|
||||
else if(direction in station.directions())
|
||||
setDir(direction)
|
||||
station.launch_pod()
|
||||
return
|
||||
|
||||
for(var/obj/structure/transit_tube/tube in loc)
|
||||
if(dir in tube.directions())
|
||||
if(tube.has_exit(direction))
|
||||
setDir(direction)
|
||||
return
|
||||
@@ -0,0 +1,480 @@
|
||||
/obj/structure/toilet
|
||||
name = "toilet"
|
||||
desc = "The HT-451, a torque rotation-based, waste disposal unit for small matter. This one seems remarkably clean."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "toilet00"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/open = 0 //if the lid is up
|
||||
var/cistern = 0 //if the cistern bit is open
|
||||
var/w_items = 0 //the combined w_class of all the items in the cistern
|
||||
var/mob/living/swirlie = null //the mob being given a swirlie
|
||||
|
||||
|
||||
/obj/structure/toilet/New()
|
||||
open = round(rand(0, 1))
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/toilet/attack_hand(mob/living/user)
|
||||
if(swirlie)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
playsound(src.loc, "swing_hit", 25, 1)
|
||||
swirlie.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='userdanger'>[user] slams the toilet seat onto your head!</span>", "<span class='italics'>You hear reverberating porcelain.</span>")
|
||||
swirlie.adjustBruteLoss(5)
|
||||
|
||||
else if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(GM.loc != get_turf(src))
|
||||
user << "<span class='warning'>[GM] needs to be on [src]!</span>"
|
||||
return
|
||||
if(!swirlie)
|
||||
if(open)
|
||||
GM.visible_message("<span class='danger'>[user] starts to give [GM] a swirlie!</span>", "<span class='userdanger'>[user] starts to give you a swirlie...</span>")
|
||||
swirlie = GM
|
||||
if(do_after(user, 30, 0, target = src))
|
||||
GM.visible_message("<span class='danger'>[user] gives [GM] a swirlie!</span>", "<span class='userdanger'>[user] gives you a swirlie!</span>", "<span class='italics'>You hear a toilet flushing.</span>")
|
||||
if(iscarbon(GM))
|
||||
var/mob/living/carbon/C = GM
|
||||
if(!C.internal)
|
||||
C.adjustOxyLoss(5)
|
||||
else
|
||||
GM.adjustOxyLoss(5)
|
||||
swirlie = null
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
|
||||
GM.visible_message("<span class='danger'>[user] slams [GM.name] into [src]!</span>", "<span class='userdanger'>[user] slams you into [src]!</span>")
|
||||
GM.adjustBruteLoss(5)
|
||||
else
|
||||
user << "<span class='warning'>You need a tighter grip!</span>"
|
||||
|
||||
else if(cistern && !open)
|
||||
if(!contents.len)
|
||||
user << "<span class='notice'>The cistern is empty.</span>"
|
||||
else
|
||||
var/obj/item/I = pick(contents)
|
||||
if(ishuman(user))
|
||||
user.put_in_hands(I)
|
||||
else
|
||||
I.loc = get_turf(src)
|
||||
user << "<span class='notice'>You find [I] in the cistern.</span>"
|
||||
w_items -= I.w_class
|
||||
else
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/toilet/update_icon()
|
||||
icon_state = "toilet[open][cistern]"
|
||||
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
user << "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>"
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(do_after(user, 30/I.toolspeed, target = src))
|
||||
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
|
||||
cistern = !cistern
|
||||
update_icon()
|
||||
|
||||
else if(cistern)
|
||||
if(user.a_intent != "harm")
|
||||
if(I.w_class > 3)
|
||||
user << "<span class='warning'>[I] does not fit!</span>"
|
||||
return
|
||||
if(w_items + I.w_class > 5)
|
||||
user << "<span class='warning'>The cistern is full!</span>"
|
||||
return
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the cistern!</span>"
|
||||
return
|
||||
I.loc = src
|
||||
w_items += I.w_class
|
||||
user << "<span class='notice'>You carefully place [I] into the cistern.</span>"
|
||||
|
||||
else if(istype(I, /obj/item/weapon/reagent_containers))
|
||||
if (!open)
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/RG = I
|
||||
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
user << "<span class='notice'>You fill [RG] from [src]. Gross.</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/obj/structure/urinal
|
||||
name = "urinal"
|
||||
desc = "The HU-452, an experimental urinal."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "urinal"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
|
||||
/obj/structure/urinal/attack_hand(mob/user)
|
||||
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
|
||||
var/mob/living/GM = user.pulling
|
||||
if(user.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(GM.loc != get_turf(src))
|
||||
user << "<span class='notice'>[GM.name] needs to be on [src].</span>"
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='danger'>[user] slams [GM] into [src]!</span>", "<span class='danger'>You slam [GM] into [src]!</span>")
|
||||
GM.adjustBruteLoss(8)
|
||||
else
|
||||
user << "<span class='warning'>You need a tighter grip!</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/shower
|
||||
name = "shower"
|
||||
desc = "The HS-451. Installed in the 2550s by the Nanotrasen Hygiene Division."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "shower"
|
||||
density = 0
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
var/on = 0
|
||||
var/obj/effect/mist/mymist = null
|
||||
var/ismist = 0 //needs a var so we can make it linger~
|
||||
var/watertemp = "normal" //freezing, normal, or boiling
|
||||
|
||||
|
||||
/obj/effect/mist
|
||||
name = "mist"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mist"
|
||||
layer = FLY_LAYER
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
|
||||
|
||||
/obj/machinery/shower/attack_hand(mob/M)
|
||||
on = !on
|
||||
update_icon()
|
||||
add_fingerprint(M)
|
||||
if(on)
|
||||
wash_turf()
|
||||
for(var/atom/movable/G in loc)
|
||||
if(isliving(G))
|
||||
var/mob/living/L = G
|
||||
wash_mob(L)
|
||||
else
|
||||
wash_obj(G)
|
||||
else
|
||||
if(istype(loc, /turf/open))
|
||||
var/turf/open/tile = loc
|
||||
tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)
|
||||
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user, params)
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I]...</span>"
|
||||
if(do_after(user, 50/I.toolspeed, target = src))
|
||||
switch(watertemp)
|
||||
if("normal")
|
||||
watertemp = "freezing"
|
||||
if("freezing")
|
||||
watertemp = "boiling"
|
||||
if("boiling")
|
||||
watertemp = "normal"
|
||||
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I] to [watertemp] temperature.</span>")
|
||||
log_game("[key_name(user)] has wrenched a shower to [watertemp] at ([x],[y],[z])")
|
||||
add_hiddenprint(user)
|
||||
|
||||
|
||||
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
|
||||
cut_overlays() //once it's been on for a while, in addition to handling the water overlay.
|
||||
if(mymist)
|
||||
qdel(mymist)
|
||||
|
||||
if(on)
|
||||
add_overlay(image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir))
|
||||
if(watertemp == "freezing")
|
||||
return
|
||||
if(!ismist)
|
||||
spawn(50)
|
||||
if(src && on)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else if(ismist)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
spawn(250)
|
||||
if(!on && mymist)
|
||||
qdel(mymist)
|
||||
ismist = 0
|
||||
|
||||
|
||||
/obj/machinery/shower/Crossed(atom/movable/O)
|
||||
..()
|
||||
if(on)
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
if(wash_mob(L)) //it's a carbon mob.
|
||||
var/mob/living/carbon/C = L
|
||||
C.slip(4,2,null,NO_SLIP_WHEN_WALKING)
|
||||
else
|
||||
wash_obj(O)
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/wash_obj(atom/movable/O)
|
||||
O.clean_blood()
|
||||
|
||||
if(istype(O,/obj/item))
|
||||
var/obj/item/I = O
|
||||
I.extinguish()
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/wash_turf()
|
||||
if(isturf(loc))
|
||||
var/turf/tile = loc
|
||||
loc.clean_blood()
|
||||
for(var/obj/effect/E in tile)
|
||||
if(is_cleanable(E))
|
||||
qdel(E)
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/wash_mob(mob/living/L)
|
||||
L.wash_cream()
|
||||
L.ExtinguishMob()
|
||||
L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/M = L
|
||||
. = 1
|
||||
check_heat(M)
|
||||
if(M.r_hand)
|
||||
M.r_hand.clean_blood()
|
||||
if(M.l_hand)
|
||||
M.l_hand.clean_blood()
|
||||
if(M.back)
|
||||
if(M.back.clean_blood())
|
||||
M.update_inv_back(0)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/washgloves = 1
|
||||
var/washshoes = 1
|
||||
var/washmask = 1
|
||||
var/washears = 1
|
||||
var/washglasses = 1
|
||||
|
||||
if(H.wear_suit)
|
||||
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
|
||||
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
|
||||
|
||||
if(H.head)
|
||||
washmask = !(H.head.flags_inv & HIDEMASK)
|
||||
washglasses = !(H.head.flags_inv & HIDEEYES)
|
||||
washears = !(H.head.flags_inv & HIDEEARS)
|
||||
|
||||
if(H.wear_mask)
|
||||
if (washears)
|
||||
washears = !(H.wear_mask.flags_inv & HIDEEARS)
|
||||
if (washglasses)
|
||||
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
|
||||
|
||||
if(H.head)
|
||||
if(H.head.clean_blood())
|
||||
H.update_inv_head()
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit.clean_blood())
|
||||
H.update_inv_wear_suit()
|
||||
else if(H.w_uniform)
|
||||
if(H.w_uniform.clean_blood())
|
||||
H.update_inv_w_uniform()
|
||||
if(washgloves)
|
||||
clean_blood()
|
||||
if(H.shoes && washshoes)
|
||||
if(H.shoes.clean_blood())
|
||||
H.update_inv_shoes()
|
||||
if(H.wear_mask)
|
||||
if(washmask)
|
||||
if(H.wear_mask.clean_blood())
|
||||
H.update_inv_wear_mask()
|
||||
else
|
||||
H.lip_style = null
|
||||
H.update_body()
|
||||
if(H.glasses && washglasses)
|
||||
if(H.glasses.clean_blood())
|
||||
H.update_inv_glasses()
|
||||
if(H.ears && washears)
|
||||
if(H.ears.clean_blood())
|
||||
H.update_inv_ears()
|
||||
if(H.belt)
|
||||
if(H.belt.clean_blood())
|
||||
H.update_inv_belt()
|
||||
else
|
||||
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
|
||||
if(M.wear_mask.clean_blood())
|
||||
M.update_inv_wear_mask(0)
|
||||
M.clean_blood()
|
||||
else
|
||||
L.clean_blood()
|
||||
|
||||
|
||||
/obj/machinery/shower/process()
|
||||
if(on)
|
||||
wash_turf()
|
||||
for(var/atom/movable/G in loc)
|
||||
if(isliving(G))
|
||||
var/mob/living/L = G
|
||||
wash_mob(L)
|
||||
else
|
||||
wash_obj(G)
|
||||
|
||||
|
||||
/obj/machinery/shower/proc/check_heat(mob/living/carbon/C)
|
||||
if(watertemp == "freezing")
|
||||
C.bodytemperature = max(80, C.bodytemperature - 80)
|
||||
C << "<span class='warning'>The water is freezing!</span>"
|
||||
else if(watertemp == "boiling")
|
||||
C.bodytemperature = min(500, C.bodytemperature + 35)
|
||||
C.adjustFireLoss(5)
|
||||
C << "<span class='danger'>The water is searing!</span>"
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/bikehorn/rubberducky
|
||||
name = "rubber ducky"
|
||||
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "rubberducky"
|
||||
item_state = "rubberducky"
|
||||
|
||||
|
||||
|
||||
/obj/structure/sink
|
||||
name = "sink"
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "sink"
|
||||
desc = "A sink used for washing one's hands and face."
|
||||
anchored = 1
|
||||
var/busy = 0 //Something's being washed at the moment
|
||||
|
||||
|
||||
/obj/structure/sink/attack_hand(mob/living/user)
|
||||
if(!user || !istype(user))
|
||||
return
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
if(busy)
|
||||
user << "<span class='notice'>Someone's already washing here.</span>"
|
||||
return
|
||||
var/selected_area = parse_zone(user.zone_selected)
|
||||
var/washing_face = 0
|
||||
if(selected_area in list("head", "mouth", "eyes"))
|
||||
washing_face = 1
|
||||
user.visible_message("<span class='notice'>[user] start washing their [washing_face ? "face" : "hands"]...</span>", \
|
||||
"<span class='notice'>You start washing your [washing_face ? "face" : "hands"]...</span>")
|
||||
busy = 1
|
||||
|
||||
if(!do_after(user, 40, target = src))
|
||||
busy = 0
|
||||
return
|
||||
|
||||
busy = 0
|
||||
|
||||
user.visible_message("<span class='notice'>[user] washes their [washing_face ? "face" : "hands"] using [src].</span>", \
|
||||
"<span class='notice'>You wash your [washing_face ? "face" : "hands"] using [src].</span>")
|
||||
if(washing_face)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.lip_style = null //Washes off lipstick
|
||||
H.lip_color = initial(H.lip_color)
|
||||
H.wash_cream()
|
||||
H.regenerate_icons()
|
||||
user.drowsyness = max(user.drowsyness - rand(2,3), 0) //Washing your face wakes you up if you're falling asleep
|
||||
else
|
||||
user.clean_blood()
|
||||
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/O, mob/user, params)
|
||||
if(busy)
|
||||
user << "<span class='warning'>Someone's already washing here!</span>"
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/reagent_containers))
|
||||
var/obj/item/weapon/reagent_containers/RG = O
|
||||
if(RG.flags & OPENCONTAINER)
|
||||
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
user << "<span class='notice'>You fill [RG] from [src].</span>"
|
||||
return 1
|
||||
|
||||
if(istype(O, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if(B.bcell)
|
||||
if(B.bcell.charge > 0 && B.status == 1)
|
||||
flick("baton_active", src)
|
||||
var/stunforce = B.stunforce
|
||||
user.Stun(stunforce)
|
||||
user.Weaken(stunforce)
|
||||
user.stuttering = stunforce
|
||||
B.deductcharge(B.hitcost)
|
||||
user.visible_message("<span class='warning'>[user] shocks themself while attempting to wash the active [B.name]!</span>", \
|
||||
"<span class='userdanger'>You unwisely attempt to wash [B] while it's still on.</span>")
|
||||
playsound(src, "sparks", 50, 1)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/mop))
|
||||
O.reagents.add_reagent("water", 5)
|
||||
user << "<span class='notice'>You wet [O] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = O
|
||||
user << "<span class='notice'>You place [src] under a stream of water...</span>"
|
||||
user.drop_item()
|
||||
M.loc = get_turf(src)
|
||||
M.Expand()
|
||||
return
|
||||
|
||||
if(!istype(O))
|
||||
return
|
||||
if(O.flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
|
||||
return
|
||||
|
||||
if(user.a_intent != "harm")
|
||||
user << "<span class='notice'>You start washing [O]...</span>"
|
||||
busy = 1
|
||||
if(!do_after(user, 40, target = src))
|
||||
busy = 0
|
||||
return 1
|
||||
busy = 0
|
||||
O.clean_blood()
|
||||
user.visible_message("<span class='notice'>[user] washes [O] using [src].</span>", \
|
||||
"<span class='notice'>You wash [O] using [src].</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/sink/kitchen
|
||||
name = "kitchen sink"
|
||||
icon_state = "sink_alt"
|
||||
|
||||
|
||||
/obj/structure/sink/puddle //splishy splashy ^_^
|
||||
name = "puddle"
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O, mob/user, params)
|
||||
icon_state = "puddle-splash"
|
||||
. = ..()
|
||||
icon_state = "puddle"
|
||||
@@ -0,0 +1,356 @@
|
||||
/* Windoor (window door) assembly -Nodrak
|
||||
* Step 1: Create a windoor out of rglass
|
||||
* Step 2: Add r-glass to the assembly to make a secure windoor (Optional)
|
||||
* Step 3: Rotate or Flip the assembly to face and open the way you want
|
||||
* Step 4: Wrench the assembly in place
|
||||
* Step 5: Add cables to the assembly
|
||||
* Step 6: Set access for the door.
|
||||
* Step 7: Screwdriver the door to complete
|
||||
*/
|
||||
|
||||
|
||||
/obj/structure/windoor_assembly
|
||||
icon = 'icons/obj/doors/windoor.dmi'
|
||||
|
||||
name = "windoor Assembly"
|
||||
icon_state = "l_windoor_assembly01"
|
||||
anchored = 0
|
||||
density = 0
|
||||
setDir(NORTH)
|
||||
|
||||
var/ini_dir
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/created_name = null
|
||||
|
||||
//Vars to help with the icon's name
|
||||
var/facing = "l" //Does the windoor open to the left or right?
|
||||
var/secure = 0 //Whether or not this creates a secure windoor
|
||||
var/state = "01" //How far the door assembly has progressed
|
||||
|
||||
/obj/structure/windoor_assembly/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
|
||||
|
||||
/obj/structure/windoor_assembly/New(dir=NORTH)
|
||||
..()
|
||||
ini_dir = dir
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/structure/windoor_assembly/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
/obj/structure/windoor_assembly/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/windoor_assembly/update_icon()
|
||||
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
|
||||
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/windoor_assembly/CanAtmosPass(turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/windoor_assembly/attackby(obj/item/W, mob/user, params)
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if("01")
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] disassembles the windoor assembly.", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "<span class='notice'>You disassemble the windoor assembly.</span>"
|
||||
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
|
||||
RG.add_fingerprint(user)
|
||||
if(secure)
|
||||
var/obj/item/stack/rods/R = new (get_turf(src), 4)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(istype(W, /obj/item/weapon/wrench) && !anchored)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
user << "<span class='warning'>There is already a windoor in that location!</span>"
|
||||
return
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!src || anchored)
|
||||
return
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
user << "<span class='warning'>There is already a windoor in that location!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You secure the windoor assembly.</span>"
|
||||
anchored = 1
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/weapon/wrench) && anchored)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!src || !anchored)
|
||||
return
|
||||
user << "<span class='notice'>You unsecure the windoor assembly.</span>"
|
||||
anchored = 0
|
||||
if(secure)
|
||||
name = "secure windoor assembly"
|
||||
else
|
||||
name = "windoor assembly"
|
||||
|
||||
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
|
||||
var/obj/item/stack/sheet/plasteel/P = W
|
||||
if(P.amount < 2)
|
||||
user << "<span class='warning'>You need more plasteel to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You start to reinforce the windoor with plasteel...</span>"
|
||||
|
||||
if(do_after(user,40, target = src))
|
||||
if(!src || secure)
|
||||
return
|
||||
|
||||
P.use(2)
|
||||
user << "<span class='notice'>You reinforce the windoor.</span>"
|
||||
secure = 1
|
||||
if(anchored)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "secure windoor assembly"
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
|
||||
user.visible_message("[user] wires the windoor assembly.", "<span class='notice'>You start to wire the windoor assembly...</span>")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!src || !anchored || src.state != "01")
|
||||
return
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(!CC.use(1))
|
||||
user << "<span class='warning'>You need more cable to do this!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You wire the windoor.</span>"
|
||||
state = "02"
|
||||
if(secure)
|
||||
name = "secure wired windoor assembly"
|
||||
else
|
||||
name = "wired windoor assembly"
|
||||
else
|
||||
return ..()
|
||||
|
||||
if("02")
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "<span class='notice'>You start to cut the wires from airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!src || state != "02")
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You cut the windoor wires.</span>"
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = "01"
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Adding airlock electronics for access. Step 6 complete.
|
||||
else if(istype(W, /obj/item/weapon/electronics/airlock))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
W.loc = src
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!src || electronics)
|
||||
W.loc = src.loc
|
||||
return
|
||||
user << "<span class='notice'>You install the airlock electronics.</span>"
|
||||
name = "near finished windoor assembly"
|
||||
electronics = W
|
||||
else
|
||||
W.loc = loc
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!electronics)
|
||||
return
|
||||
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
if(!src || !electronics)
|
||||
return
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = loc
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter the name for the door.", name, created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
return
|
||||
|
||||
|
||||
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(!electronics)
|
||||
usr << "<span class='warning'>The assembly is missing electronics!</span>"
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "<span class='notice'>You start prying the windoor into the frame...</span>")
|
||||
|
||||
if(do_after(user, 40/W.toolspeed, target = src))
|
||||
|
||||
if(loc && electronics)
|
||||
|
||||
density = 1 //Shouldn't matter but just incase
|
||||
user << "<span class='notice'>You finish the windoor.</span>"
|
||||
|
||||
if(secure)
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = 0
|
||||
|
||||
if(electronics.one_access)
|
||||
windoor.req_one_access = electronics.accesses
|
||||
else
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
|
||||
else
|
||||
var/obj/machinery/door/window/windoor = new /obj/machinery/door/window(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftopen"
|
||||
windoor.base_state = "left"
|
||||
else
|
||||
windoor.icon_state = "rightopen"
|
||||
windoor.base_state = "right"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = 0
|
||||
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
//Update to reflect changes(if applicable)
|
||||
update_icon()
|
||||
|
||||
|
||||
//Rotates the windoor assembly clockwise
|
||||
/obj/structure/windoor_assembly/verb/revrotate()
|
||||
set name = "Rotate Windoor Assembly"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
if (anchored)
|
||||
usr << "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>"
|
||||
return 0
|
||||
//if(state != "01")
|
||||
//update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
|
||||
setDir(turn(dir, 270))
|
||||
|
||||
//if(state != "01")
|
||||
//update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
ini_dir = dir
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/windoor_assembly/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
else
|
||||
revrotate()
|
||||
|
||||
//Flips the windoor assembly, determines whather the door opens to the left or the right
|
||||
/obj/structure/windoor_assembly/verb/flip()
|
||||
set name = "Flip Windoor Assembly"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if(facing == "l")
|
||||
usr << "<span class='notice'>The windoor will now slide to the right.</span>"
|
||||
facing = "r"
|
||||
else
|
||||
facing = "l"
|
||||
usr << "<span class='notice'>The windoor will now slide to the left.</span>"
|
||||
|
||||
update_icon()
|
||||
return
|
||||
@@ -0,0 +1,542 @@
|
||||
/obj/structure/window
|
||||
name = "window"
|
||||
desc = "A window."
|
||||
icon_state = "window"
|
||||
density = 1
|
||||
layer = ABOVE_OBJ_LAYER //Just above doors
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
anchored = 1 //initially is 0 for tile smoothing
|
||||
flags = ON_BORDER
|
||||
var/maxhealth = 25
|
||||
var/health = 0
|
||||
var/ini_dir = null
|
||||
var/state = 0
|
||||
var/reinf = 0
|
||||
var/wtype = "glass"
|
||||
var/fulltile = 0
|
||||
// var/silicate = 0 // number of units of silicate
|
||||
// var/icon/silicateIcon = null // the silicated icon
|
||||
var/image/crack_overlay
|
||||
var/list/debris = list()
|
||||
can_be_unanchored = 1
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>Alt-click to rotate it clockwise.</span>"
|
||||
|
||||
/obj/structure/window/New(Loc,re=0)
|
||||
..()
|
||||
health = maxhealth
|
||||
if(re)
|
||||
reinf = re
|
||||
if(reinf)
|
||||
state = 2*anchored
|
||||
|
||||
ini_dir = dir
|
||||
air_update_turf(1)
|
||||
|
||||
// Precreate our own debris
|
||||
|
||||
var/shards = 1
|
||||
if(fulltile)
|
||||
shards++
|
||||
var/rods = 0
|
||||
if(reinf)
|
||||
rods++
|
||||
if(fulltile)
|
||||
rods++
|
||||
|
||||
for(var/i in 1 to shards)
|
||||
debris += new /obj/item/weapon/shard(src)
|
||||
if(rods)
|
||||
debris += new /obj/item/stack/rods(src, rods)
|
||||
|
||||
|
||||
/obj/structure/window/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
/obj/structure/window/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
shatter()
|
||||
if(3)
|
||||
take_damage(rand(25,75), BRUTE, 0)
|
||||
|
||||
/obj/structure/window/blob_act(obj/effect/blob/B)
|
||||
shatter()
|
||||
|
||||
/obj/structure/window/narsie_act()
|
||||
color = NARSIE_WINDOW_COLOUR
|
||||
for(var/obj/item/weapon/shard/shard in debris)
|
||||
shard.color = NARSIE_WINDOW_COLOUR
|
||||
|
||||
/obj/structure/window/ratvar_act()
|
||||
if(prob(20))
|
||||
if(!fulltile)
|
||||
new/obj/structure/window/reinforced/clockwork(get_turf(src), dir)
|
||||
else
|
||||
new/obj/structure/window/reinforced/clockwork/fulltile(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/window/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
shatter()
|
||||
|
||||
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
|
||||
return 0 //full tile window, you can't move into it!
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target)
|
||||
if(istype(O) && O.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/window/hitby(AM as mob|obj)
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 40
|
||||
|
||||
else if(isobj(AM))
|
||||
var/obj/item/I = AM
|
||||
tforce = I.throwforce
|
||||
if(reinf)
|
||||
tforce *= 0.25
|
||||
take_damage(tforce)
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
|
||||
add_fingerprint(user)
|
||||
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
|
||||
|
||||
/obj/structure/window/attack_hulk(mob/living/carbon/human/user)
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
..(user, 1)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
add_fingerprint(user)
|
||||
take_damage(50)
|
||||
return 1
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user)
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("[user] knocks on [src].")
|
||||
add_fingerprint(user)
|
||||
playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1)
|
||||
|
||||
/obj/structure/window/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/window/proc/attack_generic(mob/user, damage = 0, damage_type = BRUTE) //used by attack_alien, attack_animal, and attack_slime
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
take_damage(damage, damage_type)
|
||||
|
||||
/obj/structure/window/attack_alien(mob/living/user)
|
||||
attack_generic(user, 15)
|
||||
|
||||
/obj/structure/window/attack_animal(mob/living/simple_animal/M)
|
||||
if(!M.melee_damage_upper)
|
||||
return
|
||||
attack_generic(M, M.melee_damage_upper, M.melee_damage_type)
|
||||
|
||||
|
||||
/obj/structure/window/attack_slime(mob/living/simple_animal/slime/user)
|
||||
if(!user.is_adult)
|
||||
return
|
||||
attack_generic(user, rand(10, 15))
|
||||
|
||||
|
||||
/obj/structure/window/attackby(obj/item/I, mob/living/user, params)
|
||||
if(!can_be_reached(user))
|
||||
return 1 //skip the afterattack
|
||||
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help")
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(health < maxhealth)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You begin repairing [src]...</span>"
|
||||
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
|
||||
if(do_after(user, 40/I.toolspeed, target = src))
|
||||
health = maxhealth
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
update_nearby_icons()
|
||||
user << "<span class='notice'>You repair [src].</span>"
|
||||
else
|
||||
user << "<span class='warning'>[src] is already in good condition!</span>"
|
||||
return
|
||||
|
||||
|
||||
if(!(flags&NODECONSTRUCT))
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
if(reinf && (state == 2 || state == 1))
|
||||
user << (state == 2 ? "<span class='notice'>You begin to unscrew the window from the frame...</span>" : "<span class='notice'>You begin to screw the window to the frame...</span>")
|
||||
else if(reinf && state == 0)
|
||||
user << (anchored ? "<span class='notice'>You begin to unscrew the frame from the floor...</span>" : "<span class='notice'>You begin to screw the frame to the floor...</span>")
|
||||
else if(!reinf)
|
||||
user << (anchored ? "<span class='notice'>You begin to unscrew the window from the floor...</span>" : "<span class='notice'>You begin to screw the window to the floor...</span>")
|
||||
|
||||
if(do_after(user, 30/I.toolspeed, target = src))
|
||||
if(reinf && (state == 1 || state == 2))
|
||||
//If state was unfastened, fasten it, else do the reverse
|
||||
state = (state == 1 ? 2 : 1)
|
||||
user << (state == 1 ? "<span class='notice'>You unfasten the window from the frame.</span>" : "<span class='notice'>You fasten the window to the frame.</span>")
|
||||
else if(reinf && state == 0)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
user << (anchored ? "<span class='notice'>You fasten the frame to the floor.</span>" : "<span class='notice'>You unfasten the frame from the floor.</span>")
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
user << (anchored ? "<span class='notice'>You fasten the window to the floor.</span>" : "<span class='notice'>You unfasten the window.</span>")
|
||||
return
|
||||
|
||||
else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == 0 || state == 1))
|
||||
user << (state == 0 ? "<span class='notice'>You begin to lever the window into the frame...</span>" : "<span class='notice'>You begin to lever the window out of the frame...</span>")
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
if(do_after(user, 40/I.toolspeed, target = src))
|
||||
//If state was out of frame, put into frame, else do the reverse
|
||||
state = (state == 0 ? 1 : 0)
|
||||
user << (state == 1 ? "<span class='notice'>You pry the window into the frame.</span>" : "<span class='notice'>You pry the window out of the frame.</span>")
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
||||
user << "<span class='notice'> You begin to disassemble [src]...</span>"
|
||||
if(do_after(user, 40/I.toolspeed, target = src))
|
||||
if(qdeleted(src))
|
||||
return
|
||||
|
||||
if(reinf)
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
if(fulltile) //fulltiles drop two panes
|
||||
RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
|
||||
else
|
||||
var/obj/item/stack/sheet/glass/G = new (user.loc)
|
||||
G.add_fingerprint(user)
|
||||
if(fulltile)
|
||||
G = new (user.loc)
|
||||
G.add_fingerprint(user)
|
||||
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
user << "<span class='notice'>You successfully disassemble [src].</span>"
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/window/attacked_by(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
/obj/structure/window/mech_melee_attack(obj/mecha/M)
|
||||
if(..())
|
||||
take_damage(M.force, M.damtype)
|
||||
|
||||
|
||||
/obj/structure/window/proc/can_be_reached(mob/user)
|
||||
if(!fulltile)
|
||||
if(get_dir(user,src) & dir)
|
||||
for(var/obj/O in loc)
|
||||
if(!O.CanPass(user, user.loc, 1))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/window/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
if(reinf)
|
||||
damage *= 0.5
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 90, 1)
|
||||
if(BURN)
|
||||
if(sound_effect)
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
update_nearby_icons()
|
||||
if(health <= 0)
|
||||
shatter()
|
||||
|
||||
/obj/structure/window/proc/shatter()
|
||||
if(qdeleted(src))
|
||||
return
|
||||
playsound(src, "shatter", 70, 1)
|
||||
var/turf/T = loc
|
||||
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
for(var/i in debris)
|
||||
var/obj/item/I = i
|
||||
|
||||
I.loc = T
|
||||
transfer_fingerprints_to(I)
|
||||
qdel(src)
|
||||
update_nearby_icons()
|
||||
|
||||
/obj/structure/window/verb/rotate()
|
||||
set name = "Rotate Window Counter-Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
usr << "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>"
|
||||
return 0
|
||||
|
||||
setDir(turn(dir, 90))
|
||||
// updateSilicate()
|
||||
air_update_turf(1)
|
||||
ini_dir = dir
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/verb/revrotate()
|
||||
set name = "Rotate Window Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
if(anchored)
|
||||
usr << "<span class='warning'>[src] cannot be rotated while it is fastened to the floor!</span>"
|
||||
return 0
|
||||
|
||||
setDir(turn(dir, 270))
|
||||
// updateSilicate()
|
||||
air_update_turf(1)
|
||||
ini_dir = dir
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/structure/window/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
user << "<span class='warning'>You can't do that right now!</span>"
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
return
|
||||
else
|
||||
revrotate()
|
||||
|
||||
/*
|
||||
/obj/structure/window/proc/updateSilicate() what do you call a syndicate silicon?
|
||||
if(silicateIcon && silicate)
|
||||
icon = initial(icon)
|
||||
|
||||
var/icon/I = icon(icon,icon_state,dir)
|
||||
|
||||
var/r = (silicate / 100) + 1
|
||||
var/g = (silicate / 70) + 1
|
||||
var/b = (silicate / 50) + 1
|
||||
I.SetIntensity(r,g,b)
|
||||
icon = I
|
||||
silicateIcon = I
|
||||
*/
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
update_nearby_icons()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/window/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
setDir(ini_dir)
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/window/CanAtmosPass(turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
|
||||
return !density
|
||||
return 1
|
||||
|
||||
//This proc is used to update the icons of nearby windows.
|
||||
/obj/structure/window/proc/update_nearby_icons()
|
||||
update_icon()
|
||||
if(smooth)
|
||||
queue_smooth_neighbors(src)
|
||||
|
||||
//merges adjacent full-tile windows into one
|
||||
/obj/structure/window/update_icon()
|
||||
if(!qdeleted(src))
|
||||
if(!fulltile)
|
||||
return
|
||||
|
||||
var/ratio = health / maxhealth
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
|
||||
overlays -= crack_overlay
|
||||
if(ratio > 75)
|
||||
return
|
||||
crack_overlay = image('icons/obj/structures.dmi',"damage[ratio]",-(layer+0.1))
|
||||
add_overlay(crack_overlay)
|
||||
|
||||
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + (reinf ? 1600 : 800))
|
||||
take_damage(round(exposed_volume / 100), BURN, 0)
|
||||
..()
|
||||
|
||||
/obj/structure/window/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||
return 0
|
||||
|
||||
/obj/structure/window/CanAStarPass(ID, to_dir)
|
||||
if(!density)
|
||||
return 1
|
||||
if((dir == SOUTHWEST) || (dir == to_dir))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
name = "reinforced window"
|
||||
icon_state = "rwindow"
|
||||
reinf = 1
|
||||
maxhealth = 50
|
||||
explosion_block = 1
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
name = "tinted window"
|
||||
icon_state = "twindow"
|
||||
opacity = 1
|
||||
|
||||
/obj/structure/window/reinforced/tinted/frosted
|
||||
name = "frosted window"
|
||||
icon_state = "fwindow"
|
||||
|
||||
|
||||
/* Full Tile Windows (more health) */
|
||||
|
||||
/obj/structure/window/fulltile
|
||||
icon = 'icons/obj/smooth_structures/window.dmi'
|
||||
icon_state = "window"
|
||||
dir = NORTHEAST
|
||||
maxhealth = 50
|
||||
fulltile = 1
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
|
||||
|
||||
/obj/structure/window/reinforced/fulltile
|
||||
icon = 'icons/obj/smooth_structures/reinforced_window.dmi'
|
||||
icon_state = "r_window"
|
||||
dir = NORTHEAST
|
||||
maxhealth = 100
|
||||
fulltile = 1
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile)
|
||||
level = 3
|
||||
|
||||
/obj/structure/window/reinforced/tinted/fulltile
|
||||
icon = 'icons/obj/smooth_structures/tinted_window.dmi'
|
||||
icon_state = "tinted_window"
|
||||
dir = NORTHEAST
|
||||
fulltile = 1
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile/)
|
||||
level = 3
|
||||
|
||||
/obj/structure/window/reinforced/fulltile/ice
|
||||
icon = 'icons/obj/smooth_structures/rice_window.dmi'
|
||||
icon_state = "ice_window"
|
||||
maxhealth = 150
|
||||
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/reinforced/fulltile/ice)
|
||||
level = 3
|
||||
|
||||
/obj/structure/window/shuttle
|
||||
name = "shuttle window"
|
||||
desc = "A reinforced, air-locked pod window."
|
||||
icon = 'icons/obj/smooth_structures/shuttle_window.dmi'
|
||||
icon_state = "shuttle_window"
|
||||
dir = NORTHEAST
|
||||
maxhealth = 100
|
||||
wtype = "shuttle"
|
||||
fulltile = 1
|
||||
reinf = 1
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
explosion_block = 1
|
||||
level = 3
|
||||
|
||||
/obj/structure/window/shuttle/narsie_act()
|
||||
color = "#3C3434"
|
||||
|
||||
/obj/structure/window/shuttle/tinted
|
||||
opacity = TRUE
|
||||
|
||||
/obj/structure/window/reinforced/clockwork
|
||||
name = "brass window"
|
||||
desc = "A paper-thin pane of translucent yet reinforced brass."
|
||||
icon = 'icons/obj/smooth_structures/clockwork_window.dmi'
|
||||
icon_state = "clockwork_window_single"
|
||||
maxhealth = 100
|
||||
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
|
||||
|
||||
/obj/structure/window/reinforced/clockwork/New(loc, direct)
|
||||
..()
|
||||
if(!fulltile)
|
||||
var/obj/effect/E = PoolOrNew(/obj/effect/overlay/temp/ratvar/window/single, get_turf(src))
|
||||
if(direct)
|
||||
setDir(direct)
|
||||
E.setDir(direct)
|
||||
else
|
||||
PoolOrNew(/obj/effect/overlay/temp/ratvar/window, get_turf(src))
|
||||
for(var/obj/item/I in debris)
|
||||
debris -= I
|
||||
qdel(I)
|
||||
debris += new/obj/item/clockwork/component/vanguard_cogwheel(src)
|
||||
|
||||
/obj/structure/window/reinforced/clockwork/ratvar_act()
|
||||
health = maxhealth
|
||||
update_icon()
|
||||
return 0
|
||||
|
||||
/obj/structure/window/reinforced/clockwork/narsie_act()
|
||||
take_damage(rand(25, 75), BRUTE)
|
||||
if(src)
|
||||
var/previouscolor = color
|
||||
color = "#960000"
|
||||
animate(src, color = previouscolor, time = 8)
|
||||
|
||||
/obj/structure/window/reinforced/clockwork/fulltile
|
||||
icon_state = "clockwork_window"
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
fulltile = 1
|
||||
dir = NORTHEAST
|
||||
maxhealth = 150
|
||||
Reference in New Issue
Block a user