mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Merge pull request #12245 from Fox-McCloud/universal-damage
Universal Object Damage
This commit is contained in:
@@ -28,12 +28,12 @@
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, 1)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/*
|
||||
* Resin
|
||||
@@ -301,8 +301,9 @@
|
||||
break
|
||||
|
||||
/obj/structure/alien/egg/obj_break(damage_flag)
|
||||
if(status != BURST)
|
||||
Burst(kill = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(status != BURST)
|
||||
Burst(kill = TRUE)
|
||||
|
||||
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
icon = 'icons/obj/barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
req_access = list(access_bar)
|
||||
armor = list(melee = 20, bullet = 20, laser = 20, energy = 100, bomb = 0, bio = 0, rad = 0)
|
||||
max_integrity = 500
|
||||
integrity_failure = 250
|
||||
armor = list("melee" = 20, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
var/list/barsigns=list()
|
||||
var/list/hiddensigns
|
||||
var/emagged = 0
|
||||
@@ -38,7 +40,21 @@
|
||||
else
|
||||
desc = "It displays \"[name]\"."
|
||||
|
||||
/obj/structure/sign/barsign/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
broken = TRUE
|
||||
|
||||
/obj/structure/sign/barsign/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 2)
|
||||
new /obj/item/stack/cable_coil(drop_location(), 2)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/sign/barsign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/sign/barsign/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
@@ -58,9 +74,6 @@
|
||||
|
||||
|
||||
/obj/structure/sign/barsign/attackby(var/obj/item/I, var/mob/user)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class = 'info'>Access denied.</span>")
|
||||
return
|
||||
if( istype(I, /obj/item/screwdriver))
|
||||
if(!panel_open)
|
||||
to_chat(user, "<span class='notice'>You open the maintenance panel.</span>")
|
||||
@@ -90,6 +103,8 @@
|
||||
broken = 0
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least two lengths of cable!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ LINEN BINS
|
||||
throw_range = 2
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
item_color = "white"
|
||||
burn_state = FLAMMABLE
|
||||
resistance_flags = FLAMMABLE
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
dog_fashion = /datum/dog_fashion/head/ghost
|
||||
@@ -236,8 +236,8 @@ LINEN BINS
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "linenbin-full"
|
||||
anchored = 1
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
var/amount = 20
|
||||
var/list/sheets = list()
|
||||
var/obj/item/hidden = null
|
||||
@@ -261,8 +261,9 @@ LINEN BINS
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
if(!amount)
|
||||
return
|
||||
if(amount)
|
||||
amount = 0
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/structure/bedsheetbin/burn()
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
coat.loc = src
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You cannot hang [W] on [src]</span>")
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "closed"
|
||||
density = 1
|
||||
armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
var/locked = FALSE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/health = 100
|
||||
var/lastbang
|
||||
var/cutting_tool = /obj/item/weldingtool
|
||||
var/sound = 'sound/machines/click.ogg'
|
||||
@@ -124,48 +125,20 @@
|
||||
if(!(opened ? close() : open()))
|
||||
to_chat(user, "<span class='notice'>It won't budge!</span>")
|
||||
|
||||
/obj/structure/closet/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
for(var/atom/movable/A in src)//pulls everything out of the locker and hits it with an explosion
|
||||
A.ex_act(severity++)
|
||||
dump_contents()
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
for(var/atom/movable/A in src)
|
||||
A.ex_act(severity++)
|
||||
dump_contents()
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A in src)
|
||||
A.ex_act(severity++)
|
||||
dump_contents()
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
qdel(src)
|
||||
/obj/structure/closet/proc/bust_open()
|
||||
welded = FALSE //applies to all lockers
|
||||
locked = FALSE //applies to critter crates and secure lockers only
|
||||
broken = TRUE //applies to secure lockers only
|
||||
open()
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
..()
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
health -= Proj.damage
|
||||
if(health <= 0)
|
||||
dump_contents()
|
||||
qdel(src)
|
||||
/obj/structure/closet/deconstruct(disassembled = TRUE)
|
||||
if(ispath(material_drop) && material_drop_amount && !(flags & NODECONSTRUCT))
|
||||
new material_drop(loc, material_drop_amount)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='warning'>[user] destroys the [src].</span>")
|
||||
dump_contents()
|
||||
qdel(src)
|
||||
|
||||
// this should probably use dump_contents()
|
||||
/obj/structure/closet/blob_act()
|
||||
if(prob(75))
|
||||
dump_contents()
|
||||
qdel(src)
|
||||
/obj/structure/closet/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
bust_open()
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs) && !opened)
|
||||
@@ -240,6 +213,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Out of charges.</span>")
|
||||
return
|
||||
return
|
||||
|
||||
if(opened)
|
||||
if(istype(W, /obj/item/grab))
|
||||
@@ -260,9 +234,7 @@
|
||||
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
|
||||
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
new material_drop(T, material_drop_amount)
|
||||
qdel(src)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
@@ -287,8 +259,10 @@
|
||||
update_icon()
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>[src] has been [welded?"welded shut":"unwelded"] by [user.name].</span>", 3, "You hear welding.", 2)
|
||||
else
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
|
||||
..()
|
||||
@@ -425,6 +399,16 @@
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
|
||||
|
||||
/obj/structure/closet/ex_act(severity)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity)
|
||||
CHECK_TICK
|
||||
..()
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
icon_state = "cardboard"
|
||||
icon_opened = "cardboard_open"
|
||||
icon_closed = "cardboard"
|
||||
health = 10
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
integrity_failure = 0
|
||||
sound = 'sound/effects/rustle2.ogg'
|
||||
material_drop = /obj/item/stack/sheet/cardboard
|
||||
var/amt = 4
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
icon_state = "coffin"
|
||||
icon_closed = "coffin"
|
||||
icon_opened = "coffin_open"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
material_drop = /obj/item/stack/sheet/wood
|
||||
|
||||
/obj/structure/closet/coffin/update_icon()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon_opened = "fireaxe1100"
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
armor = list(melee = 50, bullet = 50, laser = 50, energy = 100, bomb = 10, bio = 100, rad = 100)
|
||||
armor = list("melee" = 50, "bullet" = 20, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50)
|
||||
var/localopened = FALSE //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
|
||||
opened = TRUE
|
||||
var/hitstaken = FALSE
|
||||
@@ -104,7 +104,7 @@
|
||||
user.put_in_hands(fireaxe)
|
||||
to_chat(user, "<span class='notice'>You take \the [fireaxe] from the [src].</span>")
|
||||
fireaxe = null
|
||||
|
||||
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
@@ -179,13 +179,13 @@
|
||||
/obj/structure/closet/fireaxecabinet/proc/update_icon_opening()
|
||||
var/hasaxe = fireaxe != null
|
||||
icon_state = "fireaxe[hasaxe][localopened][hitstaken][smashed]opening"
|
||||
spawn(10)
|
||||
spawn(10)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/proc/update_icon_closing()
|
||||
var/hasaxe = fireaxe != null
|
||||
icon_state = "fireaxe[hasaxe][localopened][hitstaken][smashed]closing"
|
||||
spawn(10)
|
||||
spawn(10)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/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
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/secure_closet/bar/New()
|
||||
..()
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
desc = ""
|
||||
locked = 0
|
||||
anchored = 1
|
||||
health = 200
|
||||
req_access = list()
|
||||
layer = 2.9 // ensures the loot they drop always appears on top of them.
|
||||
var/is_armory = FALSE
|
||||
@@ -40,7 +39,7 @@
|
||||
if(isanimal(M) && "syndicate" in M.faction)
|
||||
to_chat(M, "<span class='warning'>The [src] resists your attack!</span>")
|
||||
return
|
||||
return ..(M)
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/syndicate/depot/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcs))
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
|
||||
if(broken)
|
||||
@@ -86,4 +86,4 @@
|
||||
else if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access Denied</span>")
|
||||
return ..()
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
opened = 0
|
||||
locked = 1
|
||||
broken = 0
|
||||
armor = list(melee = 30, bullet = 50, laser = 50, energy = 100, bomb = 0, bio = 0, rad = 0)
|
||||
max_integrity = 250
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 20
|
||||
var/large = 1
|
||||
icon_closed = "secure"
|
||||
var/icon_locked = "secure1"
|
||||
@@ -15,7 +17,6 @@
|
||||
var/icon_broken = "securebroken"
|
||||
var/icon_off = "secureoff"
|
||||
wall_mounted = 0 //never solid (You can always pass over it)
|
||||
health = 200
|
||||
|
||||
/obj/structure/closet/secure_closet/can_open()
|
||||
if(!..())
|
||||
@@ -85,9 +86,11 @@
|
||||
else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken)
|
||||
emag_act(user)
|
||||
else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool))
|
||||
return ..(W,user)
|
||||
else
|
||||
return ..(W, user)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
togglelock(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/secure_closet/emag_act(mob/user)
|
||||
if(!broken)
|
||||
|
||||
@@ -333,8 +333,8 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/New()
|
||||
..()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "human_male"
|
||||
density = 1
|
||||
anchored = 1
|
||||
health = 0 //destroying the statue kills the mob within
|
||||
max_integrity = 0 //destroying the statue kills the mob within
|
||||
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
|
||||
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
|
||||
var/intialBrute = 0
|
||||
@@ -20,7 +20,7 @@
|
||||
L.anchored = 0
|
||||
L.forceMove(src)
|
||||
L.disabilities += MUTE
|
||||
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
intialFire = L.getFireLoss()
|
||||
intialBrute = L.getBruteLoss()
|
||||
@@ -37,7 +37,7 @@
|
||||
icon_state = "corgi"
|
||||
desc = "If it takes forever, I will wait for you..."
|
||||
|
||||
if(health == 0) //meaning if the statue didn't find a valid target
|
||||
if(max_integrity == 0) //meaning if the statue didn't find a valid target
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
for(var/mob/living/M in src)
|
||||
M.forceMove(loc)
|
||||
M.disabilities -= MUTE
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
|
||||
..()
|
||||
|
||||
@@ -87,35 +87,10 @@
|
||||
/obj/structure/closet/statue/toggle()
|
||||
return
|
||||
|
||||
/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.damage
|
||||
check_health()
|
||||
|
||||
/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user as mob)
|
||||
if(user.environment_smash)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/blob_act()
|
||||
/obj/structure/closet/statue/obj_destruction(damage_flag)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/ex_act(severity)
|
||||
for(var/mob/M in src)
|
||||
M.ex_act(severity)
|
||||
health -= 60 / severity
|
||||
check_health()
|
||||
|
||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
health -= I.force
|
||||
visible_message("<span class='warning'>[user] strikes [src] with [I].</span>")
|
||||
check_health()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/statue/MouseDrop_T()
|
||||
return
|
||||
@@ -132,9 +107,8 @@
|
||||
/obj/structure/closet/statue/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/proc/shatter(mob/user as mob)
|
||||
/obj/structure/closet/statue/proc/shatter(mob/user)
|
||||
if(user)
|
||||
user.dust()
|
||||
dump_contents()
|
||||
visible_message("<span class='warning'>[src] shatters!. </span>")
|
||||
qdel(src)
|
||||
visible_message("<span class='warning'>[src] shatters!. </span>")
|
||||
@@ -176,27 +176,14 @@
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
rigged = FALSE
|
||||
return
|
||||
else return attack_hand(user)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/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
|
||||
else
|
||||
return
|
||||
/obj/structure/closet/singularity_act()
|
||||
dump_contents()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user)
|
||||
if(manifest)
|
||||
@@ -236,9 +223,12 @@
|
||||
var/greenlight = "securecrateg"
|
||||
var/sparks = "securecratesparks"
|
||||
var/emag = "securecrateemag"
|
||||
max_integrity = 500
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 25
|
||||
var/tamperproof = 0
|
||||
broken = 0
|
||||
locked = 1
|
||||
health = 1000
|
||||
|
||||
/obj/structure/closet/crate/secure/update_icon()
|
||||
..()
|
||||
@@ -252,6 +242,21 @@
|
||||
else
|
||||
overlays += greenlight
|
||||
|
||||
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION)
|
||||
boom()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/boom(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
|
||||
investigate_log("[key_name(user)] has detonated a [src]", INVESTIGATE_BOMB)
|
||||
for(var/atom/movable/AM in src)
|
||||
qdel(AM)
|
||||
explosion(get_turf(src), 0, 1, 5, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/crate/secure/can_open()
|
||||
return !locked
|
||||
|
||||
@@ -462,7 +467,7 @@
|
||||
"<span class='notice'>You have secured [src]'s floor casters.</span>")
|
||||
anchored = TRUE
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/radiation
|
||||
desc = "A crate with a radiation sign on it."
|
||||
@@ -527,6 +532,7 @@
|
||||
icon_state = "largemetal"
|
||||
icon_opened = "largemetalopen"
|
||||
icon_closed = "largemetal"
|
||||
integrity_failure = 0 //Makes the crate break when integrity reaches 0, instead of opening and becoming an invisible sprite.
|
||||
|
||||
/obj/structure/closet/crate/large/close()
|
||||
. = ..()
|
||||
|
||||
@@ -45,8 +45,10 @@
|
||||
"<span class='notice'>You pry open \the [src].</span>", \
|
||||
"<span class='notice'>You hear splitting wood.</span>")
|
||||
qdel(src)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return attack_hand(user)
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/mule
|
||||
|
||||
@@ -56,7 +58,7 @@
|
||||
/obj/structure/largecrate/lisa/attackby(obj/item/W as obj, mob/user as mob) //ugly but oh well
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/pet/dog/corgi/Lisa(loc)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/cow
|
||||
name = "cow crate"
|
||||
@@ -65,7 +67,7 @@
|
||||
/obj/structure/largecrate/cow/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/goat
|
||||
name = "goat crate"
|
||||
@@ -74,7 +76,7 @@
|
||||
/obj/structure/largecrate/goat/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/chick
|
||||
name = "chicken crate"
|
||||
@@ -85,7 +87,7 @@
|
||||
var/num = rand(4, 6)
|
||||
for(var/i = 0, i < num, i++)
|
||||
new /mob/living/simple_animal/chick(loc)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/largecrate/cat
|
||||
name = "cat crate"
|
||||
@@ -94,4 +96,4 @@
|
||||
/obj/structure/largecrate/cat/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /mob/living/simple_animal/pet/cat(loc)
|
||||
..()
|
||||
return ..()
|
||||
@@ -14,18 +14,21 @@
|
||||
layer = SHOWER_OPEN_LAYER
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
|
||||
if(!P.nodamage)
|
||||
visible_message("<span class='warning'>[P] tears [src] down!</span>")
|
||||
qdel(src)
|
||||
else
|
||||
..(P, def_zone)
|
||||
|
||||
/obj/structure/curtain/attack_hand(mob/user)
|
||||
playsound(get_turf(loc), "rustle", 15, 1, -5)
|
||||
toggle()
|
||||
..()
|
||||
|
||||
/obj/structure/curtain/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/curtain/proc/toggle()
|
||||
set_opacity(!opacity)
|
||||
if(opacity)
|
||||
@@ -65,7 +68,7 @@
|
||||
to_chat(user, "<span class='notice'>You cut apart [src].</span>")
|
||||
deconstruct()
|
||||
else
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/curtain/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth(loc, 2)
|
||||
|
||||
@@ -26,18 +26,13 @@
|
||||
if(!has_overloaded)
|
||||
overload(TRUE, TRUE)
|
||||
depotarea.reactor = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/fusionreactor/ex_act(severity)
|
||||
if(severity < 3)
|
||||
obj_integrity = 0
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/fusionreactor/bullet_act(obj/item/projectile/Proj)
|
||||
obj_integrity -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/fusionreactor/proc/healthcheck()
|
||||
if(obj_integrity <= 0 && istype(depotarea))
|
||||
overload(TRUE)
|
||||
@@ -46,13 +41,15 @@
|
||||
if(iswrench(I))
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>The [src] is too well secured to the floor.</span>")
|
||||
else if(isscrewdriver(I))
|
||||
return
|
||||
if(isscrewdriver(I))
|
||||
to_chat(user, "<span class='notice'>You try to screwdriver open [src], but accidentally release some radiation!</span>")
|
||||
if(prob(50))
|
||||
empulse(src, 4, 10)
|
||||
else
|
||||
for(var/mob/living/M in range(10, loc))
|
||||
M.apply_effect(rand(5, 25), IRRADIATE)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1,217 +1,81 @@
|
||||
#define DISPLAYCASE_FRAME_CIRCUIT 0
|
||||
#define DISPLAYCASE_FRAME_SCREWDRIVER 1
|
||||
|
||||
// List and hook used to set up the captain's print on their display case
|
||||
GLOBAL_LIST_INIT(captain_display_cases, list())
|
||||
|
||||
/proc/updateDisplaycase(mob/living/carbon/human/captain)
|
||||
if(!GLOB.captain_display_cases.len)
|
||||
return
|
||||
var/fingerprint = captain.get_full_print()
|
||||
for(var/item in GLOB.captain_display_cases)
|
||||
var/obj/structure/displaycase/CASE = item
|
||||
CASE.ue = fingerprint
|
||||
|
||||
/obj/structure/displaycase_frame
|
||||
name = "display case frame"
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "box_glass"
|
||||
armor = list(melee = 30, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 0, rad = 0)
|
||||
var/obj/item/airlock_electronics/circuit = null
|
||||
var/obj/item/assembly/prox_sensor/sensor = null
|
||||
var/state = DISPLAYCASE_FRAME_CIRCUIT
|
||||
|
||||
/obj/structure/displaycase_frame/Destroy()
|
||||
QDEL_NULL(circuit)
|
||||
QDEL_NULL(sensor)
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase_frame/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
var/pstate = state
|
||||
var/turf/T = get_turf(src)
|
||||
switch(state)
|
||||
if(DISPLAYCASE_FRAME_CIRCUIT)
|
||||
if(istype(W, /obj/item/airlock_electronics) && W.icon_state != "door_electronics_smoked")
|
||||
user.drop_item()
|
||||
circuit = W
|
||||
circuit.forceMove(src)
|
||||
state++
|
||||
to_chat(user, "<span class='notice'>You add the airlock electronics to the frame.</span>")
|
||||
playsound(get_turf(src),W.usesound, 50, 1)
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
new /obj/machinery/constructable_frame/machine_frame(T)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(T)
|
||||
G.amount = 5
|
||||
qdel(src)
|
||||
to_chat(user, "<span class='notice'>You pry the glass out of the frame.</span>")
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
return
|
||||
|
||||
if(DISPLAYCASE_FRAME_SCREWDRIVER)
|
||||
if(isscrewdriver(W))
|
||||
var/obj/structure/displaycase/C = new(T)
|
||||
if(circuit.one_access)
|
||||
C.req_access = null
|
||||
C.req_one_access = circuit.conf_access
|
||||
else
|
||||
C.req_access = circuit.conf_access
|
||||
C.req_one_access = null
|
||||
if(isprox(sensor))
|
||||
C.burglar_alarm = 1
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
circuit.forceMove(T)
|
||||
circuit = null
|
||||
if(isprox(sensor))
|
||||
sensor.forceMove(T)
|
||||
sensor = null
|
||||
state--
|
||||
to_chat(user, "<span class='notice'>You pry the electronics out of the frame.</span>")
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(isprox(W) && !isprox(sensor))
|
||||
user.drop_item()
|
||||
sensor = W
|
||||
sensor.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You add the proximity sensor to the frame.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
|
||||
if(pstate != state)
|
||||
pstate = state
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase_frame/update_icon()
|
||||
switch(state)
|
||||
if(1)
|
||||
icon_state = "box_glass_circuit"
|
||||
else
|
||||
icon_state = "box_glass"
|
||||
|
||||
/obj/structure/displaycase
|
||||
name = "display case"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox20"
|
||||
desc = "A display case for prized possessions. It taunts you to kick it."
|
||||
icon_state = "glassbox0"
|
||||
desc = "A display case for prized possessions."
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
unacidable = TRUE //Dissolving the case would also delete the contents.
|
||||
var/health = 30
|
||||
var/obj/item/occupant = null
|
||||
var/destroyed = FALSE
|
||||
var/locked = FALSE
|
||||
var/burglar_alarm = FALSE
|
||||
var/ue = null
|
||||
var/image/occupant_overlay = null
|
||||
var/obj/item/airlock_electronics/circuit
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 30, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 100)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
var/obj/item/showpiece = null
|
||||
var/alert = TRUE
|
||||
var/open = FALSE
|
||||
var/openable = TRUE
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
var/start_showpiece_type = null //add type for items on display
|
||||
var/alarm_needs_power = TRUE
|
||||
var/list/start_showpieces = list() //Takes sublists in the form of list("type" = /obj/item/bikehorn, "trophy_message" = "henk")
|
||||
var/trophy_message = ""
|
||||
|
||||
/obj/structure/displaycase/New()
|
||||
/obj/structure/displaycase/Initialize(mapload)
|
||||
. = ..()
|
||||
if(start_showpieces.len && !start_showpiece_type)
|
||||
var/list/showpiece_entry = pick(start_showpieces)
|
||||
if (showpiece_entry && showpiece_entry["type"])
|
||||
start_showpiece_type = showpiece_entry["type"]
|
||||
if (showpiece_entry["trophy_message"])
|
||||
trophy_message = showpiece_entry["trophy_message"]
|
||||
if(start_showpiece_type)
|
||||
occupant = new start_showpiece_type(src)
|
||||
showpiece = new start_showpiece_type (src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/Destroy()
|
||||
dump()
|
||||
QDEL_NULL(circuit)
|
||||
QDEL_NULL(electronics)
|
||||
QDEL_NULL(showpiece)
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/captains_laser
|
||||
name = "captain's display case"
|
||||
desc = "A display case for the captain's antique laser gun. Hooked up with an anti-theft system."
|
||||
burglar_alarm = TRUE
|
||||
locked = TRUE
|
||||
req_access = list(access_captain)
|
||||
start_showpiece_type = /obj/item/gun/energy/laser/captain
|
||||
|
||||
/obj/structure/displaycase/captains_laser/Initialize(mapload)
|
||||
. = ..()
|
||||
GLOB.captain_display_cases += src
|
||||
|
||||
/obj/structure/displaycase/captains_laser/Destroy()
|
||||
GLOB.captain_display_cases -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/lavaland_winter
|
||||
burglar_alarm = TRUE
|
||||
locked = TRUE
|
||||
req_access = list(access_cent_specops)
|
||||
start_showpiece_type = /obj/item/gun/energy/laser/captain
|
||||
|
||||
/obj/structure/displaycase/stechkin
|
||||
name = "officer's display case"
|
||||
desc = "A display case containing a humble stechkin pistol. Never forget your roots."
|
||||
locked = 1
|
||||
req_access = list(access_syndicate_command)
|
||||
start_showpiece_type = /obj/item/gun/projectile/automatic/pistol
|
||||
|
||||
/obj/structure/displaycase/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Peering through the glass, you see that it contains:</span>"
|
||||
if(occupant)
|
||||
. += "[bicon(occupant)] <span class='notice'>\A [occupant].</span>"
|
||||
else
|
||||
. += "Nothing."
|
||||
if(alert)
|
||||
. += "<span class='notice'>Hooked up with an anti-theft system.</span>"
|
||||
if(showpiece)
|
||||
. += "<span class='notice'>There's [showpiece] inside.</span>"
|
||||
if(trophy_message)
|
||||
. += "The plaque reads:\n [trophy_message]"
|
||||
|
||||
/obj/structure/displaycase/proc/dump()
|
||||
if(occupant)
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant = null
|
||||
occupant_overlay = null
|
||||
if(showpiece)
|
||||
showpiece.forceMove(loc)
|
||||
showpiece = null
|
||||
|
||||
/obj/structure/displaycase/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/displaycase/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
dump()
|
||||
if(!disassembled)
|
||||
new /obj/item/shard(loc)
|
||||
if(occupant)
|
||||
dump()
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
src.health -= 15
|
||||
src.healthcheck()
|
||||
if(3)
|
||||
if(prob(50))
|
||||
src.health -= 5
|
||||
src.healthcheck()
|
||||
trigger_alarm()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
health -= Proj.damage
|
||||
..()
|
||||
src.healthcheck()
|
||||
return
|
||||
/obj/structure/displaycase/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
density = FALSE
|
||||
broken = 1
|
||||
new /obj/item/shard( src.loc )
|
||||
playsound(src, "shatter", 70, TRUE)
|
||||
update_icon()
|
||||
trigger_alarm()
|
||||
|
||||
/obj/structure/displaycase/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/shard(loc)
|
||||
if(occupant) dump()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/displaycase/proc/healthcheck()
|
||||
if(src.health <= 0)
|
||||
health = 0
|
||||
if(!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/shard(loc)
|
||||
playsound(get_turf(src), "shatter", 70, 1)
|
||||
update_icon()
|
||||
spawn(0)
|
||||
if(!alarm_needs_power)
|
||||
burglar_alarm()
|
||||
else
|
||||
var/area/a = get_area(src)
|
||||
if(isarea(a) && a.power_equip)
|
||||
burglar_alarm()
|
||||
else
|
||||
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/structure/displaycase/proc/burglar_alarm()
|
||||
if(burglar_alarm && is_station_contact(z))
|
||||
/obj/structure/displaycase/proc/trigger_alarm()
|
||||
set waitfor = FALSE
|
||||
if(alert && is_station_contact(z))
|
||||
var/area/alarmed = get_area(src)
|
||||
alarmed.burglaralert(src)
|
||||
visible_message("<span class='danger'>The burglar alarm goes off!</span>")
|
||||
@@ -221,130 +85,153 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
|
||||
sleep(74) // 7.4 seconds long
|
||||
|
||||
/obj/structure/displaycase/update_icon()
|
||||
if(destroyed)
|
||||
icon_state = "glassbox2b"
|
||||
var/icon/I
|
||||
if(open)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox_open")
|
||||
else
|
||||
icon_state = "glassbox2[locked]"
|
||||
overlays = 0
|
||||
if(occupant)
|
||||
var/icon/occupant_icon=getFlatIcon(occupant)
|
||||
occupant_icon.Scale(16,16)
|
||||
occupant_overlay = image(occupant_icon)
|
||||
occupant_overlay.pixel_x = 8
|
||||
occupant_overlay.pixel_y = 8
|
||||
if(locked)
|
||||
occupant_overlay.alpha = 128
|
||||
overlays += occupant_overlay
|
||||
return
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassbox0")
|
||||
if(broken)
|
||||
I = icon('icons/obj/stationobjs.dmi',"glassboxb0")
|
||||
if(showpiece)
|
||||
var/icon/S = getFlatIcon(showpiece)
|
||||
S.Scale(17, 17)
|
||||
I.Blend(S,ICON_UNDERLAY,8,8)
|
||||
icon = I
|
||||
|
||||
/obj/structure/displaycase/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/card))
|
||||
var/obj/item/card/id/I = W
|
||||
if(!check_access(I))
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
locked = !locked
|
||||
if(!locked)
|
||||
to_chat(user, "[bicon(src)] <span class='notice'>\The [src] clicks as locks release, and it slowly opens for you.</span>")
|
||||
/obj/structure/displaycase/attackby(obj/item/I, mob/user, params)
|
||||
if(I.GetID() && !broken && openable)
|
||||
if(allowed(user))
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else
|
||||
to_chat(user, "[bicon(src)] <span class='notice'>You close \the [src] and swipe your card, locking it.</span>")
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
else if(iswelder(I) && user.a_intent == INTENT_HELP && !broken)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src].</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
else if(!alert && iscrowbar(I) && openable) //Only applies to the lab cage and player made display cases
|
||||
if(broken)
|
||||
if(showpiece)
|
||||
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed case</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start to [open ? "close":"open"] [src].</span>")
|
||||
if(do_after(user, 20 * I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else if(open && !showpiece)
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
showpiece = I
|
||||
to_chat(user, "<span class='notice'>You put [I] on display</span>")
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/stack/sheet/glass) && broken)
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two glass sheets to fix the case!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start fixing [src]...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(2)
|
||||
broken = 0
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/proc/toggle_lock(mob/user)
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(showpiece && (broken || open))
|
||||
to_chat(user, "<span class='notice'>You deactivate the hover field built into the case.</span>")
|
||||
dump()
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
if(istype(W,/obj/item/crowbar) && (!locked || destroyed))
|
||||
user.visible_message("[user.name] pries \the [src] apart.", \
|
||||
"You pry \the [src] apart.", \
|
||||
"You hear something pop.")
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, W.usesound, 50, 1)
|
||||
dump()
|
||||
var/obj/item/airlock_electronics/C = circuit
|
||||
if(!C)
|
||||
C = new (src)
|
||||
C.one_access = !(req_access && req_access.len>0)
|
||||
if(!C.one_access)
|
||||
C.conf_access = req_access
|
||||
else
|
||||
C.conf_access = req_one_access
|
||||
|
||||
if(!destroyed)
|
||||
var/obj/structure/displaycase_frame/F = new(T)
|
||||
F.state = DISPLAYCASE_FRAME_SCREWDRIVER
|
||||
F.circuit = C
|
||||
F.circuit.forceMove(F)
|
||||
if(burglar_alarm)
|
||||
new /obj/item/assembly/prox_sensor(T)
|
||||
F.update_icon()
|
||||
else
|
||||
C.forceMove(T)
|
||||
circuit = null
|
||||
new /obj/machinery/constructable_frame/machine_frame(T)
|
||||
qdel(src)
|
||||
return
|
||||
if(W.flags & ABSTRACT)
|
||||
to_chat(user, "<span class='danger'>You can't put this into the case.</span>")
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(locked && !destroyed)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
else if(!locked)
|
||||
dump()
|
||||
to_chat(user, "<span class='danger'>You smash \the [W] into the delicate electronics at the bottom of the case, and deactivate the hover field.</span>")
|
||||
update_icon()
|
||||
else
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked, you can't put anything into it.</span>")
|
||||
//prevents remote "kicks" with TK
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
if(!occupant)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='notice'>[W] is stuck to you. You cannot put it in [src]!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src], and it floats as the hoverfield activates.</span>")
|
||||
user.drop_item()
|
||||
W.forceMove(src)
|
||||
occupant=W
|
||||
update_icon()
|
||||
user.visible_message("<span class='danger'>[user] kicks the display case.</span>")
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
take_damage(2)
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
if(destroyed || (!locked && user.a_intent == INTENT_HARM))
|
||||
if(occupant)
|
||||
dump()
|
||||
to_chat(user, "<span class='danger'>You smash your fist into the delicate electronics at the bottom of the case, and deactivate the hover field.</span>")
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_KICK)
|
||||
user.visible_message("<span class='danger'>[user.name] kicks \the [src]!</span>", \
|
||||
"<span class='danger'>You kick \the [src]!</span>", \
|
||||
"You hear glass crack.")
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
else if(!locked)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/print = H.get_full_print()
|
||||
if(!ue)
|
||||
to_chat(user, "<span class='notice'>Your press your thumb against the fingerprint scanner, registering your identity with the case.</span>")
|
||||
ue = print
|
||||
return
|
||||
if(ue != print)
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
/obj/structure/displaycase_chassis
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
name = "display case chassis"
|
||||
desc = "The wooden base of a display case."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "glassbox_chassis"
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='notice'>Your press your thumb against the fingerprint scanner, and deactivate the hover field built into the case.</span>")
|
||||
dump()
|
||||
update_icon()
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I)) //The player can only deconstruct the wooden frame
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/wood(get_turf(src), 5)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/airlock_electronics))
|
||||
to_chat(user, "<span class='notice'>You start installing the electronics into [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30, target = src))
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
electronics = I
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 10)
|
||||
to_chat(user, "<span class='warning'>You need ten glass sheets to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
G.use(10)
|
||||
var/obj/structure/displaycase/display = new(src.loc)
|
||||
if(electronics)
|
||||
electronics.forceMove(display)
|
||||
display.electronics = electronics
|
||||
if(electronics.one_access)
|
||||
display.req_one_access = electronics.conf_access
|
||||
else
|
||||
to_chat(src, "[bicon(src)] <span class='warning'>\The [src] is empty!</span>")
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("[user.name] gently runs [user.p_their()] hands over [src] in appreciation of its contents.", \
|
||||
"You gently run your hands over [src] in appreciation of its contents.", \
|
||||
"You hear someone streaking glass with their greasy hands.")
|
||||
display.req_access = electronics.conf_access
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
#undef DISPLAYCASE_FRAME_CIRCUIT
|
||||
#undef DISPLAYCASE_FRAME_SCREWDRIVER
|
||||
//The captains display case requiring specops ID access is intentional.
|
||||
//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed.
|
||||
/obj/structure/displaycase/captain
|
||||
alert = TRUE
|
||||
start_showpiece_type = /obj/item/gun/energy/laser/captain
|
||||
req_access = list(access_cent_specops)
|
||||
|
||||
/obj/structure/displaycase/labcage
|
||||
name = "lab cage"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
start_showpiece_type = /obj/item/clothing/mask/facehugger/lamarr
|
||||
req_access = list(access_rd)
|
||||
|
||||
/obj/structure/displaycase/stechkin
|
||||
name = "officer's display case"
|
||||
desc = "A display case containing a humble stechkin pistol. Never forget your roots."
|
||||
start_showpiece_type = /obj/item/gun/projectile/automatic/pistol
|
||||
req_access = list(access_syndicate_command)
|
||||
@@ -281,7 +281,7 @@
|
||||
qdel(source)
|
||||
|
||||
/obj/structure/door_assembly/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/turf/T = get_turf(src)
|
||||
if(!disassembled)
|
||||
material_amt = rand(2,4)
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Move()
|
||||
. = ..()
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
icon_state = "dresser"
|
||||
density = 1
|
||||
anchored = 1
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 25
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user as mob)
|
||||
if(!Adjacent(user))//no tele-grooming
|
||||
@@ -82,11 +80,15 @@
|
||||
user.visible_message("[user] has secured [src]'s bolts.", \
|
||||
"<span class='notice'>You have secured [src]'s bolts.</span>")
|
||||
anchored = 1
|
||||
else
|
||||
if(iscrowbar(W) && !anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is attempting to dismantle [src].", \
|
||||
"<span class='notice'>You begin to dismantle [src]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
new /obj/item/stack/sheet/wood (loc, 30)
|
||||
qdel(src)
|
||||
return
|
||||
if(iscrowbar(W) && !anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is attempting to dismantle [src].", "<span class='notice'>You begin to dismantle [src]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
deconstruct()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/dresser/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/wood(drop_location(), 30)
|
||||
qdel(src)
|
||||
@@ -31,6 +31,7 @@
|
||||
part = null
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/e_chair/verb/activate_e_chair()
|
||||
set name = "Activate Electric Chair"
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
icon_state = "extinguisher_closed"
|
||||
anchored = 1
|
||||
density = 0
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
var/obj/item/extinguisher/has_extinguisher = null
|
||||
var/extinguishertype
|
||||
var/opened = 0
|
||||
@@ -47,7 +49,17 @@
|
||||
/obj/structure/extinguisher_cabinet/Destroy()
|
||||
QDEL_NULL(has_extinguisher)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/ex_act(severity)
|
||||
if(has_extinguisher)
|
||||
has_extinguisher.ex_act(severity)
|
||||
..()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
|
||||
if(A == has_extinguisher)
|
||||
has_extinguisher = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
@@ -64,6 +76,7 @@
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
else if(istype(O, /obj/item/weldingtool))
|
||||
if(has_extinguisher)
|
||||
to_chat(user, "<span class='warning'>You need to remove the extinguisher before deconstructing the cabinet!</span>")
|
||||
@@ -82,13 +95,14 @@
|
||||
visible_message("<span class='notice'>[user] slices apart [src].</span>",
|
||||
"<span class='notice'>You cut [src] apart with [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
new material_drop(T)
|
||||
qdel(src)
|
||||
else
|
||||
deconstruct(TRUE)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
@@ -127,6 +141,22 @@
|
||||
opened = !opened
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/obj_break(damage_flag)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
broken = 1
|
||||
opened = 1
|
||||
if(has_extinguisher)
|
||||
has_extinguisher.forceMove(loc)
|
||||
has_extinguisher = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal(loc)
|
||||
if(has_extinguisher)
|
||||
has_extinguisher.forceMove(loc)
|
||||
has_extinguisher = null
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/update_icon()
|
||||
if(!opened)
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
|
||||
can_deconstruct = TRUE
|
||||
max_integrity = 100
|
||||
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/wall,
|
||||
@@ -123,21 +122,25 @@
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
dismantle(user)
|
||||
dismantle(user, TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
||||
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter) || istype(W, /obj/item/pickaxe/drill/diamonddrill) || istype(W, /obj/item/pickaxe/drill/jackhammer) || istype(W, /obj/item/melee/energy/blade))
|
||||
dismantle(user)
|
||||
dismantle(user, TRUE)
|
||||
|
||||
/obj/structure/falsewall/proc/dismantle(mob/user)
|
||||
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE)
|
||||
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='warning'>You dismantle the false wall.</span>")
|
||||
if(can_deconstruct)
|
||||
new girder_type(loc)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
||||
deconstruct(disassembled)
|
||||
|
||||
/obj/structure/falsewall/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(disassembled)
|
||||
new girder_type(loc)
|
||||
if(mineral_amount)
|
||||
for(var/i in 1 to mineral_amount)
|
||||
new mineral(loc)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
@@ -224,6 +227,7 @@
|
||||
mineral = /obj/item/stack/sheet/mineral/diamond
|
||||
walltype = /turf/simulated/wall/mineral/diamond
|
||||
canSmoothWith = list(/obj/structure/falsewall/diamond, /turf/simulated/wall/mineral/diamond)
|
||||
max_integrity = 800
|
||||
|
||||
|
||||
/obj/structure/falsewall/plasma
|
||||
@@ -333,8 +337,7 @@
|
||||
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
|
||||
icon = 'icons/turf/walls/clockwork_wall.dmi'
|
||||
icon_state = "clockwork_wall"
|
||||
burn_state = FIRE_PROOF
|
||||
unacidable = TRUE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
mineral_amount = 1
|
||||
canSmoothWith = list(/obj/effect/clockwork/overlay/wall, /obj/structure/falsewall/brass)
|
||||
girder_type = /obj/structure/clockwork/wall_gear/displaced
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/flora
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 150
|
||||
|
||||
//trees
|
||||
/obj/structure/flora/tree
|
||||
@@ -244,7 +244,7 @@
|
||||
desc = "a rock"
|
||||
icon_state = "rock1"
|
||||
icon = 'icons/obj/flora/rocks.dmi'
|
||||
burn_state = FIRE_PROOF
|
||||
resistance_flags = FIRE_PROOF
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/flora/rock/New()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
new/obj/item/stack/sheet/metal(drop_location())
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/fluff/empty_terrarium //Empty terrariums are created when a preserved terrarium in a lavaland seed vault is activated.
|
||||
name = "empty terrarium"
|
||||
|
||||
@@ -173,32 +173,7 @@
|
||||
update_icon() //Not really needed without overlays, but keeping just in case
|
||||
updateUsrDialog()
|
||||
|
||||
/*
|
||||
Overlays for cart_unused
|
||||
/obj/structure/foodcart/update_icon()
|
||||
overlays = null
|
||||
if(food1)
|
||||
overlays += "cart_food1"
|
||||
if(food2)
|
||||
overlays += "cart_food2"
|
||||
if(food3)
|
||||
overlays += "cart_food3"
|
||||
if(food4)
|
||||
overlays += "cart_food4"
|
||||
if(food5)
|
||||
overlays += "cart_food5"
|
||||
if(food6)
|
||||
overlays += "cart_food6"
|
||||
if(drink1)
|
||||
overlays += "cart_drink1"
|
||||
if(drink2)
|
||||
overlays += "cart_drink2"
|
||||
if(drink3)
|
||||
overlays += "cart_drink3"
|
||||
if(drink4)
|
||||
overlays += "cart_drink4"
|
||||
if(drink5)
|
||||
overlays += "cart_drink5"
|
||||
if(drink6)
|
||||
overlays += "cart_drink6"
|
||||
*/
|
||||
/obj/structure/foodcart/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal(loc, 4)
|
||||
qdel(src)
|
||||
@@ -6,7 +6,7 @@
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/state = GIRDER_NORMAL
|
||||
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
|
||||
var/health = 200
|
||||
max_integrity = 200
|
||||
var/can_displace = TRUE //If the girder can be moved around by crowbarring it
|
||||
var/metalUsed = 2 //used to determine amount returned in deconstruction
|
||||
|
||||
@@ -29,24 +29,6 @@
|
||||
for(var/i=0;i < metalAmount;i++)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
|
||||
/obj/structure/girder/attack_animal(mob/living/simple_animal/M)
|
||||
M.changeNext_move(CLICK_CD_MELEE)
|
||||
M.do_attack_animation(src)
|
||||
if((M.environment_smash & ENVIRONMENT_SMASH_STRUCTURES) || (M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS))
|
||||
if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS)
|
||||
ex_act(2)
|
||||
M.visible_message("<span class='warning'>[M] smashes through \the [src].</span>", "<span class='warning'>You smash through \the [src].</span>")
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M] smashes against \the [src].</span>", "<span class='warning'>You smash against \the [src].</span>")
|
||||
take_damage(rand(25, 75))
|
||||
return
|
||||
|
||||
/obj/structure/girder/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
..()
|
||||
var/temp_check = exposed_temperature
|
||||
@@ -378,62 +360,30 @@
|
||||
. = . || mover.checkpass(PASSGRILLE)
|
||||
|
||||
/obj/structure/girder/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/remains = pick(/obj/item/stack/rods, /obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/blob_act()
|
||||
if(prob(40))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/narsie_act()
|
||||
if(prob(25))
|
||||
new /obj/structure/girder/cult(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/bullet_act(obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
||||
ex_act(2)
|
||||
else
|
||||
take_damage(Proj.damage)
|
||||
..()
|
||||
return 0
|
||||
|
||||
/obj/structure/girder/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
return
|
||||
if(2)
|
||||
if(prob(75))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
if(3)
|
||||
if(prob(40))
|
||||
var/remains = pick(/obj/item/stack/rods,/obj/item/stack/sheet/metal)
|
||||
new remains(loc)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/girder/displaced
|
||||
name = "displaced girder"
|
||||
icon_state = "displaced"
|
||||
anchored = 0
|
||||
state = GIRDER_DISPLACED
|
||||
girderpasschance = 25
|
||||
health = 120
|
||||
max_integrity = 120
|
||||
|
||||
/obj/structure/girder/reinforced
|
||||
name = "reinforced girder"
|
||||
icon_state = "reinforced"
|
||||
state = GIRDER_REINF
|
||||
girderpasschance = 0
|
||||
health = 350
|
||||
max_integrity = 350
|
||||
|
||||
/obj/structure/girder/cult
|
||||
name = "runed girder"
|
||||
@@ -501,17 +451,13 @@
|
||||
var/turf/T = get_turf(src)
|
||||
T.ChangeTurf(/turf/simulated/wall/cult)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/cult/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/runed_metal(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/cult/narsie_act()
|
||||
return
|
||||
|
||||
/obj/structure/girder/cult/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
layer = BELOW_OBJ_LAYER
|
||||
level = 3
|
||||
armor = list(melee = 50, bullet = 70, laser = 70, energy = 100, bomb = 10, bio = 100, rad = 100)
|
||||
armor = list("melee" = 50, "bullet" = 70, "laser" = 70, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
|
||||
max_integrity = 50
|
||||
integrity_failure = 20
|
||||
var/rods_type = /obj/item/stack/rods
|
||||
@@ -42,16 +42,9 @@
|
||||
//height=42
|
||||
icon='icons/fence-ns.dmi'
|
||||
|
||||
/obj/structure/grille/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(rand(5,10), BRUTE, 0)
|
||||
|
||||
/obj/structure/grille/blob_act()
|
||||
if(!broken)
|
||||
obj_break()
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/grille/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -74,6 +67,11 @@
|
||||
shock(user, 70)
|
||||
shockcooldown = world.time + my_shockcooldown
|
||||
|
||||
/obj/structure/grille/attack_animal(mob/user)
|
||||
. = ..()
|
||||
if(!shock(user, 70))
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/hulk_damage()
|
||||
return 60
|
||||
|
||||
@@ -94,14 +92,9 @@
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/attack_alien(mob/living/user)
|
||||
if(istype(user, /mob/living/carbon/alien/larva))
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
|
||||
"<span class='warning'>You mangle [src].</span>", \
|
||||
"You hear twisting metal.")
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='warning'>[user] mangles [src].</span>")
|
||||
if(!shock(user, 70))
|
||||
take_damage(20, BRUTE, "melee", 1)
|
||||
|
||||
@@ -204,39 +197,31 @@
|
||||
W.state = WINDOW_OUT_OF_FRAME
|
||||
to_chat(user, "<span class='notice'>You place the [W] on [src].</span>")
|
||||
W.update_nearby_icons()
|
||||
return
|
||||
|
||||
/obj/structure/grille/attacked_by(obj/item/I, mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(!(I.flags&NOBLUDGEON))
|
||||
if(I.force)
|
||||
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>")
|
||||
take_damage(I.force * 0.3, I.damtype)
|
||||
|
||||
/obj/structure/grille/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
playsound(src, 'sound/effects/grillehit.ogg', 80, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 80, 1)
|
||||
playsound(src, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/grille/deconstruct(disassembled = TRUE)
|
||||
if(!loc) //if already qdel'd somehow, we do nothing
|
||||
return
|
||||
if(can_deconstruct)
|
||||
var/obj/R = new rods_type(loc, rods_amount)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/obj/R = new rods_type(drop_location(), rods_amount)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/structure/grille/obj_break()
|
||||
if(!broken && can_deconstruct)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
new broken_type(loc)
|
||||
var/obj/R = new rods_type(loc, rods_broken)
|
||||
var/obj/R = new rods_type(drop_location(), rods_broken)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
@@ -266,15 +251,17 @@
|
||||
if(exposed_temperature > T0C + 1500)
|
||||
take_damage(1, BURN, 0, 0)
|
||||
|
||||
/obj/structure/grille/hitby(atom/movable/AM)
|
||||
if(istype(AM, /obj))
|
||||
/obj/structure/grille/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
if(isobj(AM))
|
||||
if(prob(50) && anchored && !broken)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(loc, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
var/obj/O = AM
|
||||
if(O.throwforce != 0)//don't want to let people spam tesla bolts, this way it will break after time
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/broken // Pre-broken grilles for map placement
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
anchored = TRUE
|
||||
max_integrity = 1
|
||||
armor = list("melee" = 0, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 0, "bio" = 0, "rad" = 0)
|
||||
armor = list("melee" = 0, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = 20)
|
||||
var/obj/item/holosign_creator/projector
|
||||
|
||||
/obj/structure/holosign/New(loc, source_projector)
|
||||
@@ -32,9 +32,9 @@
|
||||
/obj/structure/holosign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 80, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 80, 1)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/holosign/wetsign
|
||||
name = "wet floor sign"
|
||||
|
||||
@@ -19,12 +19,11 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
|
||||
max_integrity = 50
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "wall"
|
||||
var/torn = /obj/item/inflatable/torn
|
||||
var/intact = /obj/item/inflatable
|
||||
var/health = 50.0
|
||||
|
||||
/obj/structure/inflatable/Initialize(location)
|
||||
..()
|
||||
@@ -41,97 +40,28 @@
|
||||
/obj/structure/inflatable/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
deflate(1)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(50))
|
||||
deflate(1)
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/blob_act()
|
||||
deflate(1)
|
||||
|
||||
/obj/structure/inflatable/attack_hand(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/attack_generic(mob/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] tears open [src]!</span>")
|
||||
deflate(1)
|
||||
else //for nicer text~
|
||||
user.visible_message("<span class='danger'>[user] tears at [src]!</span>")
|
||||
|
||||
/obj/structure/inflatable/attack_alien(mob/user as mob)
|
||||
if(islarva(user))
|
||||
return
|
||||
attack_generic(user, 15)
|
||||
|
||||
/obj/structure/inflatable/attack_animal(mob/user as mob)
|
||||
if(!isanimal(user))
|
||||
return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0)
|
||||
return
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
|
||||
/obj/structure/inflatable/attack_slime(mob/user as mob)
|
||||
var/mob/living/simple_animal/slime/S = user
|
||||
if(!S.is_adult)
|
||||
return
|
||||
attack_generic(user, rand(10, 15))
|
||||
|
||||
/obj/structure/inflatable/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(!istype(W))
|
||||
return
|
||||
if(is_pointed(W))
|
||||
visible_message("<span class='danger'>[user] pierces [src] with [W]!</span>")
|
||||
deflate(1)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
hit(W.force)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/proc/hit(var/damage, var/sound_effect = 1)
|
||||
health = max(0, health - damage)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
|
||||
/obj/structure/inflatable/AltClick()
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(!Adjacent(usr))
|
||||
return
|
||||
deflate()
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/inflatable/proc/deflate(var/violent=0)
|
||||
/obj/structure/inflatable/deconstruct(disassembled = TRUE)
|
||||
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
|
||||
if(violent)
|
||||
if(!disassembled)
|
||||
visible_message("[src] rapidly deflates!")
|
||||
var/obj/item/inflatable/torn/R = new torn(loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
else
|
||||
visible_message("[src] slowly deflates.")
|
||||
spawn(50)
|
||||
var/obj/item/inflatable/R = new intact(loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/inflatable/verb/hand_deflate()
|
||||
@@ -142,7 +72,7 @@
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
deflate()
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/item/inflatable/door
|
||||
name = "inflatable door"
|
||||
@@ -278,4 +208,4 @@
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
@@ -8,6 +8,7 @@
|
||||
desc = "The frame of a meat spike."
|
||||
density = 1
|
||||
anchored = 0
|
||||
max_integrity = 200
|
||||
|
||||
/obj/structure/kitchenspike_frame/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
@@ -26,6 +27,9 @@
|
||||
new /obj/structure/kitchenspike(loc)
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
@@ -37,6 +41,7 @@
|
||||
anchored = 1
|
||||
buckle_lying = FALSE
|
||||
can_buckle = TRUE
|
||||
max_integrity = 250
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user)
|
||||
@@ -52,10 +57,7 @@
|
||||
playsound(loc, G.usesound, 100, 1)
|
||||
if(do_after(user, 20 * G.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
|
||||
new /obj/item/stack/rods(loc, 4)
|
||||
new /obj/structure/kitchenspike_frame(loc)
|
||||
add_fingerprint(user)
|
||||
qdel(src)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
|
||||
return
|
||||
@@ -63,16 +65,15 @@
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>")
|
||||
else
|
||||
if(isliving(G.affecting))
|
||||
if(!has_buckled_mobs())
|
||||
if(do_mob(user, src, 120))
|
||||
if(spike(G.affecting))
|
||||
G.affecting.visible_message("<span class='danger'>[user] slams [G.affecting] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
|
||||
qdel(G)
|
||||
return
|
||||
to_chat(user, "<span class='danger'>You can't use that on the spike!</span>")
|
||||
return
|
||||
if(isliving(G.affecting))
|
||||
if(!has_buckled_mobs())
|
||||
if(do_mob(user, src, 120))
|
||||
if(spike(G.affecting))
|
||||
G.affecting.visible_message("<span class='danger'>[user] slams [G.affecting] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
|
||||
qdel(G)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/proc/spike(mob/living/victim)
|
||||
|
||||
@@ -143,4 +144,13 @@
|
||||
if(has_buckled_mobs())
|
||||
for(var/mob/living/L in buckled_mobs)
|
||||
release_mob(L)
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/deconstruct(disassembled = TRUE)
|
||||
if(disassembled)
|
||||
var/obj/F = new /obj/structure/kitchenspike_frame(loc)
|
||||
transfer_fingerprints_to(F)
|
||||
else
|
||||
new /obj/item/stack/sheet/metal(loc, 4)
|
||||
new /obj/item/stack/rods(loc, 4)
|
||||
qdel(src)
|
||||
@@ -1,82 +0,0 @@
|
||||
/obj/structure/lamarr
|
||||
name = "Lab Cage"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "labcage1"
|
||||
desc = "A glass lab container for storing interesting creatures."
|
||||
density = 1
|
||||
anchored = 1
|
||||
unacidable = 1//Dissolving the case would also delete Lamarr
|
||||
var/health = 30
|
||||
var/occupied = 1
|
||||
var/destroyed = 0
|
||||
|
||||
/obj/structure/lamarr/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
new /obj/item/shard(loc)
|
||||
Break()
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
src.health -= 15
|
||||
src.healthcheck()
|
||||
if(3)
|
||||
if(prob(50))
|
||||
src.health -= 5
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/structure/lamarr/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
src.healthcheck()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/shard(loc)
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/lamarr/proc/healthcheck()
|
||||
if(src.health <= 0)
|
||||
if(!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/shard(loc)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
Break()
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/update_icon()
|
||||
if(src.destroyed)
|
||||
src.icon_state = "labcageb[src.occupied]"
|
||||
else
|
||||
src.icon_state = "labcage[src.occupied]"
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/lamarr/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/lamarr/attack_hand(mob/user as mob)
|
||||
if(src.destroyed)
|
||||
return
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] kicks the lab cage.</span>", "<span class='notice'>You kick 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)
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
@@ -5,7 +5,8 @@
|
||||
icon_state = "lattice"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
|
||||
max_integrity = 50
|
||||
layer = LATTICE_LAYER //under pipes
|
||||
plane = FLOOR_PLANE
|
||||
var/number_of_rods = 1
|
||||
@@ -41,24 +42,17 @@
|
||||
return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
|
||||
|
||||
/obj/structure/lattice/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/rods(get_turf(src), number_of_rods)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/rods(get_turf(src), number_of_rods)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/lattice/blob_act()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/lattice/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
qdel(src)
|
||||
if(3)
|
||||
return
|
||||
/obj/structure/lattice/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/lattice/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FOUR)
|
||||
qdel(src)
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/lattice/clockwork
|
||||
name = "cog lattice"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
move_resist = INFINITY // just killing it tears a massive hole in the ground, let's not move it
|
||||
anchored = TRUE
|
||||
burn_state = LAVA_PROOF
|
||||
resistance_flags = FIRE_PROOF | LAVA_PROOF
|
||||
|
||||
var/gps = null
|
||||
var/obj/effect/light_emitter/tendril/emitted_light
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
|
||||
icon = 'icons/obj/doors/mineral_doors.dmi'
|
||||
icon_state = "metal"
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 100, bomb = 10, bio = 100, rad = 100)
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 50, "acid" = 50)
|
||||
var/initial_state
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
@@ -52,9 +53,6 @@
|
||||
/obj/structure/mineral_door/attack_hand(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_animal(mob/user)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/mineral_door/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
SwitchState()
|
||||
@@ -139,23 +137,7 @@
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
attacked_by(W, user)
|
||||
|
||||
/obj/structure/mineral_door/attacked_by(obj/item/I, mob/user)
|
||||
if(I.damtype != STAMINA)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='notice'>[user] hits \the [src] with \the [I].</span>")
|
||||
if(damageSound)
|
||||
playsound(loc, damageSound, 100, 1)
|
||||
else
|
||||
playsound(loc, I.hitsound, 100, 1)
|
||||
hardness -= I.force / 100
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
deconstruct(FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/structure/mineral_door/deconstruct(disassembled = TRUE)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -166,28 +148,14 @@
|
||||
new sheetType(T, max(sheetAmount - 2, 1))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mineral_door/ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
deconstruct(FALSE)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
deconstruct(FALSE)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
hardness = 3
|
||||
max_integrity = 300
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
name = "silver door"
|
||||
icon_state = "silver"
|
||||
sheetType = /obj/item/stack/sheet/mineral/silver
|
||||
hardness = 3
|
||||
max_integrity = 300
|
||||
|
||||
/obj/structure/mineral_door/gold
|
||||
name = "gold door"
|
||||
@@ -198,14 +166,14 @@
|
||||
name = "uranium door"
|
||||
icon_state = "uranium"
|
||||
sheetType = /obj/item/stack/sheet/mineral/uranium
|
||||
hardness = 3
|
||||
max_integrity = 300
|
||||
light_range = 2
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
name = "sandstone door"
|
||||
icon_state = "sandstone"
|
||||
sheetType = /obj/item/stack/sheet/mineral/sandstone
|
||||
hardness = 0.5
|
||||
max_integrity = 100
|
||||
|
||||
/obj/structure/mineral_door/transparent
|
||||
opacity = 0
|
||||
@@ -241,7 +209,7 @@
|
||||
name = "diamond door"
|
||||
icon_state = "diamond"
|
||||
sheetType = /obj/item/stack/sheet/mineral/diamond
|
||||
hardness = 10
|
||||
max_integrity = 1000
|
||||
|
||||
/obj/structure/mineral_door/wood
|
||||
name = "wood door"
|
||||
@@ -250,8 +218,8 @@
|
||||
closeSound = 'sound/effects/doorcreaky.ogg'
|
||||
sheetType = /obj/item/stack/sheet/wood
|
||||
hardness = 1
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 200
|
||||
|
||||
/obj/structure/mineral_door/resin
|
||||
name = "resin door"
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
anchored = 1
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
var/list/ui_users = list()
|
||||
|
||||
/obj/structure/mirror/New(turf/T, newdir = SOUTH, building = FALSE)
|
||||
@@ -34,26 +36,16 @@
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
/obj/structure/mirror/proc/shatter()
|
||||
if(broken)
|
||||
return
|
||||
broken = TRUE
|
||||
icon_state = "mirror_broke"
|
||||
playsound(src, "shatter", 70, 1)
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
|
||||
|
||||
/obj/structure/mirror/bullet_act(obj/item/projectile/Proj)
|
||||
if(prob(Proj.damage * 2))
|
||||
if(!broken)
|
||||
shatter()
|
||||
else
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
..()
|
||||
|
||||
/obj/structure/mirror/obj_break(damage_flag, mapload)
|
||||
if(!broken && !(flags & NODECONSTRUCT))
|
||||
icon_state = "mirror_broke"
|
||||
if(!mapload)
|
||||
playsound(src, "shatter", 70, TRUE)
|
||||
if(desc == initial(desc))
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
broken = TRUE
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(isscrewdriver(I))
|
||||
user.visible_message("<span class='notice'>[user] begins to unfasten [src].</span>", "<span class='notice'>You begin to unfasten [src].</span>")
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
@@ -64,59 +56,21 @@
|
||||
user.visible_message("<span class='notice'>[user] carefully places [src] on the floor.</span>", "<span class='notice'>You carefully place [src] on the floor.</span>")
|
||||
new /obj/item/mounted/mirror(get_turf(user))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
user.do_attack_animation(src)
|
||||
if(broken)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
return ..()
|
||||
|
||||
if(prob(I.force * 2))
|
||||
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
|
||||
shatter()
|
||||
else
|
||||
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
|
||||
/obj/structure/mirror/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!disassembled)
|
||||
new /obj/item/shard( src.loc )
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_alien(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(islarva(user))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
if(broken)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
shatter()
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_animal(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!isanimal(user))
|
||||
return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0)
|
||||
return
|
||||
M.do_attack_animation(src)
|
||||
if(broken)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
shatter()
|
||||
|
||||
|
||||
/obj/structure/mirror/attack_slime(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/mob/living/simple_animal/slime/S = user
|
||||
if(!S.is_adult)
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
if(broken)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||
shatter()
|
||||
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, TRUE)
|
||||
|
||||
|
||||
/obj/item/mounted/mirror
|
||||
@@ -204,8 +158,5 @@
|
||||
/obj/structure/mirror/magic/attackby(obj/item/I, mob/living/user, params)
|
||||
return
|
||||
|
||||
/obj/structure/mirror/magic/shatter()
|
||||
return //can't be broken. it's magic, i ain't gotta explain shit
|
||||
|
||||
/obj/structure/mirror/magic/proc/curse(mob/living/user)
|
||||
return
|
||||
@@ -11,9 +11,6 @@
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
to_chat(user, "Civilians: NT is recruiting! Please head SOUTH to the NT Recruitment office to join the station's crew!")
|
||||
|
||||
@@ -26,11 +23,6 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
|
||||
|
||||
|
||||
@@ -33,18 +33,5 @@
|
||||
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
if(src.reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='notice'>Out of water!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/mopbucket/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
return ..()
|
||||
@@ -16,6 +16,7 @@
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "morgue1"
|
||||
density = 1
|
||||
max_integrity = 400
|
||||
dir = EAST
|
||||
var/obj/structure/m_tray/connected = null
|
||||
var/list/status_descriptors = list(
|
||||
@@ -132,8 +133,9 @@
|
||||
else
|
||||
name = "Morgue"
|
||||
overlays.Cut()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/morgue/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
@@ -184,6 +186,7 @@
|
||||
var/obj/structure/morgue/connected = null
|
||||
anchored = 1.0
|
||||
pass_flags = LETPASSTHROW
|
||||
max_integrity = 350
|
||||
|
||||
|
||||
/obj/structure/m_tray/attack_hand(mob/user as mob)
|
||||
@@ -323,8 +326,9 @@
|
||||
name = text("Crematorium- '[]'", t)
|
||||
else
|
||||
name = "Crematorium"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/crematorium/relaymove(mob/user as mob)
|
||||
if(user.stat || locked)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "nboard00"
|
||||
density = 0
|
||||
anchored = 1
|
||||
max_integrity = 150
|
||||
var/notices = 0
|
||||
|
||||
/obj/structure/noticeboard/Initialize()
|
||||
@@ -29,6 +30,8 @@
|
||||
to_chat(user, "<span class='notice'>You pin the paper to the noticeboard.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(user as mob)
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
@@ -37,6 +40,10 @@
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
|
||||
/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/metal (loc, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 4
|
||||
armor = list(melee = 100, bullet = 80, laser = 80, energy = 100, bomb = 50, bio = 100, rad = 100)
|
||||
armor = list(melee = 100, bullet = 80, laser = 80, energy = 100, bomb = 50, bio = 100, rad = 100, fire = 50, acid = 50)
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
@@ -53,7 +53,7 @@
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
@@ -95,19 +95,8 @@
|
||||
return CanAStarPass(ID, to_dir, M.pulling)
|
||||
return TRUE //diseases, stings, etc can pass
|
||||
|
||||
/obj/structure/plasticflaps/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
new /obj/item/stack/sheet/plastic/five(loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -125,4 +114,4 @@
|
||||
T.air_update_turf(TRUE)
|
||||
|
||||
/obj/structure/plasticflaps/mining/CanAtmosPass(turf/T)
|
||||
return FALSE
|
||||
return FALSE
|
||||
@@ -46,6 +46,7 @@
|
||||
to_chat(user, "You dismantle [src].")
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(!anchored)
|
||||
@@ -70,6 +71,7 @@
|
||||
return
|
||||
anchored = 0
|
||||
to_chat(user, "<span class='notice'>You cut [src] free from the floor.</span>")
|
||||
return
|
||||
//Finishing the frame
|
||||
if(istype(W,/obj/item/stack/sheet))
|
||||
if(finished)
|
||||
@@ -96,6 +98,8 @@
|
||||
S.use(1)
|
||||
new /obj/structure/reflector/box (src.loc)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/proc/get_reflection(srcdir,pdir)
|
||||
return 0
|
||||
|
||||
@@ -17,8 +17,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
burn_state = LAVA_PROOF
|
||||
unacidable = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
var/open = FALSE
|
||||
var/locked = TRUE
|
||||
@@ -83,7 +82,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
if(open)
|
||||
. += "The inside of the the door has numbers written on it: <b>[get_combination()]</b>"
|
||||
|
||||
/obj/structure/safe/blob_act()
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity)
|
||||
|
||||
@@ -4,25 +4,18 @@
|
||||
opacity = 0
|
||||
density = 0
|
||||
layer = 3.5
|
||||
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
max_integrity = 100
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
|
||||
/obj/structure/sign/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/structure/sign/blob_act()
|
||||
qdel(src)
|
||||
return
|
||||
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 80, TRUE)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
@@ -35,14 +28,15 @@
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
else ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
burn_state = FLAMMABLE
|
||||
resistance_flags = FLAMMABLE
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
@@ -69,11 +63,13 @@
|
||||
S.icon_state = sign_state
|
||||
to_chat(user, "You fasten \the [S] with your [tool].")
|
||||
qdel(src)
|
||||
else ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/double/map
|
||||
name = "station map"
|
||||
desc = "A framed picture of the station."
|
||||
max_integrity = 500
|
||||
|
||||
/obj/structure/sign/double/map/left
|
||||
icon_state = "map-left"
|
||||
@@ -125,11 +121,13 @@
|
||||
name = "\improper DANGER: FIRE"
|
||||
desc = "A warning sign which reads 'DANGER: FIRE'"
|
||||
icon_state = "fire"
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/structure/sign/nosmoking_1
|
||||
name = "\improper NO SMOKING"
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
icon_state = "nosmoking"
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/structure/sign/nosmoking_2
|
||||
name = "\improper NO SMOKING"
|
||||
|
||||
@@ -24,42 +24,6 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/spawner/blob_act(obj/structure/blob/B) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable
|
||||
take_damage(400, BRUTE, "melee", 0, get_dir(src, B))
|
||||
|
||||
/obj/structure/spawner/ex_act(severity) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
obj_integrity = 0
|
||||
qdel(src)
|
||||
if(2)
|
||||
take_damage(rand(100, 250), BRUTE, "bomb", 0)
|
||||
if(3)
|
||||
take_damage(rand(10, 90), BRUTE, "bomb", 0)
|
||||
|
||||
/obj/structure/spawner/mech_melee_attack(obj/mecha/M) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable
|
||||
M.do_attack_animation(src)
|
||||
var/play_soundeffect = 0
|
||||
var/mech_damtype = M.damtype
|
||||
if(M.selected)
|
||||
mech_damtype = M.selected.damtype
|
||||
play_soundeffect = 1
|
||||
else
|
||||
switch(M.damtype)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 50, 1)
|
||||
if(TOX)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
|
||||
return take_damage(M.force*3, mech_damtype, "melee", play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs.
|
||||
|
||||
/obj/structure/spawner/syndicate
|
||||
name = "warp beacon"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
|
||||
@@ -5,76 +5,42 @@
|
||||
icon_state = ""
|
||||
density = 1
|
||||
anchored = 0
|
||||
var/hardness = 1
|
||||
max_integrity = 100
|
||||
var/oreAmount = 5
|
||||
var/material_drop_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/statue/attackby(obj/item/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(iswrench(W))
|
||||
if(anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is loosening the [name]'s bolts.", \
|
||||
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("[user] loosened the [name]'s bolts!", \
|
||||
"<span class='notice'>You loosen the [name]'s bolts!</span>")
|
||||
anchored = 0
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is securing the [name]'s bolts...", \
|
||||
"<span class='notice'>You are securing the [name]'s bolts...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("[user] has secured the [name]'s bolts.", \
|
||||
"<span class='notice'>You have secured the [name]'s bolts.</span>")
|
||||
anchored = 1
|
||||
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is slicing apart the [name]...", \
|
||||
"<span class='notice'>You are slicing apart the [name]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc)
|
||||
return
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name].</span>")
|
||||
Dismantle(TRUE)
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
var/obj/item/pickaxe/drill/jackhammer/D = W
|
||||
if(!loc)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
user.visible_message("[user] destroys the [name]!", \
|
||||
"<span class='notice'>You destroy the [name].</span>")
|
||||
D.playDigSound()
|
||||
qdel(src)
|
||||
|
||||
else if(iswelder(W) && !anchored)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
user.visible_message("[user] is slicing apart the [name].", \
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is slicing apart the [name]...", \
|
||||
"<span class='notice'>You are slicing apart the [name]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc)
|
||||
return
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name]!</span>")
|
||||
Dismantle(TRUE)
|
||||
else
|
||||
hardness -= W.force/100
|
||||
..()
|
||||
CheckHardness()
|
||||
return ..()
|
||||
"<span class='notice'>You slice apart the [name].</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
else if(iswelder(W))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
user.visible_message("[user] is slicing apart the [name].", \
|
||||
"<span class='notice'>You are slicing apart the [name]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc)
|
||||
return
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name]!</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -85,40 +51,18 @@
|
||||
/obj/structure/statue/CanAtmosPass()
|
||||
return !density
|
||||
|
||||
/obj/structure/statue/bullet_act(obj/item/projectile/Proj)
|
||||
hardness -= Proj.damage
|
||||
..()
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/statue/proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
Dismantle(TRUE)
|
||||
|
||||
/obj/structure/statue/proc/Dismantle(disassembled = TRUE)
|
||||
if(material_drop_type)
|
||||
var/drop_amt = oreAmount
|
||||
if(!disassembled)
|
||||
drop_amt -= 2
|
||||
if(drop_amt > 0)
|
||||
new material_drop_type(get_turf(src), drop_amt)
|
||||
/obj/structure/statue/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(material_drop_type)
|
||||
var/drop_amt = oreAmount
|
||||
if(!disassembled)
|
||||
drop_amt -= 2
|
||||
if(drop_amt > 0)
|
||||
new material_drop_type(get_turf(src), drop_amt)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/statue/ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(TRUE)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
Dismantle(TRUE)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/statue/uranium
|
||||
hardness = 3
|
||||
max_integrity = 300
|
||||
light_range = 2
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/uranium
|
||||
var/last_event = 0
|
||||
@@ -136,7 +80,7 @@
|
||||
|
||||
/obj/structure/statue/uranium/attackby(obj/item/W, mob/user, params)
|
||||
radiate()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/uranium/Bumped(atom/user)
|
||||
radiate()
|
||||
@@ -156,7 +100,7 @@
|
||||
active = null
|
||||
|
||||
/obj/structure/statue/plasma
|
||||
hardness = 2
|
||||
max_integrity = 200
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/plasma
|
||||
desc = "This statue is suitably made from plasma."
|
||||
|
||||
@@ -193,18 +137,18 @@
|
||||
investigate_log("[key_name(user)] ignited a plasma statue at [COORD(loc)]", "atmos")
|
||||
ignite(is_hot(W))
|
||||
return
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/plasma/proc/PlasmaBurn()
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 160)
|
||||
Dismantle(FALSE)
|
||||
deconstruct(FALSE)
|
||||
|
||||
/obj/structure/statue/plasma/proc/ignite(exposed_temperature)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn()
|
||||
|
||||
/obj/structure/statue/gold
|
||||
hardness = 3
|
||||
max_integrity = 300
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/gold
|
||||
desc = "This is a highly valuable statue made from gold."
|
||||
|
||||
@@ -229,7 +173,7 @@
|
||||
icon_state = "rd"
|
||||
|
||||
/obj/structure/statue/silver
|
||||
hardness = 3
|
||||
max_integrity = 300
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/silver
|
||||
desc = "This is a valuable statue made from silver."
|
||||
|
||||
@@ -254,7 +198,7 @@
|
||||
icon_state = "medborg"
|
||||
|
||||
/obj/structure/statue/diamond
|
||||
hardness = 10
|
||||
max_integrity = 1000
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/diamond
|
||||
desc = "This is a very expensive diamond statue."
|
||||
|
||||
@@ -271,7 +215,7 @@
|
||||
icon_state = "ai2"
|
||||
|
||||
/obj/structure/statue/bananium
|
||||
hardness = 3
|
||||
max_integrity = 300
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/bananium
|
||||
desc = "A bananium statue with a small engraving:'HOOOOOOONK'."
|
||||
var/spam_flag = 0
|
||||
@@ -286,7 +230,7 @@
|
||||
|
||||
/obj/structure/statue/bananium/attackby(obj/item/W, mob/user, params)
|
||||
honk()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/bananium/attack_hand(mob/user)
|
||||
honk()
|
||||
@@ -300,7 +244,7 @@
|
||||
spam_flag = 0
|
||||
|
||||
/obj/structure/statue/sandstone
|
||||
hardness = 0.5
|
||||
max_integrity = 50
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
|
||||
/obj/structure/statue/sandstone/assistant
|
||||
@@ -315,7 +259,7 @@
|
||||
icon_state = "venus"
|
||||
|
||||
/obj/structure/statue/tranquillite
|
||||
hardness = 0.5
|
||||
max_integrity = 300
|
||||
material_drop_type = /obj/item/stack/sheet/mineral/tranquillite
|
||||
desc = "..."
|
||||
|
||||
@@ -333,7 +277,9 @@
|
||||
to_chat(user, "It is fastened to the floor!")
|
||||
return
|
||||
setDir(turn(dir, 90))
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
/obj/structure/snowman
|
||||
name = "snowman"
|
||||
desc = "Seems someone made a snowman here."
|
||||
@@ -341,10 +287,10 @@
|
||||
icon_state = "snowman"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
max_integrity = 50
|
||||
|
||||
/obj/structure/snowman/built
|
||||
desc = "Just like the ones you remember from childhood!"
|
||||
max_integrity = 50
|
||||
|
||||
/obj/structure/snowman/built/Destroy()
|
||||
new /obj/item/reagent_containers/food/snacks/grown/carrot(drop_location())
|
||||
@@ -379,4 +325,4 @@
|
||||
icon = 'icons/obj/decorations.dmi'
|
||||
icon_state = "chickenstatue"
|
||||
anchored = 1
|
||||
density = 1
|
||||
density = 1
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "It's a gruesome pile of thick, sticky resin shaped like a nest."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
icon_state = "nest"
|
||||
var/health = 100
|
||||
max_integrity = 120
|
||||
var/image/nest_overlay
|
||||
comfort = 0
|
||||
|
||||
@@ -76,15 +76,15 @@
|
||||
M.layer = initial(M.layer)
|
||||
cut_overlay(nest_overlay)
|
||||
|
||||
/obj/structure/bed/nest/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
visible_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
|
||||
healthcheck()
|
||||
/obj/structure/bed/nest/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/bed/nest/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
density = FALSE
|
||||
qdel(src)
|
||||
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
return attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
@@ -17,8 +17,9 @@
|
||||
can_buckle = TRUE
|
||||
anchored = TRUE
|
||||
buckle_lying = TRUE
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 100
|
||||
integrity_failure = 30
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 2
|
||||
buckle_offset = -6
|
||||
@@ -39,18 +40,19 @@
|
||||
/obj/structure/bed/proc/handle_rotation()
|
||||
return
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
qdel(src)
|
||||
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
|
||||
if(iswrench(W) && !(flags & NODECONSTRUCT))
|
||||
playsound(loc, W.usesound, 50, TRUE)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(buildstacktype)
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
..()
|
||||
|
||||
/obj/structure/bed/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.environment_smash)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
@@ -60,7 +62,7 @@
|
||||
name = "roller bed"
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
burn_state = FIRE_PROOF
|
||||
resistance_flags = NONE
|
||||
anchored = FALSE
|
||||
comfort = 1
|
||||
|
||||
@@ -76,6 +78,8 @@
|
||||
user.visible_message("<span class='notice'>[user] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/roller/post_buckle_mob(mob/living/M)
|
||||
density = TRUE
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE // you sit in a chair, not lay
|
||||
anchored = TRUE
|
||||
burn_state = FIRE_PROOF
|
||||
resistance_flags = NONE
|
||||
max_integrity = 250
|
||||
integrity_failure = 25
|
||||
buckle_offset = 0
|
||||
var/buildstacktype = /obj/item/stack/sheet/metal
|
||||
var/buildstackamount = 1
|
||||
@@ -51,10 +53,18 @@
|
||||
SK.loc = E
|
||||
SK.master = E
|
||||
qdel(src)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
return
|
||||
if(iswrench(W) && !(flags & NODECONSTRUCT))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/deconstruct()
|
||||
// If we have materials, and don't have the NOCONSTRUCT flag
|
||||
if(buildstacktype && (!(flags & NODECONSTRUCT)))
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/structure/chair/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
@@ -137,8 +147,8 @@
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
icon_state = "wooden_chair"
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
buildstackamount = 3
|
||||
buildstacktype = /obj/item/stack/sheet/wood
|
||||
item_chair = /obj/item/chair/wood
|
||||
@@ -155,8 +165,8 @@
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255, 255, 255)
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 30
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
buildstackamount = 2
|
||||
item_chair = null
|
||||
var/image/armrest = null
|
||||
@@ -287,27 +297,6 @@
|
||||
icon_state = "bar"
|
||||
item_chair = /obj/item/chair/stool/bar
|
||||
|
||||
/obj/structure/chair/stool/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if(prob(70))
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(50))
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/chair/stool/blob_act()
|
||||
if(prob(75))
|
||||
new buildstacktype(loc, buildstackamount)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/chair
|
||||
name = "chair"
|
||||
desc = "Bar brawl essential."
|
||||
@@ -412,7 +401,7 @@
|
||||
name = "wooden chair"
|
||||
icon_state = "wooden_chair_toppled"
|
||||
item_state = "woodenchair"
|
||||
burn_state = FLAMMABLE
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
origin_type = /obj/structure/chair/wood
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
icon_state = "wood_frame"
|
||||
framestack = /obj/item/stack/sheet/wood
|
||||
framestackamount = 2
|
||||
burn_state = FLAMMABLE
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/sheet/wood))
|
||||
@@ -127,8 +127,7 @@
|
||||
name = "brass table frame"
|
||||
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
|
||||
icon_state = "brass_frame"
|
||||
burn_state = FIRE_PROOF
|
||||
unacidable = 1
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
framestack = /obj/item/stack/tile/brass
|
||||
framestackamount = 1
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
if(istype(I, /obj/item/grab))
|
||||
tablepush(I, user)
|
||||
return
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(isscrewdriver(I) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
@@ -244,7 +244,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/turf/T = get_turf(src)
|
||||
new buildstack(T, buildstackamount)
|
||||
if(!wrench_disassembly)
|
||||
@@ -368,9 +368,10 @@
|
||||
icon = 'icons/obj/smooth_structures/glass_table.dmi'
|
||||
icon_state = "glass_table"
|
||||
buildstack = /obj/item/stack/sheet/glass
|
||||
max_integrity = 70
|
||||
unacidable = 1
|
||||
canSmoothWith = null
|
||||
max_integrity = 70
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
var/list/debris = list()
|
||||
|
||||
/obj/structure/table/glass/New()
|
||||
@@ -385,7 +386,7 @@
|
||||
|
||||
/obj/structure/table/glass/Crossed(atom/movable/AM, oldloc)
|
||||
. = ..()
|
||||
if(!can_deconstruct)
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
if(!isliving(AM))
|
||||
return
|
||||
@@ -421,13 +422,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(disassembled)
|
||||
..()
|
||||
return
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, "shatter", 50, 1)
|
||||
playsound(T, "shatter", 50, TRUE)
|
||||
for(var/X in debris)
|
||||
var/atom/movable/AM = X
|
||||
AM.forceMove(T)
|
||||
@@ -452,8 +453,7 @@
|
||||
buildstack = /obj/item/stack/sheet/wood
|
||||
max_integrity = 70
|
||||
canSmoothWith = list(/obj/structure/table/wood, /obj/structure/table/wood/poker)
|
||||
burn_state = FLAMMABLE
|
||||
burntime = 20
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/structure/table/wood/narsie_act(total_override = TRUE)
|
||||
if(!total_override)
|
||||
@@ -508,7 +508,7 @@
|
||||
canSmoothWith = list(/obj/structure/table/reinforced, /obj/structure/table)
|
||||
max_integrity = 200
|
||||
integrity_failure = 50
|
||||
armor = list(melee = 10, bullet = 30, laser = 30, energy = 100, bomb = 20, bio = 0, rad = 0)
|
||||
armor = list("melee" = 10, "bullet" = 30, "laser" = 30, "energy" = 100, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 70)
|
||||
|
||||
/obj/structure/table/reinforced/deconstruction_hints(mob/user)
|
||||
if(deconstruction_ready)
|
||||
@@ -542,14 +542,14 @@
|
||||
to_chat(user, "<span class='notice'>You weaken the table.</span>")
|
||||
deconstruction_ready = TRUE
|
||||
else
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/reinforced/brass
|
||||
name = "brass table"
|
||||
desc = "A solid, slightly beveled brass table."
|
||||
icon = 'icons/obj/smooth_structures/brass_table.dmi'
|
||||
icon_state = "brass_table"
|
||||
burn_state = FIRE_PROOF
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
frame = /obj/structure/table_frame/brass
|
||||
framestack = /obj/item/stack/tile/brass
|
||||
buildstack = /obj/item/stack/tile/brass
|
||||
@@ -616,7 +616,7 @@
|
||||
held_items += item.UID()
|
||||
|
||||
/obj/structure/table/tray/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/turf/T = get_turf(src)
|
||||
new buildstack(T, buildstackamount)
|
||||
qdel(src)
|
||||
@@ -680,7 +680,7 @@
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
if(iswrench(W) && can_deconstruct)
|
||||
if(iswrench(W) && !(flags & NODECONSTRUCT) && user.a_intent != INTENT_HELP)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
@@ -706,11 +706,11 @@
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
|
||||
playsound(loc, 'sound/items/dodgeball.ogg', 80, TRUE)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 40, 1)
|
||||
playsound(loc, 'sound/items/welder.ogg', 40, TRUE)
|
||||
|
||||
/obj/structure/rack/skeletal_bar
|
||||
name = "skeletal minibar"
|
||||
@@ -729,7 +729,7 @@
|
||||
*/
|
||||
|
||||
/obj/structure/rack/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
density = FALSE
|
||||
var/obj/item/rack_parts/newparts = new(loc)
|
||||
transfer_fingerprints_to(newparts)
|
||||
@@ -753,7 +753,7 @@
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/item/rack_parts/attack_self(mob/user)
|
||||
if(building)
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
if(istype(I, /obj/item/tank/plasma))
|
||||
if(plasmatanks < 10)
|
||||
user.drop_item()
|
||||
@@ -74,6 +75,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(anchored)
|
||||
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
|
||||
@@ -81,6 +83,8 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You wrench [src] into place.</span>")
|
||||
anchored = 1
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/dispenser/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -118,3 +122,11 @@
|
||||
else
|
||||
SSnanoui.close_user_uis(usr,src)
|
||||
return 1
|
||||
|
||||
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
for(var/X in src)
|
||||
var/obj/item/I = X
|
||||
I.forceMove(loc)
|
||||
new /obj/item/stack/sheet/metal(loc, 2)
|
||||
qdel(src)
|
||||
@@ -24,10 +24,7 @@
|
||||
|
||||
/obj/structure/target_stake/attackby(obj/item/W, mob/user, params)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(pinned_target)
|
||||
return // get rid of that pinned target first!
|
||||
|
||||
if(istype(W, /obj/item/target))
|
||||
if(istype(W, /obj/item/target) && !pinned_target)
|
||||
density = 0
|
||||
W.density = 1
|
||||
user.drop_item(src)
|
||||
@@ -35,6 +32,8 @@
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
to_chat(user, "You slide the target into the stake.")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/target_stake/attack_hand(mob/user)
|
||||
// taking pinned targets off!
|
||||
|
||||
@@ -671,6 +671,7 @@
|
||||
icon_state = "puddle"
|
||||
can_move = 0
|
||||
can_rotate = 0
|
||||
resistance_flags = UNACIDABLE
|
||||
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M as mob)
|
||||
icon_state = "puddle-splash"
|
||||
|
||||
@@ -32,6 +32,8 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
flags = ON_BORDER
|
||||
can_be_unanchored = TRUE
|
||||
max_integrity = 25
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
var/ini_dir = null
|
||||
var/state = WINDOW_OUT_OF_FRAME
|
||||
var/reinf = FALSE
|
||||
@@ -127,6 +129,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
return
|
||||
|
||||
/obj/structure/window/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FIVE)
|
||||
deconstruct(FALSE)
|
||||
|
||||
@@ -254,7 +257,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
take_damage(75)
|
||||
return
|
||||
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(isscrewdriver(I))
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
if(reinf)
|
||||
@@ -331,18 +334,18 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, hitsound, 75, 1)
|
||||
playsound(src, hitsound, 75, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/window/deconstruct(disassembled = TRUE)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(!disassembled)
|
||||
playsound(src, breaksound, 70, 1)
|
||||
if(can_deconstruct)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
for(var/i in debris)
|
||||
var/obj/item/I = i
|
||||
I.forceMove(loc)
|
||||
@@ -478,9 +481,10 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
reinf = TRUE
|
||||
cancolor = TRUE
|
||||
heat_resistance = 1600
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100)
|
||||
max_integrity = 50
|
||||
armor = list("melee" = 80, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
max_integrity = 75
|
||||
explosion_block = 1
|
||||
damage_deflection = 11
|
||||
glass_type = /obj/item/stack/sheet/rglass
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
@@ -550,9 +554,9 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
shardtype = /obj/item/shard/plasma
|
||||
glass_type = /obj/item/stack/sheet/plasmaglass
|
||||
heat_resistance = 32000
|
||||
max_integrity = 120
|
||||
max_integrity = 200
|
||||
explosion_block = 1
|
||||
armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
|
||||
/obj/structure/window/plasmabasic/BlockSuperconductivity()
|
||||
return 1
|
||||
@@ -564,9 +568,10 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
shardtype = /obj/item/shard/plasma
|
||||
glass_type = /obj/item/stack/sheet/plasmarglass
|
||||
reinf = TRUE
|
||||
max_integrity = 160
|
||||
max_integrity = 500
|
||||
explosion_block = 2
|
||||
armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
damage_deflection = 21
|
||||
|
||||
/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
@@ -598,11 +603,11 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
shardtype = /obj/item/shard/plasma
|
||||
glass_type = /obj/item/stack/sheet/plasmaglass
|
||||
heat_resistance = 32000
|
||||
max_integrity = 240
|
||||
max_integrity = 300
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced)
|
||||
explosion_block = 1
|
||||
armor = list("melee" = 75, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
|
||||
/obj/structure/window/full/plasmareinforced
|
||||
name = "reinforced plasma window"
|
||||
@@ -613,9 +618,9 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
glass_type = /obj/item/stack/sheet/plasmarglass
|
||||
smooth = SMOOTH_TRUE
|
||||
reinf = TRUE
|
||||
max_integrity = 320
|
||||
max_integrity = 1000
|
||||
explosion_block = 2
|
||||
armor = list("melee" = 85, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
|
||||
/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
@@ -627,10 +632,10 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
icon_state = "r_window"
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced)
|
||||
max_integrity = 100
|
||||
max_integrity = 150
|
||||
reinf = TRUE
|
||||
heat_resistance = 1600
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
explosion_block = 1
|
||||
glass_type = /obj/item/stack/sheet/rglass
|
||||
cancolor = TRUE
|
||||
@@ -653,11 +658,11 @@ obj/structure/window/full/reinforced/ice
|
||||
desc = "A reinforced, air-locked pod window."
|
||||
icon = 'icons/obj/smooth_structures/shuttle_window.dmi'
|
||||
icon_state = "shuttle_window"
|
||||
max_integrity = 160
|
||||
max_integrity = 150
|
||||
reinf = TRUE
|
||||
heat_resistance = 1600
|
||||
explosion_block = 3
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 90, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
glass_type = /obj/item/stack/sheet/titaniumglass
|
||||
@@ -679,7 +684,7 @@ obj/structure/window/full/reinforced/ice
|
||||
flags = PREVENT_CLICK_UNDER
|
||||
reinf = TRUE
|
||||
heat_resistance = 1600
|
||||
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 95, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
explosion_block = 3
|
||||
@@ -692,10 +697,9 @@ obj/structure/window/full/reinforced/ice
|
||||
desc = "A paper-thin pane of translucent yet reinforced brass."
|
||||
icon = 'icons/obj/smooth_structures/clockwork_window.dmi'
|
||||
icon_state = "clockwork_window_single"
|
||||
burn_state = FIRE_PROOF
|
||||
unacidable = 1
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
max_integrity = 80
|
||||
armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100)
|
||||
armor = list("melee" = 60, "bullet" = 25, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
explosion_block = 2 //fancy AND hard to destroy. the most useful combination.
|
||||
glass_type = /obj/item/stack/tile/brass
|
||||
reinf = FALSE
|
||||
|
||||
Reference in New Issue
Block a user