Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into phoronwindowsv2

This commit is contained in:
Atlantis
2015-09-01 03:22:08 +02:00
895 changed files with 23822 additions and 19893 deletions
+37 -18
View File
@@ -3,26 +3,45 @@
icon_state = "empty"
anchored = 1
var/cult = 0
New()
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead", "whiskeyimplant", "carpecarp", "robustroadhouse", "greytide", "theredshirt","thebark","theharmbaton","theharmedbaton","thesingulo","thedrukcarp","thedrunkcarp", "scotch","officerbeersky","on"))
return
proc/ChangeSign(var/Text)
src.icon_state = "[Text]"
//on = 0
//brightness_on = 4 //uncomment these when the lighting fixes get in
return
/obj/structure/sign/double/barsign/proc/get_valid_states(initial=1)
. = icon_states(icon)
. -= "on"
. -= "narsiebistro"
. -= "empty"
if(initial)
. -= "Off"
/obj/structure/sign/double/barsign/examine(mob/user)
..()
switch(icon_state)
if("Off")
user << "It appears to be switched off."
if("narsiebistro")
user << "It shows a picture of a large black and red being. Spooky!"
if("on", "empty")
user << "The lights are on, but there's no picture."
else
user << "It says '[icon_state]'"
/obj/structure/sign/double/barsign/New()
..()
icon_state = pick(get_valid_states())
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
if(cult)
return ..()
var/obj/item/weapon/card/id/card = I.GetID()
if(istype(card))
if(access_bar in card.GetAccess())
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in get_valid_states(0)
if(!sign_type)
return
icon_state = sign_type
user << "<span class='notice'>You change the barsign.</span>"
else
user << "<span class='warning'>Access denied.</span>"
return
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/card = I
if(access_bar in card.GetAccess())
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Off", "Pink Flamingo", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead Bay", "The Damn Wall", "The Cavern", "Cindi Kate", "The Orchard", "The Saucy Clown", "The Clowns Head", "Whiskey Implant", "Carpe Carp", "Robust Roadhouse", "Greytide", "The Redshirt", "The Bark", "The Harm Baton", "The Harmed Baton", "The Singulo", "The Druk Carp", "The Drunk Carp", "Scotch", "Officer Beersky", "On")
if(sign_type == null)
return
else
sign_type = replacetext(lowertext(sign_type), " ", "") // lowercase, strip spaces - along with choices for user options, avoids huge if-else-else
src.ChangeSign(sign_type)
user << "You change the barsign."
return ..()
@@ -25,6 +25,16 @@ LINEN BINS
add_fingerprint(user)
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
if(is_sharp(I))
user.visible_message("<span class='notice'>\The [user] begins cutting up [src] with [I].</span>", "<span class='notice'>You begin cutting up [src] with [I].</span>")
if(do_after(user, 50))
user << "<span class='notice'>You cut [src] into pieces!</span>"
for(var/i in 1 to rand(2,5))
new /obj/item/weapon/reagent_containers/glass/rag(src.loc)
qdel(src)
return
..()
/obj/item/weapon/bedsheet/blue
icon_state = "sheetblue"
@@ -53,11 +53,6 @@
else
user << "It is full."
/obj/structure/closet/alter_health()
return get_turf(src)
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0 || wall_mounted)) return 1
return (!density)
@@ -215,6 +210,7 @@
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
return 0
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
@@ -262,11 +258,9 @@
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
if((!( istype(O, /atom/movable) ) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O) || user.contents.Find(src)))
return
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
return
if(!istype(user.loc, /turf)) // are you in a container/closet/pod/etc?
if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
return
if(!src.opened)
return
@@ -346,9 +340,12 @@
if(!req_breakout())
return
if(!escapee.canClick())
return
escapee.setClickCooldown(100)
//okay, so the closet is either welded or locked... resist!!!
escapee.next_move = world.time + 100
escapee.last_special = world.time + 100
escapee << "<span class='warning'>You lean on the back of \the [src] and start pushing the door open. (this will take about [breakout_time] minutes)</span>"
visible_message("<span class='danger'>The [src] begins to shake violently!</span>")
@@ -68,7 +68,7 @@
new /obj/item/weapon/cartridge/janitor(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/soft/purple(src)
new /obj/item/clothing/head/beret/jan(src)
new /obj/item/clothing/head/beret/purple(src)
new /obj/item/device/flashlight(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
@@ -11,16 +11,16 @@
New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer( src )
return
/obj/structure/closet/secure_closet/bar/update_icon()
@@ -122,7 +122,7 @@
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/hos(src)
new /obj/item/clothing/head/beret/sec/corporate/hos(src)
return
@@ -159,7 +159,7 @@
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/warden(src)
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
return
@@ -308,7 +308,7 @@
/obj/structure/closet/secure_closet/courtroom
name = "courtroom locker"
req_access = list(access_court)
req_access = list(access_lawyer)
New()
..()
@@ -42,11 +42,11 @@
/obj/structure/closet/syndicate/nuclear/New()
..()
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/ammo_magazine/a10mm(src)
new /obj/item/weapon/storage/box/handcuffs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/gun/energy/gun(src)
@@ -1,6 +1,6 @@
/obj/structure/closet/wardrobe
name = "wardrobe"
desc = "It's a storage unit for standard-issue Nanotrasen attire."
desc = "It's a storage unit for standard-issue attire."
icon_state = "blue"
icon_closed = "blue"
@@ -26,9 +26,9 @@
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/head/beret/sec(src)
new /obj/item/clothing/head/beret/sec/alt(src)
new /obj/item/clothing/head/beret/sec/alt(src)
new /obj/item/clothing/head/beret/sec/alt(src)
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
new /obj/item/clothing/head/beret/sec/corporate/officer(src)
return
@@ -68,7 +68,7 @@
/obj/structure/closet/wardrobe/chaplain_black
name = "chapel wardrobe"
desc = "It's a storage unit for Nanotrasen-approved religious attire."
desc = "It's a storage unit for approved religious attire."
icon_state = "black"
icon_closed = "black"
@@ -120,7 +120,7 @@
/obj/structure/closet/wardrobe/orange
name = "prison wardrobe"
desc = "It's a storage unit for Nanotrasen-regulation prisoner attire."
desc = "It's a storage unit for regulation prisoner attire."
icon_state = "orange"
icon_closed = "orange"
@@ -167,9 +167,9 @@
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/hardhat/red(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
return
@@ -190,9 +190,9 @@
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/hardhat(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/eng(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
new /obj/item/clothing/head/beret/engineering(src)
return
@@ -14,7 +14,7 @@
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/atom/movable/AM in contents)
if(AM.simulated) AM.loc = T
if(AM.simulated) AM.forceMove(T)
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
+8
View File
@@ -44,6 +44,14 @@
color = "#B8F5E3"
alpha = 200
/obj/structure/curtain/open/bed
name = "bed curtain"
color = "#854636"
/obj/structure/curtain/open/privacy
name = "privacy curtain"
color = "#B8F5E3"
/obj/structure/curtain/open/shower
name = "shower curtain"
color = "#ACD1E9"
@@ -236,20 +236,20 @@
electronics = null
else if(istype(W, /obj/item/stack/material) && !glass)
var/obj/item/stack/material/S = W
var/obj/item/stack/S = W
var/material_name = S.get_material_name()
if (S)
if (S.get_amount() >= 1)
if(istype(S, /obj/item/stack/material/glass/reinforced))
if(material_name == "rglass")
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/material) && S.default_type)
var/M = S.default_type
else if(material_name)
// 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"))
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
user << "You cannot make an airlock out of that material."
return
if(S.get_amount() >= 2)
@@ -257,8 +257,8 @@
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(2))
user << "<span class='notice'>You installed [M] plating into the airlock assembly.</span>"
glass = "[M]"
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
glass = material_name
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
+83 -88
View File
@@ -7,6 +7,7 @@
var/health = 200
var/cover = 50 //how much cover the girder provides against projectiles.
var/material/reinf_material
var/reinforcing = 0
/obj/structure/girder/displaced
icon_state = "displaced"
@@ -25,7 +26,7 @@
/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
return PROJECTILE_CONTINUE //pass through
//Tasers and the like should not damage girders.
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
@@ -43,10 +44,12 @@
return
/obj/structure/girder/proc/reset_girder()
anchored = 1
cover = initial(cover)
health = min(health,initial(health))
state = 0
icon_state = initial(icon_state)
reinforcing = 0
if(reinf_material)
reinforce_girder()
@@ -77,13 +80,18 @@
user << "<span class='notice'>You drill through the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(istype(W, /obj/item/weapon/screwdriver))
if(state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(anchored && !reinf_material)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
reinforcing = !reinforcing
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
@@ -107,95 +115,82 @@
cover = 25
else if(istype(W, /obj/item/stack/material))
var/obj/item/stack/material/S = W
if(S.get_amount() < 2)
return ..()
var/material/M = name_to_material[S.default_type]
if(!istype(M))
return ..()
var/wall_fake
add_hiddenprint(usr)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return
user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2))
return
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
if(reinforcing && !reinf_material)
if(!reinforce_with_material(W, user))
return ..()
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
wall_fake = 1
if(!construct_wall(W, user))
return ..()
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
qdel(src)
return
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
user.drop_item()
P.loc = src.loc
user << "<span class='notice'>You fit the pipe into the [src]!</span>"
else
..()
return ..()
/obj/structure/girder/proc/construct_wall(obj/item/stack/material/S, mob/user)
if(S.get_amount() < 2)
user << "<span class='notice'>There isn't enough material here to construct a wall.</span>"
return 0
var/material/M = name_to_material[S.default_type]
if(!istype(M))
return 0
var/wall_fake
add_hiddenprint(usr)
if(M.integrity < 50)
user << "<span class='notice'>This material is too soft for use in wall construction.</span>"
return 0
user << "<span class='notice'>You begin adding the plating...</span>"
if(!do_after(user,40) || !S.use(2))
return 1 //once we've gotten this far don't call parent attackby()
if(anchored)
user << "<span class='notice'>You added the plating!</span>"
else
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
wall_fake = 1
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(/turf/simulated/wall)
var/turf/simulated/wall/T = get_turf(src)
T.set_material(M, reinf_material)
if(wall_fake)
T.can_open = 1
T.add_hiddenprint(usr)
qdel(src)
return 1
/obj/structure/girder/proc/reinforce_with_material(obj/item/stack/material/S, mob/user) //if the verb is removed this can be renamed.
if(reinf_material)
user << "<span class='notice'>\The [src] is already reinforced.</span>"
return 0
if(S.get_amount() < 2)
user << "<span class='notice'>There isn't enough material here to reinforce the girder.</span>"
return 0
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 0
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return 1 //don't call parent attackby() past this point
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
return 1
/obj/structure/girder/proc/reinforce_girder()
cover = reinf_material.hardness
health = 500
state = 2
icon_state = "reinforced"
/obj/structure/girder/verb/reinforce_with_material()
set name = "Reinforce girder"
set desc = "Reinforce a girder with metal."
set src in view(1)
var/mob/living/user = usr
if(!istype(user) || !(user.l_hand || user.r_hand))
return
if(reinf_material)
user << "\The [src] is already reinforced."
return
var/obj/item/stack/material/S = user.l_hand
if(!istype(S))
S = user.r_hand
if(!istype(S))
user << "You cannot plate \the [src] with that."
return
if(S.get_amount() < 2)
user << "There is not enough material here to reinforce the girder."
return
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
user << "<span class='notice'>Now reinforcing...</span>"
if (!do_after(user,40) || !S.use(2))
return
user << "<span class='notice'>You added reinforcement!</span>"
reinf_material = M
reinforce_girder()
reinforcing = 0
/obj/structure/girder/proc/dismantle()
new /obj/item/stack/material/steel(get_turf(src))
+4 -2
View File
@@ -30,6 +30,7 @@
/obj/structure/grille/attack_hand(mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.do_attack_animation(src)
@@ -91,7 +92,7 @@
passthrough = 1
if(passthrough)
. = -1
. = PROJECTILE_CONTINUE
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
@@ -155,7 +156,8 @@
//window placing end
else if(!(W.flags & CONDUCT) || !shock(user, 70))
user.do_attack_animation(src)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
+1 -1
View File
@@ -53,7 +53,7 @@
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/tile/steel))
if (istype(C, /obj/item/stack/tile/floor))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
+3 -4
View File
@@ -17,7 +17,7 @@
var/datum/nano_module/appearance_changer/AC = ui_users[user]
if(!AC)
AC = new(src, user)
AC.name = "SalonPro Nano-Mirror(TM)"
AC.name = "SalonPro Nano-Mirror&trade;"
ui_users[user] = AC
AC.ui_interact(user)
@@ -75,13 +75,12 @@
/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(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != "Vox" && is_alien_whitelisted(user, "Vox"))
var/choice = input("Do you wish to become a true Vox of the Shoal? 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)
new /obj/item/organ/stack/vox(vox)
if(user.mind)
user.mind.transfer_to(vox)
spawn(1)
+23 -23
View File
@@ -40,34 +40,31 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
return
/obj/structure/morgue/alter_health()
return src.loc
/obj/structure/morgue/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.loc = src
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src.connected)
src.connected = null
@@ -81,7 +78,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "morguet"
src.connected.set_dir(src.dir)
else
@@ -117,7 +114,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "morguet"
else
qdel(src.connected)
@@ -149,7 +146,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.loc = src.connected
A.forceMove(src.connected)
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -166,7 +163,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
O.forceMove(src.loc)
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
@@ -210,29 +207,26 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.loc = src.loc
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
return
/obj/structure/crematorium/alter_health()
return src.loc
/obj/structure/crematorium/attack_hand(mob/user as mob)
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
// user.show_message("<span class='warning'>Uh-oh, that was a bad idea.</span>", 1)
@@ -246,7 +240,7 @@
if ((src.connected) && (src.locked == 0))
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.loc = src
A.forceMove(src)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
//src.connected = null
qdel(src.connected)
@@ -260,7 +254,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "cremat"
else
//src.connected = null
@@ -294,7 +288,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
A.forceMove(src.connected.loc)
src.connected.icon_state = "cremat"
else
qdel(src.connected)
@@ -366,11 +360,17 @@
anchored = 1
throwpass = 1
/obj/structure/c_tray/Destroy()
if(connected && connected.connected == src)
connected.connected = null
connected = null
return ..()
/obj/structure/c_tray/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.loc = src.connected
A.forceMove(src.connected)
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -387,7 +387,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.loc = src.loc
O.forceMove(src.loc)
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
@@ -406,7 +406,7 @@
/obj/machinery/button/crematorium/attack_hand(mob/user as mob)
if(..())
return
if(src.allowed(usr))
if(src.allowed(user))
for (var/obj/structure/crematorium/C in world)
if (C.id == id)
if (!C.cremating)
+6 -3
View File
@@ -175,12 +175,15 @@ obj/structure/safe/ex_act(severity)
level = 1 //underfloor
layer = 2.5
/obj/structure/safe/floor/initialize()
..()
var/turf/T = loc
hide(T.intact)
if(istype(T) && !T.is_plating())
hide(1)
update_icon()
/obj/structure/safe/floor/hide(var/intact)
invisibility = intact ? 101 : 0
/obj/structure/safe/floor/hides_under_flooring()
return 1
@@ -44,6 +44,9 @@
update_nearby_tiles()
..()
/obj/structure/simple_door/get_material()
return material
/obj/structure/simple_door/Bumped(atom/user)
..()
if(!state)
@@ -33,6 +33,9 @@
padding_material = get_material_by_name(new_padding_material)
update_icon()
/obj/structure/bed/get_material()
return material
// Reuse the cache/code from stools, todo maybe unify.
/obj/structure/bed/update_icon()
// Prep icon.
@@ -8,7 +8,7 @@
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
src.add_fingerprint(user)
var/mob/living/carbon/human/H = user
if(!ishuman(user) || (H.species && !(H.species.flags & HAS_UNDERWEAR)))
if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)))
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
return 0
+26 -32
View File
@@ -117,7 +117,7 @@
/obj/machinery/shower
name = "shower"
desc = "The HS-451. Installed in the 2550s by the Nanotrasen Hygiene Division."
desc = "The HS-451. Installed in the 2550s by the Hygiene Division."
icon = 'icons/obj/watercloset.dmi'
icon_state = "shower"
density = 0
@@ -129,6 +129,7 @@
var/watertemp = "normal" //freezing, normal, or boiling
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
var/is_washing = 0
var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C)
/obj/machinery/shower/New()
..()
@@ -150,7 +151,7 @@
if(on)
if (M.loc == loc)
wash(M)
check_heat(M)
process_heat(M)
for (var/atom/movable/G in src.loc)
G.clean_blood()
@@ -158,15 +159,11 @@
if(I.type == /obj/item/device/analyzer)
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
if(istype(I, /obj/item/weapon/wrench))
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 50))
switch(watertemp)
if("normal")
watertemp = "freezing"
if("freezing")
watertemp = "boiling"
if("boiling")
watertemp = "normal"
watertemp = newtemp
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
add_fingerprint(user)
@@ -177,8 +174,8 @@
if(on)
overlays += image('icons/obj/watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
if(watertemp == "freezing")
return
if(temperature_settings[watertemp] < T20C)
return //no mist for cold water
if(!ismist)
spawn(50)
if(src && on)
@@ -200,7 +197,7 @@
wash(O)
if(ismob(O))
mobpresent += 1
check_heat(O)
process_heat(O)
/obj/machinery/shower/Uncrossed(atom/movable/O)
if(ismob(O))
@@ -304,8 +301,8 @@
if(!on) return
wash_floor()
if(!mobpresent) return
for(var/mob/living/carbon/C in loc)
check_heat(C)
for(var/mob/living/L in loc)
process_heat(L)
/obj/machinery/shower/proc/wash_floor()
if(!ismist && is_washing)
@@ -317,22 +314,19 @@
spawn(100)
is_washing = 0
/obj/machinery/shower/proc/check_heat(mob/M as mob)
if(!on || watertemp == "normal") return
if(iscarbon(M))
var/mob/living/carbon/C = M
if(watertemp == "freezing")
C.bodytemperature = max(80, C.bodytemperature - 80)
C << "<span class='warning'>The water is freezing!</span>"
return
if(watertemp == "boiling")
C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjustFireLoss(5)
C << "<span class='danger'>The water is searing!</span>"
return
/obj/machinery/shower/proc/process_heat(mob/living/M)
if(!on || !istype(M)) return
var/temperature = temperature_settings[watertemp]
var/temp_adj = between(BODYTEMP_COOLING_MAX, temperature - M.bodytemperature, BODYTEMP_HEATING_MAX)
M.bodytemperature += temp_adj
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(temperature >= H.species.heat_level_1)
H << "<span class='danger'>The water is searing hot!</span>"
else if(temperature <= H.species.cold_level_1)
H << "<span class='warning'>The water is freezing cold!</span>"
/obj/item/weapon/bikehorn/rubberducky
name = "rubber ducky"
@@ -395,7 +389,7 @@
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("<span class='notice'>[user] fills \the [RG] using \the [src].</span>","<span class='notice'>You fill \the [RG] using \the [src].</span>")
return
return 1
else if (istype(O, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = O
@@ -413,7 +407,7 @@
user.visible_message( \
"<span class='danger'>[user] was stunned by \his wet [O]!</span>", \
"<span class='userdanger'>[user] was stunned by \his wet [O]!</span>")
return
return 1
// Short of a rewrite, this is necessary to stop monkeycubes being washed.
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
return
+35 -27
View File
@@ -173,6 +173,7 @@
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
/obj/structure/window/attack_hand(mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
@@ -200,6 +201,7 @@
return
/obj/structure/window/attack_generic(var/mob/user, var/damage)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(!damage)
return
if(damage >= 10)
@@ -241,6 +243,7 @@
if(istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
else if(reinf && state == 0)
@@ -269,6 +272,7 @@
new glasstype(loc)
qdel(src)
else
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
hit(W.force)
@@ -292,6 +296,9 @@
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
@@ -308,6 +315,9 @@
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return 0
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
@@ -339,7 +349,11 @@
/obj/structure/window/Destroy()
density = 0
update_nearby_tiles()
update_nearby_icons()
var/turf/location = loc
loc = null
for(var/obj/structure/window/W in orange(location, 1))
W.update_icon()
loc = location
..()
@@ -359,35 +373,31 @@
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/proc/update_nearby_icons()
update_icon()
for(var/direction in cardinal)
for(var/obj/structure/window/W in get_step(src,direction) )
W.update_icon()
for(var/obj/structure/window/W in orange(src, 1))
W.update_icon()
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
/obj/structure/window/update_icon()
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
//this way it will only update full-tile ones
//This spawn is here so windows get properly updated when one gets deleted.
spawn(2)
if(!src) return
if(!is_fulltile())
icon_state = "[basestate]"
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W)
if(opacity)
icon_state = "[basestate][junction]"
else
if(reinf)
icon_state = "[basestate][junction]"
else
icon_state = "[basestate][junction]"
overlays.Cut()
if(!is_fulltile())
icon_state = "[basestate]"
return
var/list/dirs = list()
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.type == src.type && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
dirs += get_dir(src, W)
var/list/connections = dirs_to_corner_states(dirs)
icon_state = ""
for(var/i = 1 to 4)
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
overlays += I
return
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > maximal_heat)
@@ -470,11 +480,9 @@
basestate = "window"
maxhealth = 40
reinf = 1
basestate = "w"
dir = 5
update_icon() //icon_state has to be set manually
return
/obj/structure/window/reinforced/polarized
name = "electrochromic window"
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
@@ -0,0 +1,98 @@
// Ported from Haine and WrongEnd with much gratitude!
/* ._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._. */
/*-=-=-=-=-=-=-=-=-=-=-=-=-=WHAT-EVER=-=-=-=-=-=-=-=-=-=-=-=-=-*/
/* '~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~'-._.-'~' */
/obj/effect/wingrille_spawn
name = "window grille spawner"
icon = 'icons/obj/structures.dmi'
icon_state = "wingrille"
density = 1
anchored = 1.0
pressure_resistance = 4*ONE_ATMOSPHERE
var/win_path = /obj/structure/window/basic
var/activated
/obj/effect/wingrille_spawn/attack_hand()
attack_generic()
/obj/effect/wingrille_spawn/attack_ghost()
attack_generic()
/obj/effect/wingrille_spawn/attack_generic()
activate()
/obj/effect/wingrille_spawn/initialize()
..()
if(!win_path)
return
if(ticker && ticker.current_state < GAME_STATE_PLAYING)
activate()
/obj/effect/wingrille_spawn/proc/activate()
if(activated) return
if (!locate(/obj/structure/grille) in get_turf(src))
var/obj/structure/grille/G = PoolOrNew(/obj/structure/grille, src.loc)
handle_grille_spawn(G)
var/list/neighbours = list()
for (var/dir in cardinal)
var/turf/T = get_step(src, dir)
var/obj/effect/wingrille_spawn/other = locate(/obj/effect/wingrille_spawn) in T
if(!other)
var/found_connection
if(locate(/obj/structure/grille) in T)
for(var/obj/structure/window/W in T)
if(W.type == win_path && W.dir == get_dir(T,src))
found_connection = 1
qdel(W)
if(!found_connection)
var/obj/structure/window/new_win = PoolOrNew(win_path, src.loc)
new_win.set_dir(dir)
handle_window_spawn(new_win)
else
neighbours |= other
activated = 1
for(var/obj/effect/wingrille_spawn/other in neighbours)
if(!other.activated) other.activate()
qdel(src)
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
return
// Currently unused, could be useful for pre-wired electrified windows.
/obj/effect/wingrille_spawn/proc/handle_grille_spawn(var/obj/structure/grille/G)
return
/obj/effect/wingrille_spawn/reinforced
name = "reinforced window grille spawner"
icon_state = "r-wingrille"
win_path = /obj/structure/window/reinforced
/obj/effect/wingrille_spawn/reinforced/crescent
name = "Crescent window grille spawner"
icon_state = "r-wingrille"
win_path = /obj/structure/window/reinforced
/obj/effect/wingrille_spawn/reinforced/crescent/handle_window_spawn(var/obj/structure/window/W)
W.maxhealth = 1000000
W.health = 1000000
/obj/effect/wingrille_spawn/phoron
name = "phoron window grille spawner"
icon_state = "p-wingrille"
win_path = /obj/structure/window/phoronbasic
/obj/effect/wingrille_spawn/reinforced_phoron
name = "reinforced phoron window grille spawner"
icon_state = "pr-wingrille"
win_path = /obj/structure/window/phoronreinforced
/obj/effect/wingrille_spawn/reinforced/polarized
name = "polarized window grille spawner"
color = "#444444"
win_path = /obj/structure/window/reinforced/polarized
var/id
/obj/effect/wingrille_spawn/reinforced/polarized/handle_window_spawn(var/obj/structure/window/reinforced/polarized/P)
if(id)
P.id = id