mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Merge remote-tracking branch 'upstream/dev' into inventoryfix
Conflicts: code/game/gamemodes/revolution/rp-revolution.dm code/game/machinery/kitchen/juicer.dm code/game/objects/items/stacks/stack.dm code/game/objects/items/weapons/cigs_lighters.dm code/game/objects/structures/stool_bed_chair_nest/stools.dm code/modules/destilery/main.dm code/modules/hydroponics/biogenerator.dm code/modules/mob/living/carbon/human/inventory.dm code/modules/mob/living/carbon/monkey/inventory.dm code/modules/projectiles/guns/launcher/pneumatic.dm
This commit is contained in:
@@ -161,6 +161,9 @@
|
||||
del(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
|
||||
/obj/structure/closet/lasertag/red/New()
|
||||
..()
|
||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
||||
new /obj/item/weapon/gun/energy/laser/redtag(src)
|
||||
new /obj/item/weapon/gun/energy/lasertag/red(src)
|
||||
new /obj/item/weapon/gun/energy/lasertag/red(src)
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
new /obj/item/clothing/suit/redtag(src)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/obj/structure/closet/lasertag/blue/New()
|
||||
..()
|
||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
||||
new /obj/item/weapon/gun/energy/laser/bluetag(src)
|
||||
new /obj/item/weapon/gun/energy/lasertag/blue(src)
|
||||
new /obj/item/weapon/gun/energy/lasertag/blue(src)
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
new /obj/item/clothing/suit/bluetag(src)
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
if (prob(70))
|
||||
new /obj/item/clothing/tie/storage/brown_vest(src)
|
||||
new /obj/item/clothing/accessory/storage/brown_vest(src)
|
||||
else
|
||||
new /obj/item/clothing/tie/storage/webbing(src)
|
||||
new /obj/item/clothing/accessory/storage/webbing(src)
|
||||
new /obj/item/blueprints(src)
|
||||
new /obj/item/clothing/under/rank/chief_engineer(src)
|
||||
new /obj/item/clothing/head/hardhat/white(src)
|
||||
@@ -109,9 +109,9 @@
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
if (prob(70))
|
||||
new /obj/item/clothing/tie/storage/brown_vest(src)
|
||||
new /obj/item/clothing/accessory/storage/brown_vest(src)
|
||||
else
|
||||
new /obj/item/clothing/tie/storage/webbing(src)
|
||||
new /obj/item/clothing/accessory/storage/webbing(src)
|
||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||
new /obj/item/device/radio/headset/headset_eng(src)
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
@@ -138,9 +138,9 @@
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_eng(src)
|
||||
if (prob(70))
|
||||
new /obj/item/clothing/tie/storage/brown_vest(src)
|
||||
new /obj/item/clothing/accessory/storage/brown_vest(src)
|
||||
else
|
||||
new /obj/item/clothing/tie/storage/webbing(src)
|
||||
new /obj/item/clothing/accessory/storage/webbing(src)
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
|
||||
@@ -23,5 +23,6 @@
|
||||
new /obj/item/clothing/head/greenbandana(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/wirecutters/clippers(src)
|
||||
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
|
||||
return
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/medical3
|
||||
name = "medical doctor's locker"
|
||||
req_access = list(access_surgery)
|
||||
req_access = list(access_medical)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||
new /obj/item/clothing/head/helmet/cap(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/suit/storage/vest(src)
|
||||
new /obj/item/weapon/cartridge/captain(src)
|
||||
new /obj/item/clothing/head/helmet/swat(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
@@ -47,13 +47,14 @@
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/suit/storage/vest(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/weapon/cartridge/hop(src)
|
||||
new /obj/item/device/radio/headset/heads/hop(src)
|
||||
new /obj/item/weapon/storage/box/ids(src)
|
||||
new /obj/item/weapon/storage/box/ids( src )
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/gun/projectile/sec/flash(src)
|
||||
new /obj/item/device/flash(src)
|
||||
return
|
||||
|
||||
@@ -103,7 +104,7 @@
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/head/helmet/HoS(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hos(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
||||
new /obj/item/clothing/suit/armor/hos/jensen(src)
|
||||
@@ -119,7 +120,7 @@
|
||||
new /obj/item/device/flash(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/clothing/tie/holster/waist(src)
|
||||
new /obj/item/clothing/accessory/holster/waist(src)
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
new /obj/item/clothing/head/beret/sec/hos(src)
|
||||
return
|
||||
@@ -143,12 +144,12 @@
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/clothing/suit/storage/vest/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/helmet/warden(src)
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
@@ -156,7 +157,7 @@
|
||||
new /obj/item/weapon/storage/belt/security(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
new /obj/item/weapon/gun/energy/gun(src)
|
||||
new /obj/item/weapon/storage/box/holobadge(src)
|
||||
new /obj/item/clothing/head/beret/sec/warden(src)
|
||||
return
|
||||
@@ -179,7 +180,7 @@
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/suit/armor/vest/security(src)
|
||||
new /obj/item/clothing/suit/storage/vest/officer(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
// new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
@@ -188,13 +189,14 @@
|
||||
new /obj/item/weapon/reagent_containers/spray/pepper(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/device/hailer(src)
|
||||
new /obj/item/clothing/tie/storage/black_vest(src)
|
||||
new /obj/item/clothing/accessory/storage/black_vest(src)
|
||||
new /obj/item/clothing/head/soft/sec/corp(src)
|
||||
new /obj/item/clothing/under/rank/security/corp(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/weapon/gun/energy/taser(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -202,7 +204,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/cargo(src)
|
||||
new /obj/item/clothing/accessory/armband/cargo(src)
|
||||
new /obj/item/device/encryptionkey/headset_cargo(src)
|
||||
return
|
||||
|
||||
@@ -210,7 +212,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/engine(src)
|
||||
new /obj/item/clothing/accessory/armband/engine(src)
|
||||
new /obj/item/device/encryptionkey/headset_eng(src)
|
||||
return
|
||||
|
||||
@@ -218,7 +220,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/science(src)
|
||||
new /obj/item/clothing/accessory/armband/science(src)
|
||||
new /obj/item/device/encryptionkey/headset_sci(src)
|
||||
return
|
||||
|
||||
@@ -226,7 +228,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/tie/armband/medgreen(src)
|
||||
new /obj/item/clothing/accessory/armband/medgreen(src)
|
||||
new /obj/item/device/encryptionkey/headset_med(src)
|
||||
return
|
||||
|
||||
@@ -257,12 +259,12 @@
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/device/detective_scanner(src)
|
||||
new /obj/item/clothing/suit/armor/det_suit(src)
|
||||
new /obj/item/ammo_magazine/c45r(src)
|
||||
new /obj/item/ammo_magazine/c45r(src)
|
||||
new /obj/item/clothing/suit/storage/vest/detective(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/ammo_magazine/c45m/rubber(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
new /obj/item/weapon/gun/projectile/detective/semiauto(src)
|
||||
new /obj/item/clothing/tie/holster/armpit(src)
|
||||
new /obj/item/weapon/gun/projectile/colt/detective(src)
|
||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/secure_closet/detective/update_icon()
|
||||
|
||||
@@ -28,11 +28,15 @@
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/clothing/suit/space/emergency(src)
|
||||
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||
if ("aid")
|
||||
new /obj/item/weapon/tank/emergency_oxygen(src)
|
||||
new /obj/item/weapon/storage/toolbox/emergency(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||
new /obj/item/clothing/suit/space/emergency(src)
|
||||
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||
if ("tank")
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
@@ -43,6 +47,10 @@
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/weapon/storage/firstaid/o2(src)
|
||||
new /obj/item/clothing/suit/space/emergency(src)
|
||||
new /obj/item/clothing/suit/space/emergency(src)
|
||||
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||
new /obj/item/clothing/head/helmet/space/emergency(src)
|
||||
if ("nothing")
|
||||
// doot
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 2
|
||||
if(usr.stunned)
|
||||
return 2
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
@@ -55,8 +56,8 @@
|
||||
break
|
||||
if(O.density || O.anchored || istype(O,/obj/structure/closet))
|
||||
continue
|
||||
if(istype(O, /obj/structure/stool/bed)) //This is only necessary because of rollerbeds and swivel chairs.
|
||||
var/obj/structure/stool/bed/B = O
|
||||
if(istype(O, /obj/structure/bed)) //This is only necessary because of rollerbeds and swivel chairs.
|
||||
var/obj/structure/bed/B = O
|
||||
if(B.buckled_mob)
|
||||
continue
|
||||
O.loc = src
|
||||
@@ -341,8 +342,10 @@
|
||||
|
||||
/obj/structure/closet/crate/freezer/rations/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/box/donkpockets(src)
|
||||
new /obj/item/weapon/storage/box/donkpockets(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/liquidfood(src)
|
||||
|
||||
/obj/structure/closet/crate/bin
|
||||
name = "large bin"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if (1)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
del(src)
|
||||
if (2)
|
||||
@@ -39,14 +39,14 @@
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if (occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
occupied = 0
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/displaycase/meteorhit(obj/O as obj)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/obj/structure/displaycase/attack_hand(mob/user as mob)
|
||||
if (src.destroyed && src.occupied)
|
||||
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
|
||||
new /obj/item/weapon/gun/energy/captain( src.loc )
|
||||
user << "\b You deactivate the hover field built into the case."
|
||||
src.occupied = 0
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
|
||||
var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
|
||||
if(!t) return
|
||||
if(!in_range(src, usr) && src.loc != usr) return
|
||||
created_name = t
|
||||
@@ -248,6 +248,10 @@
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
// 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."
|
||||
return
|
||||
if(S.get_amount() >= 2)
|
||||
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.")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/structure/stool/bed/chair/e_chair
|
||||
/obj/structure/bed/chair/e_chair
|
||||
name = "electric chair"
|
||||
desc = "Looks absolutely SHOCKING!"
|
||||
icon_state = "echair0"
|
||||
@@ -6,14 +6,14 @@
|
||||
var/obj/item/assembly/shock_kit/part = null
|
||||
var/last_time = 1.0
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/New()
|
||||
/obj/structure/bed/chair/e_chair/New()
|
||||
..()
|
||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
|
||||
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
C.set_dir(dir)
|
||||
part.loc = loc
|
||||
@@ -23,7 +23,7 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/verb/toggle()
|
||||
/obj/structure/bed/chair/e_chair/verb/toggle()
|
||||
set name = "Toggle Electric Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
@@ -37,13 +37,13 @@
|
||||
usr << "<span class='notice'>You switch [on ? "on" : "off"] [src].</span>"
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/rotate()
|
||||
/obj/structure/bed/chair/e_chair/rotate()
|
||||
..()
|
||||
overlays.Cut()
|
||||
overlays += image('icons/obj/objects.dmi', src, "echair_over", MOB_LAYER + 1, dir) //there's probably a better way of handling this, but eh. -Pete
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/e_chair/proc/shock()
|
||||
/obj/structure/bed/chair/e_chair/proc/shock()
|
||||
if(!on)
|
||||
return
|
||||
if(last_time + 50 > world.time)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
layer = 2
|
||||
var/state = 0
|
||||
var/health = 200
|
||||
var/cover = 50 //how much cover the girder provides against projectiles.
|
||||
|
||||
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
@@ -14,19 +15,25 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
||||
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
|
||||
if(Proj.original != src && !prob(cover))
|
||||
return -1 //pass through
|
||||
|
||||
//Tasers and the like should not damage girders.
|
||||
if(Proj.damage_type == HALLOSS || Proj.damage_type == TOX || Proj.damage_type == CLONE)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
if(istype(Proj, /obj/item/projectile/beam))
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
var/damage = Proj.damage
|
||||
if(!istype(Proj, /obj/item/projectile/beam))
|
||||
damage *= 0.4 //non beams do reduced damage
|
||||
|
||||
return
|
||||
health -= damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wrench) && state == 0)
|
||||
@@ -137,6 +144,10 @@
|
||||
|
||||
if(S.sheettype)
|
||||
var/M = S.sheettype
|
||||
// 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 plate the girder in that material."
|
||||
return
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
S.use(2)
|
||||
@@ -209,11 +220,13 @@
|
||||
icon_state = "displaced"
|
||||
anchored = 0
|
||||
health = 50
|
||||
cover = 25
|
||||
|
||||
/obj/structure/girder/reinforced
|
||||
icon_state = "reinforced"
|
||||
state = 2
|
||||
health = 500
|
||||
cover = 80
|
||||
|
||||
/obj/structure/cultgirder
|
||||
icon= 'icons/obj/cult.dmi'
|
||||
@@ -222,6 +235,7 @@
|
||||
density = 1
|
||||
layer = 2
|
||||
var/health = 250
|
||||
var/cover = 70
|
||||
|
||||
/obj/structure/cultgirder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
|
||||
if(!damage || !wallbreaker)
|
||||
@@ -258,6 +272,14 @@
|
||||
dismantle()
|
||||
|
||||
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
|
||||
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
|
||||
if(Proj.original != src && !prob(cover))
|
||||
return -1 //pass through
|
||||
|
||||
//Tasers and the like should not damage cultgirders.
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
|
||||
@@ -59,16 +59,40 @@
|
||||
return !density
|
||||
|
||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if(!Proj) return
|
||||
|
||||
//Tasers and the like should not damage grilles.
|
||||
if(Proj.damage_type == HALLOSS)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
src.health -= Proj.damage*0.2
|
||||
healthcheck()
|
||||
return 0
|
||||
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
|
||||
var/damage = Proj.damage
|
||||
var/passthrough = 0
|
||||
|
||||
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
||||
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
//bullets
|
||||
if(Proj.original == src || prob(20))
|
||||
Proj.damage *= between(0, Proj.damage/60, 0.5)
|
||||
if(prob(max((damage-10)/25, 0))*100)
|
||||
passthrough = 1
|
||||
else
|
||||
Proj.damage *= between(0, Proj.damage/60, 1)
|
||||
passthrough = 1
|
||||
if(BURN)
|
||||
//beams and other projectiles are either blocked completely by grilles or stop half the damage.
|
||||
if(!(Proj.original == src || prob(20)))
|
||||
Proj.damage *= 0.5
|
||||
passthrough = 1
|
||||
|
||||
if(passthrough)
|
||||
. = -1
|
||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||
|
||||
src.health -= damage*0.2
|
||||
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswirecutter(W))
|
||||
@@ -115,7 +139,7 @@
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
user << "<span class='notice'>There is already a window facing this way there.</span>"
|
||||
return
|
||||
|
||||
|
||||
var/wtype = ST.created_window
|
||||
if (ST.use(1))
|
||||
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
|
||||
@@ -173,7 +197,8 @@
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
if(user.stunned)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A folded membrane which rapidly expands into a large cubical shape on activation."
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_wall"
|
||||
w_class = 3.0
|
||||
w_class = 3
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
@@ -38,6 +38,9 @@
|
||||
return 0
|
||||
|
||||
/obj/structure/inflatable/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
@@ -249,7 +252,8 @@
|
||||
desc = "Contains inflatable walls and doors."
|
||||
icon_state = "inf_box"
|
||||
item_state = "syringe_kit"
|
||||
max_combined_w_class = 21
|
||||
max_storage_space = 28
|
||||
can_hold = list(/obj/item/inflatable)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
|
||||
//old style retardo-cart
|
||||
/obj/structure/stool/bed/chair/janicart
|
||||
/obj/structure/bed/chair/janicart
|
||||
name = "janicart"
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "pussywagon"
|
||||
@@ -169,12 +169,12 @@
|
||||
var/callme = "pimpin' ride" //how do people refer to it?
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/New()
|
||||
/obj/structure/bed/chair/janicart/New()
|
||||
create_reagents(100)
|
||||
update_layer()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
|
||||
/obj/structure/bed/chair/janicart/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
user << "\A [mybag] is hanging on the [callme]."
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume > 1)
|
||||
reagents.trans_to(I, 2)
|
||||
@@ -200,7 +200,7 @@
|
||||
mybag = I
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
|
||||
/obj/structure/bed/chair/janicart/attack_hand(mob/user)
|
||||
if(mybag)
|
||||
mybag.loc = get_turf(user)
|
||||
user.put_in_hands(mybag)
|
||||
@@ -209,9 +209,9 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
|
||||
/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
||||
unbuckle()
|
||||
unbuckle_mob()
|
||||
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
|
||||
step(src, direction)
|
||||
update_mob()
|
||||
@@ -219,46 +219,34 @@
|
||||
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/Move()
|
||||
/obj/structure/bed/chair/janicart/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = loc
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/buckle_mob(mob/M, mob/user)
|
||||
if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon))
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M] climbs onto the [callme]!</span>",\
|
||||
"<span class='notice'>You climb onto the [callme]!</span>")
|
||||
M.buckled = src
|
||||
M.loc = loc
|
||||
M.set_dir(dir)
|
||||
M.update_canmove()
|
||||
buckled_mob = M
|
||||
/obj/structure/bed/chair/janicart/post_buckle_mob(mob/living/M)
|
||||
update_mob()
|
||||
add_fingerprint(user)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/update_layer()
|
||||
/obj/structure/bed/chair/janicart/update_layer()
|
||||
if(dir == SOUTH)
|
||||
layer = FLY_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/unbuckle()
|
||||
if(buckled_mob)
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 0
|
||||
..()
|
||||
/obj/structure/bed/chair/janicart/unbuckle_mob()
|
||||
var/mob/living/M = ..()
|
||||
if(M)
|
||||
M.pixel_x = 0
|
||||
M.pixel_y = 0
|
||||
return M
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/set_dir()
|
||||
/obj/structure/bed/chair/janicart/set_dir()
|
||||
..()
|
||||
update_layer()
|
||||
if(buckled_mob)
|
||||
@@ -269,7 +257,7 @@
|
||||
update_mob()
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
|
||||
/obj/structure/bed/chair/janicart/proc/update_mob()
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
switch(dir)
|
||||
@@ -287,7 +275,7 @@
|
||||
buckled_mob.pixel_y = 7
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(buckled_mob)
|
||||
if(prob(85))
|
||||
return buckled_mob.bullet_act(Proj)
|
||||
|
||||
@@ -4,75 +4,57 @@
|
||||
name = "a meat spike"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "spike"
|
||||
desc = "A spike for collecting meat from animals"
|
||||
desc = "A spike for collecting meat from animals."
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/meat = 0
|
||||
var/occupied = 0
|
||||
var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno
|
||||
var/occupied
|
||||
var/meat_type
|
||||
var/victim_name = "corpse"
|
||||
|
||||
/obj/structure/kitchenspike
|
||||
|
||||
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if(!istype(G, /obj/item/weapon/grab))
|
||||
return
|
||||
if(istype(G.affecting, /mob/living/carbon/monkey))
|
||||
if(src.occupied == 0)
|
||||
src.icon_state = "spikebloody"
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 1
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
|
||||
del(G.affecting)
|
||||
del(G)
|
||||
|
||||
else
|
||||
user << "\red The spike already has something on it, finish collecting its meat first!"
|
||||
else if(istype(G.affecting, /mob/living/carbon/alien))
|
||||
if(src.occupied == 0)
|
||||
src.icon_state = "spikebloodygreen"
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 2
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
|
||||
del(G.affecting)
|
||||
del(G)
|
||||
else
|
||||
user << "\red The spike already has something on it, finish collecting its meat first!"
|
||||
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
|
||||
if(!istype(G, /obj/item/weapon/grab) || !G.affecting)
|
||||
return
|
||||
if(occupied)
|
||||
user << "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>"
|
||||
else
|
||||
if(spike(G.affecting))
|
||||
visible_message("<span class = 'danger'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>")
|
||||
del(G.affecting)
|
||||
del(G)
|
||||
else
|
||||
user << "\red They are too big for the spike, try something smaller!"
|
||||
return
|
||||
user << "<span class='danger'>They are too big for the spike, try something smaller!</span>"
|
||||
|
||||
// MouseDrop_T(var/atom/movable/C, mob/user)
|
||||
// if(istype(C, /obj/mob/carbon/monkey)
|
||||
// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime))
|
||||
// else if(istype(C, /obj/livestock/spesscarp
|
||||
/obj/structure/kitchenspike/proc/spike(var/mob/living/victim)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.occupied)
|
||||
if(src.meattype == 1)
|
||||
if(src.meat > 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc )
|
||||
usr << "You remove some meat from the monkey."
|
||||
else if(src.meat == 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc)
|
||||
usr << "You remove the last piece of meat from the monkey!"
|
||||
src.icon_state = "spike"
|
||||
src.occupied = 0
|
||||
else if(src.meattype == 2)
|
||||
if(src.meat > 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc )
|
||||
usr << "You remove some meat from the alien."
|
||||
else if(src.meat == 1)
|
||||
src.meat--
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc)
|
||||
usr << "You remove the last piece of meat from the alien!"
|
||||
src.icon_state = "spike"
|
||||
src.occupied = 0
|
||||
if(!istype(victim))
|
||||
return
|
||||
|
||||
if(istype(victim, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if(!H.species.is_small)
|
||||
return 0
|
||||
meat_type = H.species.meat_type
|
||||
icon_state = "spikebloody"
|
||||
else if(istype(victim, /mob/living/carbon/alien))
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
|
||||
icon_state = "spikebloodygreen"
|
||||
else
|
||||
return 0
|
||||
|
||||
victim_name = victim.name
|
||||
occupied = 1
|
||||
meat = 5
|
||||
return 1
|
||||
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user as mob)
|
||||
if(..() || !occupied)
|
||||
return
|
||||
meat--
|
||||
new meat_type(get_turf(src))
|
||||
if(src.meat > 1)
|
||||
user << "You remove some meat from \the [victim_name]."
|
||||
else if(src.meat == 1)
|
||||
user << "You remove the last piece of meat from \the [victim_name]!"
|
||||
icon_state = "spike"
|
||||
occupied = 0
|
||||
|
||||
@@ -1,65 +1,25 @@
|
||||
//wip wip wup
|
||||
/obj/structure/mirror
|
||||
name = "\improper SalonPro Nano-Mirror(TM)"
|
||||
desc = "The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
|
||||
name = "mirror"
|
||||
desc = "A SalonPro Nano-Mirror(TM) brand mirror! The leading technology in hair salon products, utilizing nano-machinery to style your hair just right."
|
||||
icon = 'icons/obj/watercloset.dmi'
|
||||
icon_state = "mirror"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/shattered = 0
|
||||
var/list/ui_users = list()
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||
|
||||
if(shattered) return
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(H.a_intent == "hurt")
|
||||
if(prob(30) || H.species.can_shred(H))
|
||||
attack_generic(user,1)
|
||||
else
|
||||
attack_generic(user)
|
||||
return
|
||||
|
||||
var/userloc = H.loc
|
||||
|
||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||
//this is largely copypasted from there.
|
||||
|
||||
//handle facial hair (if necessary)
|
||||
if(H.gender == MALE)
|
||||
var/list/species_facial_hair = list()
|
||||
if(H.species)
|
||||
for(var/i in facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
|
||||
if(H.species.name in tmp_facial.species_allowed)
|
||||
species_facial_hair += i
|
||||
else
|
||||
species_facial_hair = facial_hair_styles_list
|
||||
|
||||
var/new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
H.f_style = new_style
|
||||
|
||||
//handle normal hair
|
||||
var/list/species_hair = list()
|
||||
if(H.species)
|
||||
for(var/i in hair_styles_list)
|
||||
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
|
||||
if(H.species.name in tmp_hair.species_allowed)
|
||||
species_hair += i
|
||||
else
|
||||
species_hair = hair_styles_list
|
||||
|
||||
var/new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair
|
||||
if(userloc != H.loc) return //no tele-grooming
|
||||
if(new_style)
|
||||
H.h_style = new_style
|
||||
|
||||
H.update_hair()
|
||||
|
||||
var/obj/nano_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
AC = new(src, user)
|
||||
AC.name = "SalonPro Nano-Mirror(TM)"
|
||||
ui_users[user] = AC
|
||||
AC.ui_interact(user)
|
||||
|
||||
/obj/structure/mirror/proc/shatter()
|
||||
if(shattered) return
|
||||
@@ -70,6 +30,9 @@
|
||||
|
||||
|
||||
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
if(prob(Proj.damage * 2))
|
||||
if(!shattered)
|
||||
shatter()
|
||||
@@ -101,3 +64,32 @@
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
|
||||
return 1
|
||||
|
||||
// The following mirror is ~special~.
|
||||
/obj/structure/mirror/raider
|
||||
name = "cracked mirror"
|
||||
desc = "Something seems strange about this old, dirty mirror. Your reflection doesn't look like you remember it."
|
||||
icon_state = "mirror_broke"
|
||||
shattered = 1
|
||||
|
||||
/obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user)
|
||||
if(istype(get_area(src),/area/syndicate_mothership))
|
||||
if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species != "Vox" && is_alien_whitelisted(user, "Vox"))
|
||||
var/choice = input("Do you wish to become a Vox? This is not reversible.") as null|anything in list("No","Yes")
|
||||
if(choice && choice == "Yes")
|
||||
var/mob/living/carbon/human/vox/vox = new(get_turf(src),"Vox")
|
||||
vox.gender = user.gender
|
||||
raiders.equip(vox)
|
||||
if(user.mind)
|
||||
user.mind.transfer_to(vox)
|
||||
spawn(1)
|
||||
var/newname = input(vox,"Enter a name, or leave blank for the default name.", "Name change","") as text
|
||||
newname = sanitize(newname)
|
||||
if(!newname || newname == "")
|
||||
var/datum/language/L = all_languages[vox.species.default_language]
|
||||
newname = L.get_random_name()
|
||||
vox.real_name = newname
|
||||
vox.name = vox.real_name
|
||||
raiders.update_access(vox)
|
||||
del(user)
|
||||
..()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = sanitize(t)
|
||||
if (t)
|
||||
src.name = text("Morgue- '[]'", t)
|
||||
else
|
||||
@@ -258,7 +258,7 @@
|
||||
return
|
||||
if ((!in_range(src, usr) > 1 && src.loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
t = sanitize(t)
|
||||
if (t)
|
||||
src.name = text("Crematorium- '[]'", t)
|
||||
else
|
||||
@@ -379,12 +379,21 @@
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
/obj/machinery/crema_switch/attack_hand(mob/user as mob)
|
||||
/obj/machinery/button/crematorium
|
||||
name = "crematorium igniter"
|
||||
desc = "Burn baby burn!"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "crema_switch"
|
||||
req_access = list(access_crematorium)
|
||||
id = 1
|
||||
|
||||
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(src.allowed(usr))
|
||||
for (var/obj/structure/crematorium/C in world)
|
||||
if (C.id == id)
|
||||
if (!C.cremating)
|
||||
C.cremate(user)
|
||||
else
|
||||
usr << "\red Access denied."
|
||||
return
|
||||
usr << "<span class='warning'>Access denied.</span>"
|
||||
|
||||
@@ -90,7 +90,7 @@ FLOOR SAFES
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
var/canhear = 0
|
||||
if(istype(user.l_hand, /obj/item/clothing/tie/stethoscope) || istype(user.r_hand, /obj/item/clothing/tie/stethoscope))
|
||||
if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
|
||||
canhear = 1
|
||||
|
||||
if(href_list["open"])
|
||||
@@ -155,7 +155,7 @@ FLOOR SAFES
|
||||
user << "<span class='notice'>[I] won't fit in [src].</span>"
|
||||
return
|
||||
else
|
||||
if(istype(I, /obj/item/clothing/tie/stethoscope))
|
||||
if(istype(I, /obj/item/clothing/accessory/stethoscope))
|
||||
user << "Hold [I] in one of your hands while you manipulate the dial."
|
||||
return
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
//Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to.
|
||||
#define NEST_RESIST_TIME 1200
|
||||
|
||||
/obj/structure/stool/bed/nest
|
||||
/obj/structure/bed/nest
|
||||
name = "alien nest"
|
||||
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
|
||||
|
||||
/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob)
|
||||
/obj/structure/bed/nest/user_unbuckle_mob(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
@@ -18,7 +18,7 @@
|
||||
"<span class='notice'>You hear squelching...</span>")
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.old_y = 0
|
||||
unbuckle()
|
||||
unbuckle_mob()
|
||||
else
|
||||
if(world.time <= buckled_mob.last_special+NEST_RESIST_TIME)
|
||||
return
|
||||
@@ -32,16 +32,15 @@
|
||||
buckled_mob.last_special = world.time
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.old_y = 0
|
||||
unbuckle()
|
||||
unbuckle_mob()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
unbuckle_mob()
|
||||
|
||||
var/mob/living/carbon/xenos = user
|
||||
var/mob/living/carbon/victim = M
|
||||
@@ -69,7 +68,7 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
@@ -77,7 +76,7 @@
|
||||
M.show_message("<span class='warning'>[user] hits [src] with [W]!</span>", 1)
|
||||
healthcheck()
|
||||
|
||||
/obj/structure/stool/bed/nest/proc/healthcheck()
|
||||
/obj/structure/bed/nest/proc/healthcheck()
|
||||
if(health <=0)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
@@ -7,120 +7,66 @@
|
||||
/*
|
||||
* Beds
|
||||
*/
|
||||
/obj/structure/stool/bed
|
||||
/obj/structure/bed
|
||||
name = "bed"
|
||||
desc = "This is used to lie in, sleep in or strap on."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "bed"
|
||||
var/mob/living/buckled_mob
|
||||
var/movable = 0 // For mobility checks
|
||||
pressure_resistance = 15
|
||||
anchored = 1
|
||||
can_buckle = 1
|
||||
buckle_lying = 1
|
||||
|
||||
/obj/structure/stool/bed/psych
|
||||
/obj/structure/bed/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/bed/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
del(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)
|
||||
del(src)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/bed/psych
|
||||
name = "psychiatrists couch"
|
||||
desc = "For prime comfort during psychiatric evaluations."
|
||||
icon_state = "psychbed"
|
||||
|
||||
/obj/structure/stool/bed/alien
|
||||
/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/stool/bed/Del()
|
||||
unbuckle()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/attack_hand(mob/user as mob)
|
||||
manual_unbuckle(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/MouseDrop(atom/over_object)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/stool/bed/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
|
||||
var/M = buckled_mob
|
||||
buckled_mob = null
|
||||
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
if(buckled_mob != user)
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
|
||||
"You were unbuckled from [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] unbuckled \himself!",\
|
||||
"You unbuckle yourself from [src].",\
|
||||
"You hear metal clanking")
|
||||
unbuckle()
|
||||
src.add_fingerprint(user)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if (!ticker)
|
||||
user << "You can't buckle anyone in before the game starts."
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
if (istype(M, /mob/living/carbon/slime))
|
||||
user << "The [M] is too squishy to buckle in."
|
||||
return
|
||||
|
||||
unbuckle()
|
||||
|
||||
if (M == usr)
|
||||
M.visible_message(\
|
||||
"\blue [M.name] buckles in!",\
|
||||
"You buckle yourself to [src].",\
|
||||
"You hear metal clanking")
|
||||
else
|
||||
M.visible_message(\
|
||||
"\blue [M.name] is buckled in to [src] by [user.name]!",\
|
||||
"You are buckled in to [src] by [user.name].",\
|
||||
"You hear metal clanking")
|
||||
M.buckled = src
|
||||
M.loc = src.loc
|
||||
M.set_dir(src.dir)
|
||||
M.update_canmove()
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
*/
|
||||
/obj/structure/stool/bed/roller
|
||||
/obj/structure/bed/roller
|
||||
name = "roller bed"
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
|
||||
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/roller_holder))
|
||||
if(buckled_mob)
|
||||
manual_unbuckle()
|
||||
user_unbuckle_mob(user)
|
||||
else
|
||||
visible_message("[user] collapses \the [src.name].")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
@@ -137,7 +83,7 @@
|
||||
w_class = 4.0 // Can't be put in backpacks. Oh well.
|
||||
|
||||
/obj/item/roller/attack_self(mob/user)
|
||||
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
@@ -171,13 +117,13 @@
|
||||
return
|
||||
|
||||
user << "\blue You deploy the roller bed."
|
||||
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
del(held)
|
||||
held = null
|
||||
|
||||
|
||||
/obj/structure/stool/bed/roller/Move()
|
||||
/obj/structure/bed/roller/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
@@ -185,31 +131,21 @@
|
||||
else
|
||||
buckled_mob = null
|
||||
|
||||
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
|
||||
return
|
||||
M.pixel_y = 6
|
||||
M.old_y = 6
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
..()
|
||||
return
|
||||
/obj/structure/bed/roller/post_buckle_mob(mob/living/M as mob)
|
||||
if(M == buckled_mob)
|
||||
M.pixel_y = 6
|
||||
M.old_y = 6
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
else
|
||||
M.pixel_y = 0
|
||||
M.old_y = 0
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
|
||||
/obj/structure/stool/bed/roller/manual_unbuckle(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.pixel_y = 0
|
||||
buckled_mob.old_y = 0
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob = null
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete
|
||||
/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"
|
||||
buckle_lying = 0 //force people to sit up in chairs when buckled
|
||||
|
||||
var/propelled = 0 // Check for fire-extinguisher-driven chairs
|
||||
|
||||
/obj/structure/stool/MouseDrop(atom/over_object)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/New()
|
||||
/obj/structure/bed/chair/New()
|
||||
..()
|
||||
spawn(3) //sorry. i don't think there's a better way to do this.
|
||||
update_layer()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/structure/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/assembly/shock_kit))
|
||||
var/obj/item/assembly/shock_kit/SK = W
|
||||
@@ -22,7 +20,7 @@
|
||||
user << "<span class='notice'>[SK] is not ready to be attached!</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
|
||||
var/obj/structure/bed/chair/e_chair/E = new /obj/structure/bed/chair/e_chair(src.loc)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
E.set_dir(dir)
|
||||
E.part = SK
|
||||
@@ -30,26 +28,26 @@
|
||||
SK.master = E
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/bed/chair/attack_tk(mob/user as mob)
|
||||
/obj/structure/bed/chair/attack_tk(mob/user as mob)
|
||||
if(buckled_mob)
|
||||
..()
|
||||
else
|
||||
rotate()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/proc/update_layer()
|
||||
/obj/structure/bed/chair/proc/update_layer()
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
else
|
||||
src.layer = OBJ_LAYER
|
||||
|
||||
/obj/structure/stool/bed/chair/set_dir()
|
||||
/obj/structure/bed/chair/set_dir()
|
||||
..()
|
||||
update_layer()
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
|
||||
/obj/structure/stool/bed/chair/verb/rotate()
|
||||
/obj/structure/bed/chair/verb/rotate()
|
||||
set name = "Rotate Chair"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
@@ -68,23 +66,18 @@
|
||||
src.set_dir(turn(src.dir, 90))
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
// Chair types
|
||||
/obj/structure/stool/bed/chair/wood/normal
|
||||
/obj/structure/bed/chair/wood/normal
|
||||
icon_state = "wooden_chair"
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
|
||||
/obj/structure/stool/bed/chair/wood/wings
|
||||
/obj/structure/bed/chair/wood/wings
|
||||
icon_state = "wooden_chair_wings"
|
||||
name = "wooden chair"
|
||||
desc = "Old is never too old to not be in fashion."
|
||||
|
||||
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/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)
|
||||
@@ -92,57 +85,57 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy
|
||||
/obj/structure/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
var/image/armrest = null
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/New()
|
||||
/obj/structure/bed/chair/comfy/New()
|
||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||
armrest.layer = MOB_LAYER + 0.1
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/afterbuckle()
|
||||
/obj/structure/bed/chair/comfy/post_buckle_mob()
|
||||
if(buckled_mob)
|
||||
overlays += armrest
|
||||
else
|
||||
overlays -= armrest
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/brown
|
||||
/obj/structure/bed/chair/comfy/brown
|
||||
color = rgb(141,70,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/red
|
||||
/obj/structure/bed/chair/comfy/red
|
||||
color = rgb(218,2,10)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/teal
|
||||
/obj/structure/bed/chair/comfy/teal
|
||||
color = rgb(0,234,250)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
/obj/structure/bed/chair/comfy/black
|
||||
color = rgb(60,60,60)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/green
|
||||
/obj/structure/bed/chair/comfy/green
|
||||
color = rgb(1,196,8)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/purp
|
||||
/obj/structure/bed/chair/comfy/purp
|
||||
color = rgb(112,2,176)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/blue
|
||||
/obj/structure/bed/chair/comfy/blue
|
||||
color = rgb(2,9,210)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
/obj/structure/bed/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/stool/bed/chair/office
|
||||
/obj/structure/bed/chair/office
|
||||
anchored = 0
|
||||
movable = 1
|
||||
buckle_movable = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
/obj/structure/bed/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/office/Move()
|
||||
/obj/structure/bed/chair/office/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
@@ -155,15 +148,14 @@
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle()
|
||||
unbuckle_mob()
|
||||
|
||||
/obj/structure/stool/bed/chair/office/Bump(atom/A)
|
||||
/obj/structure/bed/chair/office/Bump(atom/A)
|
||||
..()
|
||||
if(!buckled_mob) return
|
||||
|
||||
if(propelled)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
unbuckle()
|
||||
var/mob/living/occupant = unbuckle_mob()
|
||||
|
||||
var/def_zone = ran_zone()
|
||||
var/blocked = occupant.run_armor_check(def_zone, "melee")
|
||||
@@ -183,8 +175,8 @@
|
||||
victim.apply_damage(10, BRUTE, def_zone, blocked)
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/stool/bed/chair/office/light
|
||||
/obj/structure/bed/chair/office/light
|
||||
icon_state = "officechair_white"
|
||||
|
||||
/obj/structure/stool/bed/chair/office/dark
|
||||
/obj/structure/bed/chair/office/dark
|
||||
icon_state = "officechair_dark"
|
||||
|
||||
@@ -1,79 +1,11 @@
|
||||
/obj/structure/stool
|
||||
/obj/item/weapon/stool
|
||||
name = "stool"
|
||||
desc = "Apply butt."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "stool"
|
||||
anchored = 1.0
|
||||
pressure_resistance = 15
|
||||
|
||||
/obj/structure/stool/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/structure/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)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/structure/stool/MouseDrop(atom/over_object)
|
||||
if (istype(over_object, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = over_object
|
||||
if (H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
|
||||
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
|
||||
S.origin = src
|
||||
src.loc = S
|
||||
H.put_in_hands(S)
|
||||
H.visible_message("\red [H] grabs [src] from the floor!", "\red You grab [src] from the floor!")
|
||||
|
||||
/obj/item/weapon/stool
|
||||
name = "stool"
|
||||
desc = "Uh-hoh, bar is heating up."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "stool"
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = 5.0
|
||||
var/obj/structure/stool/origin = null
|
||||
|
||||
/obj/item/weapon/stool/proc/deploy(var/mob/user)
|
||||
|
||||
if(!origin)
|
||||
del src
|
||||
|
||||
origin.loc = get_turf(src)
|
||||
|
||||
if(user)
|
||||
user.remove_from_mob(src)
|
||||
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
|
||||
|
||||
del src
|
||||
|
||||
/obj/item/weapon/stool/dropped(mob/user as mob)
|
||||
..()
|
||||
if(istype(loc,/turf/))
|
||||
deploy(user)
|
||||
|
||||
/obj/item/weapon/stool/attack_self(mob/user as mob)
|
||||
..()
|
||||
deploy(user)
|
||||
w_class = 5
|
||||
|
||||
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
|
||||
if (prob(5) && istype(M,/mob/living))
|
||||
@@ -87,3 +19,29 @@
|
||||
T.apply_damage(20)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/stool/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/stool/blob_act()
|
||||
if(prob(75))
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
del(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)
|
||||
del(src)
|
||||
..()
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/obj/structure/stool/bed/chair/wheelchair
|
||||
/obj/structure/bed/chair/wheelchair
|
||||
name = "wheelchair"
|
||||
desc = "You sit in this. Either by will or force."
|
||||
icon_state = "wheelchair"
|
||||
anchored = 0
|
||||
movable = 1
|
||||
buckle_movable = 1
|
||||
|
||||
var/driving = 0
|
||||
var/mob/living/pulling = null
|
||||
var/bloodiness
|
||||
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/set_dir()
|
||||
/obj/structure/bed/chair/wheelchair/set_dir()
|
||||
..()
|
||||
overlays = null
|
||||
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
|
||||
@@ -18,7 +18,7 @@
|
||||
if(buckled_mob)
|
||||
buckled_mob.set_dir(dir)
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
|
||||
/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)
|
||||
@@ -79,7 +79,7 @@
|
||||
create_track()
|
||||
driving = 0
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/Move()
|
||||
/obj/structure/bed/chair/wheelchair/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
var/mob/living/occupant = buckled_mob
|
||||
@@ -93,7 +93,7 @@
|
||||
if (O != occupant)
|
||||
Bump(O)
|
||||
else
|
||||
unbuckle()
|
||||
unbuckle_mob()
|
||||
if (pulling && (get_dist(src, pulling) > 1))
|
||||
pulling.pulledby = null
|
||||
pulling << "\red You lost your grip!"
|
||||
@@ -102,14 +102,14 @@
|
||||
if (occupant && (src.loc != occupant.loc))
|
||||
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob)
|
||||
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||
if (pulling)
|
||||
MouseDrop(usr)
|
||||
else
|
||||
manual_unbuckle(user)
|
||||
user_unbuckle_mob(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if(over_object == usr && in_range(src, usr))
|
||||
if(!ishuman(usr)) return
|
||||
@@ -133,15 +133,14 @@
|
||||
pulling = null
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/Bump(atom/A)
|
||||
/obj/structure/bed/chair/wheelchair/Bump(atom/A)
|
||||
..()
|
||||
if(!buckled_mob) return
|
||||
|
||||
if(propelled || (pulling && (pulling.a_intent == "hurt")))
|
||||
var/mob/living/occupant = buckled_mob
|
||||
unbuckle()
|
||||
if(propelled || (pulling && (pulling.a_intent == I_HURT)))
|
||||
var/mob/living/occupant = unbuckle_mob()
|
||||
|
||||
if (pulling && (pulling.a_intent == "hurt"))
|
||||
if (pulling && (pulling.a_intent == I_HURT))
|
||||
occupant.throw_at(A, 3, 3, pulling)
|
||||
else if (propelled)
|
||||
occupant.throw_at(A, 3, propelled)
|
||||
@@ -171,7 +170,7 @@
|
||||
else
|
||||
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/proc/create_track()
|
||||
/obj/structure/bed/chair/wheelchair/proc/create_track()
|
||||
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
|
||||
var/newdir = get_dir(get_step(loc, dir), loc)
|
||||
if(newdir == dir)
|
||||
@@ -185,7 +184,7 @@
|
||||
B.set_dir(newdir)
|
||||
bloodiness--
|
||||
|
||||
/obj/structure/stool/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
/obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if(M == pulling)
|
||||
pulling = null
|
||||
usr.pulledby = null
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == "hurt")
|
||||
if(user.a_intent == I_HURT)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
|
||||
@@ -353,53 +353,24 @@ obj/structure/ex_act(severity)
|
||||
|
||||
moving = 0
|
||||
|
||||
|
||||
// Should I return a copy here? If the caller edits or del()s the returned
|
||||
// datum, there might be problems if I don't...
|
||||
/obj/structure/transit_tube_pod/return_air()
|
||||
var/datum/gas_mixture/GM = new()
|
||||
GM.copy_from(air_contents)
|
||||
return GM
|
||||
return air_contents
|
||||
|
||||
// For now, copying what I found in an unused FEA file (and almost identical in a
|
||||
// used ZAS file). Means that assume_air and remove_air don't actually alter the
|
||||
// air contents.
|
||||
/obj/structure/transit_tube_pod/assume_air(datum/gas_mixture/giver)
|
||||
return air_contents.merge(giver)
|
||||
|
||||
/obj/structure/transit_tube_pod/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
|
||||
|
||||
// Called when a pod arrives at, and before a pod departs from a station,
|
||||
// giving it a chance to mix its internal air supply with the turf it is
|
||||
// currently on.
|
||||
/obj/structure/transit_tube_pod/proc/mix_air()
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/env_pressure = environment.return_pressure()
|
||||
var/int_pressure = air_contents.return_pressure()
|
||||
var/total_pressure = env_pressure + int_pressure
|
||||
|
||||
if(total_pressure == 0)
|
||||
return
|
||||
|
||||
// Math here: Completely made up, not based on realistic equasions.
|
||||
// Goal is to balance towards equal pressure, but ensure some gas
|
||||
// transfer in both directions regardless.
|
||||
// Feel free to rip this out and replace it with something better,
|
||||
// I don't really know muhch about how gas transfer rates work in
|
||||
// SS13.
|
||||
var/transfer_in = max(0.1, 0.5 * (env_pressure - int_pressure) / total_pressure)
|
||||
var/transfer_out = max(0.1, 0.3 * (int_pressure - env_pressure) / total_pressure)
|
||||
|
||||
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles * transfer_in)
|
||||
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles * transfer_out)
|
||||
|
||||
loc.assume_air(from_int)
|
||||
air_contents.merge(from_env)
|
||||
|
||||
|
||||
|
||||
//note that share_ratio assumes both gas mixes have the same volume,
|
||||
//so if the volume is changed this may need to be changed as well.
|
||||
air_contents.share_ratio(environment, 1)
|
||||
|
||||
// When the player moves, check if the pos is currently stopped at a station.
|
||||
// if it is, check the direction. If the direction matches the direction of
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/obj/structure/undies_wardrobe
|
||||
name = "underwear wardrobe"
|
||||
desc = "Holds item of clothing you shouldn't be showing off in the hallways."
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "cabinet_closed"
|
||||
density = 1
|
||||
|
||||
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!ishuman(user) || (H.species && !(H.species.flags & HAS_UNDERWEAR)))
|
||||
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
|
||||
return 0
|
||||
|
||||
var/utype = alert("Which section do you want to pick from?",,"Male underwear", "Female underwear", "Undershirts")
|
||||
var/list/selection
|
||||
switch(utype)
|
||||
if("Male underwear")
|
||||
selection = underwear_m
|
||||
if("Female underwear")
|
||||
selection = underwear_f
|
||||
if("Undershirts")
|
||||
selection = undershirt_t
|
||||
var/pick = input("Select the style") as null|anything in selection
|
||||
if(pick)
|
||||
if(get_dist(src,user) > 1)
|
||||
return
|
||||
if(utype == "Undershirts")
|
||||
H.undershirt = undershirt_t[pick]
|
||||
else
|
||||
H.underwear = selection[pick]
|
||||
H.update_body(1)
|
||||
|
||||
return 1
|
||||
@@ -211,6 +211,11 @@
|
||||
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
|
||||
if(!on) return
|
||||
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
L.ExtinguishMob()
|
||||
L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily
|
||||
|
||||
if(iscarbon(O))
|
||||
var/mob/living/carbon/M = O
|
||||
if(M.r_hand)
|
||||
|
||||
@@ -15,25 +15,70 @@
|
||||
var/basestate
|
||||
var/shardtype = /obj/item/weapon/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
|
||||
// var/icon/silicateIcon = null // the silicated icon
|
||||
var/silicate = 0 // number of units of silicate
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
. = ..(user)
|
||||
|
||||
if(health == maxhealth)
|
||||
user << "<span class='notice'>It looks fully intact.</span>"
|
||||
else
|
||||
var/perc = health / maxhealth
|
||||
if(perc > 0.75)
|
||||
user << "<span class='notice'>It has a few cracks.</span>"
|
||||
else if(perc > 0.5)
|
||||
user << "<span class='warning'>It looks slightly damaged.</span>"
|
||||
else if(perc > 0.25)
|
||||
user << "<span class='warning'>It looks moderately damaged.</span>"
|
||||
else
|
||||
user << "<span class='danger'>It looks heavily damaged.</span>"
|
||||
if(silicate)
|
||||
if (silicate < 30)
|
||||
user << "<span class='notice'>It has a thin layer of silicate.</span>"
|
||||
else if (silicate < 70)
|
||||
user << "<span class='notice'>It is covered in silicate.</span>"
|
||||
else
|
||||
user << "<span class='notice'>There is a thick layer of silicate covering it.</span>"
|
||||
|
||||
/obj/structure/window/proc/take_damage(var/damage = 0, var/sound_effect = 1)
|
||||
var/initialhealth = src.health
|
||||
src.health = max(0, src.health - damage)
|
||||
if(src.health <= 0)
|
||||
src.shatter()
|
||||
var/initialhealth = health
|
||||
|
||||
if(silicate)
|
||||
damage = damage * (1 - silicate / 200)
|
||||
|
||||
health = max(0, health - damage)
|
||||
|
||||
if(health <= 0)
|
||||
shatter()
|
||||
else
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
if(src.health < src.maxhealth / 4 && initialhealth >= src.maxhealth / 4)
|
||||
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
|
||||
visible_message("[src] looks like it's about to shatter!" )
|
||||
else if(src.health < src.maxhealth / 2 && initialhealth >= src.maxhealth / 2)
|
||||
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
|
||||
visible_message("[src] looks seriously damaged!" )
|
||||
else if(src.health < src.maxhealth * 3/4 && initialhealth >= src.maxhealth * 3/4)
|
||||
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
|
||||
visible_message("Cracks begin to appear in [src]!" )
|
||||
return
|
||||
|
||||
/obj/structure/window/proc/apply_silicate(var/amount)
|
||||
if(health < maxhealth) // Mend the damage
|
||||
health = min(health + amount * 3, maxhealth)
|
||||
if(health == maxhealth)
|
||||
visible_message("[src] looks fully repaired." )
|
||||
else // Reinforce
|
||||
silicate = min(silicate + amount, 100)
|
||||
updateSilicate()
|
||||
|
||||
/obj/structure/window/proc/updateSilicate()
|
||||
if (overlays)
|
||||
overlays.Cut()
|
||||
|
||||
var/image/img = image(src.icon, src.icon_state)
|
||||
img.color = "#ffffff"
|
||||
img.alpha = silicate * 255 / 100
|
||||
overlays += img
|
||||
|
||||
/obj/structure/window/proc/shatter(var/display_message = 1)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(display_message)
|
||||
@@ -55,7 +100,7 @@
|
||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
//Tasers and the like should not damage windows.
|
||||
if(Proj.damage_type == HALLOSS)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
..()
|
||||
@@ -135,7 +180,7 @@
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
shatter()
|
||||
|
||||
else if (usr.a_intent == "hurt")
|
||||
else if (usr.a_intent == I_HURT)
|
||||
|
||||
if (istype(usr,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
@@ -251,7 +296,7 @@
|
||||
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
set_dir(turn(dir, 90))
|
||||
// updateSilicate()
|
||||
updateSilicate()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
return
|
||||
|
||||
@@ -267,27 +312,10 @@
|
||||
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
set_dir(turn(dir, 270))
|
||||
// updateSilicate()
|
||||
updateSilicate()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
/obj/structure/window/proc/updateSilicate()
|
||||
if(silicateIcon && silicate)
|
||||
icon = initial(icon)
|
||||
|
||||
var/icon/I = icon(icon,icon_state,dir)
|
||||
|
||||
var/r = (silicate / 100) + 1
|
||||
var/g = (silicate / 70) + 1
|
||||
var/b = (silicate / 50) + 1
|
||||
I.SetIntensity(r,g,b)
|
||||
icon = I
|
||||
silicateIcon = I
|
||||
*/
|
||||
|
||||
|
||||
/obj/structure/window/New(Loc, start_dir=null, constructed=0)
|
||||
..()
|
||||
|
||||
@@ -442,3 +470,51 @@
|
||||
|
||||
update_icon() //icon_state has to be set manually
|
||||
return
|
||||
|
||||
/obj/structure/window/reinforced/polarized
|
||||
name = "electrochromic window"
|
||||
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
|
||||
var/id
|
||||
|
||||
/obj/structure/window/reinforced/polarized/proc/toggle()
|
||||
if(opacity)
|
||||
animate(src, color="#FFFFFF", time=5)
|
||||
SetOpacity(0)
|
||||
else
|
||||
animate(src, color="#222222", time=5)
|
||||
SetOpacity(1)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/button/windowtint
|
||||
name = "window tint control"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "light0"
|
||||
desc = "A remote control switch for polarized windows."
|
||||
var/range = 7
|
||||
|
||||
/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
toggle_tint()
|
||||
|
||||
/obj/machinery/button/windowtint/proc/toggle_tint()
|
||||
use_power(5)
|
||||
|
||||
active = !active
|
||||
update_icon()
|
||||
|
||||
for(var/obj/structure/window/reinforced/polarized/W in range(src,range))
|
||||
if (W.id == src.id || !W.id)
|
||||
spawn(0)
|
||||
W.toggle()
|
||||
return
|
||||
|
||||
/obj/machinery/button/windowtint/power_change()
|
||||
..()
|
||||
if(active && !powered(power_channel))
|
||||
toggle_tint()
|
||||
|
||||
/obj/machinery/button/windowtint/update_icon()
|
||||
icon_state = "light[active]"
|
||||
|
||||
Reference in New Issue
Block a user