mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 22:48:38 +01:00
Merge branch 'dev' into ofClicksAndCooldowns
Conflicts: code/_onclick/click.dm code/_onclick/telekinesis.dm code/game/machinery/deployable.dm code/game/objects/items.dm code/game/objects/structures/grille.dm code/modules/mob/living/simple_animal/simple_animal.dm code/setup.dm
This commit is contained in:
@@ -37,10 +37,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
if(get_dist(src, user) > 1)
|
||||
return ..(user)
|
||||
|
||||
if(opened)
|
||||
if(..(user, 1) && !opened)
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(!I.anchored)
|
||||
@@ -232,7 +229,7 @@
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
new /obj/item/stack/material/steel(src.loc)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
|
||||
qdel(src)
|
||||
@@ -326,15 +323,10 @@
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
/obj/structure/closet/hear_talk(mob/M as mob, text, verb, datum/language/speaking)
|
||||
for (var/atom/A in src)
|
||||
if(istype(A,/obj/))
|
||||
var/obj/O = A
|
||||
O.hear_talk(M, text, verb, speaking)
|
||||
|
||||
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
dump_contents()
|
||||
spawn(1) qdel(src)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/obj/structure/closet/fireaxecabinet
|
||||
name = "fire axe cabinet"
|
||||
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
|
||||
var/obj/item/weapon/twohanded/fireaxe/fireaxe
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
|
||||
icon_state = "fireaxe1000"
|
||||
icon_closed = "fireaxe1000"
|
||||
icon_opened = "fireaxe1100"
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
fireaxe = new /obj/item/weapon/twohanded/fireaxe(src)
|
||||
fireaxe = new /obj/item/weapon/material/twohanded/fireaxe(src)
|
||||
|
||||
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
|
||||
//..() //That's very useful, Erro
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
if (isrobot(usr) || src.locked)
|
||||
if(istype(O, /obj/item/device/multitool))
|
||||
user << "\red Resetting circuitry..."
|
||||
user << "<span class='warning'>Resetting circuitry...</span>"
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
src.locked = 0
|
||||
@@ -45,7 +45,7 @@
|
||||
else
|
||||
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
|
||||
if(W.force < 15)
|
||||
user << "\blue The cabinet's protective glass glances off the hit."
|
||||
user << "<span class='notice'>The cabinet's protective glass glances off the hit.</span>"
|
||||
else
|
||||
src.hitstaken++
|
||||
if(src.hitstaken == 4)
|
||||
@@ -55,15 +55,15 @@
|
||||
src.localopened = 1
|
||||
update_icon()
|
||||
return
|
||||
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
|
||||
if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
|
||||
if(!fireaxe)
|
||||
if(O:wielded)
|
||||
user << "\red Unwield the axe first."
|
||||
user << "<span class='warning'>Unwield the axe first.</span>"
|
||||
return
|
||||
fireaxe = O
|
||||
user.remove_from_mob(O)
|
||||
src.contents += O
|
||||
user << "\blue You place the fire axe back in the [src.name]."
|
||||
user << "<span class='notice'>You place the fire axe back in the [src.name].</span>"
|
||||
update_icon()
|
||||
else
|
||||
if(src.smashed)
|
||||
@@ -86,10 +86,10 @@
|
||||
spawn(10) update_icon()
|
||||
return
|
||||
else
|
||||
user << "\red Resetting circuitry..."
|
||||
user << "<span class='warning'>Resetting circuitry...</span>"
|
||||
sleep(50)
|
||||
src.locked = 1
|
||||
user << "\blue You re-enable the locking modules."
|
||||
user << "<span class='notice'>You re-enable the locking modules.</span>"
|
||||
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
|
||||
if(do_after(user,20))
|
||||
src.locked = 1
|
||||
@@ -114,13 +114,13 @@
|
||||
hasaxe = 1
|
||||
|
||||
if(src.locked)
|
||||
user <<"\red The cabinet won't budge!"
|
||||
user <<"<span class='warning'>The cabinet won't budge!</span>"
|
||||
return
|
||||
if(localopened)
|
||||
if(fireaxe)
|
||||
user.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
user << "\blue You take the fire axe from the [name]."
|
||||
user << "<span class='notice'>You take the fire axe from the [name].</span>"
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
@@ -147,7 +147,7 @@
|
||||
attack_tk(mob/user as mob)
|
||||
if(localopened && fireaxe)
|
||||
fireaxe.loc = loc
|
||||
user << "\blue You telekinetically remove the fire axe."
|
||||
user << "<span class='notice'>You telekinetically remove the fire axe.</span>"
|
||||
fireaxe = null
|
||||
update_icon()
|
||||
return
|
||||
@@ -159,9 +159,9 @@
|
||||
|
||||
if (isrobot(usr) || src.locked || src.smashed)
|
||||
if(src.locked)
|
||||
usr << "\red The cabinet won't budge!"
|
||||
usr << "<span class='warning'>The cabinet won't budge!</span>"
|
||||
else if(src.smashed)
|
||||
usr << "\blue The protective glass is broken!"
|
||||
usr << "<span class='notice'>The protective glass is broken!</span>"
|
||||
return
|
||||
|
||||
localopened = !localopened
|
||||
@@ -178,23 +178,23 @@
|
||||
if(fireaxe)
|
||||
usr.put_in_hands(fireaxe)
|
||||
fireaxe = null
|
||||
usr << "\blue You take the Fire axe from the [name]."
|
||||
usr << "<span class='notice'>You take the Fire axe from the [name].</span>"
|
||||
else
|
||||
usr << "\blue The [src.name] is empty."
|
||||
usr << "<span class='notice'>The [src.name] is empty.</span>"
|
||||
else
|
||||
usr << "\blue The [src.name] is closed."
|
||||
usr << "<span class='notice'>The [src.name] is closed.</span>"
|
||||
update_icon()
|
||||
|
||||
attack_ai(mob/user as mob)
|
||||
if(src.smashed)
|
||||
user << "\red The security of the cabinet is compromised."
|
||||
user << "<span class='warning'>The security of the cabinet is compromised.</span>"
|
||||
return
|
||||
else
|
||||
locked = !locked
|
||||
if(locked)
|
||||
user << "\red Cabinet locked."
|
||||
user << "<span class='warning'>Cabinet locked.</span>"
|
||||
else
|
||||
user << "\blue Cabinet unlocked."
|
||||
user << "<span class='notice'>Cabinet unlocked.</span>"
|
||||
return
|
||||
|
||||
update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
|
||||
|
||||
@@ -5,12 +5,6 @@
|
||||
icon_closed = "bio"
|
||||
icon_opened = "bioopen"
|
||||
|
||||
/obj/structure/closet/l3closet/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/general
|
||||
icon_state = "bio_general"
|
||||
icon_closed = "bio_general"
|
||||
@@ -18,8 +12,6 @@
|
||||
|
||||
/obj/structure/closet/l3closet/general/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
|
||||
@@ -31,8 +23,6 @@
|
||||
|
||||
/obj/structure/closet/l3closet/virology/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
@@ -46,8 +36,6 @@
|
||||
|
||||
/obj/structure/closet/l3closet/security/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/security( src )
|
||||
new /obj/item/clothing/head/bio_hood/security( src )
|
||||
|
||||
@@ -59,8 +47,6 @@
|
||||
|
||||
/obj/structure/closet/l3closet/janitor/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/janitor( src )
|
||||
new /obj/item/clothing/head/bio_hood/janitor( src )
|
||||
|
||||
@@ -72,7 +58,5 @@
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/scientist( src )
|
||||
new /obj/item/clothing/head/bio_hood/scientist( src )
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
new /obj/item/device/analyzer/plant_analyzer(src)
|
||||
new /obj/item/device/radio/headset/headset_service(src)
|
||||
new /obj/item/clothing/head/greenbandana(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/material/minihoe(src)
|
||||
new /obj/item/weapon/material/hatchet(src)
|
||||
new /obj/item/weapon/wirecutters/clippers(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
if (W) W.loc = src.loc
|
||||
else if(istype(W, /obj/item/weapon/card/id))
|
||||
if(src.broken)
|
||||
user << "\red It appears to be broken."
|
||||
user << "<span class='warning'>It appears to be broken.</span>"
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
@@ -82,7 +82,7 @@
|
||||
src.registered_name = I.registered_name
|
||||
src.desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
@@ -95,9 +95,9 @@
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message("\blue The locker has been sliced open by [user] with an energy blade!", 1, "\red You hear metal being sliced and sparks flying.", 2)
|
||||
O.show_message("<span class='warning'>The locker has been sliced open by [user] with an energy blade!</span>", 1, "<span class='warning'>You hear metal being sliced and sparks flying.</span>", 2)
|
||||
else
|
||||
user << "\red Access Denied"
|
||||
user << "<span class='warning'>Access Denied</span>"
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/verb/reset()
|
||||
@@ -109,9 +109,9 @@
|
||||
if(ishuman(usr))
|
||||
src.add_fingerprint(usr)
|
||||
if (src.locked || !src.registered_name)
|
||||
usr << "\red You need to unlock it first."
|
||||
usr << "<span class='warning'>You need to unlock it first.</span>"
|
||||
else if (src.broken)
|
||||
usr << "\red It appears to be broken."
|
||||
usr << "<span class='warning'>It appears to be broken.</span>"
|
||||
else
|
||||
if (src.opened)
|
||||
if(!src.close())
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
src.req_access += pick(get_all_station_access())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/secure_closet/proc/togglelock(mob/user as mob)
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
|
||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
||||
health -= I.force
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
||||
if(health <= 0)
|
||||
for(var/mob/M in src)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear/New()
|
||||
..()
|
||||
|
||||
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
new /obj/item/ammo_magazine/a12mm(src)
|
||||
@@ -86,35 +86,35 @@
|
||||
|
||||
//Metal (common ore)
|
||||
if(pickednum >= 2)
|
||||
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
|
||||
new /obj/item/stack/material/steel(src, rand(common_min, common_max))
|
||||
|
||||
//Glass (common ore)
|
||||
if(pickednum >= 5)
|
||||
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
|
||||
new /obj/item/stack/material/glass(src, rand(common_min, common_max))
|
||||
|
||||
//Plasteel (common ore) Because it has a million more uses then phoron
|
||||
if(pickednum >= 10)
|
||||
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
|
||||
new /obj/item/stack/material/plasteel(src, rand(common_min, common_max))
|
||||
|
||||
//Phoron (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/sheet/mineral/phoron(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/phoron(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/material/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
@@ -127,14 +127,14 @@
|
||||
|
||||
New()
|
||||
var/list/resources = list(
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/mineral/gold,
|
||||
/obj/item/stack/sheet/mineral/silver,
|
||||
/obj/item/stack/sheet/mineral/phoron,
|
||||
/obj/item/stack/sheet/mineral/uranium,
|
||||
/obj/item/stack/sheet/mineral/diamond,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/material/steel,
|
||||
/obj/item/stack/material/glass,
|
||||
/obj/item/stack/material/gold,
|
||||
/obj/item/stack/material/silver,
|
||||
/obj/item/stack/material/phoron,
|
||||
/obj/item/stack/material/uranium,
|
||||
/obj/item/stack/material/diamond,
|
||||
/obj/item/stack/material/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
open()
|
||||
else
|
||||
src.req_access = list()
|
||||
src.req_access += pick(get_all_accesses())
|
||||
src.req_access += pick(get_all_station_access())
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/plastic
|
||||
@@ -486,7 +486,7 @@
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/material/minihoe(src)
|
||||
// new /obj/item/weapon/weedspray(src)
|
||||
// new /obj/item/weapon/weedspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/stack/sheet/wood(src)
|
||||
new /obj/item/stack/material/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/obj/O in contents)
|
||||
O.loc = T
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/displaycase/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/structure/displaycase/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
/obj/structure/displaycase/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
qdel(src)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
update_icon()
|
||||
else
|
||||
@@ -79,16 +79,16 @@
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
user << "\b You deactivate the hover field built into the case."
|
||||
user << "<span class='notice'>You deactivate the hover field built into the case.</span>"
|
||||
src.occupied = 0
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
usr << text("\blue You kick the display case.")
|
||||
usr << text("<span class='warning'>You kick the display case.</span>")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the display case.", usr)
|
||||
O << "<span class='warning'>[usr] kicks the display case.</span>"
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
@@ -149,38 +149,38 @@
|
||||
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You welded the [glass] plating off!"
|
||||
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
|
||||
user << "<span class='notice>You welded the [glass] plating off!</span>"
|
||||
var/M = text2path("/obj/item/stack/material/[glass]")
|
||||
new M(src.loc, 2)
|
||||
glass = 0
|
||||
else if(glass == 1)
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You welded the glass panel out!"
|
||||
new /obj/item/stack/sheet/glass/reinforced(src.loc)
|
||||
user << "<span class='notice>You welded the glass panel out!</span>"
|
||||
new /obj/item/stack/material/glass/reinforced(src.loc)
|
||||
glass = 0
|
||||
else if(!anchored)
|
||||
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the airlock assembly!"
|
||||
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||
user << "<span class='notice>You dissasembled the airlock assembly!</span>"
|
||||
new /obj/item/stack/material/steel(src.loc, 4)
|
||||
qdel (src)
|
||||
else
|
||||
user << "\blue You need more welding fuel."
|
||||
user << "<span class='notice>You need more welding fuel.</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor.")
|
||||
user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.")
|
||||
else
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor.")
|
||||
user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You [anchored? "un" : ""]secured the airlock assembly!"
|
||||
user << "<span class='notice>You [anchored? "un" : ""]secured the airlock assembly!</span>"
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
|
||||
@@ -200,7 +200,7 @@
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You cut the airlock wires.!"
|
||||
user << "<span class='notice>You cut the airlock wires.!</span>"
|
||||
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||
src.state = 0
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
if(!src) return
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "\blue You installed the airlock electronics!"
|
||||
user << "<span class='notice>You installed the airlock electronics!</span>"
|
||||
src.state = 2
|
||||
src.name = "Near finished Airlock Assembly"
|
||||
src.electronics = W
|
||||
@@ -225,29 +225,29 @@
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove the electronics from the airlock assembly.")
|
||||
user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You removed the airlock electronics!"
|
||||
user << "<span class='notice>You removed the airlock electronics!</span>"
|
||||
src.state = 1
|
||||
src.name = "Wired Airlock Assembly"
|
||||
electronics.loc = src.loc
|
||||
electronics = null
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet) && !glass)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
else if(istype(W, /obj/item/stack/material) && !glass)
|
||||
var/obj/item/stack/material/S = W
|
||||
if (S)
|
||||
if (S.get_amount() >= 1)
|
||||
if(istype(S, /obj/item/stack/sheet/glass/reinforced))
|
||||
if(istype(S, /obj/item/stack/material/glass/reinforced))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40) && !glass)
|
||||
if (S.use(1))
|
||||
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
else if(istype(S, /obj/item/stack/material) && S.default_type)
|
||||
var/M = S.default_type
|
||||
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
|
||||
if(M in list("mhydrogen","osmium","tritium","platinum","iron"))
|
||||
user << "You cannot make an airlock out of that material."
|
||||
@@ -262,11 +262,11 @@
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\blue Now finishing the airlock."
|
||||
user << "<span class='notice>Now finishing the airlock.</span>"
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You finish the airlock!"
|
||||
user << "<span class='notice>You finish the airlock!</span>"
|
||||
var/path
|
||||
if(istext(glass))
|
||||
path = text2path("/obj/machinery/door/airlock/[glass]")
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
return 0
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
spawn(1) dismantle()
|
||||
return 1
|
||||
@@ -105,13 +106,13 @@
|
||||
health = 50
|
||||
cover = 25
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet))
|
||||
else if(istype(W, /obj/item/stack/material))
|
||||
|
||||
var/obj/item/stack/sheet/S = W
|
||||
var/obj/item/stack/material/S = W
|
||||
if(S.get_amount() < 2)
|
||||
return ..()
|
||||
|
||||
var/material/M = name_to_material[S.sheettype]
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
@@ -171,7 +172,7 @@
|
||||
user << "\The [src] is already reinforced."
|
||||
return
|
||||
|
||||
var/obj/item/stack/sheet/S = user.l_hand
|
||||
var/obj/item/stack/material/S = user.l_hand
|
||||
if(!istype(S))
|
||||
S = user.r_hand
|
||||
if(!istype(S))
|
||||
@@ -182,7 +183,7 @@
|
||||
user << "There is not enough material here to reinforce the girder."
|
||||
return
|
||||
|
||||
var/material/M = name_to_material[S.sheettype]
|
||||
var/material/M = name_to_material[S.default_type]
|
||||
if(!istype(M) || M.integrity < 50)
|
||||
user << "You cannot reinforce \the [src] with that; it is too soft."
|
||||
return
|
||||
@@ -197,7 +198,7 @@
|
||||
|
||||
|
||||
/obj/structure/girder/proc/dismantle()
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
new /obj/item/stack/material/steel(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
user.changeNextMove(8)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
user.do_attack_animation(src)
|
||||
|
||||
var/damage_dealt = 1
|
||||
var/attack_message = "kicks"
|
||||
@@ -115,8 +116,8 @@
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if(istype(W,/obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/ST = W
|
||||
else if(istype(W,/obj/item/stack/material/glass))
|
||||
var/obj/item/stack/material/glass/ST = W
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
@@ -153,12 +154,13 @@
|
||||
WD.update_icon()
|
||||
return
|
||||
//window placing end
|
||||
|
||||
else if(istype(W, /obj/item/weapon/shard))
|
||||
|
||||
else if(istype(W, /obj/item/weapon/material/shard))
|
||||
user.changeNextMove(8)
|
||||
health -= W.force * 0.1
|
||||
else if(!shock(user, 70))
|
||||
user.changeNextMove(8)
|
||||
user.do_attack_animation(src)
|
||||
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
@@ -220,6 +222,7 @@
|
||||
|
||||
/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
||||
user.do_attack_animation(src)
|
||||
health -= damage
|
||||
spawn(1) healthcheck()
|
||||
return 1
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
user << "\blue You inflate [src]."
|
||||
user << "<span class='notice'>You inflate [src].</span>"
|
||||
var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
@@ -74,7 +74,7 @@
|
||||
if(!istype(W)) return
|
||||
|
||||
if (can_puncture(W))
|
||||
visible_message("\red <b>[user] pierces [src] with [W]!</b>")
|
||||
visible_message("<span class='danger'>[user] pierces [src] with [W]!</span>")
|
||||
deflate(1)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
hit(W.force)
|
||||
@@ -96,7 +96,7 @@
|
||||
src.transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
else
|
||||
//user << "\blue You slowly deflate the inflatable wall."
|
||||
//user << "<span class='notice'>You slowly deflate the inflatable wall.</span>"
|
||||
visible_message("[src] slowly deflates.")
|
||||
spawn(50)
|
||||
var/obj/item/inflatable/R = new /obj/item/inflatable(loc)
|
||||
@@ -116,6 +116,7 @@
|
||||
|
||||
/obj/structure/inflatable/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
health -= damage
|
||||
user.do_attack_animation(src)
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] [attack_verb] open the [src]!</span>")
|
||||
spawn(1) deflate(1)
|
||||
@@ -131,7 +132,7 @@
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
user << "\blue You inflate [src]."
|
||||
user << "<span class='notice'>You inflate [src].</span>"
|
||||
var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
@@ -235,7 +236,7 @@
|
||||
icon_state = "folded_wall_torn"
|
||||
|
||||
attack_self(mob/user)
|
||||
user << "\blue The inflatable wall is too torn to be inflated!"
|
||||
user << "<span class='notice'>The inflatable wall is too torn to be inflated!</span>"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/inflatable/door/torn
|
||||
@@ -245,7 +246,7 @@
|
||||
icon_state = "folded_door_torn"
|
||||
|
||||
attack_self(mob/user)
|
||||
user << "\blue The inflatable door is too torn to be inflated!"
|
||||
user << "<span class='notice'>The inflatable door is too torn to be inflated!</span>"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/storage/briefcase/inflatable
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/lamarr/ex_act(severity)
|
||||
switch(severity)
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
if (2)
|
||||
@@ -35,13 +35,13 @@
|
||||
|
||||
/obj/structure/lamarr/blob_act()
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/lamarr/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
Break()
|
||||
qdel(src)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if (!( src.destroyed ))
|
||||
src.density = 0
|
||||
src.destroyed = 1
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
playsound(src, "shatter", 70, 1)
|
||||
Break()
|
||||
else
|
||||
@@ -76,10 +76,10 @@
|
||||
if (src.destroyed)
|
||||
return
|
||||
else
|
||||
usr << text("\blue You kick the lab cage.")
|
||||
usr << "<span class='notice'>You kick the lab cage.</span>"
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << text("\red [] kicks the lab cage.", usr)
|
||||
O << "<span class='warning'>[usr] kicks the lab cage.</span>"
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if (istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "\blue Slicing lattice joints ..."
|
||||
user << "<span class='notice'>Slicing lattice joints ...</span>"
|
||||
PoolOrNew(/obj/item/stack/rods, src.loc)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
//NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its
|
||||
//machineryness
|
||||
|
||||
/obj/structure/mineral_door
|
||||
name = "mineral door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 1
|
||||
|
||||
icon = 'icons/obj/doors/mineral_doors.dmi'
|
||||
icon_state = "metal"
|
||||
|
||||
var/mineralType = DEFAULT_WALL_MATERIAL
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/hardness = 1
|
||||
var/oreAmount = 7
|
||||
|
||||
New(location)
|
||||
..()
|
||||
icon_state = mineralType
|
||||
name = "[mineralType] door"
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
Destroy()
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
return TryToSwitchState(user)
|
||||
return
|
||||
|
||||
attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
else
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
|
||||
proc/Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
proc/Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
update_icon()
|
||||
if(state)
|
||||
icon_state = "[mineralType]open"
|
||||
else
|
||||
icon_state = mineralType
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "You start digging the [name]."
|
||||
if(do_after(user,digTool.digspeed*hardness) && src)
|
||||
user << "You finished digging."
|
||||
Dismantle()
|
||||
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
|
||||
hardness -= W.force/100
|
||||
user << "You hit the [name] with your [W.name]!"
|
||||
CheckHardness()
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
Dismantle(1)
|
||||
|
||||
proc/Dismantle(devastated = 0)
|
||||
var/material/M = name_to_material[mineralType]
|
||||
if(istype(M))
|
||||
for(var/i = (devastated? 1 : 3), i <= oreAmount, i++)
|
||||
new M.stack_type(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(1)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
Dismantle(1)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
mineralType = "iron"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
mineralType = "silver"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/gold
|
||||
mineralType = "gold"
|
||||
|
||||
/obj/structure/mineral_door/uranium
|
||||
mineralType = "uranium"
|
||||
hardness = 3
|
||||
light_range = 2
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
mineralType = "sandstone"
|
||||
hardness = 0.5
|
||||
|
||||
/obj/structure/mineral_door/transparent
|
||||
opacity = 0
|
||||
|
||||
Close()
|
||||
..()
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/mineral_door/transparent/phoron
|
||||
mineralType = "phoron"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
TemperatureAct(100)
|
||||
..()
|
||||
|
||||
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
var/phoronToDeduce = temperature/10
|
||||
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
|
||||
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
|
||||
hardness -= phoronToDeduce/100
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/transparent/diamond
|
||||
mineralType = "diamond"
|
||||
hardness = 10
|
||||
|
||||
/obj/structure/mineral_door/wood
|
||||
mineralType = "wood"
|
||||
hardness = 1
|
||||
|
||||
Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
for(var/i = 1, i <= oreAmount, i++)
|
||||
new/obj/item/stack/sheet/wood(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mineral_door/resin
|
||||
mineralType = "resin"
|
||||
hardness = 1.5
|
||||
var/close_delay = 100
|
||||
|
||||
TryToSwitchState(atom/user)
|
||||
|
||||
var/mob/living/carbon/M = user
|
||||
if(istype(M) && locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)
|
||||
return ..()
|
||||
|
||||
Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
flick("[mineralType]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
spawn(close_delay)
|
||||
if(!isSwitchingStates && state == 1)
|
||||
Close()
|
||||
|
||||
Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
flick("[mineralType]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
Dismantle(devastated = 0)
|
||||
qdel(src)
|
||||
|
||||
CheckHardness()
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
..()
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
|
||||
|
||||
user.do_attack_animation(src)
|
||||
if(shattered)
|
||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||
return 0
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
B << text("\red [] stuffs [] into []!", user, O, src)
|
||||
B << "<span class='warning'>\The [user] stuffs [O] into [src]!"
|
||||
return
|
||||
|
||||
|
||||
@@ -218,13 +218,13 @@
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
|
||||
// user.show_message("\red Uh-oh, that was a bad idea.", 1)
|
||||
// user.show_message("<span class='warning'>Uh-oh, that was a bad idea.</span>", 1)
|
||||
// //usr << "Uh-oh, that was a bad idea."
|
||||
// src:loc:poison += 20000000
|
||||
// src:loc:firelevel = src:loc:poison
|
||||
// return
|
||||
if (cremating)
|
||||
usr << "\red It's locked."
|
||||
usr << "<span class='warning'>It's locked.</span>"
|
||||
return
|
||||
if ((src.connected) && (src.locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
@@ -294,7 +294,7 @@
|
||||
|
||||
if(contents.len <= 0)
|
||||
for (var/mob/M in viewers(src))
|
||||
M.show_message("\red You hear a hollow crackle.", 1)
|
||||
M.show_message("<span class='warning'>You hear a hollow crackle.</span>", 1)
|
||||
return
|
||||
|
||||
else
|
||||
@@ -303,7 +303,7 @@
|
||||
return
|
||||
|
||||
for (var/mob/M in viewers(src))
|
||||
M.show_message("\red You hear a roar as the crematorium activates.", 1)
|
||||
M.show_message("<span class='warning'>You hear a roar as the crematorium activates.</span>", 1)
|
||||
|
||||
cremating = 1
|
||||
locked = 1
|
||||
@@ -375,7 +375,7 @@
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
B << text("\red [] stuffs [] into []!", user, O, src)
|
||||
B << text("<span class='warning'>[] stuffs [] into []!</span>", user, O, src)
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
|
||||
@@ -415,20 +415,20 @@
|
||||
if (istype(O, /obj/item/weapon/wrench))
|
||||
if (anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to loosen \the [src]'s casters..."
|
||||
user << "<span class='notice'>You begin to loosen \the [src]'s casters...</span>"
|
||||
if (do_after(user, 40))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"\blue You have loosened \the [src]. Now it can be pulled somewhere else.", \
|
||||
"<span class='notice'>You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 0
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "\blue You begin to tighten \the [src] to the floor..."
|
||||
user << "<span class='notice'>You begin to tighten \the [src] to the floor...</span>"
|
||||
if (do_after(user, 20))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"\blue You have tightened \the [src]'s casters. Now it can be played again.", \
|
||||
"<span class='notice'>You have tightened \the [src]'s casters. Now it can be played again</span>.", \
|
||||
"You hear ratchet.")
|
||||
src.anchored = 1
|
||||
else
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(notices < 5)
|
||||
O.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
user.drop_item()
|
||||
user.drop_from_inventory(O)
|
||||
O.loc = src
|
||||
notices++
|
||||
icon_state = "nboard0[notices]" //update sprite
|
||||
@@ -29,13 +29,22 @@
|
||||
else
|
||||
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
|
||||
|
||||
/obj/structure/noticeboard/attack_hand(user as mob)
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/weapon/paper/P in src)
|
||||
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
/obj/structure/noticeboard/attack_hand(var/mob/user)
|
||||
examine(user)
|
||||
|
||||
// Since Topic() never seems to interact with usr on more than a superficial
|
||||
// level, it should be fine to let anyone mess with the board other than ghosts.
|
||||
/obj/structure/noticeboard/examine(var/mob/user)
|
||||
if(!user)
|
||||
user = usr
|
||||
if(user.Adjacent(src))
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/weapon/paper/P in src)
|
||||
dat += "<A href='?src=\ref[src];read=\ref[P]'>[P.name]</A> <A href='?src=\ref[src];write=\ref[P]'>Write</A> <A href='?src=\ref[src];remove=\ref[P]'>Remove</A><BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
@@ -44,18 +53,16 @@
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["remove"])
|
||||
if((P && P.loc == src))
|
||||
if(P && P.loc == src)
|
||||
P.loc = get_turf(src) //dump paper on the floor because you're a clumsy fuck
|
||||
P.add_fingerprint(usr)
|
||||
add_fingerprint(usr)
|
||||
notices--
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
if(href_list["write"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["write"])
|
||||
|
||||
if((P && P.loc == src)) //ifthe paper's on the board
|
||||
if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
|
||||
add_fingerprint(usr)
|
||||
@@ -66,14 +73,9 @@
|
||||
P.attackby(usr.l_hand, usr)
|
||||
else
|
||||
usr << "<span class='notice'>You'll need something to write with!</span>"
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||
if((P && P.loc == src))
|
||||
if(!( istype(usr, /mob/living/carbon/human) ))
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[stars(P.info)]</TT></BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
else
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[P.info]</TT></BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[P.info]</TT></BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
return
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/obj/structure/simple_door
|
||||
name = "door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
icon = 'icons/obj/doors/material_doors.dmi'
|
||||
icon_state = "metal"
|
||||
|
||||
var/material/material
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/hardness = 1
|
||||
var/oreAmount = 7
|
||||
|
||||
/obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
/obj/structure/simple_door/proc/TemperatureAct(temperature)
|
||||
hardness -= material.combustion_effect(get_turf(src),temperature, 0.3)
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/simple_door/New(var/newloc, var/material_name)
|
||||
..()
|
||||
if(!material_name)
|
||||
material_name = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(material_name)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
hardness = max(1,round(material.integrity/10))
|
||||
icon_state = material.door_icon_base
|
||||
name = "[material.display_name] door"
|
||||
color = material.icon_colour
|
||||
if(material.opacity < 0.5)
|
||||
opacity = 0
|
||||
else
|
||||
opacity = 1
|
||||
if(material.products_need_process())
|
||||
processing_objects |= src
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
/obj/structure/simple_door/Destroy()
|
||||
processing_objects -= src
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
/obj/structure/simple_door/Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
return TryToSwitchState(user)
|
||||
return
|
||||
|
||||
/obj/structure/simple_door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/simple_door/attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/simple_door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
/obj/structure/simple_door/proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(!material.can_open_material_door(user))
|
||||
return
|
||||
if(world.time - user.last_bumped <= 60)
|
||||
return
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
else
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
/obj/structure/simple_door/proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
|
||||
/obj/structure/simple_door/proc/Open()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, material.dooropen_noise, 100, 1)
|
||||
flick("[material.door_icon_base]opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
/obj/structure/simple_door/proc/Close()
|
||||
isSwitchingStates = 1
|
||||
playsound(loc, material.dooropen_noise, 100, 1)
|
||||
flick("[material.door_icon_base]closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 1
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
/obj/structure/simple_door/update_icon()
|
||||
if(state)
|
||||
icon_state = "[material.door_icon_base]open"
|
||||
else
|
||||
icon_state = material.door_icon_base
|
||||
|
||||
/obj/structure/simple_door/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/pickaxe))
|
||||
var/obj/item/weapon/pickaxe/digTool = W
|
||||
user << "You start digging the [name]."
|
||||
if(do_after(user,digTool.digspeed*hardness) && src)
|
||||
user << "You finished digging."
|
||||
Dismantle()
|
||||
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
|
||||
hardness -= W.force/100
|
||||
user << "You hit the [name] with your [W.name]!"
|
||||
CheckHardness()
|
||||
else if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(material.ignition_point && WT.remove_fuel(0, user))
|
||||
TemperatureAct(150)
|
||||
else
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/structure/simple_door/proc/CheckHardness()
|
||||
if(hardness <= 0)
|
||||
Dismantle(1)
|
||||
|
||||
/obj/structure/simple_door/proc/Dismantle(devastated = 0)
|
||||
material.place_dismantled_product(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/simple_door/ex_act(severity = 1)
|
||||
switch(severity)
|
||||
if(1)
|
||||
Dismantle(1)
|
||||
if(2)
|
||||
if(prob(20))
|
||||
Dismantle(1)
|
||||
else
|
||||
hardness--
|
||||
CheckHardness()
|
||||
if(3)
|
||||
hardness -= 0.1
|
||||
CheckHardness()
|
||||
return
|
||||
|
||||
/obj/structure/simple_door/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
|
||||
|
||||
/obj/structure/simple_door/iron/New(var/newloc,var/material_name)
|
||||
..(newloc, "iron")
|
||||
|
||||
/obj/structure/simple_door/silver/New(var/newloc,var/material_name)
|
||||
..(newloc, "silver")
|
||||
|
||||
/obj/structure/simple_door/gold/New(var/newloc,var/material_name)
|
||||
..(newloc, "gold")
|
||||
|
||||
/obj/structure/simple_door/uranium/New(var/newloc,var/material_name)
|
||||
..(newloc, "uranium")
|
||||
|
||||
/obj/structure/simple_door/sandstone/New(var/newloc,var/material_name)
|
||||
..(newloc, "sandstone")
|
||||
|
||||
/obj/structure/simple_door/phoron/New(var/newloc,var/material_name)
|
||||
..(newloc, "phoron")
|
||||
|
||||
/obj/structure/simple_door/diamond/New(var/newloc,var/material_name)
|
||||
..(newloc, "diamond")
|
||||
|
||||
/obj/structure/simple_door/wood/New(var/newloc,var/material_name)
|
||||
..(newloc, "wood")
|
||||
|
||||
/obj/structure/simple_door/resin/New(var/newloc,var/material_name)
|
||||
..(newloc, "resin")
|
||||
@@ -8,6 +8,9 @@
|
||||
icon_state = "nest"
|
||||
var/health = 100
|
||||
|
||||
/obj/structure/bed/nest/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
|
||||
@@ -10,12 +10,56 @@
|
||||
/obj/structure/bed
|
||||
name = "bed"
|
||||
desc = "This is used to lie in, sleep in or strap on."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon = 'icons/obj/furniture.dmi'
|
||||
icon_state = "bed"
|
||||
pressure_resistance = 15
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
var/base_icon = "bed"
|
||||
|
||||
/obj/structure/bed/New(var/newloc, var/new_material, var/new_padding_material)
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(new_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
if(new_padding_material)
|
||||
padding_material = get_material_by_name(new_padding_material)
|
||||
update_icon()
|
||||
|
||||
// Reuse the cache/code from stools, todo maybe unify.
|
||||
/obj/structure/bed/update_icon()
|
||||
// Prep icon.
|
||||
icon_state = ""
|
||||
overlays.Cut()
|
||||
// Base icon.
|
||||
var/cache_key = "[base_icon]-[material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
var/image/I = image('icons/obj/furniture.dmi', base_icon)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
overlays |= stool_cache[cache_key]
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "[base_icon]-padding-[padding_material.name]"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_padding")
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
overlays |= stool_cache[padding_cache_key]
|
||||
// Strings.
|
||||
desc = initial(desc)
|
||||
if(padding_material)
|
||||
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
|
||||
desc += " It's made of [material.use_name] and covered with [padding_material.use_name]."
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
desc += " It's made of [material.use_name]."
|
||||
|
||||
/obj/structure/bed/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -33,14 +77,49 @@
|
||||
|
||||
/obj/structure/bed/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
else if(istype(W,/obj/item/stack))
|
||||
if(padding_material)
|
||||
user << "\The [src] is already padded."
|
||||
return
|
||||
var/obj/item/stack/C = W
|
||||
if(C.get_amount() < 1) // How??
|
||||
user.drop_from_inventory(C)
|
||||
qdel(C)
|
||||
return
|
||||
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
|
||||
if(istype(W,/obj/item/stack/tile/carpet))
|
||||
padding_type = "carpet"
|
||||
else if(istype(W,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = W
|
||||
if(M.material && (M.material.flags & MATERIAL_PADDING))
|
||||
padding_type = "[M.material.name]"
|
||||
if(!padding_type)
|
||||
user << "You cannot pad \the [src] with that."
|
||||
return
|
||||
C.use(1)
|
||||
if(!istype(src.loc, /turf))
|
||||
user.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
user << "You add padding to \the [src]."
|
||||
add_padding(padding_type)
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!padding_material)
|
||||
user << "\The [src] has no padding to remove."
|
||||
return
|
||||
user << "You remove the padding from \the [src]."
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
remove_padding()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/grab))
|
||||
user.visible_message("<span class='notice'>[user] attempts to buckle [W:affecting] into \the [src]!</span>")
|
||||
if(do_after(user, 20))
|
||||
@@ -53,15 +132,39 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/bed/proc/remove_padding()
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
padding_material = null
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/proc/add_padding(var/padding_type)
|
||||
padding_material = get_material_by_name(padding_type)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/proc/dismantle()
|
||||
material.place_sheet(get_turf(src))
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
|
||||
/obj/structure/bed/psych
|
||||
name = "psychiatrists couch"
|
||||
name = "psychiatrist's couch"
|
||||
desc = "For prime comfort during psychiatric evaluations."
|
||||
icon_state = "psychbed"
|
||||
base_icon = "psychbed"
|
||||
|
||||
/obj/structure/bed/psych/New(var/newloc)
|
||||
..(newloc,"wood","leather")
|
||||
|
||||
/obj/structure/bed/padded/New(var/newloc)
|
||||
..(newloc,"plastic","cotton")
|
||||
|
||||
/obj/structure/bed/alien
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
|
||||
/obj/structure/bed/alien/New(var/newloc)
|
||||
..(newloc,"resin")
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
@@ -72,8 +175,13 @@
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/bed/roller/update_icon()
|
||||
return // Doesn't care about material or anything else.
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/roller_holder))
|
||||
if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
|
||||
return
|
||||
else if(istype(W,/obj/item/roller_holder))
|
||||
if(buckled_mob)
|
||||
user_unbuckle_mob(user)
|
||||
else
|
||||
@@ -101,7 +209,7 @@
|
||||
if(istype(W,/obj/item/roller_holder))
|
||||
var/obj/item/roller_holder/RH = W
|
||||
if(!RH.held)
|
||||
user << "\blue You collect the roller bed."
|
||||
user << "<span class='notice'>You collect the roller bed.</span>"
|
||||
src.loc = RH
|
||||
RH.held = src
|
||||
return
|
||||
@@ -122,10 +230,10 @@
|
||||
/obj/item/roller_holder/attack_self(mob/user as mob)
|
||||
|
||||
if(!held)
|
||||
user << "\blue The rack is empty."
|
||||
user << "<span class='notice'>The rack is empty.</span>"
|
||||
return
|
||||
|
||||
user << "\blue You deploy the roller bed."
|
||||
user << "<span class='notice'>You deploy the roller bed.</span>"
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
qdel(held)
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
/obj/structure/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
|
||||
name = "chair"
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "chair"
|
||||
icon_state = "chair_preview"
|
||||
base_icon = "chair"
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
/obj/structure/bed/chair/New()
|
||||
..()
|
||||
..() //Todo make metal/stone chairs display as thrones
|
||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||
update_layer()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
if(!padding_material && istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
if(!SK.status)
|
||||
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
|
||||
user << "<span class='notice'>\The [SK] is not ready to be attached!</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
|
||||
var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
E.set_dir(dir)
|
||||
E.part = SK
|
||||
@@ -35,6 +35,20 @@
|
||||
rotate()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/post_buckle_mob()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/bed/chair/update_icon()
|
||||
..()
|
||||
if(buckled_mob && padding_material)
|
||||
var/cache_key = "[base_icon]-armrest-[padding_material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
var/image/I = image(icon, "[base_icon]_armrest")
|
||||
I.layer = MOB_LAYER + 0.1
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
overlays |= stool_cache[cache_key]
|
||||
|
||||
/obj/structure/bed/chair/proc/update_layer()
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
@@ -66,72 +80,49 @@
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
return
|
||||
|
||||
// Chair types
|
||||
/obj/structure/bed/chair/wood
|
||||
icon_state = "wooden_chair"
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
|
||||
/obj/structure/bed/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
|
||||
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/wood(src.loc)
|
||||
qdel(src)
|
||||
else
|
||||
..()
|
||||
|
||||
// Leaving this in for the sake of compilation.
|
||||
/obj/structure/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
var/image/armrest = null
|
||||
desc = "It's a chair. It looks comfy."
|
||||
icon_state = "comfychair_preview"
|
||||
|
||||
/obj/structure/bed/chair/comfy/New()
|
||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||
armrest.layer = MOB_LAYER + 0.1
|
||||
/obj/structure/bed/chair/comfy/brown/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","leather")
|
||||
|
||||
return ..()
|
||||
/obj/structure/bed/chair/comfy/red/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","carpet")
|
||||
|
||||
/obj/structure/bed/chair/comfy/post_buckle_mob()
|
||||
if(buckled_mob)
|
||||
overlays += armrest
|
||||
else
|
||||
overlays -= armrest
|
||||
/obj/structure/bed/chair/comfy/teal/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","teal")
|
||||
|
||||
/obj/structure/bed/chair/comfy/brown
|
||||
color = rgb(141,70,0)
|
||||
/obj/structure/bed/chair/comfy/black/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","black")
|
||||
|
||||
/obj/structure/bed/chair/comfy/red
|
||||
color = rgb(218,2,10)
|
||||
/obj/structure/bed/chair/comfy/green/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","green")
|
||||
|
||||
/obj/structure/bed/chair/comfy/teal
|
||||
color = rgb(0,234,250)
|
||||
/obj/structure/bed/chair/comfy/purp/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","purple")
|
||||
|
||||
/obj/structure/bed/chair/comfy/black
|
||||
color = rgb(60,60,60)
|
||||
/obj/structure/bed/chair/comfy/blue/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","blue")
|
||||
|
||||
/obj/structure/bed/chair/comfy/green
|
||||
color = rgb(1,196,8)
|
||||
/obj/structure/bed/chair/comfy/beige/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","beige")
|
||||
|
||||
/obj/structure/bed/chair/comfy/purp
|
||||
color = rgb(112,2,176)
|
||||
|
||||
/obj/structure/bed/chair/comfy/blue
|
||||
color = rgb(2,9,210)
|
||||
|
||||
/obj/structure/bed/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
/obj/structure/bed/chair/comfy/lime/New(var/newloc,var/newmaterial)
|
||||
..(newloc,"steel","lime")
|
||||
|
||||
/obj/structure/bed/chair/office
|
||||
anchored = 0
|
||||
buckle_movable = 1
|
||||
|
||||
/obj/structure/bed/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
/obj/structure/bed/chair/office/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/office/Move()
|
||||
..()
|
||||
@@ -178,3 +169,23 @@
|
||||
|
||||
/obj/structure/bed/chair/office/dark
|
||||
icon_state = "officechair_dark"
|
||||
|
||||
// Chair types
|
||||
/obj/structure/bed/chair/wood
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
icon_state = "wooden_chair"
|
||||
|
||||
/obj/structure/bed/chair/wood/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/wood/New(var/newloc)
|
||||
..(newloc, "wood")
|
||||
|
||||
/obj/structure/bed/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
|
||||
@@ -1,18 +1,79 @@
|
||||
//Todo: add leather and cloth for arbitrary coloured stools.
|
||||
var/global/list/stool_cache = list() //haha stool
|
||||
|
||||
/obj/item/weapon/stool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "stool"
|
||||
icon = 'icons/obj/furniture.dmi'
|
||||
icon_state = "stool_preview" //set for the map
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = 5
|
||||
var/base_icon = "stool_base"
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
|
||||
/obj/item/weapon/stool/padded
|
||||
icon_state = "stool_padded_preview" //set for the map
|
||||
|
||||
/obj/item/weapon/stool/New(var/newloc, var/new_material, var/new_padding_material)
|
||||
..(newloc)
|
||||
if(!new_material)
|
||||
new_material = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(new_material)
|
||||
if(new_padding_material)
|
||||
padding_material = get_material_by_name(new_padding_material)
|
||||
if(!istype(material))
|
||||
qdel(src)
|
||||
return
|
||||
force = round(material.get_blunt_damage()*0.4)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stool/padded/New(var/newloc, var/new_material)
|
||||
..(newloc, "steel", "carpet")
|
||||
|
||||
/obj/item/weapon/stool/update_icon()
|
||||
// Prep icon.
|
||||
icon_state = ""
|
||||
overlays.Cut()
|
||||
// Base icon.
|
||||
var/cache_key = "stool-[material.name]"
|
||||
if(isnull(stool_cache[cache_key]))
|
||||
var/image/I = image(icon, base_icon)
|
||||
I.color = material.icon_colour
|
||||
stool_cache[cache_key] = I
|
||||
overlays |= stool_cache[cache_key]
|
||||
// Padding overlay.
|
||||
if(padding_material)
|
||||
var/padding_cache_key = "stool-padding-[padding_material.name]"
|
||||
if(isnull(stool_cache[padding_cache_key]))
|
||||
var/image/I = image(icon, "stool_padding")
|
||||
I.color = padding_material.icon_colour
|
||||
stool_cache[padding_cache_key] = I
|
||||
overlays |= stool_cache[padding_cache_key]
|
||||
// Strings.
|
||||
if(padding_material)
|
||||
name = "[padding_material.display_name] [initial(name)]" //this is not perfect but it will do for now.
|
||||
desc = "A padded stool. Apply butt. It's made of [material.use_name] and covered with [padding_material.use_name]."
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
desc = "A stool. Apply butt with care. It's made of [material.use_name]."
|
||||
|
||||
/obj/item/weapon/stool/proc/add_padding(var/padding_type)
|
||||
padding_material = get_material_by_name(padding_type)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stool/proc/remove_padding()
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
padding_material = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
user.visible_message("\red [user] breaks [src] over [M]'s back!")
|
||||
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!</span>")
|
||||
user.remove_from_mob(src)
|
||||
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
|
||||
m.loc = get_turf(src)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
var/mob/living/T = M
|
||||
T.Weaken(10)
|
||||
@@ -36,12 +97,53 @@
|
||||
|
||||
/obj/item/weapon/stool/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stool/proc/dismantle()
|
||||
if(material)
|
||||
material.place_sheet(get_turf(src))
|
||||
if(padding_material)
|
||||
padding_material.place_sheet(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
qdel(src)
|
||||
..()
|
||||
dismantle()
|
||||
qdel(src)
|
||||
else if(istype(W,/obj/item/stack))
|
||||
if(padding_material)
|
||||
user << "\The [src] is already padded."
|
||||
return
|
||||
var/obj/item/stack/C = W
|
||||
if(C.get_amount() < 1) // How??
|
||||
user.drop_from_inventory(C)
|
||||
qdel(C)
|
||||
return
|
||||
var/padding_type //This is awful but it needs to be like this until tiles are given a material var.
|
||||
if(istype(W,/obj/item/stack/tile/carpet))
|
||||
padding_type = "carpet"
|
||||
else if(istype(W,/obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = W
|
||||
if(M.material && (M.material.flags & MATERIAL_PADDING))
|
||||
padding_type = "[M.material.name]"
|
||||
if(!padding_type)
|
||||
user << "You cannot pad \the [src] with that."
|
||||
return
|
||||
C.use(1)
|
||||
if(!istype(src.loc, /turf))
|
||||
user.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
user << "You add padding to \the [src]."
|
||||
add_padding(padding_type)
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!padding_material)
|
||||
user << "\The [src] has no padding to remove."
|
||||
return
|
||||
user << "You remove the padding from \the [src]."
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
remove_padding()
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
var/mob/living/pulling = null
|
||||
var/bloodiness
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||
..()
|
||||
@@ -18,13 +20,18 @@
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/relaymove(mob/user, direction)
|
||||
// Redundant check?
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained())
|
||||
if(user==pulling)
|
||||
pulling = null
|
||||
user.pulledby = null
|
||||
user << "\red You lost your grip!"
|
||||
user << "<span class='warning'>You lost your grip!</span>"
|
||||
return
|
||||
if(buckled_mob && pulling && user == buckled_mob)
|
||||
if(pulling.stat || pulling.stunned || pulling.weakened || pulling.paralysis || pulling.lying || pulling.restrained())
|
||||
@@ -42,10 +49,10 @@
|
||||
if(user==pulling)
|
||||
return
|
||||
if(pulling && (get_dir(src.loc, pulling.loc) == direction))
|
||||
user << "\red You cannot go there."
|
||||
user << "<span class='warning'>You cannot go there.</span>"
|
||||
return
|
||||
if(pulling && buckled_mob && (buckled_mob == user))
|
||||
user << "\red You cannot drive while being pushed."
|
||||
user << "<span class='warning'>You cannot drive while being pushed.</span>"
|
||||
return
|
||||
|
||||
// Let's roll
|
||||
@@ -96,7 +103,7 @@
|
||||
unbuckle_mob()
|
||||
if (pulling && (get_dist(src, pulling) > 1))
|
||||
pulling.pulledby = null
|
||||
pulling << "\red You lost your grip!"
|
||||
pulling << "<span class='warning'>You lost your grip!</span>"
|
||||
pulling = null
|
||||
else
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
@@ -114,7 +121,7 @@
|
||||
if(over_object == usr && in_range(src, usr))
|
||||
if(!ishuman(usr)) return
|
||||
if(usr == buckled_mob)
|
||||
usr << "\red You realize you are unable to push the wheelchair you sit in."
|
||||
usr << "<span class='warning'>You realize you are unable to push the wheelchair you sit in.</span>"
|
||||
return
|
||||
if(!pulling)
|
||||
pulling = usr
|
||||
@@ -126,7 +133,7 @@
|
||||
else
|
||||
if(usr != pulling)
|
||||
for(var/mob/O in viewers(pulling, null))
|
||||
O.show_message("\red [usr] breaks [pulling]'s grip on the wheelchair.", 1)
|
||||
O.show_message("<span class='warning'>[usr] breaks [pulling]'s grip on the wheelchair.</span>", 1)
|
||||
else
|
||||
usr << "You let go of \the [name]'s handles."
|
||||
pulling.pulledby = null
|
||||
|
||||
@@ -362,10 +362,10 @@
|
||||
return
|
||||
|
||||
if(busy)
|
||||
user << "\red Someone's already washing here."
|
||||
user << "<span class='warning'>Someone's already washing here.</span>"
|
||||
return
|
||||
|
||||
usr << "\blue You start washing your hands."
|
||||
usr << "<span class='notice'>You start washing your hands.</span>"
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
@@ -377,18 +377,18 @@
|
||||
if(ishuman(user))
|
||||
user:update_inv_gloves()
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message("\blue [user] washes their hands using \the [src].")
|
||||
V.show_message("<span class='notice'>[user] washes their hands using \the [src].")
|
||||
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(busy)
|
||||
user << "\red Someone's already washing here."
|
||||
user << "<span class='warning'>Someone's already washing here."
|
||||
return
|
||||
|
||||
var/obj/item/weapon/reagent_containers/RG = O
|
||||
if (istype(RG) && RG.is_open_container())
|
||||
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
|
||||
user.visible_message("\blue [user] fills \the [RG] using \the [src].","\blue You fill \the [RG] using \the [src].")
|
||||
user.visible_message("<span class='notice'>[user] fills \the [RG] using \the [src].</span>","<span class='notice'>You fill \the [RG] using \the [src].</span>")
|
||||
return
|
||||
|
||||
else if (istype(O, /obj/item/weapon/melee/baton))
|
||||
@@ -415,7 +415,7 @@
|
||||
var/obj/item/I = O
|
||||
if(!I || !istype(I,/obj/item)) return
|
||||
|
||||
usr << "\blue You start washing \the [I]."
|
||||
usr << "<span class='notice'>You start washing \the [I].</span>"
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
@@ -427,8 +427,8 @@
|
||||
|
||||
O.clean_blood()
|
||||
user.visible_message( \
|
||||
"\blue [user] washes \a [I] using \the [src].", \
|
||||
"\blue You wash \a [I] using \the [src].")
|
||||
"<span class='notice'>[user] washes \a [I] using \the [src].</span>", \
|
||||
"<span class='notice'>You wash \a [I] using \the [src].</span>")
|
||||
|
||||
|
||||
/obj/structure/sink/kitchen
|
||||
|
||||
@@ -34,7 +34,7 @@ obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
|
||||
set_dir(start_dir)
|
||||
else //If the user is facing northeast. northwest, southeast, southwest or north, default to north
|
||||
set_dir(NORTH)
|
||||
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
obj/structure/windoor_assembly/Destroy()
|
||||
@@ -75,13 +75,13 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You dissasembled the windoor assembly!"
|
||||
new /obj/item/stack/sheet/glass/reinforced(get_turf(src), 5)
|
||||
user << "<span class='notice'>You dissasembled the windoor assembly!</span>"
|
||||
new /obj/item/stack/material/glass/reinforced(get_turf(src), 5)
|
||||
if(secure)
|
||||
PoolOrNew(/obj/item/stack/rods, list(get_turf(src), 4))
|
||||
qdel(src)
|
||||
else
|
||||
user << "\blue You need more welding fuel to dissassemble the windoor assembly."
|
||||
user << "<span class='notice'>You need more welding fuel to dissassemble the windoor assembly.</span>"
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
@@ -91,7 +91,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've secured the windoor assembly!"
|
||||
user << "<span class='notice'>You've secured the windoor assembly!</span>"
|
||||
src.anchored = 1
|
||||
if(src.secure)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
@@ -105,7 +105,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
user << "\blue You've unsecured the windoor assembly!"
|
||||
user << "<span class='notice'>You've unsecured the windoor assembly!</span>"
|
||||
src.anchored = 0
|
||||
if(src.secure)
|
||||
src.name = "Secure Windoor Assembly"
|
||||
@@ -155,7 +155,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
|
||||
user << "\blue You cut the windoor wires.!"
|
||||
user << "<span class='notice'>You cut the windoor wires.!</span>"
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = "01"
|
||||
if(src.secure)
|
||||
@@ -173,7 +173,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
user << "\blue You've installed the airlock electronics!"
|
||||
user << "<span class='notice'>You've installed the airlock electronics!</span>"
|
||||
src.name = "Near finished Windoor Assembly"
|
||||
src.electronics = W
|
||||
else
|
||||
@@ -186,7 +186,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
|
||||
if(do_after(user, 40))
|
||||
if(!src || !src.electronics) return
|
||||
user << "\blue You've removed the airlock electronics!"
|
||||
user << "<span class='notice'>You've removed the airlock electronics!</span>"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
else
|
||||
@@ -198,7 +198,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(!src.electronics)
|
||||
usr << "\red The assembly is missing electronics."
|
||||
usr << "<span class='warning'>The assembly is missing electronics.</span>"
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
@@ -209,7 +209,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if(!src) return
|
||||
|
||||
density = 1 //Shouldn't matter but just incase
|
||||
user << "\blue You finish the windoor!"
|
||||
user << "<span class='notice'>You finish the windoor!</span>"
|
||||
|
||||
if(secure)
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(src.loc)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/state = 2
|
||||
var/reinf = 0
|
||||
var/basestate
|
||||
var/shardtype = /obj/item/weapon/shard
|
||||
var/shardtype = /obj/item/weapon/material/shard
|
||||
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
|
||||
var/silicate = 0 // number of units of silicate
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
var/index = null
|
||||
index = 0
|
||||
while(index < 2)
|
||||
new shardtype(loc)
|
||||
new shardtype(loc) //todo pooling?
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
index++
|
||||
else
|
||||
new shardtype(loc)
|
||||
new shardtype(loc) //todo pooling?
|
||||
if(reinf) PoolOrNew(/obj/item/stack/rods, loc)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -179,6 +179,7 @@
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
user.do_attack_animation(src)
|
||||
shatter()
|
||||
|
||||
else if (usr.a_intent == I_HURT)
|
||||
@@ -190,13 +191,14 @@
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
usr.visible_message("\red [usr.name] bangs against the [src.name]!", \
|
||||
"\red You bang against the [src.name]!", \
|
||||
user.do_attack_animation(src)
|
||||
usr.visible_message("<span class='danger'>[usr.name] bangs against the [src.name]!</span>",
|
||||
"<<span class='danger'>You bang against the [src.name]!</span>",
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].", \
|
||||
"You knock on the [src.name].", \
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].",
|
||||
"You knock on the [src.name].",
|
||||
"You hear a knocking sound.")
|
||||
return
|
||||
|
||||
@@ -209,6 +211,7 @@
|
||||
take_damage(damage)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||
user.do_attack_animation(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
|
||||
@@ -264,7 +267,7 @@
|
||||
else
|
||||
visible_message("<span class='notice'>[user] dismantles \the [src].</span>")
|
||||
if(dir == SOUTHWEST)
|
||||
var/obj/item/stack/sheet/mats = new glasstype(loc)
|
||||
var/obj/item/stack/material/mats = new glasstype(loc)
|
||||
mats.amount = is_fulltile() ? 4 : 2
|
||||
else
|
||||
new glasstype(loc)
|
||||
@@ -272,6 +275,7 @@
|
||||
else
|
||||
user.changeNextMove(8)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
user.do_attack_animation(src)
|
||||
hit(W.force)
|
||||
if(health <= 7)
|
||||
anchored = 0
|
||||
@@ -401,7 +405,7 @@
|
||||
desc = "It looks thin and flimsy. A few knocks with... anything, really should shatter it."
|
||||
icon_state = "window"
|
||||
basestate = "window"
|
||||
glasstype = /obj/item/stack/sheet/glass
|
||||
glasstype = /obj/item/stack/material/glass
|
||||
|
||||
|
||||
/obj/structure/window/phoronbasic
|
||||
@@ -409,8 +413,8 @@
|
||||
desc = "A phoron-glass alloy window. It looks insanely tough to break. It appears it's also insanely tough to burn through."
|
||||
basestate = "phoronwindow"
|
||||
icon_state = "phoronwindow"
|
||||
shardtype = /obj/item/weapon/shard/phoron
|
||||
glasstype = /obj/item/stack/sheet/glass/phoronglass
|
||||
shardtype = /obj/item/weapon/material/shard/phoron
|
||||
glasstype = /obj/item/stack/material/glass/phoronglass
|
||||
maxhealth = 120
|
||||
|
||||
/obj/structure/window/phoronbasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
@@ -423,8 +427,8 @@
|
||||
desc = "A phoron-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic phoron windows are insanely fireproof."
|
||||
basestate = "phoronrwindow"
|
||||
icon_state = "phoronrwindow"
|
||||
shardtype = /obj/item/weapon/shard/phoron
|
||||
glasstype = /obj/item/stack/sheet/glass/phoronrglass
|
||||
shardtype = /obj/item/weapon/material/shard/phoron
|
||||
glasstype = /obj/item/stack/material/glass/phoronrglass
|
||||
reinf = 1
|
||||
maxhealth = 160
|
||||
|
||||
@@ -438,7 +442,7 @@
|
||||
basestate = "rwindow"
|
||||
maxhealth = 40
|
||||
reinf = 1
|
||||
glasstype = /obj/item/stack/sheet/glass/reinforced
|
||||
glasstype = /obj/item/stack/material/glass/reinforced
|
||||
|
||||
/obj/structure/window/New(Loc, constructed=0)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user