mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 11:58:39 +01:00
Merge remote-tracking branch 'bay12-upstream/master' into development
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
/obj/structure/alien
|
||||
name = "alien thing"
|
||||
desc = "There's something alien about this."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
var/health = 50
|
||||
|
||||
/obj/structure/alien/proc/healthcheck()
|
||||
if(health <=0)
|
||||
density = 0
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/alien/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/alien/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
health-=50
|
||||
if(2.0)
|
||||
health-=50
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
health-=50
|
||||
else
|
||||
health-=25
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/alien/hitby(AM as mob|obj)
|
||||
..()
|
||||
visible_message("<span class='danger'>\The [src] was hit by \the [AM].</span>")
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 10
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/alien/attack_generic()
|
||||
attack_hand(usr)
|
||||
|
||||
/obj/structure/alien/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
health = max(0, health - W.force)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/alien/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
@@ -0,0 +1,96 @@
|
||||
#define MAX_PROGRESS 100
|
||||
|
||||
/obj/structure/alien/egg
|
||||
desc = "It looks like a weird egg."
|
||||
name = "egg"
|
||||
icon_state = "egg_growing"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/progress = 0
|
||||
|
||||
/obj/structure/alien/egg/New()
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
/obj/structure/alien/egg/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/structure/alien/egg/CanUseTopic(var/mob/user)
|
||||
return isobserver(user) ? STATUS_INTERACTIVE : STATUS_CLOSE
|
||||
|
||||
/obj/structure/alien/egg/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["spawn"])
|
||||
attack_ghost(usr)
|
||||
|
||||
/obj/structure/alien/egg/process()
|
||||
progress++
|
||||
if(progress >= MAX_PROGRESS)
|
||||
for(var/mob/M in dead_mob_list)
|
||||
if(istype(M,/mob/dead) && M.client && M.client.prefs && (MODE_XENOMORPH in M.client.prefs.be_special_role))
|
||||
M << "<span class='notice'>An alien is ready to hatch! ([ghost_follow_link(src, M)]) (<a href='byond://?src=\ref[src];spawn=1'>spawn</a>)</span>"
|
||||
processing_objects -= src
|
||||
update_icon()
|
||||
|
||||
/obj/structure/alien/egg/update_icon()
|
||||
if(progress == -1)
|
||||
icon_state = "egg_hatched"
|
||||
else if(progress < MAX_PROGRESS)
|
||||
icon_state = "egg_growing"
|
||||
else
|
||||
icon_state = "egg"
|
||||
|
||||
/obj/structure/alien/egg/attack_ghost(var/mob/dead/observer/user)
|
||||
if(progress == -1) //Egg has been hatched.
|
||||
return
|
||||
|
||||
if(progress < MAX_PROGRESS)
|
||||
user << "\The [src] has not yet matured."
|
||||
return
|
||||
|
||||
if(!user.MayRespawn(1))
|
||||
return
|
||||
|
||||
// Check for bans properly.
|
||||
if(jobban_isbanned(user, "Xenomorph"))
|
||||
user << "<span class='danger'>You are banned from playing a Xenomorph.</span>"
|
||||
return
|
||||
|
||||
var/confirm = alert(user, "Are you sure you want to join as a Xenomorph larva?", "Become Larva", "No", "Yes")
|
||||
|
||||
if(!src || confirm != "Yes")
|
||||
return
|
||||
|
||||
if(!user || !user.ckey)
|
||||
return
|
||||
|
||||
if(progress == -1) //Egg has been hatched.
|
||||
user << "Too slow..."
|
||||
return
|
||||
|
||||
flick("egg_opening",src)
|
||||
progress = -1 // No harvesting pls.
|
||||
sleep(5)
|
||||
|
||||
if(!src || !user)
|
||||
visible_message("<span class='alium'>\The [src] writhes with internal motion, but nothing comes out.</span>")
|
||||
progress = MAX_PROGRESS // Someone else can have a go.
|
||||
return // What a pain.
|
||||
|
||||
// Create the mob, transfer over key.
|
||||
var/mob/living/carbon/alien/larva/larva = new(get_turf(src))
|
||||
larva.ckey = user.ckey
|
||||
spawn(-1)
|
||||
if(user) qdel(user) // Remove the keyless ghost if it exists.
|
||||
|
||||
visible_message("<span class='alium'>\The [src] splits open with a wet slithering noise, and \the [larva] writhes free!</span>")
|
||||
|
||||
// Turn us into a hatched egg.
|
||||
name = "hatched alien egg"
|
||||
desc += " This one has hatched."
|
||||
update_icon()
|
||||
|
||||
#undef MAX_PROGRESS
|
||||
@@ -0,0 +1,19 @@
|
||||
/obj/structure/alien/node
|
||||
name = "alien weed node"
|
||||
desc = "Some kind of strange, pulsating structure."
|
||||
icon_state = "weednode"
|
||||
health = 100
|
||||
layer = 3.1
|
||||
|
||||
/obj/structure/alien/node/New()
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
/obj/structure/alien/node/Destroy()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/structure/alien/node/process()
|
||||
if(locate(/obj/effect/plant) in loc)
|
||||
return
|
||||
new /obj/effect/plant(get_turf(src), plant_controller.seeds["xenomorph"])
|
||||
@@ -0,0 +1,50 @@
|
||||
/obj/structure/alien/resin
|
||||
name = "resin"
|
||||
desc = "Looks like some kind of slimy growth."
|
||||
icon_state = "resin"
|
||||
|
||||
density = 1
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
health = 200
|
||||
|
||||
/obj/structure/alien/resin/wall
|
||||
name = "resin wall"
|
||||
desc = "Purple slime solidified into a wall."
|
||||
icon_state = "resinwall"
|
||||
|
||||
/obj/structure/alien/resin/membrane
|
||||
name = "resin membrane"
|
||||
desc = "Purple slime just thin enough to let light pass through."
|
||||
icon_state = "resinmembrane"
|
||||
opacity = 0
|
||||
health = 120
|
||||
|
||||
/obj/structure/alien/resin/New()
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
|
||||
/obj/structure/alien/resin/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
T.thermal_conductivity = initial(T.thermal_conductivity)
|
||||
..()
|
||||
|
||||
/obj/structure/alien/resin/attack_hand(var/mob/user)
|
||||
if (HULK in user.mutations)
|
||||
visible_message("<span class='danger'>\The [user] destroys \the [name]!</span>")
|
||||
health = 0
|
||||
else
|
||||
// Aliens can get straight through these.
|
||||
if(istype(user,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = user
|
||||
if(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
|
||||
visible_message("<span class='alium'>\The [user] strokes \the [name] and it melts away!</span>")
|
||||
health = 0
|
||||
healthcheck()
|
||||
return
|
||||
visible_message("<span class='danger'>\The [user] claws at \the [src]!</span>")
|
||||
// Todo check attack datums.
|
||||
health -= rand(5,10)
|
||||
healthcheck()
|
||||
return
|
||||
@@ -3,26 +3,45 @@
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
var/cult = 0
|
||||
New()
|
||||
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt","thebark","theharmbaton","theharmedbaton","thesingulo","thedrukcarp","thedrunkcarp", "scotch","officerbeersky","on","theouterspess","milliways42","spaceasshole","robustacafe","emergencyrumparty","thenet","birdcage","toolboxtavern","foreign"))
|
||||
return
|
||||
proc/ChangeSign(var/Text)
|
||||
src.icon_state = "[Text]"
|
||||
//on = 0
|
||||
//brightness_on = 4 //uncomment these when the lighting fixes get in
|
||||
return
|
||||
|
||||
/obj/structure/sign/double/barsign/proc/get_valid_states(initial=1)
|
||||
. = icon_states(icon)
|
||||
. -= "on"
|
||||
. -= "narsiebistro"
|
||||
. -= "empty"
|
||||
if(initial)
|
||||
. -= "Off"
|
||||
|
||||
/obj/structure/sign/double/barsign/examine(mob/user)
|
||||
..()
|
||||
switch(icon_state)
|
||||
if("Off")
|
||||
user << "It appears to be switched off."
|
||||
if("narsiebistro")
|
||||
user << "It shows a picture of a large black and red being. Spooky!"
|
||||
if("on", "empty")
|
||||
user << "The lights are on, but there's no picture."
|
||||
else
|
||||
user << "It says '[icon_state]'"
|
||||
|
||||
/obj/structure/sign/double/barsign/New()
|
||||
..()
|
||||
icon_state = pick(get_valid_states())
|
||||
|
||||
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
|
||||
if(cult)
|
||||
return ..()
|
||||
|
||||
var/obj/item/weapon/card/id/card = I.GetID()
|
||||
if(istype(card))
|
||||
if(access_bar in card.GetAccess())
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in get_valid_states(0)
|
||||
if(!sign_type)
|
||||
return
|
||||
icon_state = sign_type
|
||||
user << "<span class='notice'>You change the barsign.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/card = I
|
||||
if(access_bar in card.GetAccess())
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Off", "Pink Flamingo", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead Bay", "The Damn Wall", "The Cavern", "Cindi Kate", "The Orchard", "The Saucy Clown", "The Clowns Head", "Whiskey Implant", "Carpe Carp", "Robust Roadhouse", "Greytide", "The Redshirt", "The Bark", "The Harm Baton", "The Harmed Baton", "The Singulo", "The Druk Carp", "The Drunk Carp", "Scotch", "Officer Beersky", "On", "The Outer Spess", "Milliways 42", "Space Asshole", "Robusta Cafe", "Emergency Rum Party", "The Net", "Bird Cage", "Toolbox Tavern", "Foreign" )
|
||||
if(sign_type == null)
|
||||
return
|
||||
else
|
||||
sign_type = replacetext(lowertext(sign_type), " ", "") // lowercase, strip spaces - along with choices for user options, avoids huge if-else-else
|
||||
src.ChangeSign(sign_type)
|
||||
user << "You change the barsign."
|
||||
return ..()
|
||||
|
||||
@@ -25,6 +25,16 @@ LINEN BINS
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
|
||||
if(is_sharp(I))
|
||||
user.visible_message("<span class='notice'>\The [user] begins cutting up [src] with [I].</span>", "<span class='notice'>You begin cutting up [src] with [I].</span>")
|
||||
if(do_after(user, 50))
|
||||
user << "<span class='notice'>You cut [src] into pieces!</span>"
|
||||
for(var/i in 1 to rand(2,5))
|
||||
new /obj/item/weapon/reagent_containers/glass/rag(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/bedsheet/blue
|
||||
icon_state = "sheetblue"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/coatrack.dmi'
|
||||
icon_state = "coatrack0"
|
||||
var/obj/item/clothing/suit/coat
|
||||
var/list/allowed = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/det_suit)
|
||||
var/list/allowed = list(/obj/item/clothing/suit/storage/toggle/labcoat, /obj/item/clothing/suit/storage/det_trench)
|
||||
|
||||
/obj/structure/coatrack/attack_hand(mob/user as mob)
|
||||
user.visible_message("[user] takes [coat] off \the [src].", "You take [coat] off the \the [src]")
|
||||
@@ -48,5 +48,5 @@
|
||||
overlays += image(icon, icon_state = "coat_lab")
|
||||
if (istype(coat, /obj/item/clothing/suit/storage/toggle/labcoat/cmo))
|
||||
overlays += image(icon, icon_state = "coat_cmo")
|
||||
if (istype(coat, /obj/item/clothing/suit/storage/det_suit))
|
||||
if (istype(coat, /obj/item/clothing/suit/storage/det_trench))
|
||||
overlays += image(icon, icon_state = "coat_det")
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "closed"
|
||||
density = 1
|
||||
w_class = 5
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = 0
|
||||
@@ -11,7 +12,7 @@
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/breakout = 0 //if someone is currently breaking out. mutex
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate
|
||||
var/storage_capacity = 2 * MOB_MEDIUM //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/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.ogg'
|
||||
@@ -20,9 +21,8 @@
|
||||
var/store_items = 1
|
||||
var/store_mobs = 1
|
||||
|
||||
var/const/default_mob_size = 15
|
||||
|
||||
/obj/structure/closet/initialize()
|
||||
..()
|
||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||
var/obj/item/I
|
||||
for(I in src.loc)
|
||||
@@ -53,11 +53,6 @@
|
||||
else
|
||||
user << "It is full."
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0 || wall_mounted)) return 1
|
||||
return (!density)
|
||||
@@ -150,14 +145,13 @@
|
||||
for(var/mob/living/M in src.loc)
|
||||
if(M.buckled || M.pinned.len)
|
||||
continue
|
||||
var/current_mob_size = (M.mob_size ? M.mob_size : default_mob_size)
|
||||
if(stored_units + added_units + current_mob_size > storage_capacity)
|
||||
if(stored_units + added_units + M.mob_size > storage_capacity)
|
||||
break
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.forceMove(src)
|
||||
added_units += current_mob_size
|
||||
added_units += M.mob_size
|
||||
return added_units
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user as mob)
|
||||
@@ -194,28 +188,15 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
var/proj_damage = Proj.get_structure_damage()
|
||||
if(!proj_damage)
|
||||
return
|
||||
|
||||
..()
|
||||
damage(Proj.damage)
|
||||
damage(proj_damage)
|
||||
|
||||
return
|
||||
|
||||
// this should probably use dump_contents()
|
||||
/obj/structure/closet/blob_act()
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/meteorhit(obj/O as obj)
|
||||
if(O.icon_state == "flaming")
|
||||
for(var/mob/M in src)
|
||||
M.meteorhit(O)
|
||||
src.dump_contents()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
@@ -237,6 +218,15 @@
|
||||
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/storage/laundry_basket) && W.contents.len)
|
||||
var/obj/item/weapon/storage/laundry_basket/LB = W
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/item/I in LB.contents)
|
||||
LB.remove_from_storage(I, T)
|
||||
user.visible_message("<span class='notice'>[user] empties \the [LB] into \the [src].</span>", \
|
||||
"<span class='notice'>You empty \the [LB] into \the [src].</span>", \
|
||||
"<span class='notice'>You hear rustling of clothes.</span>")
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
@@ -327,12 +317,6 @@
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/hear_talk(mob/M as mob, text, verb, datum/language/speaking)
|
||||
for (var/atom/A in src)
|
||||
if(istype(A,/obj/))
|
||||
var/obj/O = A
|
||||
O.hear_talk(M, text, verb, speaking)
|
||||
|
||||
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
return
|
||||
@@ -357,9 +341,9 @@
|
||||
if(!req_breakout())
|
||||
return
|
||||
|
||||
escapee.setClickCooldown(100)
|
||||
|
||||
//okay, so the closet is either welded or locked... resist!!!
|
||||
escapee.next_move = world.time + 100
|
||||
escapee.last_special = world.time + 100
|
||||
escapee << "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>"
|
||||
|
||||
visible_message("<span class='danger'>The [src] begins to shake violently!</span>")
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
//I still dont think this should be a closet but whatever
|
||||
/obj/structure/closet/fireaxecabinet
|
||||
name = "fire axe cabinet"
|
||||
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
|
||||
icon_state = "fireaxe1000"
|
||||
icon_closed = "fireaxe1000"
|
||||
icon_opened = "fireaxe1100"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/localopened = 0 //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
|
||||
opened = 1
|
||||
var/hitstaken = 0
|
||||
var/locked = 1
|
||||
var/smashed = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
fireaxe = new /obj/item/weapon/material/twohanded/fireaxe(src)
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
|
||||
var/hasaxe = 0 //gonna come in handy later~
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
|
||||
if (isrobot(usr) || src.locked)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
user << "\red Resetting circuitry..."
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
src.locked = 0
|
||||
user << "<span class = 'caution'> You disable the locking modules.</span>"
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon))
|
||||
var/obj/item/weapon/W = O
|
||||
if(src.smashed || src.localopened)
|
||||
if(localopened)
|
||||
localopened = 0
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
if(W.force < 15)
|
||||
user << "\blue The cabinet's protective glass glances off the hit."
|
||||
else
|
||||
src.hitstaken++
|
||||
if(src.hitstaken == 4)
|
||||
playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
|
||||
src.smashed = 1
|
||||
src.locked = 0
|
||||
src.localopened = 1
|
||||
update_icon()
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
|
||||
if(!fireaxe)
|
||||
if(O:wielded)
|
||||
user << "\red Unwield the axe first."
|
||||
return
|
||||
fireaxe = O
|
||||
user.remove_from_mob(O)
|
||||
src.contents += O
|
||||
user << "\blue You place the fire axe back in the [src.name]."
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
if(localopened)
|
||||
localopened = 0
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user << "\red Resetting circuitry..."
|
||||
sleep(50)
|
||||
src.locked = 1
|
||||
user << "\blue You re-enable the locking modules."
|
||||
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
|
||||
if(do_after(user,20))
|
||||
src.locked = 1
|
||||
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
|
||||
var/hasaxe = 0
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
|
||||
if(src.locked)
|
||||
user <<"\red The cabinet won't budge!"
|
||||
return
|
||||
if(localopened)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
user << "\blue You take the fire axe from the [name]."
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
return
|
||||
else
|
||||
localopened = !localopened
|
||||
if(localopened)
|
||||
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
else
|
||||
localopened = !localopened //I'm pretty sure we don't need an if(src.smashed) in here. In case I'm wrong and it fucks up teh cabinet, **MARKER**. -Agouri
|
||||
if(localopened)
|
||||
src.icon_state = text("fireaxe[][][][]opening",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
else
|
||||
src.icon_state = text("fireaxe[][][][]closing",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
spawn(10) update_icon()
|
||||
|
||||
attack_tk(mob/user as mob)
|
||||
if(localopened && fireaxe)
|
||||
fireaxe.forceMove(loc)
|
||||
user << "<span class='notice'>You telekinetically remove the fire axe.</span>"
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
return
|
||||
attack_hand(user)
|
||||
|
||||
verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
|
||||
set name = "Open/Close"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr) || src.locked || src.smashed)
|
||||
if(src.locked)
|
||||
usr << "\red The cabinet won't budge!"
|
||||
else if(src.smashed)
|
||||
usr << "\blue The protective glass is broken!"
|
||||
return
|
||||
|
||||
localopened = !localopened
|
||||
update_icon()
|
||||
|
||||
verb/remove_fire_axe()
|
||||
set name = "Remove Fire Axe"
|
||||
set category = "Object"
|
||||
|
||||
if (isrobot(usr))
|
||||
return
|
||||
|
||||
if (localopened)
|
||||
if(fireaxe)
|
||||
usr.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
usr << "\blue You take the Fire axe from the [name]."
|
||||
else
|
||||
usr << "\blue The [src.name] is empty."
|
||||
else
|
||||
usr << "\blue The [src.name] is closed."
|
||||
update_icon()
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
if(src.smashed)
|
||||
user << "\red The security of the cabinet is compromised."
|
||||
return
|
||||
else
|
||||
locked = !locked
|
||||
if(locked)
|
||||
user << "\red Cabinet locked."
|
||||
else
|
||||
user << "\blue Cabinet unlocked."
|
||||
return
|
||||
|
||||
update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
|
||||
var/hasaxe = 0
|
||||
if(fireaxe)
|
||||
hasaxe = 1
|
||||
icon_state = text("fireaxe[][][][]",hasaxe,src.localopened,src.hitstaken,src.smashed)
|
||||
|
||||
open()
|
||||
return
|
||||
|
||||
close()
|
||||
return
|
||||
@@ -68,7 +68,7 @@
|
||||
new /obj/item/weapon/cartridge/janitor(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
new /obj/item/clothing/head/beret/jan(src)
|
||||
new /obj/item/clothing/head/beret/purple(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
new /obj/item/weapon/caution(src)
|
||||
|
||||
@@ -11,16 +11,16 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/bar/update_icon()
|
||||
|
||||
@@ -148,5 +148,5 @@
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/cartridge/atmos(src)
|
||||
new /obj/item/taperoll/engineering(src)
|
||||
new /obj/item/taperoll/atmos(src)
|
||||
return
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
// new /obj/item/weapon/cartridge/medical(src)
|
||||
new /obj/item/device/radio/headset/headset_med(src)
|
||||
new /obj/item/taperoll/medical(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -83,23 +83,27 @@
|
||||
src.registered_name = I.registered_name
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message("\blue The locker has been sliced open by [user] with an energy blade!", 1, "\red You hear metal being sliced and sparks flying.", 2)
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/emag_act(var/remaining_charges, var/mob/user, var/visual_feedback, var/audible_feedback)
|
||||
if(!broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(visual_feedback)
|
||||
visible_message("<span class='warning'>[visual_feedback]</span>", "<span class='warning'>[audible_feedback]</span>")
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/verb/reset()
|
||||
set src in oview(1) // One square distance
|
||||
@@ -110,9 +114,9 @@
|
||||
if(ishuman(usr))
|
||||
src.add_fingerprint(usr)
|
||||
if (src.locked || !src.registered_name)
|
||||
usr << "\red You need to unlock it first."
|
||||
usr << "<span class='warning'>You need to unlock it first.</span>"
|
||||
else if (src.broken)
|
||||
usr << "\red It appears to be broken."
|
||||
usr << "<span class='warning'>It appears to be broken.</span>"
|
||||
else
|
||||
if (src.opened)
|
||||
if(!src.close())
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
src.req_access += pick(get_all_station_access())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
|
||||
@@ -65,6 +65,8 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/weapon/storage/laundry_basket))
|
||||
return ..(W,user)
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(src.large)
|
||||
@@ -78,28 +80,34 @@
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(src.loc)
|
||||
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = icon_off
|
||||
flick(icon_broken, src)
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message("<span class='warning'>The locker has been sliced open by [user] with an energy blade!</span>", 1, "You hear metal being sliced and sparks flying.", 2)
|
||||
else
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", 1, "You hear a faint electrical spark.", 2)
|
||||
else if(istype(W,/obj/item/weapon/packageWrap) || istype(W,/obj/item/weapon/weldingtool))
|
||||
return ..(W,user)
|
||||
else
|
||||
togglelock(user)
|
||||
|
||||
/obj/structure/closet/secure_closet/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "")
|
||||
if(!broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
desc = "It appears to be broken."
|
||||
icon_state = icon_off
|
||||
flick(icon_broken, src)
|
||||
|
||||
if(visual_feedback)
|
||||
visible_message(visual_feedback, audible_feedback)
|
||||
else if(user && emag_source)
|
||||
visible_message("<span class='warning'>\The [src] has been broken by \the [user] with \an [emag_source]!</span>", "You hear a faint electrical spark.")
|
||||
else
|
||||
visible_message("<span class='warning'>\The [src] sparks and breaks open!</span>", "You hear a faint electrical spark.")
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/secure_closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(src.locked)
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
new /obj/item/weapon/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/clothing/suit/captunic(src)
|
||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||
new /obj/item/clothing/head/helmet/cap(src)
|
||||
new /obj/item/clothing/head/caphat/cap(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/suit/storage/vest(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/weapon/cartridge/captain(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/device/radio/headset/heads/captain(src)
|
||||
new /obj/item/clothing/gloves/captain(src)
|
||||
@@ -28,7 +28,7 @@
|
||||
new /obj/item/clothing/suit/armor/captain(src)
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
new /obj/item/clothing/under/dress/dress_cap(src)
|
||||
new /obj/item/clothing/head/helmet/formalcaptain(src)
|
||||
new /obj/item/clothing/head/caphat/formal(src)
|
||||
new /obj/item/clothing/under/captainformal(src)
|
||||
return
|
||||
|
||||
@@ -47,13 +47,12 @@
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/suit/storage/vest(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/weapon/cartridge/hop(src)
|
||||
new /obj/item/device/radio/headset/heads/hop(src)
|
||||
new /obj/item/weapon/storage/box/ids(src)
|
||||
new /obj/item/weapon/storage/box/ids( src )
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/projectile/sec/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
return
|
||||
@@ -82,7 +81,7 @@
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
|
||||
new /obj/item/clothing/head/helmet/hop(src)
|
||||
new /obj/item/clothing/head/caphat/hop(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -103,13 +102,14 @@
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/head/helmet/HoS(src)
|
||||
new /obj/item/clothing/head/HoS(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hos(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
||||
new /obj/item/clothing/suit/armor/hos/jensen(src)
|
||||
new /obj/item/clothing/suit/armor/hos(src)
|
||||
new /obj/item/clothing/head/helmet/HoS/dermal(src)
|
||||
new /obj/item/clothing/head/HoS/dermal(src)
|
||||
new /obj/item/weapon/cartridge/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
@@ -122,7 +122,8 @@
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/clothing/accessory/holster/waist(src)
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
new /obj/item/clothing/head/beret/sec/hos(src)
|
||||
new /obj/item/clothing/head/beret/sec/corporate/hos(src)
|
||||
new /obj/item/clothing/accessory/badge/hos(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -144,22 +145,25 @@
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/clothing/suit/storage/vest/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/helmet/warden(src)
|
||||
new /obj/item/clothing/head/warden(src)
|
||||
new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/box/teargas(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/storage/box/holobadge(src)
|
||||
new /obj/item/clothing/head/beret/sec/warden(src)
|
||||
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
|
||||
new /obj/item/clothing/accessory/badge/warden(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -180,14 +184,14 @@
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/storage/vest/officer(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/weapon/grenade/chem_grenade/teargas(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
@@ -195,7 +199,6 @@
|
||||
new /obj/item/clothing/accessory/storage/black_vest(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
return
|
||||
|
||||
@@ -246,19 +249,19 @@
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/clothing/under/det/grey(src)
|
||||
new /obj/item/clothing/under/det/black(src)
|
||||
new /obj/item/clothing/under/det/slob(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/black(src)
|
||||
new /obj/item/clothing/suit/storage/det_trench(src)
|
||||
new /obj/item/clothing/suit/storage/det_trench/grey(src)
|
||||
new /obj/item/clothing/suit/storage/forensics/blue(src)
|
||||
new /obj/item/clothing/suit/storage/forensics/red(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/head/det_hat/black(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/head/det(src)
|
||||
new /obj/item/clothing/head/det/grey(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/clothing/suit/storage/vest/detective(src)
|
||||
new /obj/item/clothing/suit/armor/vest/detective(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
@@ -307,7 +310,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/courtroom
|
||||
name = "courtroom locker"
|
||||
req_access = list(access_court)
|
||||
req_access = list(access_lawyer)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -80,12 +80,15 @@
|
||||
/obj/structure/closet/statue/toggle()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
/obj/structure/closet/statue/proc/check_health()
|
||||
if(health <= 0)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.get_structure_damage()
|
||||
check_health()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/attack_generic(var/mob/user, damage, attacktext, environment_smash)
|
||||
@@ -93,23 +96,17 @@
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/blob_act()
|
||||
/obj/structure/closet/statue/ex_act(severity)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/meteorhit(obj/O as obj)
|
||||
if(O.icon_state == "flaming")
|
||||
for(var/mob/M in src)
|
||||
M.meteorhit(O)
|
||||
shatter(M)
|
||||
M.ex_act(severity)
|
||||
health -= 60 / severity
|
||||
check_health()
|
||||
|
||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
||||
health -= I.force
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
||||
if(health <= 0)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
check_health()
|
||||
|
||||
/obj/structure/closet/statue/MouseDrop_T()
|
||||
return
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a10mm(src)
|
||||
new /obj/item/ammo_magazine/a10mm(src)
|
||||
new /obj/item/ammo_magazine/a10mm(src)
|
||||
new /obj/item/ammo_magazine/a10mm(src)
|
||||
new /obj/item/ammo_magazine/a10mm(src)
|
||||
new /obj/item/weapon/storage/box/handcuffs(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/obj/structure/closet/emcloset/New()
|
||||
..()
|
||||
|
||||
switch (pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10, "nothing" = 0, "delete" = 0)))
|
||||
switch (pickweight(list("small" = 55, "aid" = 25, "tank" = 10, "both" = 10)))
|
||||
if ("small")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
@@ -51,17 +51,6 @@
|
||||
new /obj/item/clothing/suit/space/emergency(src)
|
||||
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||
if ("nothing")
|
||||
// doot
|
||||
|
||||
// teehee - Ah, tg coders...
|
||||
if ("delete")
|
||||
qdel(src)
|
||||
|
||||
//If you want to re-add fire, just add "fire" = 15 to the pick list.
|
||||
/*if ("fire")
|
||||
new /obj/structure/closet/firecloset(src.loc)
|
||||
qdel(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
..()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/wardrobe
|
||||
name = "wardrobe"
|
||||
desc = "It's a storage unit for standard-issue Nanotrasen attire."
|
||||
desc = "It's a storage unit for standard-issue attire."
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec(src)
|
||||
new /obj/item/clothing/head/beret/sec/alt(src)
|
||||
new /obj/item/clothing/head/beret/sec/alt(src)
|
||||
new /obj/item/clothing/head/beret/sec/alt(src)
|
||||
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
|
||||
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
|
||||
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black
|
||||
name = "chapel wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-approved religious attire."
|
||||
desc = "It's a storage unit for approved religious attire."
|
||||
icon_state = "black"
|
||||
icon_closed = "black"
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
new /obj/item/weapon/storage/backpack/cultpack (src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
new /obj/item/weapon/deck/tarot(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -120,7 +121,7 @@
|
||||
|
||||
/obj/structure/closet/wardrobe/orange
|
||||
name = "prison wardrobe"
|
||||
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
|
||||
desc = "It's a storage unit for regulation prisoner attire."
|
||||
icon_state = "orange"
|
||||
icon_closed = "orange"
|
||||
|
||||
@@ -167,9 +168,9 @@
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/engineering(src)
|
||||
new /obj/item/clothing/head/beret/engineering(src)
|
||||
new /obj/item/clothing/head/beret/engineering(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -190,9 +191,9 @@
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/hardhat(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/eng(src)
|
||||
new /obj/item/clothing/head/beret/engineering(src)
|
||||
new /obj/item/clothing/head/beret/engineering(src)
|
||||
new /obj/item/clothing/head/beret/engineering(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -69,20 +69,7 @@
|
||||
|
||||
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
if(W.abstract) //Prevents 'abstract' items (such as grabs) from creeping into the material realm.
|
||||
if(istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
user << "<span class='notice'>[G.affecting] just doesn't fit!</span>"
|
||||
else
|
||||
user << "<span class='notice'>[W] does not belong there!</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(src.loc)
|
||||
return ..()
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -199,7 +186,15 @@
|
||||
/obj/structure/closet/crate/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(is_type_in_list(W, list(/obj/item/weapon/packageWrap, /obj/item/stack/cable_coil, /obj/item/device/radio/electropack, /obj/item/weapon/wirecutters)))
|
||||
return ..()
|
||||
if(locked && (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)))
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
emag_act(INFINITY, user)
|
||||
if(!opened)
|
||||
src.togglelock(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(!broken)
|
||||
overlays.Cut()
|
||||
overlays += emag
|
||||
overlays += sparks
|
||||
@@ -208,11 +203,7 @@
|
||||
src.locked = 0
|
||||
src.broken = 1
|
||||
user << "<span class='notice'>You unlock \the [src].</span>"
|
||||
return
|
||||
if(!opened)
|
||||
src.togglelock(user)
|
||||
return
|
||||
return ..()
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/secure/emp_act(severity)
|
||||
for(var/obj/O in src)
|
||||
@@ -234,7 +225,7 @@
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
src.req_access += pick(get_all_station_access())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/plastic
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/stack/material/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/M in contents)
|
||||
M.forceMove(T)
|
||||
for(var/atom/movable/AM in contents)
|
||||
if(AM.simulated) AM.forceMove(T)
|
||||
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
|
||||
"<span class='notice'>You pry open \the [src].</span>", \
|
||||
"<span class='notice'>You hear splitting wood.</span>")
|
||||
|
||||
@@ -44,6 +44,14 @@
|
||||
color = "#B8F5E3"
|
||||
alpha = 200
|
||||
|
||||
/obj/structure/curtain/open/bed
|
||||
name = "bed curtain"
|
||||
color = "#854636"
|
||||
|
||||
/obj/structure/curtain/open/privacy
|
||||
name = "privacy curtain"
|
||||
color = "#B8F5E3"
|
||||
|
||||
/obj/structure/curtain/open/shower
|
||||
name = "shower curtain"
|
||||
color = "#ACD1E9"
|
||||
|
||||
@@ -29,27 +29,11 @@
|
||||
|
||||
|
||||
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
health -= Proj.get_structure_damage()
|
||||
..()
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/displaycase/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/displaycase/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/displaycase/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
@@ -71,6 +55,7 @@
|
||||
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
@@ -79,16 +64,16 @@
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
user << "\b You deactivate the hover field built into the case."
|
||||
user << "<span class='notice'>You deactivate the hover field built into the case.</span>"
|
||||
src.occupied = 0
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
usr << text("\blue You kick the display case.")
|
||||
usr << text("<span class='warning'>You kick the display case.</span>")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the display case.", usr)
|
||||
O << "<span class='warning'>[usr] kicks the display case.</span>"
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "door_as_0"
|
||||
anchored = 0
|
||||
density = 1
|
||||
w_class = 5
|
||||
var/state = 0
|
||||
var/base_icon_state = ""
|
||||
var/base_name = "Airlock"
|
||||
@@ -149,7 +150,7 @@
|
||||
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You welded the [glass] plating off!"
|
||||
user << "<span class='notice'>You welded the [glass] plating off!</span>"
|
||||
var/M = text2path("/obj/item/stack/material/[glass]")
|
||||
new M(src.loc, 2)
|
||||
glass = 0
|
||||
@@ -157,18 +158,18 @@
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You welded the glass panel out!"
|
||||
user << "<span class='notice'>You welded the glass panel out!</span>"
|
||||
new /obj/item/stack/material/glass/reinforced(src.loc)
|
||||
glass = 0
|
||||
else if(!anchored)
|
||||
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the airlock assembly!"
|
||||
user << "<span class='notice'>You dissasembled the airlock assembly!</span>"
|
||||
new /obj/item/stack/material/steel(src.loc, 4)
|
||||
qdel (src)
|
||||
else
|
||||
user << "\blue You need more welding fuel."
|
||||
user << "<span class='notice'>You need more welding fuel.</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
@@ -180,7 +181,7 @@
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You [anchored? "un" : ""]secured the airlock assembly!"
|
||||
user << "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>"
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
|
||||
@@ -200,7 +201,7 @@
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You cut the airlock wires.!"
|
||||
user << "<span class='notice'>You cut the airlock wires.!</span>"
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
|
||||
@@ -212,7 +213,7 @@
|
||||
if(!src) return
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "\blue You installed the airlock electronics!"
|
||||
user << "<span class='notice'>You installed the airlock electronics!</span>"
|
||||
src.state = 2
|
||||
src.name = "Near finished Airlock Assembly"
|
||||
src.electronics = W
|
||||
@@ -229,7 +230,7 @@
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You removed the airlock electronics!"
|
||||
user << "<span class='notice'>You removed the airlock electronics!</span>"
|
||||
src.state = 1
|
||||
src.name = "Wired Airlock Assembly"
|
||||
electronics.loc = src.loc
|
||||
@@ -262,11 +263,11 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\blue Now finishing the airlock."
|
||||
user << "<span class='notice'>Now finishing the airlock.</span>"
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You finish the airlock!"
|
||||
user << "<span class='notice'>You finish the airlock!</span>"
|
||||
var/path
|
||||
if(istext(glass))
|
||||
path = text2path("/obj/machinery/door/airlock/[glass]")
|
||||
@@ -275,8 +276,7 @@
|
||||
else
|
||||
path = text2path("/obj/machinery/door/airlock[airlock_type]")
|
||||
|
||||
var/obj/machinery/door/new_airlock = new path(src.loc, src)
|
||||
new_airlock.dir = src.dir
|
||||
new path(src.loc, src)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -31,8 +31,14 @@
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user))
|
||||
return
|
||||
if (!user.can_use_hand())
|
||||
return
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (user.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
||||
return
|
||||
if(has_extinguisher)
|
||||
user.put_in_hands(has_extinguisher)
|
||||
user << "<span class='notice'>You take [has_extinguisher] from [src].</span>"
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/obj/structure/fireaxecabinet
|
||||
name = "fire axe cabinet"
|
||||
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
icon_state = "fireaxe"
|
||||
anchored = 1
|
||||
density = 0
|
||||
|
||||
var/damage_threshold = 15
|
||||
var/open
|
||||
var/unlocked
|
||||
var/shattered
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_generic(var/mob/user, var/damage, var/attack_verb, var/wallbreaker)
|
||||
user.do_attack_animation(src)
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>[user] [attack_verb] \the [src]!</span>")
|
||||
if(damage_threshold > damage)
|
||||
user << "<span class='danger'>Your strike is deflected by the reinforced glass!</span>"
|
||||
return
|
||||
if(shattered)
|
||||
return
|
||||
shattered = 1
|
||||
unlocked = 1
|
||||
open = 1
|
||||
playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/update_icon()
|
||||
overlays.Cut()
|
||||
if(fireaxe)
|
||||
overlays += image(icon, "fireaxe_item")
|
||||
if(shattered)
|
||||
overlays += image(icon, "fireaxe_window_broken")
|
||||
else if(!open)
|
||||
overlays += image(icon, "fireaxe_window")
|
||||
|
||||
/obj/structure/fireaxecabinet/New()
|
||||
..()
|
||||
fireaxe = new(src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_ai(var/mob/user)
|
||||
toggle_lock(user)
|
||||
|
||||
/obj/structure/fireaxecabinet/attack_hand(var/mob/user)
|
||||
if(!unlocked)
|
||||
user << "<span class='warning'>\The [src] is locked.</span>"
|
||||
return
|
||||
toggle_open(user)
|
||||
|
||||
/obj/structure/fireaxecabinet/MouseDrop(over_object, src_location, over_location)
|
||||
if(over_object == usr)
|
||||
var/mob/user = over_object
|
||||
if(!istype(user))
|
||||
return
|
||||
|
||||
if(!open)
|
||||
user << "<span class='warning'>\The [src] is closed.</span>"
|
||||
return
|
||||
|
||||
if(!fireaxe)
|
||||
user << "<span class='warning'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
fireaxe.forceMove(get_turf(user))
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/fireaxecabinet/Destroy()
|
||||
if(fireaxe)
|
||||
fireaxe.forceMove(get_turf(src))
|
||||
fireaxe = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(var/obj/item/O, var/mob/user)
|
||||
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
toggle_lock(user)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/material/twohanded/fireaxe))
|
||||
if(open)
|
||||
if(fireaxe)
|
||||
user << "<span class='warning'>There is already \a [fireaxe] inside \the [src].</span>"
|
||||
else if(user.unEquip(O))
|
||||
O.forceMove(src)
|
||||
fireaxe = O
|
||||
user << "<span class='notice'>You place \the [fireaxe] into \the [src].</span>"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(O.force)
|
||||
user.setClickCooldown(10)
|
||||
attack_generic(user, O.force, "bashes")
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/fireaxecabinet/proc/toggle_open(var/mob/user)
|
||||
if(shattered)
|
||||
open = 1
|
||||
unlocked = 1
|
||||
else
|
||||
user.setClickCooldown(10)
|
||||
open = !open
|
||||
user << "<span class='notice'>You [open ? "open" : "close"] \the [src].</span>"
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireaxecabinet/proc/toggle_lock(var/mob/user)
|
||||
|
||||
|
||||
if(open)
|
||||
return
|
||||
|
||||
if(shattered)
|
||||
open = 1
|
||||
unlocked = 1
|
||||
else
|
||||
user.setClickCooldown(10)
|
||||
user << "<span class='notice'>You begin [unlocked ? "enabling" : "disabling"] \the [src]'s maglock.</span>"
|
||||
|
||||
if(!do_after(user, 20))
|
||||
return
|
||||
|
||||
if(shattered) return
|
||||
|
||||
unlocked = !unlocked
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
user << "<span class = 'notice'>You [unlocked ? "disable" : "enable"] the maglock.</span>"
|
||||
|
||||
update_icon()
|
||||
@@ -3,6 +3,7 @@
|
||||
anchored = 1
|
||||
density = 1
|
||||
layer = 2
|
||||
w_class = 5
|
||||
var/state = 0
|
||||
var/health = 200
|
||||
var/cover = 50 //how much cover the girder provides against projectiles.
|
||||
@@ -28,11 +29,10 @@
|
||||
if(Proj.original != src && !prob(cover))
|
||||
return PROJECTILE_CONTINUE //pass through
|
||||
|
||||
//Tasers and the like should not damage girders.
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
var/damage = Proj.get_structure_damage()
|
||||
if(!damage)
|
||||
return
|
||||
|
||||
var/damage = Proj.damage
|
||||
if(!istype(Proj, /obj/item/projectile/beam))
|
||||
damage *= 0.4 //non beams do reduced damage
|
||||
|
||||
@@ -203,10 +203,6 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/blob_act()
|
||||
if(prob(40))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/girder/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
flags = CONDUCT
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = 2.9
|
||||
explosion_resistance = 1
|
||||
var/health = 10
|
||||
@@ -16,12 +15,6 @@
|
||||
/obj/structure/grille/ex_act(severity)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/blob_act()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/meteorhit(var/obj/M)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/grille/update_icon()
|
||||
if(destroyed)
|
||||
icon_state = "[initial(icon_state)]-b"
|
||||
@@ -33,6 +26,7 @@
|
||||
|
||||
/obj/structure/grille/attack_hand(mob/user as mob)
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.do_attack_animation(src)
|
||||
|
||||
@@ -67,13 +61,11 @@
|
||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj) return
|
||||
|
||||
//Tasers and the like should not damage grilles.
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||
var/damage = Proj.damage
|
||||
var/damage = Proj.get_structure_damage()
|
||||
var/passthrough = 0
|
||||
|
||||
if(!damage) return
|
||||
|
||||
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
||||
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
|
||||
@@ -158,7 +150,8 @@
|
||||
//window placing end
|
||||
|
||||
else if(!(W.flags & CONDUCT) || !shock(user, 70))
|
||||
user.do_attack_animation(src)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
|
||||
@@ -1,30 +1,47 @@
|
||||
/obj/item/inflatable
|
||||
name = "inflatable"
|
||||
w_class = 2
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
var/deploy_path = null
|
||||
|
||||
/obj/item/inflatable/attack_self(mob/user)
|
||||
if(!deploy_path)
|
||||
return
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
user << "<span class='notice'>You inflate \the [src].</span>"
|
||||
var/obj/structure/inflatable/R = new deploy_path(user.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/inflatable/wall
|
||||
name = "inflatable wall"
|
||||
desc = "A folded membrane which rapidly expands into a large cubical shape on activation."
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_wall"
|
||||
w_class = 3
|
||||
deploy_path = /obj/structure/inflatable/wall
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
user << "\blue You inflate [src]."
|
||||
var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
/obj/item/inflatable/door/
|
||||
name = "inflatable door"
|
||||
desc = "A folded membrane which rapidly expands into a simple door on activation."
|
||||
icon_state = "folded_door"
|
||||
deploy_path = /obj/structure/inflatable/door
|
||||
|
||||
/obj/structure/inflatable
|
||||
name = "inflatable wall"
|
||||
name = "inflatable"
|
||||
desc = "An inflated membrane. Do not puncture."
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "wall"
|
||||
|
||||
var/undeploy_path = null
|
||||
var/health = 50.0
|
||||
|
||||
/obj/structure/inflatable/wall
|
||||
name = "inflatable wall"
|
||||
undeploy_path = /obj/item/inflatable/wall
|
||||
|
||||
/obj/structure/inflatable/New(location)
|
||||
..()
|
||||
@@ -38,10 +55,10 @@
|
||||
return 0
|
||||
|
||||
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
health -= Proj.damage
|
||||
var/proj_damage = Proj.get_structure_damage()
|
||||
if(!proj_damage) return
|
||||
|
||||
health -= proj_damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
@@ -60,21 +77,15 @@
|
||||
deflate(1)
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/blob_act()
|
||||
deflate(1)
|
||||
|
||||
/obj/structure/inflatable/meteorhit()
|
||||
deflate(1)
|
||||
|
||||
/obj/structure/inflatable/attack_hand(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!istype(W)) return
|
||||
if(!istype(W) || istype(W, /obj/item/weapon/inflatable_dispenser)) return
|
||||
|
||||
if (can_puncture(W))
|
||||
visible_message("\red <b>[user] pierces [src] with [W]!</b>")
|
||||
visible_message("<span class='danger'>[user] pierces [src] with [W]!</span>")
|
||||
deflate(1)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
hit(W.force)
|
||||
@@ -88,6 +99,9 @@
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
|
||||
/obj/structure/inflatable/CtrlClick()
|
||||
hand_deflate()
|
||||
|
||||
/obj/structure/inflatable/proc/deflate(var/violent=0)
|
||||
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
|
||||
if(violent)
|
||||
@@ -96,10 +110,11 @@
|
||||
src.transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
else
|
||||
//user << "\blue You slowly deflate the inflatable wall."
|
||||
visible_message("[src] slowly deflates.")
|
||||
if(!undeploy_path)
|
||||
return
|
||||
visible_message("\The [src] slowly deflates.")
|
||||
spawn(50)
|
||||
var/obj/item/inflatable/R = new /obj/item/inflatable(loc)
|
||||
var/obj/item/inflatable/R = new undeploy_path(src.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
@@ -108,7 +123,7 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(isobserver(usr)) //to stop ghosts from deflating
|
||||
if(isobserver(usr) || usr.restrained() || !usr.Adjacent(src))
|
||||
return
|
||||
|
||||
verbs -= /obj/structure/inflatable/verb/hand_deflate
|
||||
@@ -124,28 +139,14 @@
|
||||
user.visible_message("<span class='danger'>[user] [attack_verb] at [src]!</span>")
|
||||
return 1
|
||||
|
||||
/obj/item/inflatable/door/
|
||||
name = "inflatable door"
|
||||
desc = "A folded membrane which rapidly expands into a simple door on activation."
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_door"
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
user << "\blue You inflate [src]."
|
||||
var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/inflatable/door //Based on mineral door code
|
||||
name = "inflatable door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "door_closed"
|
||||
undeploy_path = /obj/item/inflatable/door
|
||||
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
@@ -171,7 +172,6 @@
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
@@ -236,7 +236,7 @@
|
||||
icon_state = "folded_wall_torn"
|
||||
|
||||
attack_self(mob/user)
|
||||
user << "\blue The inflatable wall is too torn to be inflated!"
|
||||
user << "<span class='notice'>The inflatable wall is too torn to be inflated!</span>"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/inflatable/door/torn
|
||||
@@ -246,7 +246,7 @@
|
||||
icon_state = "folded_door_torn"
|
||||
|
||||
attack_self(mob/user)
|
||||
user << "\blue The inflatable door is too torn to be inflated!"
|
||||
user << "<span class='notice'>The inflatable door is too torn to be inflated!</span>"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/storage/briefcase/inflatable
|
||||
@@ -254,6 +254,7 @@
|
||||
desc = "Contains inflatable walls and doors."
|
||||
icon_state = "inf_box"
|
||||
item_state = "syringe_kit"
|
||||
w_class = 3
|
||||
max_storage_space = 28
|
||||
can_hold = list(/obj/item/inflatable)
|
||||
|
||||
@@ -262,7 +263,7 @@
|
||||
new /obj/item/inflatable/door(src)
|
||||
new /obj/item/inflatable/door(src)
|
||||
new /obj/item/inflatable/door(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable/wall(src)
|
||||
new /obj/item/inflatable/wall(src)
|
||||
new /obj/item/inflatable/wall(src)
|
||||
new /obj/item/inflatable/wall(src)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
else if(istype(I, /obj/item/weapon/mop))
|
||||
if(I.reagents.total_volume < I.reagents.maximum_volume) //if it's not completely soaked we assume they want to wet it, otherwise store it
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
user << "<span class='warning'>[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to_obj(I, 5) //
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
@@ -107,7 +107,7 @@
|
||||
if(!isliving(usr))
|
||||
return
|
||||
var/mob/living/user = usr
|
||||
|
||||
|
||||
if(href_list["take"])
|
||||
switch(href_list["take"])
|
||||
if("garbage")
|
||||
@@ -175,7 +175,6 @@
|
||||
|
||||
/obj/structure/bed/chair/janicart/New()
|
||||
create_reagents(100)
|
||||
update_layer()
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/examine(mob/user)
|
||||
@@ -235,13 +234,6 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/update_layer()
|
||||
if(dir == SOUTH)
|
||||
layer = FLY_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/unbuckle_mob()
|
||||
var/mob/living/M = ..()
|
||||
if(M)
|
||||
@@ -252,7 +244,6 @@
|
||||
|
||||
/obj/structure/bed/chair/janicart/set_dir()
|
||||
..()
|
||||
update_layer()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.loc != loc)
|
||||
buckled_mob.buckled = null //Temporary, so Move() succeeds.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(!H.species.is_small)
|
||||
if(!issmall(H))
|
||||
return 0
|
||||
meat_type = H.species.meat_type
|
||||
icon_state = "spikebloody"
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
/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/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/attack_hand(mob/user as mob)
|
||||
if(up && down)
|
||||
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
|
||||
if("Up")
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
if("Down")
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
else if(up)
|
||||
user.visible_message("<span class='notice'>[user] climbs up \the [src]!</span>", \
|
||||
"<span class='notice'>You climb up \the [src]!</span>")
|
||||
user.loc = get_turf(up)
|
||||
up.add_fingerprint(user)
|
||||
|
||||
else if(down)
|
||||
user.visible_message("<span class='notice'>[user] climbs down \the [src]!</span>", \
|
||||
"<span class='notice'>You climb down \the [src]!</span>")
|
||||
user.loc = get_turf(down)
|
||||
down.add_fingerprint(user)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
@@ -1,101 +0,0 @@
|
||||
/obj/structure/lamarr
|
||||
name = "lab cage"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "labcage1"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
density = 1
|
||||
anchored = 1
|
||||
unacidable = 1//Dissolving the case would also delete Lamarr
|
||||
var/health = 30
|
||||
var/occupied = 1
|
||||
var/destroyed = 0
|
||||
|
||||
/obj/structure/lamarr/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
src.health -= 15
|
||||
src.healthcheck()
|
||||
if (3)
|
||||
if (prob(50))
|
||||
src.health -= 5
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/structure/lamarr/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/proc/healthcheck()
|
||||
if (src.health <= 0)
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
Break()
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "labcageb[src.occupied]"
|
||||
else
|
||||
src.icon_state = "labcage[src.occupied]"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/attack_hand(mob/user as mob)
|
||||
if (src.destroyed)
|
||||
return
|
||||
else
|
||||
usr << text("\blue You kick the lab cage.")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the lab cage.", usr)
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/proc/Break()
|
||||
if(occupied)
|
||||
new /obj/item/clothing/mask/facehugger/lamarr(src.loc)
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/lamarr
|
||||
name = "Lamarr"
|
||||
desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite?
|
||||
sterile = 1
|
||||
gender = FEMALE
|
||||
|
||||
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
|
||||
return
|
||||
@@ -5,13 +5,14 @@
|
||||
icon_state = "latticefull"
|
||||
density = 0
|
||||
anchored = 1.0
|
||||
w_class = 3
|
||||
layer = 2.3 //under pipes
|
||||
// flags = CONDUCT
|
||||
|
||||
/obj/structure/lattice/New()
|
||||
/obj/structure/lattice/initialize()
|
||||
..()
|
||||
///// Z-Level Stuff
|
||||
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/floor/open)))
|
||||
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/open)))
|
||||
///// Z-Level Stuff
|
||||
qdel(src)
|
||||
for(var/obj/structure/lattice/LAT in src.loc)
|
||||
@@ -34,10 +35,6 @@
|
||||
L.updateOverlays(src.loc)
|
||||
..()
|
||||
|
||||
/obj/structure/lattice/blob_act()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/lattice/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -53,14 +50,14 @@
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
|
||||
|
||||
if (istype(C, /obj/item/stack/tile/steel))
|
||||
if (istype(C, /obj/item/stack/tile/floor))
|
||||
var/turf/T = get_turf(src)
|
||||
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
|
||||
return
|
||||
if (istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "\blue Slicing lattice joints ..."
|
||||
user << "<span class='notice'>Slicing lattice joints ...</span>"
|
||||
PoolOrNew(/obj/item/stack/rods, src.loc)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
if(shattered) return
|
||||
|
||||
if(ishuman(user))
|
||||
var/obj/nano_module/appearance_changer/AC = ui_users[user]
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "SalonPro Nano-Mirror(TM)"
|
||||
AC.name = "SalonPro Nano-Mirror™"
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
@@ -30,10 +30,8 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
if(prob(Proj.damage * 2))
|
||||
if(prob(Proj.get_structure_damage() * 2))
|
||||
if(!shattered)
|
||||
shatter()
|
||||
else
|
||||
@@ -60,12 +58,19 @@
|
||||
return 0
|
||||
|
||||
if(damage)
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!")
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
shatter()
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
|
||||
return 1
|
||||
|
||||
/obj/structure/mirror/Destroy()
|
||||
for(var/user in ui_users)
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
qdel(AC)
|
||||
ui_users.Cut()
|
||||
..()
|
||||
|
||||
// The following mirror is ~special~.
|
||||
/obj/structure/mirror/raider
|
||||
name = "cracked mirror"
|
||||
@@ -93,3 +98,27 @@
|
||||
raiders.update_access(vox)
|
||||
qdel(user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mirror
|
||||
name = "mirror"
|
||||
desc = "A SalonPro Nano-Mirror(TM) brand mirror! Now a portable version."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "mirror"
|
||||
var/list/ui_users = list()
|
||||
|
||||
/obj/item/weapon/mirror/attack_self(mob/user as mob)
|
||||
if(ishuman(user))
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "SalonPro Nano-Mirror™"
|
||||
AC.flags = APPEARANCE_HAIR
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
/obj/item/weapon/mirror/Destroy()
|
||||
for(var/user in ui_users)
|
||||
var/datum/nano_module/appearance_changer/AC = ui_users[user]
|
||||
qdel(AC)
|
||||
ui_users.Cut()
|
||||
..()
|
||||
@@ -4,14 +4,14 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
pressure_resistance = 5
|
||||
w_class = 3
|
||||
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/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
@@ -20,8 +20,8 @@
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
user << "<span class='warning'>\The [src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to_obj(I, 5)
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
user << "<span class='notice'>You wet \the [I] in \the [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
@@ -60,9 +60,6 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/morgue/alter_health()
|
||||
return src.loc
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
@@ -170,7 +167,7 @@
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
B << text("\red [] stuffs [] into []!", user, O, src)
|
||||
B << "<span class='warning'>\The [user] stuffs [O] into [src]!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -189,11 +186,21 @@
|
||||
var/cremating = 0
|
||||
var/id = 1
|
||||
var/locked = 0
|
||||
var/_wifi_id
|
||||
var/datum/wifi/receiver/button/crematorium/wifi_receiver
|
||||
|
||||
/obj/structure/crematorium/initialize()
|
||||
..()
|
||||
if(_wifi_id)
|
||||
wifi_receiver = new(_wifi_id, src)
|
||||
|
||||
/obj/structure/crematorium/Destroy()
|
||||
if(connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
if(wifi_receiver)
|
||||
qdel(wifi_receiver)
|
||||
wifi_receiver = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/crematorium/proc/update()
|
||||
@@ -230,18 +237,15 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/alter_health()
|
||||
return src.loc
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
|
||||
// user.show_message("\red Uh-oh, that was a bad idea.", 1)
|
||||
// user.show_message("<span class='warning'>Uh-oh, that was a bad idea.</span>", 1)
|
||||
// //usr << "Uh-oh, that was a bad idea."
|
||||
// src:loc:poison += 20000000
|
||||
// src:loc:firelevel = src:loc:poison
|
||||
// return
|
||||
if (cremating)
|
||||
usr << "\red It's locked."
|
||||
usr << "<span class='warning'>It's locked.</span>"
|
||||
return
|
||||
if ((src.connected) && (src.locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
@@ -310,7 +314,7 @@
|
||||
|
||||
if(contents.len <= 0)
|
||||
for (var/mob/M in viewers(src))
|
||||
M.show_message("\red You hear a hollow crackle.", 1)
|
||||
M.show_message("<span class='warning'>You hear a hollow crackle.</span>", 1)
|
||||
return
|
||||
|
||||
else
|
||||
@@ -319,7 +323,7 @@
|
||||
return
|
||||
|
||||
for (var/mob/M in viewers(src))
|
||||
M.show_message("\red You hear a roar as the crematorium activates.", 1)
|
||||
M.show_message("<span class='warning'>You hear a roar as the crematorium activates.</span>", 1)
|
||||
|
||||
cremating = 1
|
||||
locked = 1
|
||||
@@ -397,7 +401,7 @@
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
B << text("\red [] stuffs [] into []!", user, O, src)
|
||||
B << text("<span class='warning'>[] stuffs [] into []!</span>", user, O, src)
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
@@ -409,6 +413,9 @@
|
||||
req_access = list(access_crematorium)
|
||||
id = 1
|
||||
|
||||
/obj/machinery/button/crematorium/update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
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>
|
||||
After a note has an accidental placed, it will be remembered: <i>C,C4,C,C3</i> is <i>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>
|
||||
@@ -415,20 +415,20 @@
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to loosen \the [src]'s casters..."
|
||||
user << "<span class='notice'>You begin to loosen \the [src]'s casters...</span>"
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"\blue You have loosened \the [src]. Now it can be pulled somewhere else.", \
|
||||
"<span class='notice'>You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 0
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to tighten \the [src] to the floor..."
|
||||
user << "<span class='notice'>You begin to tighten \the [src] to the floor...</span>"
|
||||
if (do_after(user, 20))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"\blue You have tightened \the [src]'s casters. Now it can be played again.", \
|
||||
"<span class='notice'>You have tightened \the [src]'s casters. Now it can be played again</span>.", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 1
|
||||
else
|
||||
|
||||
@@ -160,18 +160,9 @@ FLOOR SAFES
|
||||
return
|
||||
|
||||
|
||||
obj/structure/safe/blob_act()
|
||||
return
|
||||
|
||||
|
||||
obj/structure/safe/ex_act(severity)
|
||||
return
|
||||
|
||||
|
||||
obj/structure/safe/meteorhit(obj/O as obj)
|
||||
return
|
||||
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
@@ -180,12 +171,15 @@ obj/structure/safe/meteorhit(obj/O as obj)
|
||||
level = 1 //underfloor
|
||||
layer = 2.5
|
||||
|
||||
|
||||
/obj/structure/safe/floor/initialize()
|
||||
..()
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
if(istype(T) && !T.is_plating())
|
||||
hide(1)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/safe/floor/hide(var/intact)
|
||||
invisibility = intact ? 101 : 0
|
||||
|
||||
/obj/structure/safe/floor/hides_under_flooring()
|
||||
return 1
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
opacity = 0
|
||||
density = 0
|
||||
layer = 3.5
|
||||
w_class = 3
|
||||
|
||||
/obj/structure/sign/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -19,10 +20,6 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/sign/blob_act()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
user << "You unfasten the sign with your [tool]."
|
||||
@@ -175,6 +172,11 @@
|
||||
desc = "A warning sign which reads 'HYDROPONICS'."
|
||||
icon_state = "hydro1"
|
||||
|
||||
/obj/structure/sign/directions
|
||||
name = "direction sign"
|
||||
desc = "A direction sign, claiming to know the way."
|
||||
icon_state = "direction"
|
||||
|
||||
/obj/structure/sign/directions/science
|
||||
name = "\improper Science department"
|
||||
desc = "A direction sign, pointing out which way the Science department is."
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
desc = "This is used to lie in, sleep in or strap on."
|
||||
icon = 'icons/obj/furniture.dmi'
|
||||
icon_state = "bed"
|
||||
pressure_resistance = 15
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_dir = SOUTH
|
||||
@@ -57,6 +56,7 @@
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
overlays |= stool_cache[padding_cache_key]
|
||||
|
||||
// Strings.
|
||||
desc = initial(desc)
|
||||
if(padding_material)
|
||||
@@ -86,11 +86,6 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/bed/blob_act()
|
||||
if(prob(75))
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
@@ -224,7 +219,7 @@
|
||||
if(istype(W,/obj/item/roller_holder))
|
||||
var/obj/item/roller_holder/RH = W
|
||||
if(!RH.held)
|
||||
user << "\blue You collect the roller bed."
|
||||
user << "<span class='notice'>You collect the roller bed.</span>"
|
||||
src.loc = RH
|
||||
RH.held = src
|
||||
return
|
||||
@@ -245,10 +240,10 @@
|
||||
/obj/item/roller_holder/attack_self(mob/user as mob)
|
||||
|
||||
if(!held)
|
||||
user << "\blue The rack is empty."
|
||||
user << "<span class='notice'>The rack is empty.</span>"
|
||||
return
|
||||
|
||||
user << "\blue You deploy the roller bed."
|
||||
user << "<span class='notice'>You deploy the roller bed.</span>"
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(held)
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
/obj/structure/bed/chair/New()
|
||||
..() //Todo make metal/stone chairs display as thrones
|
||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||
update_layer()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(!padding_material && istype(W, /obj/item/assembly/shock_kit))
|
||||
@@ -42,8 +36,26 @@
|
||||
|
||||
/obj/structure/bed/chair/update_icon()
|
||||
..()
|
||||
|
||||
var/cache_key = "[base_icon]-[material.name]-over"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
var/image/I = image('icons/obj/furniture.dmi', "[base_icon]_over")
|
||||
I.color = material.icon_colour
|
||||
I.layer = FLY_LAYER
|
||||
stool_cache[cache_key] = I
|
||||
overlays |= stool_cache[cache_key]
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]-over"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_padding_over")
|
||||
I.color = padding_material.icon_colour
|
||||
I.layer = FLY_LAYER
|
||||
stool_cache[padding_cache_key] = I
|
||||
overlays |= stool_cache[padding_cache_key]
|
||||
|
||||
if(buckled_mob && padding_material)
|
||||
var/cache_key = "[base_icon]-armrest-[padding_material.name]"
|
||||
cache_key = "[base_icon]-armrest-[padding_material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
I.layer = MOB_LAYER + 0.1
|
||||
@@ -51,15 +63,8 @@
|
||||
stool_cache[cache_key] = I
|
||||
overlays |= stool_cache[cache_key]
|
||||
|
||||
/obj/structure/bed/chair/proc/update_layer()
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
else
|
||||
src.layer = OBJ_LAYER
|
||||
|
||||
/obj/structure/bed/chair/set_dir()
|
||||
..()
|
||||
update_layer()
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
|
||||
@@ -172,6 +177,12 @@
|
||||
/obj/structure/bed/chair/office/dark
|
||||
icon_state = "officechair_dark"
|
||||
|
||||
/obj/structure/bed/chair/office/New()
|
||||
..()
|
||||
var/image/I = image(icon, "[icon_state]_over")
|
||||
I.layer = FLY_LAYER
|
||||
overlays += I
|
||||
|
||||
// Chair types
|
||||
/obj/structure/bed/chair/wood
|
||||
name = "wooden chair"
|
||||
@@ -188,6 +199,9 @@
|
||||
|
||||
/obj/structure/bed/chair/wood/New(var/newloc)
|
||||
..(newloc, "wood")
|
||||
var/image/I = image(icon, "[icon_state]_over")
|
||||
I.layer = FLY_LAYER
|
||||
overlays += I
|
||||
|
||||
/obj/structure/bed/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
|
||||
@@ -72,6 +72,9 @@ var/global/list/stool_cache = list() //haha stool
|
||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!</span>")
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.do_attack_animation(M)
|
||||
|
||||
user.remove_from_mob(src)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
@@ -95,11 +98,6 @@ var/global/list/stool_cache = list() //haha stool
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/stool/blob_act()
|
||||
if(prob(75))
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stool/proc/dismantle()
|
||||
if(material)
|
||||
material.place_sheet(get_turf(src))
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||
..()
|
||||
overlays = null
|
||||
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||
var/image/O = image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||
overlays += O
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
@@ -31,7 +31,7 @@
|
||||
if(user==pulling)
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
user << "\red You lost your grip!"
|
||||
user << "<span class='warning'>You lost your grip!</span>"
|
||||
return
|
||||
if(buckled_mob && pulling && user == buckled_mob)
|
||||
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
|
||||
@@ -49,10 +49,10 @@
|
||||
if(user==pulling)
|
||||
return
|
||||
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
|
||||
user << "\red You cannot go there."
|
||||
user << "<span class='warning'>You cannot go there.</span>"
|
||||
return
|
||||
if(pulling && buckled_mob && (buckled_mob == user))
|
||||
user << "\red You cannot drive while being pushed."
|
||||
user << "<span class='warning'>You cannot drive while being pushed.</span>"
|
||||
return
|
||||
|
||||
// Let's roll
|
||||
@@ -103,7 +103,7 @@
|
||||
unbuckle_mob()
|
||||
if (pulling && (get_dist(src, pulling) > 1))
|
||||
pulling.pulledby = null
|
||||
pulling << "\red You lost your grip!"
|
||||
pulling << "<span class='warning'>You lost your grip!</span>"
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
@@ -116,26 +116,21 @@
|
||||
user_unbuckle_mob(user)
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if(over_object == usr && in_range(src, usr))
|
||||
if(!ishuman(usr)) return
|
||||
if(usr == buckled_mob)
|
||||
usr << "\red You realize you are unable to push the wheelchair you sit in."
|
||||
/obj/structure/bed/chair/wheelchair/CtrlClick(var/mob/user)
|
||||
if(in_range(src, user))
|
||||
if(!ishuman(user)) return
|
||||
if(user == buckled_mob)
|
||||
user << "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>"
|
||||
return
|
||||
if(!pulling)
|
||||
pulling = usr
|
||||
usr.pulledby = src
|
||||
if(usr.pulling)
|
||||
usr.stop_pulling()
|
||||
usr.set_dir(get_dir(usr, src))
|
||||
usr << "You grip \the [name]'s handles."
|
||||
pulling = user
|
||||
user.pulledby = src
|
||||
if(user.pulling)
|
||||
user.stop_pulling()
|
||||
user.set_dir(get_dir(user, src))
|
||||
user << "You grip \the [name]'s handles."
|
||||
else
|
||||
if(usr != pulling)
|
||||
for(var/mob/O in viewers(pulling, null))
|
||||
O.show_message("\red [usr] breaks [pulling]'s grip on the wheelchair.", 1)
|
||||
else
|
||||
usr << "You let go of \the [name]'s handles."
|
||||
usr << "You let go of \the [name]'s handles."
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "dispenser"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
w_class = 5
|
||||
var/oxygentanks = 10
|
||||
var/phorontanks = 10
|
||||
var/list/oxytanks = list() //sorry for the similar var names
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_stake"
|
||||
density = 1
|
||||
w_class = 5
|
||||
flags = CONDUCT
|
||||
var/obj/item/target/pinned_target // the current pinned target
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!ishuman(user) || (H.species && !(H.species.flags & HAS_UNDERWEAR)))
|
||||
if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)))
|
||||
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
|
||||
return 0
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
/obj/machinery/shower
|
||||
name = "shower"
|
||||
desc = "The HS-451. Installed in the 2550s by the Nanotrasen Hygiene Division."
|
||||
desc = "The HS-451. Installed in the 2550s by the Hygiene Division."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "shower"
|
||||
density = 0
|
||||
@@ -346,8 +346,14 @@
|
||||
var/busy = 0 //Something's being washed at the moment
|
||||
|
||||
/obj/structure/sink/attack_hand(mob/user as mob)
|
||||
if (!user.can_use_hand())
|
||||
return
|
||||
if (ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (user.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
||||
return
|
||||
|
||||
if(isrobot(user) || isAI(user))
|
||||
return
|
||||
@@ -356,10 +362,10 @@
|
||||
return
|
||||
|
||||
if(busy)
|
||||
user << "\red Someone's already washing here."
|
||||
user << "<span class='warning'>Someone's already washing here.</span>"
|
||||
return
|
||||
|
||||
usr << "\blue You start washing your hands."
|
||||
usr << "<span class='notice'>You start washing your hands.</span>"
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
@@ -371,12 +377,12 @@
|
||||
if(ishuman(user))
|
||||
user:update_inv_gloves()
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message("\blue [user] washes their hands using \the [src].")
|
||||
V.show_message("<span class='notice'>[user] washes their hands using \the [src].</span>")
|
||||
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(busy)
|
||||
user << "\red Someone's already washing here."
|
||||
user << "<span class='warning'>Someone's already washing here.</span>"
|
||||
return
|
||||
|
||||
// Filling/emptying open reagent containers
|
||||
@@ -450,10 +456,15 @@
|
||||
user.visible_message( \
|
||||
"<span class='danger'>[user] was stunned by \his wet [O]!</span>", \
|
||||
"<span class='userdanger'>[user] was stunned by \his wet [O]!</span>")
|
||||
return
|
||||
return 1
|
||||
// Short of a rewrite, this is necessary to stop monkeycubes being washed.
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/mop))
|
||||
O.reagents.add_reagent("water", 5)
|
||||
user << "<span class='notice'>You wet \the [O] in \the [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!isturf(location)) return
|
||||
@@ -461,7 +472,7 @@
|
||||
var/obj/item/I = O
|
||||
if(!I || !istype(I,/obj/item)) return
|
||||
|
||||
usr << "\blue You start washing \the [I]."
|
||||
usr << "<span class='notice'>You start washing \the [I].</span>"
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
@@ -473,8 +484,8 @@
|
||||
|
||||
O.clean_blood()
|
||||
user.visible_message( \
|
||||
"\blue [user] washes \a [I] using \the [src].", \
|
||||
"\blue You wash \a [I] using \the [src].")
|
||||
"<span class='notice'>[user] washes \a [I] using \the [src].</span>", \
|
||||
"<span class='notice'>You wash \a [I] using \the [src].</span>")
|
||||
|
||||
|
||||
/obj/structure/sink/kitchen
|
||||
|
||||
@@ -16,6 +16,7 @@ obj/structure/windoor_assembly
|
||||
anchored = 0
|
||||
density = 0
|
||||
dir = NORTH
|
||||
w_class = 3
|
||||
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
|
||||
@@ -75,13 +76,13 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the windoor assembly!"
|
||||
user << "<span class='notice'>You dissasembled the windoor assembly!</span>"
|
||||
new /obj/item/stack/material/glass/reinforced(get_turf(src), 5)
|
||||
if(secure)
|
||||
PoolOrNew(/obj/item/stack/rods, list(get_turf(src), 4))
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You need more welding fuel to dissassemble the windoor assembly."
|
||||
user << "<span class='notice'>You need more welding fuel to dissassemble the windoor assembly.</span>"
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
@@ -91,7 +92,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've secured the windoor assembly!"
|
||||
user << "<span class='notice'>You've secured the windoor assembly!</span>"
|
||||
src.anchored = 1
|
||||
if(src.secure)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
@@ -105,7 +106,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've unsecured the windoor assembly!"
|
||||
user << "<span class='notice'>You've unsecured the windoor assembly!</span>"
|
||||
src.anchored = 0
|
||||
if(src.secure)
|
||||
src.name = "Secure Windoor Assembly"
|
||||
@@ -155,7 +156,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
|
||||
user << "\blue You cut the windoor wires.!"
|
||||
user << "<span class='notice'>You cut the windoor wires.!</span>"
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = "01"
|
||||
if(src.secure)
|
||||
@@ -173,7 +174,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "\blue You've installed the airlock electronics!"
|
||||
user << "<span class='notice'>You've installed the airlock electronics!</span>"
|
||||
src.name = "Near finished Windoor Assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
@@ -186,7 +187,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !src.electronics) return
|
||||
user << "\blue You've removed the airlock electronics!"
|
||||
user << "<span class='notice'>You've removed the airlock electronics!</span>"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
else
|
||||
@@ -198,7 +199,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(!src.electronics)
|
||||
usr << "\red The assembly is missing electronics."
|
||||
usr << "<span class='warning'>The assembly is missing electronics.</span>"
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
@@ -209,7 +210,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if(!src) return
|
||||
|
||||
density = 1 //Shouldn't matter but just incase
|
||||
user << "\blue You finish the windoor!"
|
||||
user << "<span class='notice'>You finish the windoor!</span>"
|
||||
|
||||
if(secure)
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc)
|
||||
|
||||
@@ -3,11 +3,14 @@
|
||||
desc = "A window."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
density = 1
|
||||
w_class = 3
|
||||
|
||||
layer = 3.2//Just above doors
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
anchored = 1.0
|
||||
flags = ON_BORDER
|
||||
var/maxhealth = 14.0
|
||||
var/maximal_heat = T0C + 100 // Maximal heat before this window begins taking damage from fire
|
||||
var/damage_per_fire_tick = 2.0 // Amount of damage per fire tick. Regular windows are not fireproof so they might as well break quickly.
|
||||
var/health
|
||||
var/ini_dir = null
|
||||
var/state = 2
|
||||
@@ -99,12 +102,11 @@
|
||||
|
||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
//Tasers and the like should not damage windows.
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
var/proj_damage = Proj.get_structure_damage()
|
||||
if(!proj_damage) return
|
||||
|
||||
..()
|
||||
take_damage(Proj.damage)
|
||||
take_damage(proj_damage)
|
||||
return
|
||||
|
||||
|
||||
@@ -121,14 +123,6 @@
|
||||
shatter(0)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/blob_act()
|
||||
shatter()
|
||||
|
||||
|
||||
/obj/structure/window/meteorhit()
|
||||
shatter()
|
||||
|
||||
//TODO: Make full windows a separate type of window.
|
||||
//Once a full window, it will always be a full window, so there's no point
|
||||
//having the same type for both.
|
||||
@@ -175,6 +169,7 @@
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user as mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
@@ -191,8 +186,8 @@
|
||||
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
user.do_attack_animation(src)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!",
|
||||
"\red You bang against the [src.name]!",
|
||||
usr.visible_message("<span class='danger'>\The [usr] bangs against \the [src]!</span>",
|
||||
"<span class='danger'>You bang against \the [src]!</span>",
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
@@ -202,6 +197,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/window/attack_generic(var/mob/user, var/damage)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(!damage)
|
||||
return
|
||||
if(damage >= 10)
|
||||
@@ -243,6 +239,7 @@
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
update_nearby_icons()
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
|
||||
else if(reinf && state == 0)
|
||||
@@ -271,6 +268,7 @@
|
||||
new glasstype(loc)
|
||||
qdel(src)
|
||||
else
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
user.do_attack_animation(src)
|
||||
hit(W.force)
|
||||
@@ -294,10 +292,9 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
// TODO : Change to incapacitated() on merge.
|
||||
if(usr.stat || usr.lying || usr.resting || usr.buckled)
|
||||
if(usr.incapacitated())
|
||||
return 0
|
||||
|
||||
|
||||
if(anchored)
|
||||
usr << "It is fastened to the floor therefore you can't rotate it!"
|
||||
return 0
|
||||
@@ -314,8 +311,7 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
// TODO : Change to incapacitated() on merge.
|
||||
if(usr.stat || usr.lying || usr.resting || usr.buckled)
|
||||
if(usr.incapacitated())
|
||||
return 0
|
||||
|
||||
if(anchored)
|
||||
@@ -349,7 +345,11 @@
|
||||
/obj/structure/window/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
update_nearby_icons()
|
||||
var/turf/location = loc
|
||||
loc = null
|
||||
for(var/obj/structure/window/W in orange(location, 1))
|
||||
W.update_icon()
|
||||
loc = location
|
||||
..()
|
||||
|
||||
|
||||
@@ -369,39 +369,35 @@
|
||||
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
|
||||
/obj/structure/window/proc/update_nearby_icons()
|
||||
update_icon()
|
||||
for(var/direction in cardinal)
|
||||
for(var/obj/structure/window/W in get_step(src,direction) )
|
||||
W.update_icon()
|
||||
for(var/obj/structure/window/W in orange(src, 1))
|
||||
W.update_icon()
|
||||
|
||||
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
|
||||
/obj/structure/window/update_icon()
|
||||
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
|
||||
//this way it will only update full-tile ones
|
||||
//This spawn is here so windows get properly updated when one gets deleted.
|
||||
spawn(2)
|
||||
if(!src) return
|
||||
if(!is_fulltile())
|
||||
icon_state = "[basestate]"
|
||||
return
|
||||
var/junction = 0 //will be used to determine from which side the window is connected to other windows
|
||||
if(anchored)
|
||||
for(var/obj/structure/window/W in orange(src,1))
|
||||
if(W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
|
||||
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
|
||||
junction |= get_dir(src,W)
|
||||
if(opacity)
|
||||
icon_state = "[basestate][junction]"
|
||||
else
|
||||
if(reinf)
|
||||
icon_state = "[basestate][junction]"
|
||||
else
|
||||
icon_state = "[basestate][junction]"
|
||||
|
||||
overlays.Cut()
|
||||
if(!is_fulltile())
|
||||
icon_state = "[basestate]"
|
||||
return
|
||||
var/list/dirs = list()
|
||||
if(anchored)
|
||||
for(var/obj/structure/window/W in orange(src,1))
|
||||
if(W.anchored && W.density && W.type == src.type && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
|
||||
dirs += get_dir(src, W)
|
||||
|
||||
var/list/connections = dirs_to_corner_states(dirs)
|
||||
|
||||
icon_state = ""
|
||||
for(var/i = 1 to 4)
|
||||
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
|
||||
overlays += I
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 800)
|
||||
hit(round(exposed_volume / 100), 0)
|
||||
if(exposed_temperature > maximal_heat)
|
||||
hit(damage_per_fire_tick, 0)
|
||||
..()
|
||||
|
||||
|
||||
@@ -411,44 +407,46 @@
|
||||
icon_state = "window"
|
||||
basestate = "window"
|
||||
glasstype = /obj/item/stack/material/glass
|
||||
|
||||
maximal_heat = T0C + 100
|
||||
damage_per_fire_tick = 2.0
|
||||
maxhealth = 12.0
|
||||
|
||||
/obj/structure/window/phoronbasic
|
||||
name = "phoron window"
|
||||
desc = "A phoron-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
|
||||
desc = "A borosilicate alloy window. It seems to be quite strong."
|
||||
basestate = "phoronwindow"
|
||||
icon_state = "phoronwindow"
|
||||
shardtype = /obj/item/weapon/material/shard/phoron
|
||||
glasstype = /obj/item/stack/material/glass/phoronglass
|
||||
maxhealth = 120
|
||||
|
||||
/obj/structure/window/phoronbasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 32000)
|
||||
hit(round(exposed_volume / 1000), 0)
|
||||
..()
|
||||
maximal_heat = T0C + 2000
|
||||
damage_per_fire_tick = 1.0
|
||||
maxhealth = 40.0
|
||||
|
||||
/obj/structure/window/phoronreinforced
|
||||
name = "reinforced phoron window"
|
||||
desc = "A phoron-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic phoron windows are insanely fireproof."
|
||||
name = "reinforced borosilicate window"
|
||||
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
|
||||
basestate = "phoronrwindow"
|
||||
icon_state = "phoronrwindow"
|
||||
shardtype = /obj/item/weapon/material/shard/phoron
|
||||
glasstype = /obj/item/stack/material/glass/phoronrglass
|
||||
reinf = 1
|
||||
maxhealth = 160
|
||||
maximal_heat = T0C + 4000
|
||||
damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
|
||||
maxhealth = 80.0
|
||||
|
||||
/obj/structure/window/phoronreinforced/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
name = "reinforced window"
|
||||
desc = "It looks rather strong. Might take a few good hits to shatter it."
|
||||
icon_state = "rwindow"
|
||||
basestate = "rwindow"
|
||||
maxhealth = 40
|
||||
maxhealth = 40.0
|
||||
reinf = 1
|
||||
maximal_heat = T0C + 750
|
||||
damage_per_fire_tick = 2.0
|
||||
glasstype = /obj/item/stack/material/glass/reinforced
|
||||
|
||||
|
||||
/obj/structure/window/New(Loc, constructed=0)
|
||||
..()
|
||||
|
||||
@@ -456,6 +454,10 @@
|
||||
if (constructed)
|
||||
state = 0
|
||||
|
||||
/obj/structure/window/reinforced/full
|
||||
dir = 5
|
||||
icon_state = "fwindow"
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
name = "tinted window"
|
||||
desc = "It looks rather strong and opaque. Might take a few good hits to shatter it."
|
||||
@@ -478,11 +480,9 @@
|
||||
basestate = "window"
|
||||
maxhealth = 40
|
||||
reinf = 1
|
||||
basestate = "w"
|
||||
dir = 5
|
||||
|
||||
update_icon() //icon_state has to be set manually
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/polarized
|
||||
name = "electrochromic window"
|
||||
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
|
||||
@@ -496,7 +496,23 @@
|
||||
animate(src, color="#222222", time=5)
|
||||
set_opacity(1)
|
||||
|
||||
/obj/structure/window/reinforced/crescent/attack_hand()
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/crescent/attackby()
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/crescent/ex_act()
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/crescent/hitby()
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/crescent/take_damage()
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/crescent/shatter()
|
||||
return
|
||||
|
||||
/obj/machinery/button/windowtint
|
||||
name = "window tint control"
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
// Ported from Haine and WrongEnd with much gratitude!
|
||||
/* ._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._. */
|
||||
/*-=-=-=-=-=-=-=-=-=-=-=-=-=WHAT-EVER=-=-=-=-=-=-=-=-=-=-=-=-=-*/
|
||||
/* '~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~' */
|
||||
|
||||
/obj/effect/wingrille_spawn
|
||||
name = "window grille spawner"
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "wingrille"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/win_path = /obj/structure/window/basic
|
||||
var/activated
|
||||
|
||||
// stops ZAS expanding zones past us, the windows will block the zone anyway
|
||||
/obj/effect/wingrille_spawn/CanPass()
|
||||
return 0
|
||||
|
||||
/obj/effect/wingrille_spawn/attack_hand()
|
||||
attack_generic()
|
||||
|
||||
/obj/effect/wingrille_spawn/attack_ghost()
|
||||
attack_generic()
|
||||
|
||||
/obj/effect/wingrille_spawn/attack_generic()
|
||||
activate()
|
||||
|
||||
/obj/effect/wingrille_spawn/initialize()
|
||||
..()
|
||||
if(!win_path)
|
||||
return
|
||||
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
|
||||
activate()
|
||||
|
||||
/obj/effect/wingrille_spawn/proc/activate()
|
||||
if(activated) return
|
||||
if (!locate(/obj/structure/grille) in get_turf(src))
|
||||
var/obj/structure/grille/G = PoolOrNew(/obj/structure/grille, src.loc)
|
||||
handle_grille_spawn(G)
|
||||
var/list/neighbours = list()
|
||||
for (var/dir in cardinal)
|
||||
var/turf/T = get_step(src, dir)
|
||||
var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T
|
||||
if(!other)
|
||||
var/found_connection
|
||||
if(locate(/obj/structure/grille) in T)
|
||||
for(var/obj/structure/window/W in T)
|
||||
if(W.type == win_path && W.dir == get_dir(T,src))
|
||||
found_connection = 1
|
||||
qdel(W)
|
||||
if(!found_connection)
|
||||
var/obj/structure/window/new_win = PoolOrNew(win_path, src.loc)
|
||||
new_win.set_dir(dir)
|
||||
handle_window_spawn(new_win)
|
||||
else
|
||||
neighbours |= other
|
||||
activated = 1
|
||||
for(var/obj/effect/wingrille_spawn/other in neighbours)
|
||||
if(!other.activated) other.activate()
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
|
||||
return
|
||||
|
||||
// Currently unused, could be useful for pre-wired electrified windows.
|
||||
/obj/effect/wingrille_spawn/proc/handle_grille_spawn(var/obj/structure/grille/G)
|
||||
return
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced
|
||||
name = "reinforced window grille spawner"
|
||||
icon_state = "r-wingrille"
|
||||
win_path = /obj/structure/window/reinforced
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced/crescent
|
||||
name = "Crescent window grille spawner"
|
||||
win_path = /obj/structure/window/reinforced/crescent
|
||||
|
||||
/obj/effect/wingrille_spawn/phoron
|
||||
name = "phoron window grille spawner"
|
||||
icon_state = "p-wingrille"
|
||||
win_path = /obj/structure/window/phoronbasic
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced_phoron
|
||||
name = "reinforced phoron window grille spawner"
|
||||
icon_state = "pr-wingrille"
|
||||
win_path = /obj/structure/window/phoronreinforced
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced/polarized
|
||||
name = "polarized window grille spawner"
|
||||
color = "#444444"
|
||||
win_path = /obj/structure/window/reinforced/polarized
|
||||
var/id
|
||||
|
||||
/obj/effect/wingrille_spawn/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/P)
|
||||
if(id)
|
||||
P.id = id
|
||||
Reference in New Issue
Block a user