mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
Merge branch 'Aurorastation/development' into Map-Development
# Conflicts: # code/TriDimension/controller_presets.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/crates_lockers/closets/wardrobe.dm # code/game/objects/structures/signs.dm # code/game/turfs/simulated/floor_types.dm # code/modules/random_map/mining_distribution.dm # code/modules/random_map/random_map.dm # code/world.dm # icons/obj/barsigns.dmi # icons/obj/decals.dmi # icons/obj/plants.dmi # icons/obj/structures.dmi # icons/turf/floors.dmi # icons/turf/wall_masks.dmi # maps/exodus-2.dmm
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,8 @@
|
||||
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 = 40 //Tying this to mob sizes was dumb
|
||||
//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'
|
||||
@@ -23,6 +25,7 @@
|
||||
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,10 +56,12 @@
|
||||
else
|
||||
user << "It is full."
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
/obj/structure/closet/proc/stored_weight()
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(!I.anchored)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
return content_size
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0 || wall_mounted)) return 1
|
||||
@@ -150,14 +155,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)
|
||||
@@ -165,26 +169,23 @@
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
return
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
// this should probably use dump_contents()
|
||||
/obj/structure/closet/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity + 1)
|
||||
qdel(src)
|
||||
health -= rand(120, 240)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity + 1)
|
||||
qdel(src)
|
||||
health -= rand(60, 120)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.loc)
|
||||
qdel(src)
|
||||
health -= rand(30, 60)
|
||||
|
||||
if (health <= 0)
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.loc)
|
||||
A.ex_act(severity + 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/proc/damage(var/damage)
|
||||
health -= damage
|
||||
@@ -194,28 +195,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))
|
||||
@@ -227,19 +215,25 @@
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0,user))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
else
|
||||
if(WT.isOn())
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
for(var/mob/M in viewers(src))
|
||||
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)
|
||||
else
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
for(var/mob/M in viewers(src))
|
||||
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.
|
||||
if(!dropsafety(W))
|
||||
return
|
||||
usr.drop_item()
|
||||
if(W)
|
||||
@@ -296,7 +290,7 @@
|
||||
|
||||
/obj/structure/closet/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
src.toggle(user)
|
||||
return src.toggle(user)
|
||||
|
||||
// tk grab then use on self
|
||||
/obj/structure/closet/attack_self_tk(mob/user as mob)
|
||||
|
||||
@@ -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
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/rank/bartender(src)
|
||||
new /obj/item/clothing/under/dress/dress_saloon(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/suit/wcoat(src)
|
||||
new /obj/item/clothing/accessory/wcoat(src)
|
||||
new /obj/item/clothing/accessory/wcoat(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
new /obj/item/clothing/under/waiter(src)
|
||||
new /obj/item/device/radio/headset/headset_service(src)
|
||||
new /obj/item/device/radio/headset/headset_service(src)
|
||||
new /obj/item/weapon/storage/box/mousetraps(src)
|
||||
new /obj/item/clothing/suit/storage/toggle/hoodie(src)
|
||||
new /obj/item/weapon/storage/box/gloves(src)
|
||||
new /obj/item/weapon/storage/box/mousetraps(src)
|
||||
new /obj/item/clothing/under/rank/chef(src)
|
||||
new /obj/item/clothing/head/chefhat(src)
|
||||
@@ -68,7 +69,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)
|
||||
|
||||
@@ -7,20 +7,21 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
|
||||
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()
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/chemical
|
||||
name = "chemical closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
name = "chemistry equipment closet"
|
||||
desc = "Contains equipment useful to chemists."
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
@@ -181,6 +181,8 @@
|
||||
..()
|
||||
new /obj/item/weapon/storage/box/pillbottles(src)
|
||||
new /obj/item/weapon/storage/box/pillbottles(src)
|
||||
new /obj/item/weapon/storage/box/spraybottles(src)
|
||||
new /obj/item/weapon/storage/box/spraybottles(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/medical_wall
|
||||
|
||||
@@ -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)
|
||||
@@ -78,27 +78,31 @@
|
||||
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))//Attempt to cut open locker if locked
|
||||
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 if(!src.opened)
|
||||
togglelock(user)//Attempt to lock locker if closed
|
||||
|
||||
/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
|
||||
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)
|
||||
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)
|
||||
|
||||
@@ -16,19 +16,19 @@
|
||||
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/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)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/clothing/suit/armor/captain(src)
|
||||
new /obj/item/weapon/gun/energy/pistol(src)
|
||||
new /obj/item/device/flash(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
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
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/energy/pistol(src)
|
||||
new /obj/item/weapon/gun/projectile/sec/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
return
|
||||
@@ -107,8 +107,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/device/radio/headset/heads/hop(src)
|
||||
new /obj/item/clothing/head/caphat/hop(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -138,15 +137,18 @@
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/shield/riot(src)
|
||||
new /obj/item/weapon/shield/riot/tact(src)
|
||||
new /obj/item/weapon/storage/box/flashbangs(src)
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/energy/pistol(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/accessory/badge/hos(src)
|
||||
new /obj/item/ammo_magazine/tranq(src)
|
||||
new /obj/item/device/holowarrant(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/hos2
|
||||
@@ -197,18 +199,23 @@
|
||||
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/suit/armor/vest/warden/commissar(src)
|
||||
new /obj/item/clothing/head/helmet/warden(src)
|
||||
new /obj/item/clothing/head/helmet/warden/commissar(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/gun/energy/pistol(src)
|
||||
new /obj/item/weapon/storage/box/holobadge(src)
|
||||
new /obj/item/clothing/head/beret/sec/warden(src)
|
||||
new /obj/item/clothing/accessory/badge/warden(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -231,7 +238,6 @@
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/storage/vest/officer(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)
|
||||
@@ -244,8 +250,9 @@
|
||||
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)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/device/holowarrant(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -291,19 +298,20 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/under/det(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/technicolor(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/head/det(src)
|
||||
new /obj/item/clothing/head/det/technicolor(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
@@ -356,7 +364,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,13 +1,13 @@
|
||||
/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"
|
||||
|
||||
/obj/structure/closet/wardrobe/red
|
||||
name = "security wardrobe"
|
||||
icon_state = "red"
|
||||
icon_closed = "red"
|
||||
icon_state = "blue"
|
||||
icon_closed = "blue"
|
||||
|
||||
/obj/structure/closet/wardrobe/red/New()
|
||||
..()
|
||||
@@ -32,7 +32,6 @@
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/pink
|
||||
name = "pink wardrobe"
|
||||
icon_state = "pink"
|
||||
@@ -69,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"
|
||||
|
||||
@@ -86,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
|
||||
|
||||
|
||||
@@ -121,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"
|
||||
|
||||
@@ -168,10 +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/device/radio/headset/headset_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
|
||||
|
||||
|
||||
@@ -192,10 +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/device/radio/headset/headset_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
|
||||
|
||||
|
||||
|
||||
@@ -10,9 +10,14 @@
|
||||
climbable = 1
|
||||
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
|
||||
var/rigged = 0
|
||||
var/tablestatus = 0
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
|
||||
/obj/structure/closet/crate/can_open()
|
||||
return 1
|
||||
if (tablestatus != -1)//Can't be opened while under a table
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/crate/can_close()
|
||||
return 1
|
||||
@@ -36,11 +41,20 @@
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
O.forceMove(get_turf(src))
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
for (var/mob/M in src)
|
||||
M.forceMove(get_turf(src))
|
||||
if (M.stat == CONSCIOUS)
|
||||
M.visible_message(span("danger","\The [M.name] bursts out of the [src]!"), span("danger","You burst out of the [src]!"))
|
||||
else
|
||||
M.visible_message(span("danger","\The [M.name] tumbles out of the [src]!"))
|
||||
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
pass_flags = 0
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/close()
|
||||
@@ -65,24 +79,15 @@
|
||||
|
||||
icon_state = icon_closed
|
||||
src.opened = 0
|
||||
pass_flags = PASSTABLE//Crates can only slide under tables when closed
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
/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))
|
||||
@@ -110,23 +115,157 @@
|
||||
|
||||
/obj/structure/closet/crate/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/obj/O in src.contents)
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
for(var/obj/O in src.contents)
|
||||
if(prob(50))
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
if(1)
|
||||
health -= rand(120, 240)
|
||||
if(2)
|
||||
health -= rand(60, 120)
|
||||
if(3)
|
||||
health -= rand(30, 60)
|
||||
|
||||
if (health <= 0)
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.forceMove(src.loc)
|
||||
if (prob(50) && severity > 1)//Higher chance of breaking contents
|
||||
A.ex_act(severity-1)
|
||||
else
|
||||
A.ex_act(severity)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
==========================
|
||||
Table interactions
|
||||
==========================
|
||||
*/
|
||||
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if (istype(mover, /obj/structure/closet/crate))//Handle interaction with other crates
|
||||
var/obj/structure/closet/crate/C = mover
|
||||
if (tablestatus == 1 && C.tablestatus != 1 && !C.opened)//Allow the crate to slide under us if we're ontop of a table
|
||||
return 1
|
||||
else if (tablestatus == -1 && C.tablestatus == 1)//Allow it to slide over us if we're underneath a table
|
||||
return 1
|
||||
else//Otherwise, block it. Don't allow two crates on the same level of a tile
|
||||
return 0
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
if (tablestatus == 1)//They always block shots on a table
|
||||
return 0
|
||||
else if (!tablestatus && prob(15))//Usually will not block shots when lying on the floor
|
||||
return 0
|
||||
else return 1
|
||||
else if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/crate/Move(var/turf/destination, dir)
|
||||
if(..())
|
||||
if (locate(/obj/structure/table) in destination)
|
||||
if (tablestatus != 1)
|
||||
set_tablestatus(-1)//Slide under the table
|
||||
else
|
||||
return
|
||||
set_tablestatus(0)
|
||||
|
||||
|
||||
/obj/structure/closet/crate/toggle(var/mob/user)
|
||||
if (!opened && tablestatus == -1)
|
||||
user << span("warning", "You can't open that while it's under the table")
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/proc/set_tablestatus(var/target)
|
||||
if (tablestatus != target)
|
||||
tablestatus = target
|
||||
|
||||
spawn(3)//Short spawn prevents things popping up where they shouldnt
|
||||
switch (target)
|
||||
if (1)
|
||||
layer = LAYER_ABOVE_TABLE
|
||||
pixel_y = 8
|
||||
if (0)
|
||||
layer = initial(layer)
|
||||
pixel_y = 0
|
||||
if (-1)
|
||||
layer = LAYER_UNDER_TABLE
|
||||
pixel_y = -4
|
||||
|
||||
|
||||
//For putting on tables
|
||||
/obj/structure/closet/crate/MouseDrop(atom/over_object)
|
||||
if (istype(over_object, /obj/structure/table))
|
||||
put_on_table(over_object, usr)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/crate/proc/put_on_table(var/obj/structure/table/table, var/mob/user)
|
||||
if (!table || !user || (tablestatus == -1))
|
||||
return
|
||||
|
||||
//User must be in reach of the crate
|
||||
if (!user.Adjacent(src))
|
||||
user << span("warning", "You need to be closer to the crate!")
|
||||
return
|
||||
|
||||
//One of us has to be near the table
|
||||
if (!user.Adjacent(table) && !Adjacent(table))
|
||||
user << span("warning", "Take the crate closer to the table!")
|
||||
return
|
||||
|
||||
|
||||
for (var/obj/structure/closet/crate/C in get_turf(table))
|
||||
if (C.tablestatus != -1)
|
||||
user << span("warning", "There's already a crate on this table!")
|
||||
return
|
||||
|
||||
//Crates are heavy, hauling them onto tables is hard.
|
||||
//The more stuff thats in it, the longer it takes
|
||||
//Good place to factor in Strength in future
|
||||
var/timeneeded = 20
|
||||
var/success = 0
|
||||
|
||||
|
||||
|
||||
if (tablestatus == 1 && Adjacent(table))
|
||||
//Sliding along a tabletop we're already on. Instant and silent
|
||||
timeneeded = 0
|
||||
success = 1
|
||||
else
|
||||
//Add time based on mass of contents
|
||||
for (var/obj/O in contents)
|
||||
timeneeded += 3* O.w_class
|
||||
for (var/mob/M in contents)
|
||||
timeneeded += 3* M.mob_size
|
||||
|
||||
if (timeneeded > 0)
|
||||
user.visible_message("[user] starts hoisting [src] onto the [table]", "You start hoisting [src] onto the [table]. This will take about [timeneeded*0.1] seconds")
|
||||
user.face_atom(src)
|
||||
if (do_after(user, timeneeded, needhand = 1))
|
||||
success = 1
|
||||
|
||||
|
||||
if (success == 1)
|
||||
forceMove(get_turf(table))
|
||||
set_tablestatus(1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
=====================
|
||||
Secure Crates
|
||||
=====================
|
||||
*/
|
||||
|
||||
|
||||
/obj/structure/closet/crate/secure
|
||||
desc = "A secure crate."
|
||||
@@ -140,6 +279,7 @@
|
||||
var/emag = "securecrateemag"
|
||||
var/broken = 0
|
||||
var/locked = 1
|
||||
health = 200
|
||||
|
||||
/obj/structure/closet/crate/secure/New()
|
||||
..()
|
||||
@@ -151,7 +291,8 @@
|
||||
overlays += greenlight
|
||||
|
||||
/obj/structure/closet/crate/secure/can_open()
|
||||
return !locked
|
||||
if (..())
|
||||
return !locked
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/togglelock(mob/user as mob)
|
||||
if(src.opened)
|
||||
@@ -162,6 +303,7 @@
|
||||
return
|
||||
if(src.allowed(user))
|
||||
set_locked(!locked, user)
|
||||
return 1
|
||||
else
|
||||
user << "<span class='notice'>Access Denied</span>"
|
||||
|
||||
@@ -192,14 +334,22 @@
|
||||
/obj/structure/closet/crate/secure/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(locked)
|
||||
src.togglelock(user)
|
||||
return src.togglelock(user)
|
||||
else
|
||||
src.toggle(user)
|
||||
return src.toggle(user)
|
||||
|
||||
/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 +358,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 +380,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
|
||||
@@ -430,6 +576,7 @@
|
||||
icon_state = "largemetal"
|
||||
icon_opened = "largemetalopen"
|
||||
icon_closed = "largemetal"
|
||||
health = 200
|
||||
|
||||
/obj/structure/closet/crate/large/close()
|
||||
. = ..()
|
||||
@@ -458,6 +605,7 @@
|
||||
icon_closed = "largemetal"
|
||||
redlight = "largemetalr"
|
||||
greenlight = "largemetalg"
|
||||
health = 400
|
||||
|
||||
/obj/structure/closet/crate/secure/large/close()
|
||||
. = ..()
|
||||
@@ -504,3 +652,60 @@
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
|
||||
|
||||
|
||||
//A crate that populates itself with randomly selected loot from randomstock.dm
|
||||
//Can be passed in a rarity value, which is used as a multiplier on the rare/uncommon chance
|
||||
//Quantity of spawns is number of discrete selections from the loot lists, default 10
|
||||
|
||||
/obj/structure/closet/crate/loot
|
||||
name = "unusual container"
|
||||
desc = "A mysterious container of unknown origins. What mysteries lie within?"
|
||||
var/rarity = 1
|
||||
var/quantity = 10
|
||||
var/list/spawntypes
|
||||
|
||||
//The crate chooses its icon randomly from a number of noticeable options.
|
||||
//None of these are the standard grey crate sprite, and a few are currently unused ingame
|
||||
//This ensures that people stumbling across a lootbox will notice it's different and investigate
|
||||
var/list/iconchoices = list(
|
||||
"radiation" = "radiationopen",
|
||||
"o2crate" = "o2crateopen",
|
||||
"freezer" = "freezeropen",
|
||||
"weaponcrate" = "weaponcrateopen",
|
||||
"largebins" = "largebinsopen",
|
||||
"phoroncrate" = "phoroncrateopen",
|
||||
"trashcart" = "trashcartopen",
|
||||
"critter" = "critteropen",
|
||||
"largemetal" = "largemetalopen",
|
||||
"medicalcrate" = "medicalcrateopen")
|
||||
|
||||
|
||||
/obj/structure/closet/crate/loot/New(var/location, var/_rarity = 1, var/_quantity = 10)
|
||||
|
||||
rarity = _rarity
|
||||
quantity = _quantity
|
||||
..(location)
|
||||
|
||||
|
||||
/obj/structure/closet/crate/loot/initialize()
|
||||
spawntypes = list("1" = STOCK_RARE_PROB*rarity, "2" = STOCK_UNCOMMON_PROB*rarity, "3" = (100 - ((STOCK_RARE_PROB*rarity) + (STOCK_UNCOMMON_PROB*rarity))))
|
||||
|
||||
icon_closed = pick(iconchoices)
|
||||
icon_opened = iconchoices[icon_closed]
|
||||
update_icon()
|
||||
while (quantity > 0)
|
||||
quantity --
|
||||
var/newtype = get_spawntype()
|
||||
spawn_stock(newtype,src)
|
||||
|
||||
/obj/structure/closet/crate/loot/proc/get_spawntype()
|
||||
var/stocktype = pickweight(spawntypes)
|
||||
switch (stocktype)
|
||||
if ("1")
|
||||
return pickweight(random_stock_rare)
|
||||
if ("2")
|
||||
return pickweight(random_stock_uncommon)
|
||||
if ("3")
|
||||
return pickweight(random_stock_common)
|
||||
@@ -13,11 +13,14 @@
|
||||
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>")
|
||||
for(var/obj/vehicle/V in T.contents)
|
||||
if(V)
|
||||
V.unload(user)
|
||||
qdel(src)
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -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"
|
||||
@@ -82,6 +83,12 @@
|
||||
airlock_type = "/freezer"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_fma
|
||||
base_icon_state = "mai"
|
||||
base_name = "Freezer Maintenance Access"
|
||||
airlock_type = "/freezer_maint"
|
||||
glass = -1
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
base_icon_state = "hatch"
|
||||
base_name = "Airtight Hatch"
|
||||
@@ -149,7 +156,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 +164,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 +187,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 +207,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 +219,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 +236,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 +269,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 +282,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()
|
||||
@@ -77,6 +77,50 @@
|
||||
name = "potted plant"
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-26"
|
||||
var/dead = 0
|
||||
|
||||
/obj/structure/flora/pottedplant/proc/death()
|
||||
if (!dead)
|
||||
icon_state = "plant-dead"
|
||||
name = "dead [name]"
|
||||
desc = "It looks dead."
|
||||
dead = 1
|
||||
//No complex interactions, just make them fragile
|
||||
/obj/structure/flora/pottedplant/ex_act()
|
||||
death()
|
||||
return ..()
|
||||
|
||||
/obj/structure/flora/pottedplant/fire_act()
|
||||
death()
|
||||
return ..()
|
||||
|
||||
/obj/structure/flora/pottedplant/attackby(obj/item/weapon/W, mob/user)
|
||||
if (W.edge)
|
||||
user.visible_message(span("warning", "[user] cuts down the [src]"))
|
||||
death()
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/structure/flora/pottedplant/bullet_act(var/obj/item/projectile/Proj)
|
||||
if (prob(Proj.damage*2))
|
||||
death()
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
//Added random icon selection for potted plants.
|
||||
//It was silly they always used the same sprite when we have 26 sprites of them in the icon file
|
||||
/obj/structure/flora/pottedplant/random/New()
|
||||
..()
|
||||
var/number = rand(1,36)
|
||||
if (number == 36)
|
||||
if (prob(90))//Make the wierd one rarer
|
||||
number = rand(1,35)
|
||||
else
|
||||
desc = "It stares into your soul."
|
||||
|
||||
if (number < 10)
|
||||
number = "0[number]"
|
||||
icon_state = "plant-[number]"
|
||||
|
||||
//newbushes
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -87,14 +87,14 @@
|
||||
else
|
||||
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
|
||||
return
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
user << "<span class='notice'>Now slicing apart the girder...</span>"
|
||||
if(do_after(user,30))
|
||||
if(!src) return
|
||||
user << "<span class='notice'>You slice apart the girder!</span>"
|
||||
dismantle()
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/chainsword))
|
||||
var/obj/item/weapon/melee/chainsword/WT = W
|
||||
if(WT.active)
|
||||
@@ -224,6 +224,7 @@
|
||||
reinforcing = 0
|
||||
|
||||
/obj/structure/girder/proc/dismantle()
|
||||
new /obj/item/stack/material/steel(get_turf(src))
|
||||
new /obj/item/stack/material/steel(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
@@ -234,10 +235,6 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/blob_act()
|
||||
if(prob(40))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/girder/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -247,12 +244,20 @@
|
||||
if(2.0)
|
||||
if (prob(30))
|
||||
dismantle()
|
||||
return
|
||||
return
|
||||
else
|
||||
health -= rand(60,180)
|
||||
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
dismantle()
|
||||
return
|
||||
return
|
||||
else
|
||||
health -= rand(40,80)
|
||||
else
|
||||
|
||||
if(health <= 0)
|
||||
dismantle()
|
||||
return
|
||||
|
||||
/obj/structure/girder/cult
|
||||
@@ -286,7 +291,7 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/energy))
|
||||
var/obj/item/weapon/melee/energy/WT = W
|
||||
if(WT.active)
|
||||
if(WT.active)
|
||||
user << "<span class='notice'>Now slicing apart the girder...</span>"
|
||||
if(do_after(user,30))
|
||||
user << "<span class='notice'>You slice apart the girder!</span>"
|
||||
@@ -294,13 +299,13 @@
|
||||
else
|
||||
user << "<span class='notice'>You need to activate the weapon to do that!</span>"
|
||||
return
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
user << "<span class='notice'>Now slicing apart the girder...</span>"
|
||||
if(do_after(user,30))
|
||||
user << "<span class='notice'>You slice apart the girder!</span>"
|
||||
dismantle()
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/melee/chainsword))
|
||||
var/obj/item/weapon/melee/chainsword/WT = W
|
||||
if(WT.active)
|
||||
|
||||
@@ -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
|
||||
@@ -190,24 +190,28 @@
|
||||
update_nearby_tiles()
|
||||
|
||||
/obj/structure/inflatable/door/proc/Open()
|
||||
isSwitchingStates = 1
|
||||
flick("door_opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
spawn()
|
||||
if(isSwitchingStates) return
|
||||
isSwitchingStates = 1
|
||||
flick("door_opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
/obj/structure/inflatable/door/proc/Close()
|
||||
isSwitchingStates = 1
|
||||
flick("door_closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 0
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
spawn()
|
||||
if(isSwitchingStates) return
|
||||
isSwitchingStates = 1
|
||||
flick("door_closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 0
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
/obj/structure/inflatable/door/update_icon()
|
||||
if(state)
|
||||
@@ -236,7 +240,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 +250,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 +258,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 +267,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)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/obj/structure/janitorialcart
|
||||
name = "janitorial cart"
|
||||
desc = "The ultimate in janitorial carts! Has space for water, mops, signs, trash bags, and more!"
|
||||
description_info = "Click and drag a mop bucket onto the cart to mount it\
|
||||
</br>Alt+Click with a mop to put it away, a normal click will wet it in the bucket.\
|
||||
</br>Alt+Click with a container, such as a bucket, to pour its contents into the mounted bucket. A normal click will toss it into the trash\
|
||||
</br>You can also use a lightreplacer, spraybottle (of spacecleaner) and four wet-floor signs on the cart to store them"
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cart"
|
||||
anchored = 0
|
||||
@@ -18,16 +22,16 @@
|
||||
var/has_items = 0//This is set true whenever the cart has anything loaded/mounted on it
|
||||
var/dismantled = 0//This is set true after the object has been dismantled to avoid an infintie loop
|
||||
|
||||
|
||||
///obj/structure/janitorialcart/New()
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
if (mybucket)
|
||||
user << "[src] \icon The bucket contains [mybucket.reagents.total_volume] unit\s of liquid!"
|
||||
var/contains = mybucket.reagents.total_volume
|
||||
user << "\icon[src] The bucket contains [contains] unit\s of liquid!"
|
||||
else
|
||||
user << "[src] \icon There is no bucket mounted on it!"
|
||||
user << "\icon[src] There is no bucket mounted on it!"
|
||||
//everything else is visible, so doesn't need to be mentioned
|
||||
|
||||
|
||||
@@ -59,6 +63,11 @@
|
||||
else if(istype(I, /obj/item/weapon/reagent_containers) && mybucket)
|
||||
var/obj/item/weapon/reagent_containers/C = I
|
||||
C.afterattack(mybucket, usr, 1)
|
||||
else if(istype (I, /obj/item/device/lightreplacer))
|
||||
var/obj/item/device/lightreplacer/LR = I
|
||||
if (LR.store_broken)
|
||||
return mybag.attackby(I, usr)
|
||||
|
||||
|
||||
/obj/structure/janitorialcart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/reagent_containers/glass/rag) || istype(I, /obj/item/weapon/soap))
|
||||
@@ -214,7 +223,6 @@
|
||||
if(!isliving(usr))
|
||||
return
|
||||
var/mob/living/user = usr
|
||||
|
||||
if(href_list["take"])
|
||||
switch(href_list["take"])
|
||||
if("garbage")
|
||||
@@ -273,7 +281,10 @@
|
||||
overlays += "cart_spray"
|
||||
has_items = 1
|
||||
if(myreplacer)
|
||||
overlays += "cart_replacer"
|
||||
if (istype(myreplacer, /obj/item/device/lightreplacer/advanced))
|
||||
overlays += "cart_adv_lightreplacer"
|
||||
else
|
||||
overlays += "cart_replacer"
|
||||
has_items = 1
|
||||
if(signs)
|
||||
overlays += "cart_sign[signs]"
|
||||
@@ -296,7 +307,6 @@
|
||||
|
||||
/obj/structure/bed/chair/janicart/New()
|
||||
create_reagents(100)
|
||||
update_layer()
|
||||
|
||||
|
||||
/obj/structure/bed/chair/janicart/examine(mob/user)
|
||||
@@ -356,13 +366,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)
|
||||
@@ -373,7 +376,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"
|
||||
@@ -58,3 +58,19 @@
|
||||
user << "You remove the last piece of meat from \the [victim_name]!"
|
||||
icon_state = "spike"
|
||||
occupied = 0
|
||||
|
||||
|
||||
/obj/structure/kitchenspike/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if (!mover)
|
||||
return 1
|
||||
|
||||
if(istype(mover,/obj/item/projectile) && density)
|
||||
if (!occupied && prob(80))
|
||||
//Wiry frame, usually wont be cover
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
else if(mover.checkpass(PASSTABLE))
|
||||
//Animals can run under them, lots of empty space
|
||||
return 1
|
||||
return ..()
|
||||
@@ -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)
|
||||
@@ -32,20 +32,6 @@
|
||||
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 ))
|
||||
@@ -67,6 +53,7 @@
|
||||
|
||||
|
||||
/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
@@ -76,26 +63,201 @@
|
||||
if (src.destroyed)
|
||||
return
|
||||
else
|
||||
usr << text("\blue You kick the lab cage.")
|
||||
usr << "<span class='warning'>You kick the lab cage.</span>"
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the lab cage.", usr)
|
||||
O << "<span class='warning'>[user] kicks the lab cage.</span>"
|
||||
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/proc/Break()
|
||||
if(occupied)
|
||||
new /obj/item/clothing/mask/facehugger/lamarr(src.loc)
|
||||
new /obj/item/clothing/mask/lamarr(src.loc)
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/facehugger/lamarr
|
||||
var/const/MIN_ACTIVE_TIME = 200 //time between being dropped and going idle
|
||||
var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
/obj/item/clothing/mask/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
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "facehugger"
|
||||
item_state = "facehugger"
|
||||
w_class = 3 //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags = PROXMOVE
|
||||
body_parts_covered = FACE|EYES
|
||||
throw_range = 5
|
||||
|
||||
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
|
||||
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
|
||||
var/strength = 5
|
||||
var/attached = 0
|
||||
var/sterile = 1
|
||||
|
||||
/obj/item/clothing/mask/lamarr/New()//to prevent deleting it if aliums are disabled
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/attack_hand(user as mob)
|
||||
|
||||
if((stat == CONSCIOUS))
|
||||
if(Attach(user))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/mask/lamarr/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
. = ..()
|
||||
user.drop_from_inventory(src)
|
||||
if(hit_zone == "head")
|
||||
Attach(target)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/lamarr/examine(mob/user)
|
||||
..(user)
|
||||
switch(stat)
|
||||
if(DEAD,UNCONSCIOUS)
|
||||
user << "<span class='warning'>[src] is not moving.</span>"
|
||||
if(CONSCIOUS)
|
||||
user << "<span class='warning'>[src] seems to be active.</span>"
|
||||
if (sterile)
|
||||
user << "<span class='warning'> It looks like the proboscis has been removed.</span>"
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/attackby(obj/item/I, mob/user)
|
||||
if(I.force)
|
||||
user.do_attack_animation(src)
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/bullet_act()
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C+80)
|
||||
Die()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/equipped(mob/M)
|
||||
..()
|
||||
Attach(M)
|
||||
|
||||
/obj/item/clothing/mask/lamarr/Crossed(atom/target)
|
||||
HasProximity(target)
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/on_found(mob/finder as mob)
|
||||
if(stat == CONSCIOUS)
|
||||
HasProximity(finder)
|
||||
return 1
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(CanHug(AM))
|
||||
Attach(AM)
|
||||
|
||||
/obj/item/clothing/mask/lamarr/throw_at(atom/target, range, speed)
|
||||
..()
|
||||
if(stat == CONSCIOUS)
|
||||
icon_state = "[initial(icon_state)]_thrown"
|
||||
spawn(15)
|
||||
if(icon_state == "[initial(icon_state)]_thrown")
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/clothing/mask/lamarr/proc/Attach(M as mob)
|
||||
|
||||
if((!iscarbon(M)))
|
||||
return
|
||||
|
||||
if(attached)
|
||||
return
|
||||
|
||||
var/mob/living/L = M //just so I don't need to use :
|
||||
|
||||
if(loc == L) return
|
||||
if(stat != CONSCIOUS) return
|
||||
if(!sterile) L.take_organ_damage(strength,0) //done here so that even borgs and humans in helmets take damage
|
||||
|
||||
L.visible_message("<span class='danger'>[src] leaps at [L]'s face!</span>")
|
||||
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.head && H.head.flags & AIRTIGHT)
|
||||
H.visible_message("<span class='danger'>\The [src] smashes against [H]'s [H.head]!</span>")
|
||||
Die()
|
||||
return
|
||||
|
||||
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/target = L
|
||||
|
||||
if(target.wear_mask)
|
||||
if(prob(20)) return
|
||||
var/obj/item/clothing/W = target.wear_mask
|
||||
if(!W.canremove) return
|
||||
target.drop_from_inventory(W)
|
||||
|
||||
target.visible_message("<span class='danger'>\The [src] tears [W] off of [target]'s face!</span>")
|
||||
|
||||
target.equip_to_slot(src, slot_wear_mask)
|
||||
target.contents += src // Monkey sanity check - Snapshot
|
||||
|
||||
GoIdle() //so it doesn't jump the people that tear it off
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/proc/GoActive()
|
||||
if(stat == DEAD || stat == CONSCIOUS)
|
||||
return
|
||||
|
||||
stat = CONSCIOUS
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/proc/GoIdle(var/min_time=MIN_ACTIVE_TIME, var/max_time=MAX_ACTIVE_TIME)
|
||||
if(stat == DEAD || stat == UNCONSCIOUS)
|
||||
return
|
||||
|
||||
/* RemoveActiveIndicators() */
|
||||
|
||||
stat = UNCONSCIOUS
|
||||
icon_state = "[initial(icon_state)]_inactive"
|
||||
|
||||
spawn(rand(min_time,max_time))
|
||||
GoActive()
|
||||
return
|
||||
|
||||
/obj/item/clothing/mask/lamarr/proc/Die()
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
/* RemoveActiveIndicators() */
|
||||
|
||||
icon_state = "[initial(icon_state)]_dead"
|
||||
stat = DEAD
|
||||
|
||||
src.visible_message("<span class='danger'>\The [src] curls up into a ball!</span>")
|
||||
|
||||
return
|
||||
|
||||
/proc/CanHug(var/mob/M)
|
||||
|
||||
if(!iscarbon(M))
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/C = M
|
||||
if(istype(C) && locate(/obj/item/organ/xenos/hivenode) in C.internal_organs)
|
||||
return 0
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.head && (H.head.body_parts_covered & FACE) && !(H.head.item_flags & FLEXIBLEMATERIAL))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -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) || istype(src.loc, /turf/simulated/floor/asteroid)))
|
||||
///// 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()
|
||||
..()
|
||||
@@ -1,17 +1,17 @@
|
||||
/obj/structure/mopbucket
|
||||
name = "mop bucket"
|
||||
desc = "Fill it with water, but don't forget a mop!"
|
||||
desc = "Fits onto a standard janitorial cart. Fill it with water, but don't forget a mop!"
|
||||
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
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/obj/structure/plasticflaps //HOW DO YOU CALL THOSE THINGS ANYWAY
|
||||
name = "\improper plastic flaps"
|
||||
desc = "Completely impassable - or are they?"
|
||||
icon = 'icons/obj/stationobjs.dmi' //Change this.
|
||||
icon_state = "plasticflaps"
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
explosion_resistance = 5
|
||||
var/list/mobs_can_pass = list(
|
||||
/mob/living/carbon/slime,
|
||||
/mob/living/simple_animal/mouse,
|
||||
/mob/living/silicon/robot/drone
|
||||
)
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
return prob(60)
|
||||
|
||||
var/obj/structure/bed/B = A
|
||||
if (istype(A, /obj/structure/bed) && B.buckled_mob)//if it's a bed/chair and someone is buckled, it will not pass
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/vehicle)) //no vehicles
|
||||
return 0
|
||||
|
||||
var/mob/living/M = A
|
||||
if(istype(M))
|
||||
if(M.lying)
|
||||
return ..()
|
||||
for(var/mob_type in mobs_can_pass)
|
||||
if(istype(A, mob_type))
|
||||
return ..()
|
||||
return issmall(M)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
if (3)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
New() //set the turf below the flaps to block air
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
T.blocks_air = 1
|
||||
..()
|
||||
|
||||
Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
if(istype(T, /turf/simulated/floor))
|
||||
T.blocks_air = 0
|
||||
..()
|
||||
|
||||
|
||||
//Airtight plastic flaps made for the kitchen freezer, blocks atmos but not movement
|
||||
/obj/structure/plasticflaps/airtight
|
||||
name = "airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
layer = 3
|
||||
|
||||
/obj/structure/plasticflaps/airtight/New() //set the turf below the flaps to block air
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
T.blocks_air = 1
|
||||
..()
|
||||
|
||||
/obj/structure/plasticflaps/airtight/Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor
|
||||
var/turf/T = get_turf(loc)
|
||||
if(T)
|
||||
if(istype(T, /turf/simulated/floor))
|
||||
T.blocks_air = 0
|
||||
..()
|
||||
|
||||
/obj/structure/plasticflaps/airtight/CanPass(atom/A, turf/T)
|
||||
return 1//Blocks nothing except air
|
||||
@@ -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,28 @@ 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
|
||||
|
||||
//random station safe, may come with some different loot
|
||||
/obj/structure/safe/station
|
||||
name = "corporate safe"
|
||||
|
||||
/obj/structure/safe/station/New()
|
||||
|
||||
..()
|
||||
new /obj/random/highvalue(src)
|
||||
new /obj/random/highvalue(src)
|
||||
new /obj/random/highvalue(src)
|
||||
new /obj/random/highvalue(src)
|
||||
return
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
opacity = 0
|
||||
density = 0
|
||||
layer = 3.5
|
||||
w_class = 3
|
||||
|
||||
/obj/structure/sign/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -19,28 +20,27 @@
|
||||
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]."
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
unfasten()
|
||||
else ..()
|
||||
|
||||
/obj/structure/sign/proc/unfasten()
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = 3 //big
|
||||
w_class = 5 //big
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
@@ -175,30 +175,10 @@
|
||||
desc = "A warning sign which reads 'HYDROPONICS'."
|
||||
icon_state = "hydro1"
|
||||
|
||||
/obj/structure/sign/sac
|
||||
name = "\improper S.A.C."
|
||||
desc = "It's the Sol Airspace Corporation logo."
|
||||
icon_state = "SACsmall"
|
||||
|
||||
/obj/structure/sign/sac/big
|
||||
name = "\improper S.A.C."
|
||||
desc = "A rusty sign reading 'S.A.C.'."
|
||||
icon_state = "monkey_painting"
|
||||
|
||||
/obj/structure/sign/sac/big/left
|
||||
name = "\improper S.A.C."
|
||||
desc = "A rusty sign reading 'S.A.C.'."
|
||||
icon_state = "SACs"
|
||||
|
||||
/obj/structure/sign/sac/big/middle
|
||||
name = "\improper S.A.C."
|
||||
desc = "A rusty sign reading 'S.A.C.'."
|
||||
icon_state = "SACa"
|
||||
|
||||
/obj/structure/sign/sac/big/right
|
||||
name = "\improper S.A.C."
|
||||
desc = "A rusty sign reading 'S.A.C.'."
|
||||
icon_state = "SACc"
|
||||
/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"
|
||||
@@ -224,3 +204,17 @@
|
||||
name = "\improper Escape Arm"
|
||||
desc = "A direction sign, pointing out which way the escape shuttle dock is."
|
||||
icon_state = "direction_evac"
|
||||
|
||||
/obj/structure/sign/christmas/lights
|
||||
name = "Christmas lights"
|
||||
desc = "Flashy."
|
||||
icon = 'icons/obj/christmas.dmi'
|
||||
icon_state = "xmaslights"
|
||||
layer = 5
|
||||
|
||||
/obj/structure/sign/christmas/wreath
|
||||
name = "wreath"
|
||||
desc = "Prickly and overrated."
|
||||
icon = 'icons/obj/christmas.dmi'
|
||||
icon_state = "doorwreath"
|
||||
layer = 5
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/obj/structure/tranqcabinet
|
||||
name = "tranquilizer rifle cabinet"
|
||||
desc = "A wall mounted cabinet designed to hold a tranquilizer rifle."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "tranq_closed"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/obj/item/weapon/gun/projectile/heavysniper/tranq/has_tranq
|
||||
var/opened = 0
|
||||
|
||||
/obj/structure/tranqcabinet/New()
|
||||
..()
|
||||
has_tranq = new/obj/item/weapon/gun/projectile/heavysniper/tranq(src)
|
||||
|
||||
/obj/structure/tranqcabinet/attackby(obj/item/O, mob/user)
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(istype(O, /obj/item/weapon/gun/projectile/heavysniper/tranq))
|
||||
if(!has_tranq && opened)
|
||||
user.remove_from_mob(O)
|
||||
contents += O
|
||||
has_tranq = O
|
||||
user << "<span class='notice'>You place [O] in [src].</span>"
|
||||
else
|
||||
opened = !opened
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/structure/tranqcabinet/attack_hand(mob/user)
|
||||
if(isrobot(user))
|
||||
return
|
||||
if (!user.can_use_hand())
|
||||
return
|
||||
if(has_tranq)
|
||||
user.put_in_hands(has_tranq)
|
||||
user << "<span class='notice'>You take [has_tranq] from [src].</span>"
|
||||
has_tranq = null
|
||||
opened = 1
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/tranqcabinet/attack_tk(mob/user)
|
||||
if(has_tranq)
|
||||
has_tranq.forceMove(loc)
|
||||
user << "<span class='notice'>You telekinetically remove [has_tranq] from [src].</span>"
|
||||
has_tranq = null
|
||||
opened = 1
|
||||
else
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/tranqcabinet/update_icon()
|
||||
if(!opened)
|
||||
icon_state = "tranq_closed"
|
||||
return
|
||||
if(has_tranq)
|
||||
icon_state = "tranq_full"
|
||||
else
|
||||
icon_state = "tranq_empty"
|
||||
@@ -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
|
||||
@@ -404,7 +410,7 @@
|
||||
usr << "<span class='warning'>\The [RG] is already empty.</span>"
|
||||
return
|
||||
|
||||
RG.reagents.remove_any(RG.amount_per_transfer_from_this)
|
||||
RG.reagents.clear_reagents()
|
||||
oviewers(3, usr) << "<span class='notice'>[usr] empties \the [RG] into \the [src].</span>"
|
||||
usr << "<span class='notice'>You empty \the [RG] into \the [src].</span>"
|
||||
return
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -120,14 +122,8 @@
|
||||
if(prob(50))
|
||||
shatter(0)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/blob_act()
|
||||
shatter()
|
||||
|
||||
|
||||
/obj/structure/window/meteorhit()
|
||||
shatter()
|
||||
else
|
||||
take_damage(rand(10,30))
|
||||
|
||||
//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
|
||||
@@ -172,9 +168,10 @@
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user as mob)
|
||||
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 60, 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>")
|
||||
@@ -189,26 +186,26 @@
|
||||
attack_generic(H,25)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 90, 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)
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 60, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].",
|
||||
"You knock on the [src.name].",
|
||||
"You hear a knocking sound.")
|
||||
return
|
||||
|
||||
/obj/structure/window/attack_generic(var/mob/user, var/damage)
|
||||
if(!damage)
|
||||
return
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(damage >= 10)
|
||||
visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
take_damage(damage)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 10, 1, -2)
|
||||
user.do_attack_animation(src)
|
||||
return 1
|
||||
|
||||
@@ -243,6 +240,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 +269,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 +293,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 +312,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 +346,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 +370,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 +408,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 +455,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 +481,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 +497,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