Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into guntest

Conflicts:
	code/WorkInProgress/Cib/amorph/amorph_hud.dm
	code/game/objects/structures/window.dm
	code/modules/mob/living/blob/blob.dm
	code/modules/mob/living/simple_animal/friendly/corgi.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/screen.dm
	code/modules/projectiles/gun.dm
	code/modules/projectiles/guns/projectile/automatic.dm
	maps/tgstation.2.0.9.1.dmm
This commit is contained in:
Whitellama
2013-01-31 14:26:58 -08:00
1200 changed files with 106969 additions and 76361 deletions
+12
View File
@@ -0,0 +1,12 @@
/obj/structure/sign/barsign
icon = 'barsigns.dmi'
icon_state = "empty"
anchored = 1
New()
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead"))
return
proc/ChangeSign(var/Text)
src.icon_state = "[Text]"
//on = 0
//brightness_on = 4 //uncomment these when the lighting fixes get in
return
@@ -12,7 +12,7 @@
var/wall_mounted = 0 //never solid (You can always pass over it)
var/health = 100
var/lastbang
var/storage_capacity = 20 //This is so that someone can't pack hundreds of items in a locker/crate
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate
//then open it in a populated area to crash clients.
/obj/structure/closet/New()
@@ -275,7 +275,7 @@
usr << "<span class='warning'>This mob type can't use this verb.</span>"
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays = null
overlays.Cut()
if(!opened)
icon_state = icon_closed
if(welded)
@@ -105,9 +105,9 @@
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
@@ -133,9 +133,9 @@
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/melee/baton(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
@@ -50,8 +50,9 @@
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/caution(src)
new /obj/item/weapon/trashbag(src)
new /obj/item/weapon/storage/bag/trash(src)
new /obj/item/device/lightreplacer(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/soft/purple(src)
/*
@@ -68,8 +69,8 @@
new /obj/item/clothing/under/lawyer/black(src)
new /obj/item/clothing/under/lawyer/red(src)
new /obj/item/clothing/under/lawyer/bluesuit(src)
new /obj/item/clothing/suit/lawyer/bluejacket(src)
new /obj/item/clothing/suit/storage/lawyer/bluejacket(src)
new /obj/item/clothing/under/lawyer/purpsuit(src)
new /obj/item/clothing/suit/lawyer/purpjacket(src)
new /obj/item/clothing/suit/storage/lawyer/purpjacket(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/shoes/black(src)
@@ -34,7 +34,7 @@
sleep(2)
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/heads/qm(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/clothing/gloves/black(src)
// new /obj/item/weapon/cartridge/quartermaster(src)
new /obj/item/clothing/suit/fire/firefighter(src)
@@ -25,7 +25,7 @@
new /obj/item/weapon/cartridge/ce(src)
new /obj/item/device/radio/headset/heads/ce(src)
new /obj/item/weapon/storage/toolbox/mechanical(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/clothing/suit/storage/hazardvest(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/device/flash(src)
@@ -35,7 +35,7 @@
/obj/structure/closet/secure_closet/engineering_electrical
name = "Electrical Supplies"
req_access = list(access_engine)
req_access = list(access_engine_equip)
icon_state = "secureengelec1"
icon_closed = "secureengelec"
icon_locked = "secureengelec1"
@@ -64,7 +64,7 @@
/obj/structure/closet/secure_closet/engineering_welding
name = "Welding Supplies"
req_access = list(access_engine)
req_access = list(access_engine_equip)
icon_state = "secureengweld1"
icon_closed = "secureengweld"
icon_locked = "secureengweld1"
@@ -88,7 +88,7 @@
/obj/structure/closet/secure_closet/engineering_personal
name = "Engineer's Locker"
req_access = list(access_engine)
req_access = list(access_engine_equip)
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
@@ -109,7 +109,7 @@
new /obj/item/weapon/storage/toolbox/mechanical(src)
// new /obj/item/weapon/cartridge/engineering(src)
new /obj/item/device/radio/headset/headset_eng(src)
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/clothing/suit/storage/hazardvest(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/glasses/meson(src)
new /obj/item/taperoll/engineering(src)
@@ -17,7 +17,7 @@
new /obj/item/clothing/suit/apron(src)
if(2)
new /obj/item/clothing/suit/apron/overalls(src)
new /obj/item/weapon/plantbag(src)
new /obj/item/weapon/storage/bag/plants(src)
new /obj/item/clothing/under/rank/hydroponics(src)
new /obj/item/device/analyzer/plant_analyzer(src)
new /obj/item/clothing/head/greenbandana(src)
@@ -13,7 +13,7 @@
New()
..()
sleep(2)
new /obj/item/weapon/storage/syringes(src)
new /obj/item/weapon/storage/box/syringes(src)
new /obj/item/weapon/reagent_containers/dropper(src)
new /obj/item/weapon/reagent_containers/dropper(src)
new /obj/item/weapon/reagent_containers/glass/beaker(src)
@@ -73,19 +73,25 @@
switch(pick("blue", "green", "purple"))
if ("blue")
new /obj/item/clothing/under/rank/medical/blue(src)
new /obj/item/clothing/head/surgery/blue(src)
if ("green")
new /obj/item/clothing/under/rank/medical/green(src)
new /obj/item/clothing/head/surgery/green(src)
if ("purple")
new /obj/item/clothing/under/rank/medical/purple(src)
new /obj/item/clothing/head/surgery/purple(src)
switch(pick("blue", "green", "purple"))
if ("blue")
new /obj/item/clothing/under/rank/medical/blue(src)
new /obj/item/clothing/head/surgery/blue(src)
if ("green")
new /obj/item/clothing/under/rank/medical/green(src)
new /obj/item/clothing/head/surgery/green(src)
if ("purple")
new /obj/item/clothing/under/rank/medical/purple(src)
new /obj/item/clothing/head/surgery/purple(src)
new /obj/item/clothing/under/rank/medical(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
// new /obj/item/weapon/cartridge/medical(src)
new /obj/item/device/radio/headset/headset_med(src)
@@ -114,13 +120,14 @@
new /obj/item/clothing/suit/bio_suit/cmo(src)
new /obj/item/clothing/head/bio_hood/cmo(src)
new /obj/item/clothing/under/rank/chief_medical_officer(src)
new /obj/item/clothing/suit/labcoat/cmo(src)
new /obj/item/clothing/suit/storage/labcoat/cmo(src)
new /obj/item/weapon/cartridge/cmo(src)
new /obj/item/clothing/gloves/latex(src)
new /obj/item/clothing/shoes/brown (src)
new /obj/item/device/radio/headset/heads/cmo(src)
new /obj/item/weapon/storage/belt/medical(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/reagent_containers/hypospray(src)
return
@@ -156,8 +163,8 @@
New()
..()
sleep(2)
new /obj/item/weapon/storage/pillbottlebox(src)
new /obj/item/weapon/storage/pillbottlebox(src)
new /obj/item/weapon/storage/box/pillbottles(src)
new /obj/item/weapon/storage/box/pillbottles(src)
return
/obj/structure/closet/secure_closet/medical_wall
@@ -12,7 +12,8 @@
..()
sleep(2)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/suit/labcoat(src)
//new /obj/item/clothing/suit/labcoat/science(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
// new /obj/item/weapon/cartridge/signal/toxins(src)
new /obj/item/device/radio/headset/headset_sci(src)
@@ -38,7 +39,7 @@
new /obj/item/clothing/suit/bio_suit/scientist(src)
new /obj/item/clothing/head/bio_hood/scientist(src)
new /obj/item/clothing/under/rank/research_director(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/weapon/cartridge/rd(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/gloves/latex(src)
@@ -63,6 +63,8 @@
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
else
user << "<span class='notice'>The locker is too small to stuff [W] into!</span>"
if(isrobot(user))
return
user.drop_item()
if(W)
W.loc = src.loc
@@ -151,7 +153,7 @@
usr << "<span class='warning'>This mob type can't use this verb.</span>"
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays = null
overlays.Cut()
if(!opened)
if(locked)
icon_state = icon_locked
@@ -23,7 +23,6 @@
new /obj/item/clothing/head/helmet/swat(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/heads/captain(src)
new /obj/item/weapon/reagent_containers/food/drinks/flask(src)
new /obj/item/clothing/gloves/captain(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/clothing/suit/armor/captain(src)
@@ -50,8 +49,8 @@
new /obj/item/weapon/cartridge/hop(src)
new /obj/item/device/radio/headset/heads/hop(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/weapon/storage/id_kit(src)
new /obj/item/weapon/storage/id_kit( 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/device/flash(src)
new /obj/item/clothing/glasses/sunglasses(src)
@@ -77,7 +76,7 @@
else
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/under/jensen(src)
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
new /obj/item/clothing/suit/armor/hos/jensen(src)
new /obj/item/clothing/head/helmet/HoS/dermal(src)
new /obj/item/weapon/cartridge/hos(src)
@@ -85,7 +84,7 @@
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/weapon/shield/riot(src)
new /obj/item/weapon/storage/lockbox/loyalty(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton(src)
@@ -113,14 +112,14 @@
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(src)
new /obj/item/clothing/suit/armor/vest/security(src)
new /obj/item/clothing/under/rank/warden(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/device/radio/headset/headset_sec(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton(src)
@@ -146,7 +145,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(src)
new /obj/item/clothing/suit/armor/vest/security(src)
new /obj/item/clothing/head/helmet(src)
// new /obj/item/weapon/cartridge/security(src)
new /obj/item/device/radio/headset/headset_sec(src)
@@ -161,6 +160,38 @@
return
/obj/structure/closet/secure_closet/security/cargo
New()
..()
new /obj/item/clothing/tie/armband/cargo(src)
new /obj/item/device/encryptionkey/headset_cargo(src)
return
/obj/structure/closet/secure_closet/security/engine
New()
..()
new /obj/item/clothing/tie/armband/engine(src)
new /obj/item/device/encryptionkey/headset_eng(src)
return
/obj/structure/closet/secure_closet/security/science
New()
..()
new /obj/item/clothing/tie/armband/science(src)
new /obj/item/device/encryptionkey/headset_sci(src)
return
/obj/structure/closet/secure_closet/security/med
New()
..()
new /obj/item/clothing/tie/armband/medgreen(src)
new /obj/item/device/encryptionkey/headset_med(src)
return
/obj/structure/closet/secure_closet/detective
name = "Detective's Cabinet"
@@ -176,20 +207,19 @@
..()
sleep(2)
new /obj/item/clothing/under/det(src)
new /obj/item/clothing/suit/armor/det_suit(src)
new /obj/item/clothing/suit/det_suit(src)
new /obj/item/clothing/suit/forensics/blue(src)
new /obj/item/clothing/suit/forensics/red(src)
new /obj/item/clothing/suit/storage/det_suit(src)
new /obj/item/clothing/suit/storage/forensics/blue(src)
new /obj/item/clothing/suit/storage/forensics/red(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/weapon/cartridge/detective(src)
new /obj/item/weapon/storage/fcard_kit(src)
new /obj/item/weapon/fcardholder(src)
new /obj/item/weapon/clipboard(src)
new /obj/item/device/detective_scanner(src)
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/c38(src)
new /obj/item/ammo_magazine/c38(src)
new /obj/item/weapon/gun/projectile/detective(src)
new /obj/item/clothing/tie/holster/armpit(src)
return
@@ -207,7 +237,7 @@
/obj/structure/closet/secure_closet/injection
name = "Lethal Injections"
req_access = list(access_hos)
req_access = list(access_captain)
New()
@@ -35,8 +35,8 @@
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/weapon/storage/handcuff_kit(src)
new /obj/item/weapon/storage/flashbang_kit(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)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/gun/energy/gun(src)
@@ -51,3 +51,88 @@
var/obj/item/device/radio/uplink/U = new(src)
U.hidden_uplink.uses = 40
return
/obj/structure/closet/syndicate/resources/
desc = "An old, dusty locker."
New()
..()
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
sleep(2)
var/pickednum = rand(1, 50)
//Sad trombone
if(pickednum == 1)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.name = "IOU"
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
//Metal (common ore)
if(pickednum >= 2)
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
//Glass (common ore)
if(pickednum >= 5)
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
//Plasteel (common ore) Because it has a million more uses then plasma
if(pickednum >= 10)
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
//Plasma (rare ore)
if(pickednum >= 15)
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
//Silver (rare ore)
if(pickednum >= 20)
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
//Gold (rare ore)
if(pickednum >= 30)
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
//Uranium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
//Jetpack (You hit the jackpot!)
if(pickednum == 50)
new /obj/item/weapon/tank/jetpack/carbondioxide(src)
return
/obj/structure/closet/syndicate/resources/everything
desc = "It's an emergency storage closet for repairs."
New()
var/list/resources = list(
/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/mineral/gold,
/obj/item/stack/sheet/mineral/silver,
/obj/item/stack/sheet/mineral/plasma,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/mineral/clown,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/rods
)
sleep(2)
for(var/i = 0, i<2, i++)
for(var/res in resources)
var/obj/item/stack/R = new res(src)
R.amount = R.max_amount
return
@@ -58,7 +58,7 @@
/obj/structure/closet/emcloset/legacy/New()
new /obj/item/weapon/tank/oxygen(src)
new /obj/item/clothing/mask/gas(src)
/*
* Fire Closet
*/
@@ -109,7 +109,7 @@
/obj/structure/closet/toolcloset/New()
if(prob(40))
new /obj/item/clothing/suit/hazardvest(src)
new /obj/item/clothing/suit/storage/hazardvest(src)
if(prob(70))
new /obj/item/device/flashlight(src)
if(prob(70))
@@ -23,6 +23,9 @@
new /obj/item/clothing/under/rank/security(src)
new /obj/item/clothing/under/rank/security(src)
new /obj/item/clothing/under/rank/security(src)
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/under/rank/security2(src)
new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/clothing/shoes/jackboots(src)
@@ -205,9 +208,9 @@
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/under/rank/scientist(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
@@ -225,10 +228,12 @@
/obj/structure/closet/wardrobe/robotics_black/New()
new /obj/item/clothing/under/rank/roboticist(src)
new /obj/item/clothing/under/rank/roboticist(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/gloves/black(src)
return
@@ -242,8 +247,8 @@
new /obj/item/clothing/under/rank/chemist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/suit/labcoat/chemist(src)
new /obj/item/clothing/suit/labcoat/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
return
@@ -257,8 +262,8 @@
new /obj/item/clothing/under/rank/geneticist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/suit/labcoat/genetics(src)
new /obj/item/clothing/suit/labcoat/genetics(src)
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
new /obj/item/clothing/suit/storage/labcoat/genetics(src)
return
@@ -272,8 +277,28 @@
new /obj/item/clothing/under/rank/virologist(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/suit/labcoat/virologist(src)
new /obj/item/clothing/suit/labcoat/virologist(src)
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/suit/storage/labcoat/virologist(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
return
/obj/structure/closet/wardrobe/medic_white
name = "medical wardrobe"
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/virology_white/New()
new /obj/item/clothing/under/rank/medical(src)
new /obj/item/clothing/under/rank/medical(src)
new /obj/item/clothing/under/rank/medical/blue(src)
new /obj/item/clothing/under/rank/medical/green(src)
new /obj/item/clothing/under/rank/medical/purple(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/mask/surgical(src)
return
@@ -1,8 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/structure/closet/crate
desc = "A crate."
name = "Crate"
name = "crate"
desc = "A rectangular steel crate."
icon = 'icons/obj/storage.dmi'
icon_state = "crate"
density = 1
@@ -12,6 +12,7 @@
opened = 0
flags = FPRINT
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
/obj/structure/closet/crate/internals
desc = "A internals crate."
@@ -144,6 +145,15 @@
icon_opened = "secgearcrateopen"
icon_closed = "secgearcrate"
/obj/structure/closet/crate/secure/hydrosec
desc = "A crate with a lock on it, painted in the scheme of the station's botanists."
name = "secure hydroponics crate"
icon = 'icons/obj/storage.dmi'
icon_state = "hydrosecurecrate"
density = 1
icon_opened = "hydrosecurecrateopen"
icon_closed = "hydrosecurecrate"
/obj/structure/closet/crate/secure/bin
desc = "A secure bin."
name = "Secure bin"
@@ -201,10 +211,10 @@
/obj/structure/closet/crate/secure/New()
..()
if(locked)
overlays = null
overlays.Cut()
overlays += redlight
else
overlays = null
overlays.Cut()
overlays += greenlight
/obj/structure/closet/crate/rcd/New()
@@ -242,7 +252,15 @@
for(var/obj/O in get_turf(src))
if(itemcount >= storage_capacity)
break
if(O.density || O.anchored || O == src) continue
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(B.buckled_mob)
continue
O.loc = src
itemcount++
@@ -250,20 +268,30 @@
src.opened = 0
/obj/structure/closet/crate/attack_hand(mob/user as mob)
if(opened) close()
else open()
if(opened)
close()
else
if(rigged && locate(/obj/item/device/radio/electropack) in src)
if(isliving(user))
var/mob/living/L = user
if(L.electrocute_act(17, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return
open()
return
/obj/structure/closet/crate/secure/attack_hand(mob/user as mob)
if(locked && !broken)
if (allowed(user))
user << "<span class='notice'>You unlock \the [src].</span>"
user << "<span class='notice'>You unlock [src].</span>"
src.locked = 0
overlays = null
overlays.Cut()
overlays += greenlight
return
else
user << "<span class='notice'>\The [src] is locked.</span>"
user << "<span class='notice'>[src] is locked.</span>"
return
else
..()
@@ -272,11 +300,11 @@
if(istype(W, /obj/item/weapon/card) && src.allowed(user) && !locked && !opened && !broken)
user << "<span class='notice'>You lock \the [src].</span>"
src.locked = 1
overlays = null
overlays.Cut()
overlays += redlight
return
else if ( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && locked &&!broken)
overlays = null
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
@@ -300,6 +328,27 @@
W.loc = src.loc
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/weapon/cable_coil))
if(rigged)
user << "<span class='notice'>[src] is already rigged!</span>"
return
user << "<span class='notice'>You rig [src].</span>"
user.drop_item()
del(W)
rigged = 1
return
else if(istype(W, /obj/item/device/radio/electropack))
if(rigged)
user << "<span class='notice'>You attach [W] to [src].</span>"
user.drop_item()
W.loc = src
return
else if(istype(W, /obj/item/weapon/wirecutters))
if(rigged)
user << "<span class='notice'>You cut away the wiring.</span>"
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
rigged = 0
return
else return attack_hand(user)
/obj/structure/closet/crate/secure/emp_act(severity)
@@ -308,10 +357,10 @@
if(!broken && !opened && prob(50/severity))
if(!locked)
src.locked = 1
overlays = null
overlays.Cut()
overlays += redlight
else
overlays = null
overlays.Cut()
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
@@ -24,4 +24,41 @@
return attack_hand(user)
/obj/structure/largecrate/mule
icon_state = "mulecrate"
icon_state = "mulecrate"
/obj/structure/largecrate/lisa
icon_state = "lisacrate"
/obj/structure/largecrate/lisa/attackby(obj/item/weapon/W as obj, mob/user as mob) //ugly but oh well
if(istype(W, /obj/item/weapon/crowbar))
new /mob/living/simple_animal/corgi/Lisa(loc)
..()
/obj/structure/largecrate/cow
name = "cow crate"
icon_state = "lisacrate"
/obj/structure/largecrate/cow/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
new /mob/living/simple_animal/cow(loc)
..()
/obj/structure/largecrate/goat
name = "goat crate"
icon_state = "lisacrate"
/obj/structure/largecrate/goat/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
..()
/obj/structure/largecrate/chick
name = "chicken crate"
icon_state = "lisacrate"
/obj/structure/largecrate/chick/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
var/num = rand(4, 6)
for(var/i = 0, i < num, i++)
new /mob/living/simple_animal/chick(loc)
..()
+38 -137
View File
@@ -13,6 +13,7 @@ obj/structure/door_assembly
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
var/glass_type = /obj/machinery/door/airlock/glass
var/glass = null
var/created_name = null
New()
base_icon_state = copytext(icon_state,1,lentext(icon_state))
@@ -279,6 +280,13 @@ obj/structure/door_assembly
glass = 0
/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)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
return
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
@@ -289,30 +297,13 @@ obj/structure/door_assembly
if(!src || !WT.isOn()) return
user << "\blue You dissasembled the airlock assembly!"
new /obj/item/stack/sheet/metal(get_turf(src), 4)
switch(mineral)
if("glass")
if (mineral)
if (mineral == "glass")
new /obj/item/stack/sheet/rglass(get_turf(src))
if("gold")
new /obj/item/stack/sheet/gold(get_turf(src))
new /obj/item/stack/sheet/gold(get_turf(src))
if("silver")
new /obj/item/stack/sheet/silver(get_turf(src))
new /obj/item/stack/sheet/silver(get_turf(src))
if("diamond")
new /obj/item/stack/sheet/diamond(get_turf(src))
new /obj/item/stack/sheet/diamond(get_turf(src))
if("uranium")
new /obj/item/stack/sheet/uranium(get_turf(src))
new /obj/item/stack/sheet/uranium(get_turf(src))
if("plasma")
new /obj/item/stack/sheet/plasma(get_turf(src))
new /obj/item/stack/sheet/plasma(get_turf(src))
if("clown")
new /obj/item/stack/sheet/clown(get_turf(src))
new /obj/item/stack/sheet/clown(get_turf(src))
if("sandstone")
new /obj/item/stack/sheet/sandstone(get_turf(src))
new /obj/item/stack/sheet/sandstone(get_turf(src))
else
var/M = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new M(get_turf(src))
new M(get_turf(src))
del(src)
else
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
@@ -395,96 +386,28 @@ obj/structure/door_assembly
var/obj/item/stack/sheet/G = W
if(G)
if(G.amount>=1)
switch(G.type)
if(/obj/item/stack/sheet/rglass)
if(G.type == /obj/item/stack/sheet/rglass)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed reinforced glass windows into the airlock assembly!"
G.use(1)
src.mineral = "glass"
src.name = "Near finished Window Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/glass
src.base_icon_state = "door_as_g" //this will be applied to the icon_state with the correct state number at the proc's end.
else if(istype(G, /obj/item/stack/sheet/mineral))
var/M = G.sheettype
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed reinforced glass windows into the airlock assembly!"
G.use(1)
src.mineral = "glass"
src.name = "Near finished Window Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/glass
src.base_icon_state = "door_as_g" //this will be applied to the icon_state with the correct state number at the proc's end.
if(/obj/item/stack/sheet/gold)
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed gold plating into the airlock assembly!"
G.use(2)
src.mineral = "gold"
src.name = "Near finished Gold Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/gold
src.base_icon_state = "door_as_gold"
if(/obj/item/stack/sheet/silver)
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed silver plating into the airlock assembly!"
G.use(2)
src.mineral = "silver"
src.name = "Near finished Silver Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/silver
src.base_icon_state = "door_as_silver"
if(/obj/item/stack/sheet/diamond)
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed diamond plating into the airlock assembly!"
G.use(2)
src.mineral = "diamond"
src.name = "Near finished Diamond Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/diamond
src.base_icon_state = "door_as_diamond"
if(/obj/item/stack/sheet/uranium)
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed uranium plating into the airlock assembly!"
G.use(2)
src.mineral = "uranium"
src.name = "Near finished Uranium Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/uranium
src.base_icon_state = "door_as_uranium"
if(/obj/item/stack/sheet/plasma)
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed plasma plating into the airlock assembly!"
G.use(2)
src.mineral = "plasma"
src.name = "Near finished Plasma Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/plasma
src.base_icon_state = "door_as_plasma"
if(/obj/item/stack/sheet/clown)
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed bananium plating into the airlock assembly!"
G.use(2)
playsound(src.loc, 'sound/items/bikehorn.ogg', 15, 1, -3)
src.mineral = "clown"
src.name = "Near finished Bananium Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/clown
src.base_icon_state = "door_as_clown"
if(/obj/item/stack/sheet/sandstone)
if(G.amount>=2)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", "You start to install [G.name] into the airlock assembly.")
if(do_after(user, 40))
user << "\blue You installed sandstone plating into the airlock assembly!"
G.use(2)
src.mineral = "sandstone"
src.name = "Near finished Sandstone Airlock Assembly"
src.airlock_type = /obj/machinery/door/airlock/sandstone
src.base_icon_state = "door_as_sandstone"
user << "\blue You installed [M] plating into the airlock assembly!"
G.use(2)
src.mineral = "[M]"
src.name = "Near finished [M] Airlock Assembly"
src.airlock_type = text2path ("/obj/machinery/door/airlock/[M]")
src.base_icon_state = "door_as_[M]"
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "\blue Now finishing the airlock."
@@ -493,36 +416,14 @@ obj/structure/door_assembly
if(!src) return
user << "\blue You finish the airlock!"
var/obj/machinery/door/airlock/door
switch(mineral)
if("glass")
airlock_type = /obj/machinery/door/airlock/glass
door = new src.airlock_type( src.loc )
if("gold")
airlock_type = /obj/machinery/door/airlock/gold
door = new src.airlock_type( src.loc )
if("silver")
airlock_type = /obj/machinery/door/airlock/silver
door = new src.airlock_type( src.loc )
if("diamond")
airlock_type = /obj/machinery/door/airlock/diamond
door = new src.airlock_type( src.loc )
if("uranium")
airlock_type = /obj/machinery/door/airlock/uranium
door = new src.airlock_type( src.loc )
if("plasma")
airlock_type = /obj/machinery/door/airlock/plasma
door = new src.airlock_type( src.loc )
if("clown")
airlock_type = /obj/machinery/door/airlock/clown
door = new src.airlock_type( src.loc )
if("sandstone")
airlock_type = /obj/machinery/door/airlock/sandstone
door = new src.airlock_type( src.loc )
else
door = new src.airlock_type( src.loc )
if (mineral)
airlock_type = text2path("/obj/machinery/door/airlock/[mineral]")
door = new src.airlock_type( src.loc )
//door.req_access = src.req_access
door.electronics = src.electronics
door.req_access = src.electronics.conf_access
if(created_name)
door.name = created_name
src.electronics.loc = door
del(src)
else
@@ -39,7 +39,7 @@
/obj/structure/stool/bed/chair/e_chair/rotate()
..()
overlays = null
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
+10 -12
View File
@@ -9,16 +9,15 @@
var/opened = 0
/obj/structure/extinguisher_cabinet/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (isrobot(usr))
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
if(isrobot(user) || isalien(user))
return
if (istype(O, /obj/item/weapon/extinguisher))
if(istype(O, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened)
user.drop_item(O)
src.contents += O
contents += O
has_extinguisher = O
user << "\blue You place the extinguisher in the [src.name]."
user << "<span class='notice'>You place [O] in [src].</span>"
else
opened = !opened
else
@@ -26,25 +25,24 @@
update_icon()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user as mob)
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(isrobot(user) || isalien(user))
return
if(has_extinguisher)
user.put_in_hands(has_extinguisher)
user << "<span class='notice'>You take [has_extinguisher] from [src].</span>"
has_extinguisher = null
user << "\blue You take the extinguisher from the [name]."
opened = 1
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_paw(mob/user as mob)
/obj/structure/extinguisher_cabinet/attack_paw(mob/user)
attack_hand(user)
return
/obj/structure/extinguisher_cabinet/update_icon()
if(!opened)
icon_state = "extinguisher_closed"
+144 -120
View File
@@ -1,8 +1,13 @@
/*
* False Walls
*/
/obj/structure/falsewall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
anchored = 1
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
var/opening = 0
/obj/structure/falsewall/New()
relativewall_neighbours()
@@ -23,69 +28,6 @@
W.relativewall()
..()
/obj/structure/falsewall/gold
name = "gold wall"
desc = "A wall with gold plating. Swag"
icon_state = ""
mineral = "gold"
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny"
icon_state = ""
mineral = "silver"
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster"
icon_state = ""
mineral = "diamond"
/obj/structure/falsewall/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea"
icon_state = ""
mineral = "uranium"
var/active = null
var/last_event = 0
/obj/structure/falsewall/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea"
icon_state = ""
mineral = "plasma"
//-----------wtf?-----------start
/obj/structure/falsewall/bananium
name = "bananium wall"
desc = "A wall with bananium plating. Honk"
icon_state = ""
/obj/structure/falsewall/clown
mineral = "clown"
/obj/structure/falsewall/sand
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = ""
/obj/structure/falsewall/sandstone
mineral = "sandstone"
//------------wtf?------------end
/obj/structure/falserwall
name = "r wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
icon_state = "r_wall"
density = 1
opacity = 1
anchored = 1
var/mineral = "metal"
/obj/structure/falserwall/New()
relativewall_neighbours()
..()
/obj/structure/falsewall/relativewall()
@@ -111,24 +53,26 @@
return
/obj/structure/falsewall/attack_hand(mob/user as mob)
if(opening)
return
if(density)
// Open wall
opening = 1
icon_state = "[mineral]fwall_open"
flick("[mineral]fwall_opening", src)
sleep(15)
src.density = 0
SetOpacity(0)
opening = 0
else
opening = 1
flick("[mineral]fwall_closing", src)
icon_state = "[mineral]0"
density = 1
sleep(15)
SetOpacity(1)
src.relativewall()
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
radiate()
..()
opening = 0
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
@@ -139,24 +83,30 @@
icon_state = "[mineral]fwall_open"
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opening)
user << "\red You must wait until the door has stopped moving."
return
if(density)
var/turf/T = get_turf(src)
if(T.density)
user << "\red The wall is blocked!"
return
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.")
if(!mineral || mineral == "metal")
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
else
T.ReplaceWithMineralWall(mineral)
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
del(src)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT:welding )
var/turf/T = get_turf(src)
if(!mineral)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
else
T.ReplaceWithMineralWall(mineral)
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
if(mineral != "plasma")//Stupid shit keeps me from pushing the attackby() to plasma walls -Sieve
T = get_turf(src)
T.attackby(W,user)
@@ -167,9 +117,9 @@
if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
if(!mineral)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
else
T.ReplaceWithMineralWall(mineral)
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
if(mineral != "plasma")
T = get_turf(src)
T.attackby(W,user)
@@ -179,9 +129,9 @@
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
if(!mineral)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
else
T.ReplaceWithMineralWall(mineral)
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
T = get_turf(src)
T.attackby(W,user)
del(src)
@@ -189,28 +139,13 @@
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
if(!mineral)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
else
T.ReplaceWithMineralWall(mineral)
T.ChangeTurf(text2path("/turf/simulated/wall/mineral/[mineral]"))
if(mineral != "plasma")
T = get_turf(src)
T.attackby(W,user)
del(src)
/*
var/turf/T = get_turf(user)
user << "\blue Now adding plating..."
sleep(40)
if (get_turf(user) == T)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithWall()
*/
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
radiate()
..()
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
..()
@@ -220,24 +155,48 @@
else
icon_state = "[mineral]fwall_open"
/obj/structure/falserwall/
anchored = 1
/*
* False R-Walls
*/
attack_hand(mob/user as mob)
if(density)
// Open wall
icon_state = "frwall_open"
flick("frwall_opening", src)
sleep(15)
density = 0
SetOpacity(0)
else
icon_state = "r_wall"
flick("frwall_closing", src)
density = 1
sleep(15)
SetOpacity(1)
relativewall()
/obj/structure/falserwall
name = "reinforced wall"
desc = "A huge chunk of reinforced metal used to seperate rooms."
icon = 'icons/turf/walls.dmi'
icon_state = "r_wall"
density = 1
opacity = 1
anchored = 1
var/mineral = "metal"
var/opening = 0
/obj/structure/falserwall/New()
relativewall_neighbours()
..()
/obj/structure/falserwall/attack_hand(mob/user as mob)
if(opening)
return
if(density)
opening = 1
// Open wall
icon_state = "frwall_open"
flick("frwall_opening", src)
sleep(15)
density = 0
SetOpacity(0)
opening = 0
else
opening = 1
icon_state = "r_wall"
flick("frwall_closing", src)
density = 1
sleep(15)
SetOpacity(1)
relativewall()
opening = 0
/obj/structure/falserwall/relativewall()
@@ -265,24 +224,28 @@
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(opening)
user << "\red You must wait until the door has stopped moving."
return
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
T.ReplaceWithWall() //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
T.ChangeTurf(/turf/simulated/wall) //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
del(src)
if( istype(W, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = W
if( WT.remove_fuel(0,user) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/pickaxe/plasmacutter) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
@@ -290,28 +253,89 @@
//DRILLING
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
var/turf/T = get_turf(src)
T.ReplaceWithWall()
T.ChangeTurf(/turf/simulated/wall)
T = get_turf(src)
T.attackby(W,user)
del(src)
/*
* Uranium Falsewalls
*/
/obj/structure/falsewall/uranium
name = "uranium wall"
desc = "A wall with uranium plating. This is probably a bad idea."
icon_state = ""
mineral = "uranium"
var/active = null
var/last_event = 0
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
radiate()
..()
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
radiate()
..()
/obj/structure/falsewall/uranium/proc/radiate()
if(!active)
if(world.time > last_event+15)
active = 1
for(var/mob/living/L in range(3,src))
L.apply_effect(12,IRRADIATE,0)
for(var/turf/simulated/wall/mineral/T in range(3,src))
if(T.mineral == "uranium")
T.radiate()
for(var/turf/simulated/wall/mineral/uranium/T in range(3,src))
T.radiate()
last_event = world.time
active = null
return
return
/*
* Other misc falsewall types
*/
/obj/structure/falsewall/gold
name = "gold wall"
desc = "A wall with gold plating. Swag!"
icon_state = ""
mineral = "gold"
/obj/structure/falsewall/silver
name = "silver wall"
desc = "A wall with silver plating. Shiny."
icon_state = ""
mineral = "silver"
/obj/structure/falsewall/diamond
name = "diamond wall"
desc = "A wall with diamond plating. You monster."
icon_state = ""
mineral = "diamond"
/obj/structure/falsewall/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = ""
mineral = "plasma"
//-----------wtf?-----------start
/obj/structure/falsewall/clown
name = "bananium wall"
desc = "A wall with bananium plating. Honk!"
icon_state = ""
mineral = "clown"
/obj/structure/falsewall/sandstone
name = "sandstone wall"
desc = "A wall with sandstone plating."
icon_state = ""
mineral = "sandstone"
//------------wtf?------------end
+191
View File
@@ -0,0 +1,191 @@
//trees
/obj/structure/flora/tree
name = "tree"
anchored = 1
density = 1
pixel_x = -16
layer = 9
/obj/structure/flora/tree/pine
name = "pine tree"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "pine_1"
/obj/structure/flora/tree/pine/New()
icon_state = "pine_[rand(1, 3)]"
..()
/obj/structure/flora/tree/pine/xmas
name = "xmas tree"
icon = 'icons/obj/flora/pinetrees.dmi'
icon_state = "pine_c"
/obj/structure/flora/tree/pine/xmas/New()
..()
icon_state = "pine_c"
/obj/structure/flora/tree/dead
icon = 'icons/obj/flora/deadtrees.dmi'
icon_state = "tree_1"
/obj/structure/flora/tree/dead/New()
icon_state = "tree_[rand(1, 6)]"
..()
//grass
/obj/structure/flora/grass
name = "grass"
icon = 'icons/obj/flora/snowflora.dmi'
anchored = 1
/obj/structure/flora/grass/brown
icon_state = "snowgrass1bb"
/obj/structure/flora/grass/brown/New()
icon_state = "snowgrass[rand(1, 3)]bb"
..()
/obj/structure/flora/grass/green
icon_state = "snowgrass1gb"
/obj/structure/flora/grass/green/New()
icon_state = "snowgrass[rand(1, 3)]gb"
..()
/obj/structure/flora/grass/both
icon_state = "snowgrassall1"
/obj/structure/flora/grass/both/New()
icon_state = "snowgrassall[rand(1, 3)]"
..()
//bushes
/obj/structure/flora/bush
name = "bush"
icon = 'icons/obj/flora/snowflora.dmi'
icon_state = "snowbush1"
anchored = 1
/obj/structure/flora/bush/New()
icon_state = "snowbush[rand(1, 6)]"
..()
//newbushes
/obj/structure/flora/ausbushes
name = "bush"
icon = 'icons/obj/flora/ausflora.dmi'
icon_state = "firstbush_1"
anchored = 1
/obj/structure/flora/ausbushes/New()
icon_state = "firstbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/reedbush
icon_state = "reedbush_1"
/obj/structure/flora/ausbushes/reedbush/New()
icon_state = "reedbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/leafybush
icon_state = "leafybush_1"
/obj/structure/flora/ausbushes/leafybush/New()
icon_state = "leafybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/palebush
icon_state = "palebush_1"
/obj/structure/flora/ausbushes/palebush/New()
icon_state = "palebush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/stalkybush
icon_state = "stalkybush_1"
/obj/structure/flora/ausbushes/stalkybush/New()
icon_state = "stalkybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/grassybush
icon_state = "grassybush_1"
/obj/structure/flora/ausbushes/grassybush/New()
icon_state = "grassybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/fernybush
icon_state = "fernybush_1"
/obj/structure/flora/ausbushes/fernybush/New()
icon_state = "fernybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/sunnybush
icon_state = "sunnybush_1"
/obj/structure/flora/ausbushes/sunnybush/New()
icon_state = "sunnybush_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/genericbush
icon_state = "genericbush_1"
/obj/structure/flora/ausbushes/genericbush/New()
icon_state = "genericbush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/pointybush
icon_state = "pointybush_1"
/obj/structure/flora/ausbushes/pointybush/New()
icon_state = "pointybush_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/lavendergrass
icon_state = "lavendergrass_1"
/obj/structure/flora/ausbushes/lavendergrass/New()
icon_state = "lavendergrass_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/ywflowers
icon_state = "ywflowers_1"
/obj/structure/flora/ausbushes/ywflowers/New()
icon_state = "ywflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/brflowers
icon_state = "brflowers_1"
/obj/structure/flora/ausbushes/brflowers/New()
icon_state = "brflowers_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/ppflowers
icon_state = "ppflowers_1"
/obj/structure/flora/ausbushes/ppflowers/New()
icon_state = "ppflowers_[rand(1, 4)]"
..()
/obj/structure/flora/ausbushes/sparsegrass
icon_state = "sparsegrass_1"
/obj/structure/flora/ausbushes/sparsegrass/New()
icon_state = "sparsegrass_[rand(1, 3)]"
..()
/obj/structure/flora/ausbushes/fullgrass
icon_state = "fullgrass_1"
/obj/structure/flora/ausbushes/fullgrass/New()
icon_state = "fullgrass_[rand(1, 3)]"
..()
+25 -158
View File
@@ -73,6 +73,7 @@
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall (src.loc)
del(src)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
@@ -81,9 +82,7 @@
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithWall()
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
Tsrc.ChangeTurf(/turf/simulated/wall)
for(var/turf/simulated/wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
@@ -95,6 +94,7 @@
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falserwall (src.loc)
del(src)
else
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
if(S.amount < 1) return ..()
@@ -104,9 +104,7 @@
S.use(1)
user << "\blue Wall fully reinforced!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithRWall()
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
@@ -122,161 +120,30 @@
del(src)
return
if(/obj/item/stack/sheet/gold)
if(!anchored)
if(S.amount < 2) return
if(S.sheettype)
var/M = S.sheettype
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
var/F = text2path("/obj/structure/falsewall/[M]")
new F (src.loc)
del(src)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/gold (src.loc)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithMineralWall("gold")
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
if(/obj/item/stack/sheet/silver)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/silver (src.loc)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithMineralWall("silver")
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
if(/obj/item/stack/sheet/diamond)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/diamond (src.loc)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithMineralWall("diamond")
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
if(/obj/item/stack/sheet/uranium)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/uranium (src.loc)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithMineralWall("uranium")
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
if(/obj/item/stack/sheet/plasma)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/plasma (src.loc)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithMineralWall("plasma")
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
if(/obj/item/stack/sheet/clown)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/clown (src.loc)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithMineralWall("clown")
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
if(/obj/item/stack/sheet/sandstone)
if(!anchored)
if(S.amount < 2) return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/sandstone (src.loc)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
if (do_after(user,40))
if(!src || !S || S.amount < 2) return
S.use(2)
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithMineralWall("sandstone")
for(var/obj/machinery/atmospherics/pipe/P in Tsrc)
P.layer = 1
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
user << "\blue You added the plating!"
var/turf/Tsrc = get_turf(src)
Tsrc.ChangeTurf(text2path("/turf/simulated/wall/mineral/[M]"))
for(var/turf/simulated/wall/mineral/X in Tsrc.loc)
if(X) X.add_hiddenprint(usr)
del(src)
return
add_hiddenprint(usr)
del(src)
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
+104 -108
View File
@@ -1,192 +1,188 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/structure/grille
desc = "A piece of metal with evenly spaced gridlike holes in it. Blocks large object but lets small items, gas, or energy beams through. Strangely enough these grilles also lets meteors pass through them, whether they be small or huge station breaking death stones."
desc = "A flimsy lattice of metal rods, with screws to secure it to the floor."
name = "grille"
icon = 'icons/obj/structures.dmi'
icon_state = "grille"
density = 1
anchored = 1.0
anchored = 1
flags = FPRINT | CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
explosion_resistance = 5
var/health = 10
var/destroyed = 0
explosion_resistance = 5
/obj/structure/grille/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(25))
src.health -= 11
healthcheck()
return
del(src)
/obj/structure/grille/blob_act()
del(src)
return
/obj/structure/grille/meteorhit(var/obj/M)
del(src)
/obj/structure/grille/Bumped(atom/user)
if(ismob(user)) shock(user, 70)
/obj/structure/grille/meteorhit(var/obj/M)
if (M.icon_state == "flaming")
src.health -= 2
healthcheck()
return
/obj/structure/grille/attack_hand(var/mob/user)
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] kicks the [src.name].", \
"You kick the [src.name].", \
"You hear a noise")
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
src.health -= 5
else if(!shock(user, 70))
src.health -= 3
healthcheck()
return
/obj/structure/grille/attack_paw(var/mob/user)
/obj/structure/grille/attack_paw(mob/user as mob)
attack_hand(user)
/obj/structure/grille/attack_hand(mob/user as mob)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='warning'>You kick [src].</span>", \
"You hear twisting metal.")
/obj/structure/grille/attack_alien(var/mob/user)
if (istype(usr, /mob/living/carbon/alien/larva)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] mangles the [src.name].", \
"You mangle the [src.name].", \
"You hear a noise")
if(!shock(usr, 70))
src.health -= 5
if(shock(user, 70))
return
if(HULK in user.mutations)
health -= 5
else
health -= 3
healthcheck()
/obj/structure/grille/attack_alien(mob/user as mob)
if(istype(user, /mob/living/carbon/alien/larva)) return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
"<span class='warning'>You mangle [src].</span>", \
"You hear twisting metal.")
if(!shock(user, 70))
health -= 5
healthcheck()
return
/obj/structure/grille/attack_metroid(var/mob/user)
if(!istype(usr, /mob/living/carbon/metroid/adult)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= rand(2,3)
/obj/structure/grille/attack_slime(mob/user as mob)
if(!istype(user, /mob/living/carbon/slime/adult)) return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
"<span class='warning'>You smash against [src].</span>", \
"You hear twisting metal.")
health -= rand(2,3)
healthcheck()
return
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("[M.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= M.melee_damage_upper
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
"<span class='warning'>You smash against [src].</span>", \
"You hear twisting metal.")
health -= M.melee_damage_upper
healthcheck()
return
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1
else
if (istype(mover, /obj/item/projectile))
if(istype(mover, /obj/item/projectile))
return prob(30)
else
return !src.density
return !density
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return
src.health -= Proj.damage*0.2
healthcheck()
return 0
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user)
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswirecutter(W))
if(!shock(user, 100))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
src.health = 0
if(!destroyed)
src.health = -100
else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
new /obj/item/stack/rods(loc)
del(src)
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
src.anchored = !( src.anchored )
user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
for(var/mob/O in oviewers())
O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
anchored = !anchored
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
return
//window placing begin
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
var/dir_to_set = 1
if(src.loc == usr.loc)
dir_to_set = usr.dir
if(loc == user.loc)
dir_to_set = user.dir
else
if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
if( src.x == usr.x )
if( src.y > usr.y )
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
if( x == user.x )
if( y > user.y )
dir_to_set = 2
else
dir_to_set = 1
else if( src.y == usr.y )
if( src.x > usr.x )
else if( y == user.y )
if( x > user.x )
dir_to_set = 8
else
dir_to_set = 4
else
usr << "\red You can't reach there.."
user << "<span class='notice'>You can't reach.</span>"
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
for(var/obj/structure/window/WINDOW in src.loc)
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)
usr << "\red There is already a window facing this way there."
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
usr << "\blue You start placing the window"
user << "<span class='notice'>You start placing the window.</span>"
if(do_after(user,20))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in src.loc)
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
usr << "\red There is already a window facing this way there."
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
WD = new/obj/structure/window(src.loc,1) //reinforced window
WD = new/obj/structure/window(loc,1) //reinforced window
else
WD = new/obj/structure/window(src.loc,0) //normal window
WD = new/obj/structure/window(loc,0) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
var/obj/item/stack/ST = W
ST.use(1)
usr << "\blue You place the [WD] on the [src]"
user << "<span class='notice'>You place the [WD] on [src].</span>"
return
//window placing end
else if(istype(W, /obj/item/weapon/shard))
src.health -= W.force * 0.1
health -= W.force * 0.1
else if(!shock(user, 70))
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
src.health -= W.force
health -= W.force
if("brute")
src.health -= W.force * 0.1
src.healthcheck()
health -= W.force * 0.1
healthcheck()
..()
return
/obj/structure/grille/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
src.icon_state = "brokengrille"
src.density = 0
src.destroyed = 1
new /obj/item/stack/rods( src.loc )
if(health <= 0)
if(!destroyed)
icon_state = "brokengrille"
density = 0
destroyed = 1
new /obj/item/stack/rods(loc)
else
if (src.health <= -10.0)
new /obj/item/stack/rods( src.loc )
//SN src = null
if(health <= -6)
new /obj/item/stack/rods(loc)
del(src)
return
return
@@ -194,19 +190,19 @@
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
/obj/structure/grille/proc/shock(mob/user, prb)
/obj/structure/grille/proc/shock(mob/user as mob, prb)
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
return 0
if(!prob(prb))
return 0
if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
if(!in_range(src, user))//To prevent TK and mech users from getting shocked
return 0
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
if (electrocute_mob(user, C, src))
if(electrocute_mob(user, C, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.set_up(3, 1, src)
s.start()
return 1
else
@@ -216,6 +212,6 @@
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!destroyed)
if(exposed_temperature > T0C + 1500)
src.health -= 1
health -= 1
healthcheck()
..()
+133
View File
@@ -0,0 +1,133 @@
/obj/structure/stool/bed/chair/janicart
name = "janicart"
icon = 'icons/obj/vehicles.dmi'
icon_state = "pussywagon"
anchored = 1
density = 1
flags = OPENCONTAINER
//copypaste sorry
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
var/obj/item/weapon/storage/bag/trash/mybag = null
/obj/structure/stool/bed/chair/janicart/New()
handle_rotation()
var/datum/reagents/R = new/datum/reagents(100)
reagents = R
R.my_atom = src
/obj/structure/stool/bed/chair/janicart/examine()
set src in usr
usr << "\icon[src] This pimpin' ride contains [reagents.total_volume] unit\s of water!"
if(mybag)
usr << "\A [mybag] is hanging on the pimpin' ride."
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/mop))
if(reagents.total_volume >= 2)
reagents.trans_to(W, 2)
user << "<span class='notice'>You wet the mop in the pimpin' ride.</span>"
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
if(reagents.total_volume < 1)
user << "<span class='notice'>This pimpin' ride is out of water!</span>"
else if(istype(W, /obj/item/key))
user << "Hold [W] in one of your hands while you drive this pimpin' ride."
else if(istype(W, /obj/item/weapon/storage/bag/trash))
user << "<span class='notice'>You hook the trashbag onto the pimpin' ride.</span>"
user.drop_item()
W.loc = src
mybag = W
/obj/structure/stool/bed/chair/janicart/attack_hand(mob/user)
if(mybag)
mybag.loc = get_turf(user)
user.put_in_hands(mybag)
mybag = null
else
..()
/obj/structure/stool/bed/chair/janicart/relaymove(mob/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle()
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
step(src, direction)
update_mob()
handle_rotation()
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this pimpin' ride.</span>"
/obj/structure/stool/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 pimpin' ride!</span>",\
"<span class='notice'>You climb onto the pimpin' ride!</span>")
M.buckled = src
M.loc = loc
M.dir = dir
M.update_canmove()
buckled_mob = M
update_mob()
add_fingerprint(user)
return
/obj/structure/stool/bed/chair/janicart/unbuckle()
if(buckled_mob)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
..()
/obj/structure/stool/bed/chair/janicart/handle_rotation()
if(dir == SOUTH)
layer = FLY_LAYER
else
layer = OBJ_LAYER
if(buckled_mob)
if(buckled_mob.loc != loc)
buckled_mob.buckled = null //Temporary, so Move() succeeds.
buckled_mob.buckled = src //Restoring
update_mob()
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
if(buckled_mob)
buckled_mob.dir = dir
switch(dir)
if(SOUTH)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 7
if(WEST)
buckled_mob.pixel_x = 13
buckled_mob.pixel_y = 7
if(NORTH)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 4
if(EAST)
buckled_mob.pixel_x = -13
buckled_mob.pixel_y = 7
/obj/structure/stool/bed/chair/janicart/bullet_act(var/obj/item/projectile/Proj)
if(buckled_mob)
if(prob(65))
return buckled_mob.bullet_act(Proj)
visible_message("<span class='warning'>[Proj] ricochets off the pimpin' ride!</span>")
/obj/item/key
name = "key"
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
icon = 'icons/obj/vehicles.dmi'
icon_state = "keys"
w_class = 1
@@ -49,7 +49,7 @@
// 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/metroid))
// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime))
// else if(istype(C, /obj/livestock/spesscarp
attack_hand(mob/user as mob)
+30 -10
View File
@@ -56,8 +56,13 @@
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
if(M.client && !M:handcuffed)
SwitchState()
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(!C.handcuffed)
SwitchState()
else
SwitchState()
else if(istype(user, /obj/mecha))
SwitchState()
@@ -116,13 +121,23 @@
proc/Dismantle(devastated = 0)
if(!devastated)
var/ore = text2path("/obj/item/stack/sheet/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
if (mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
del(src)
ex_act(severity = 1)
@@ -252,7 +267,7 @@
/obj/structure/mineral_door/resin
mineralType = "resin"
hardness = 5
hardness = 1.5
var/close_delay = 100
TryToSwitchState(atom/user)
@@ -286,4 +301,9 @@
isSwitchingStates = 0
Dismantle(devastated = 0)
del(src)
del(src)
CheckHardness()
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
..()
+64 -1
View File
@@ -6,8 +6,12 @@
icon_state = "mirror"
density = 0
anchored = 1
var/shattered = 0
/obj/structure/mirror/attack_hand(mob/user as mob)
if(shattered) return
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -29,4 +33,63 @@
if(new_style)
H.h_style = new_style
H.update_hair()
H.update_hair()
/obj/structure/mirror/proc/shatter()
if(shattered) return
shattered = 1
icon_state = "mirror_broke"
playsound(src, "shatter", 70, 1)
desc = "Oh no, seven years of bad luck!"
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
if(prob(Proj.damage * 2))
if(!shattered)
shatter()
else
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
shatter()
else
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
/obj/structure/mirror/attack_alien(mob/user as mob)
if(islarva(user)) return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
/obj/structure/mirror/attack_animal(mob/user as mob)
if(!isanimal(user)) return
var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0) return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
/obj/structure/mirror/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
+1 -2
View File
@@ -4,8 +4,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "mopbucket"
density = 1
flags = FPRINT
pressure_resistance = ONE_ATMOSPHERE
pressure_resistance = 5
flags = FPRINT | TABLEPASS | OPENCONTAINER
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
+4 -2
View File
@@ -15,6 +15,7 @@
desc = "Used to keep bodies in untill someone fetches them."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "morgue1"
dir = EAST
density = 1
var/obj/structure/m_tray/connected = null
anchored = 1.0
@@ -70,15 +71,16 @@
else
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
src.connected = new /obj/structure/m_tray( src.loc )
step(src.connected, EAST)
step(src.connected, src.dir)
src.connected.layer = OBJ_LAYER
var/turf/T = get_step(src, EAST)
var/turf/T = get_step(src, src.dir)
if (T.contents.Find(src.connected))
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
src.connected.icon_state = "morguet"
src.connected.dir = src.dir
else
//src.connected = null
del(src.connected)
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -40,7 +40,7 @@
/obj/structure/noticeboard/Topic(href, href_list)
..()
usr.machine = src
usr.set_machine(src)
if(href_list["remove"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return
+6 -5
View File
@@ -73,7 +73,7 @@ FLOOR SAFES
/obj/structure/safe/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = "<center>"
dat += "<a href='?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='?src=\ref[src];increment=1'>+</a>"
if(open)
@@ -135,10 +135,11 @@ FLOOR SAFES
if(href_list["retrieve"])
user << browse("", "window=safe") // Close the menu
var/obj/item/P = locate(href_list["retrieve"])
if(P && in_range(src, user))
user.put_in_hands(P)
updateUsrDialog()
var/obj/item/P = locate(href_list["retrieve"]) in src
if(open)
if(P && in_range(src, user))
user.put_in_hands(P)
updateUsrDialog()
/obj/structure/safe/attackby(obj/item/I as obj, mob/user as mob)
@@ -1,37 +0,0 @@
/obj/structure/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle.dmi'
/obj/structure/shuttle/engine
name = "engine"
density = 1
anchored = 1.0
/obj/structure/shuttle/engine/heater
name = "heater"
icon_state = "heater"
/obj/structure/shuttle/engine/platform
name = "platform"
icon_state = "platform"
/obj/structure/shuttle/engine/propulsion
name = "propulsion"
icon_state = "propulsion"
opacity = 1
/obj/structure/shuttle/engine/propulsion/burst
name = "burst"
/obj/structure/shuttle/engine/propulsion/burst/left
name = "left"
icon_state = "burst_l"
/obj/structure/shuttle/engine/propulsion/burst/right
name = "right"
icon_state = "burst_r"
/obj/structure/shuttle/engine/router
name = "router"
icon_state = "router"
+138
View File
@@ -0,0 +1,138 @@
/obj/structure/sign
icon = 'icons/obj/decals.dmi'
anchored = 1
opacity = 0
density = 0
layer = 3.5
/obj/structure/sign/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
del(src)
return
if(3.0)
del(src)
return
else
return
/obj/structure/sign/blob_act()
del(src)
return
/obj/structure/sign/map
name = "station map"
desc = "A framed picture of the station."
/obj/structure/sign/map/left
icon_state = "map-left"
/obj/structure/sign/map/right
icon_state = "map-right"
/obj/structure/sign/securearea
name = "\improper SECURE AREA"
desc = "A warning sign which reads 'SECURE AREA'."
icon_state = "securearea"
/obj/structure/sign/biohazard
name = "\improper BIOHAZARD"
desc = "A warning sign which reads 'BIOHAZARD'"
icon_state = "bio"
/obj/structure/sign/electricshock
name = "\improper HIGH VOLTAGE"
desc = "A warning sign which reads 'HIGH VOLTAGE'"
icon_state = "shock"
/obj/structure/sign/examroom
name = "\improper EXAM"
desc = "A guidance sign which reads 'EXAM ROOM'"
icon_state = "examroom"
/obj/structure/sign/vacuum
name = "\improper HARD VACUUM AHEAD"
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
icon_state = "space"
/obj/structure/sign/deathsposal
name = "\improper DISPOSAL LEADS TO SPACE"
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
icon_state = "deathsposal"
/obj/structure/sign/pods
name = "\improper ESCAPE PODS"
desc = "A warning sign which reads 'ESCAPE PODS'"
icon_state = "pods"
/obj/structure/sign/fire
name = "\improper DANGER: FIRE"
desc = "A warning sign which reads 'DANGER: FIRE'"
icon_state = "fire"
/obj/structure/sign/nosmoking_1
name = "\improper NO SMOKING"
desc = "A warning sign which reads 'NO SMOKING'"
icon_state = "nosmoking"
/obj/structure/sign/nosmoking_2
name = "\improper NO SMOKING"
desc = "A warning sign which reads 'NO SMOKING'"
icon_state = "nosmoking2"
/obj/structure/sign/redcross
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
icon_state = "redcross"
/obj/structure/sign/greencross
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
icon_state = "greencross"
/obj/structure/sign/goldenplaque
name = "The Most Robust Men Award for Robustness"
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
icon_state = "goldenplaque"
/obj/structure/sign/kiddieplaque
name = "AI developers plaque"
desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child appears to be retarded. Beneath the image, someone has scratched the word \"PACKETS\""
icon_state = "kiddieplaque"
/obj/structure/sign/atmosplaque
name = "\improper FEA Atmospherics Division plaque"
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
icon_state = "atmosplaque"
/obj/structure/sign/maltesefalcon //The sign is 64x32, so it needs two tiles. ;3
name = "The Maltese Falcon"
desc = "The Maltese Falcon, Space Bar and Grill."
/obj/structure/sign/maltesefalcon/left
icon_state = "maltesefalcon-left"
/obj/structure/sign/maltesefalcon/right
icon_state = "maltesefalcon-right"
/obj/structure/sign/science //These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
name = "\improper SCIENCE!"
desc = "A warning sign which reads 'SCIENCE!'"
icon_state = "science1"
/obj/structure/sign/chemistry
name = "\improper CHEMISTRY"
desc = "A warning sign which reads 'CHEMISTRY'"
icon_state = "chemistry1"
/obj/structure/sign/botany
name = "\improper HYDROPONICS"
desc = "A warning sign which reads 'HYDROPONICS'"
icon_state = "hydro1"
@@ -67,6 +67,10 @@
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || 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)
@@ -147,4 +151,4 @@
new/obj/item/roller(get_turf(src))
spawn(0)
del(src)
return
return
@@ -3,6 +3,9 @@
desc = "You sit in this. Either by will or force."
icon_state = "chair"
/obj/structure/stool/MouseDrop(atom/over_object)
return
/obj/structure/stool/bed/chair/New()
if(anchored)
src.verbs -= /atom/movable/verb/pull
@@ -49,14 +52,19 @@
set category = "Object"
set src in oview(1)
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
if(config.ghost_interaction)
src.dir = turn(src.dir, 90)
handle_rotation()
return
else
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
src.dir = turn(src.dir, 90)
handle_rotation()
return
src.dir = turn(src.dir, 90)
handle_rotation()
return
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
@@ -5,7 +5,7 @@
icon_state = "stool"
anchored = 1.0
flags = FPRINT
pressure_resistance = 3*ONE_ATMOSPHERE
pressure_resistance = 15
/obj/structure/stool/ex_act(severity)
switch(severity)
@@ -32,4 +32,43 @@
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
del(src)
return
return
/obj/structure/stool/MouseDrop(atom/over_object)
if (istype(over_object, /mob/living/carbon/human))
var/mob/living/carbon/human/H = 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/attack_self(mob/user as mob)
..()
origin.loc = get_turf(src)
user.u_equip(src)
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
del src
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
user.visible_message("\red [user] breaks [src] over [M]'s back!.")
user.u_equip(src)
var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal
m.loc = get_turf(src)
del src
var/mob/living/T = M
T.Weaken(10)
T.apply_damage(20)
return
..()
+81 -166
View File
@@ -19,6 +19,7 @@
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
var/parts = /obj/item/weapon/table_parts
/obj/structure/table/New()
..()
@@ -38,6 +39,12 @@
T.update_icon()
..()
/obj/structure/table/proc/destroy()
new parts(loc)
density = 0
del(src)
/obj/structure/table/update_icon()
spawn(2) //So it properly updates when deleting
var/dir_sum = 0
@@ -219,92 +226,42 @@
return
if(3.0)
if (prob(25))
src.density = 0
destroy()
else
return
/obj/structure/table/blob_act()
if(prob(75))
if(istype(src, /obj/structure/table/woodentable))
new /obj/item/weapon/table_parts/wood( src.loc )
del(src)
return
new /obj/item/weapon/table_parts( src.loc )
del(src)
return
destroy()
/obj/structure/table/hand_p(mob/user as mob)
return src.attack_paw(user)
return
/obj/structure/table/attack_paw(mob/user as mob)
if ((HULK in usr.mutations))
usr << "\blue You destroy the table."
visible_message("\red [user] smashes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood( src.loc )
else
new /obj/item/weapon/table_parts( src.loc )
src.density = 0
del(src)
if (!( locate(/obj/structure/table, user.loc) ))
step(user, get_dir(user, src))
if (user.loc == src.loc)
user.layer = TURF_LAYER
visible_message("[user] hides under the table!")
//Foreach goto(69)
return
/obj/structure/table/attack_paw(mob/user)
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("<span class='danger'>[user] smashes the [src] apart!</span>")
destroy()
/obj/structure/table/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
usr << "\green You destroy the table."
visible_message("\red [user] slices the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood( src.loc )
else
new /obj/item/weapon/table_parts( src.loc )
src.density = 0
del(src)
return
/obj/structure/table/attack_alien(mob/user)
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
/obj/structure/table/attack_animal(mob/living/simple_animal/user as mob)
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
if(user.wall_smash)
usr << "\red You destroy the table."
visible_message("\red [user] smahes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood( src.loc )
else
new /obj/item/weapon/table_parts( src.loc )
src.density = 0
del(src)
return
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
destroy()
/obj/structure/table/attack_hand(mob/user as mob)
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
usr << "\blue You destroy the table."
visible_message("\red [user] smahes the table apart!")
if(istype(src, /obj/structure/table/reinforced))
new /obj/item/weapon/table_parts/reinforced( src.loc )
else if(istype(src, /obj/structure/table/woodentable))
new/obj/item/weapon/table_parts/wood( src.loc )
else
new /obj/item/weapon/table_parts( src.loc )
src.density = 0
del(src)
return
/obj/structure/table/attack_hand(mob/user)
if(HULK in user.mutations)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
destroy()
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
@@ -331,23 +288,29 @@
/obj/structure/table/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
if (istype(G.affecting, /mob/living))
var/mob/living/M = G.affecting
if (G.state < 2)
if(user.a_intent == "hurt")
if (prob(15)) M.Weaken(5)
M.apply_damage(8,def_zone = "head")
visible_message("\red [G.assailant] slams [G.affecting]'s face against \the [src]!")
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
else
user << "\red You need a better grip to do that!"
return
else
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on \the [src].")
del(W)
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user,50))
new /obj/item/weapon/table_parts( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
//SN src = null
del(src)
destroy()
return
if(isrobot(user))
@@ -360,13 +323,10 @@
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 4))
O.show_message("\blue The table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
new /obj/item/weapon/table_parts( src.loc )
del(src)
return
O.show_message("\blue The [src] was sliced apart by [user]!", 1, "\red You hear [src] coming apart.", 2)
destroy()
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc // Unnecessary - see: mob/proc/drop_item(atom) - Doohl
return
@@ -377,46 +337,7 @@
name = "wooden table"
desc = "Do not apply fire to this. Rumour says it burns easily."
icon_state = "wood_table"
/obj/structure/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling the wooden table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
sleep(50)
new /obj/item/weapon/table_parts/wood( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
del(src)
return
if(isrobot(user))
return
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 4))
O.show_message("\blue The wooden table was sliced apart by [user]!", 1, "\red You hear wood coming apart.", 2)
new /obj/item/weapon/table_parts/wood( src.loc )
del(src)
return
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return
parts = /obj/item/weapon/table_parts/wood
/*
* Reinforced tables
@@ -426,21 +347,10 @@
desc = "A version of the four legged table. It is stronger."
icon_state = "reinf_table"
var/status = 2
parts = /obj/item/weapon/table_parts/reinforced
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
@@ -459,40 +369,13 @@
user << "\blue Table strengthened"
src.status = 2
return
if(isrobot(user))
return
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return
if (istype(W, /obj/item/weapon/wrench))
if(src.status == 1)
user << "\blue Now disassembling the reinforced table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 50))
new /obj/item/weapon/table_parts/reinforced( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
del(src)
if(src.status == 2)
return
if(isrobot(user))
return
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 4))
O.show_message("\blue The reinforced table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
new /obj/item/weapon/table_parts/reinforced( src.loc )
del(src)
return
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return
..()
/*
* Racks
@@ -552,7 +435,6 @@
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/weapon/rack_parts( src.loc )
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
//SN src = null
del(src)
return
if(isrobot(user))
@@ -562,4 +444,37 @@
return
/obj/structure/rack/meteorhit(obj/O as obj)
del(src)
del(src)
/obj/structure/table/attack_hand(mob/user)
if(HULK in user.mutations)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
new /obj/item/weapon/rack_parts(loc)
density = 0
del(src)
/obj/structure/rack/attack_paw(mob/user)
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
del(src)
/obj/structure/rack/attack_alien(mob/user)
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
del(src)
/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
if(user.wall_smash)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
new /obj/item/weapon/rack_parts(loc)
density = 0
del(src)
@@ -23,7 +23,7 @@
/obj/structure/dispenser/update_icon()
overlays = null
overlays.Cut()
switch(oxygentanks)
if(1 to 3) overlays += "oxygen-[oxygentanks]"
if(4 to INFINITY) overlays += "oxygen-4"
@@ -33,7 +33,7 @@
/obj/structure/dispenser/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = "[src]<br><br>"
dat += "Oxygen tanks: [oxygentanks] - [oxygentanks ? "<A href='?src=\ref[src];oxygen=1'>Dispense</A>" : "empty"]<br>"
dat += "Plasma tanks: [plasmatanks] - [plasmatanks ? "<A href='?src=\ref[src];plasma=1'>Dispense</A>" : "empty"]"
@@ -68,7 +68,7 @@
if(usr.stat || usr.restrained())
return
if(get_dist(src, usr) <= 1)
usr.machine = src
usr.set_machine(src)
if(href_list["oxygen"])
if(oxygentanks > 0)
var/obj/item/weapon/tank/oxygen/O
+2 -1
View File
@@ -122,6 +122,7 @@
icon_state = "shower"
density = 0
anchored = 1
use_power = 0
var/on = 0
var/obj/effect/mist/mymist = null
var/ismist = 0 //needs a var so we can make it linger~
@@ -164,7 +165,7 @@
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>")
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
overlays = null //once it's been on for a while, in addition to handling the water overlay.
overlays.Cut() //once it's been on for a while, in addition to handling the water overlay.
if(mymist)
del(mymist)
+157 -209
View File
@@ -1,123 +1,108 @@
/obj/structure/window
name = "window"
icon = 'icons/obj/structures.dmi'
desc = "A window."
icon = 'icons/obj/structures.dmi'
density = 1
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
var/health = 14.0
var/ini_dir = null
var/state = 0
var/reinf = 0
var/silicate = 0 // number of units of silicate
var/icon/silicateIcon = null // the silicated icon
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
// var/silicate = 0 // number of units of silicate
// var/icon/silicateIcon = null // the silicated icon
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
if(health <=0)
new /obj/item/weapon/shard( src.loc )
new /obj/item/stack/rods( src.loc )
src.density = 0
if(health <= 0)
new /obj/item/weapon/shard(loc)
new /obj/item/stack/rods(loc)
del(src)
return
/obj/structure/window/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
//SN src = null
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
return
if(3.0)
if (prob(50))
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
if(prob(50))
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
return
return
/obj/structure/window/blob_act()
if(reinf) new /obj/item/stack/rods( src.loc)
density = 0
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
/obj/structure/window/meteorhit()
//world << "glass at [x],[y],[z] Mhit"
new /obj/item/weapon/shard( loc )
if(reinf) new /obj/item/stack/rods( loc)
del(src)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if (src.dir == SOUTHWEST || src.dir == SOUTHEAST || src.dir == NORTHWEST || src.dir == NORTHEAST)
return 0 //full tile window, you can't move into it!
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
return 0 //full tile window, you can't move into it!
if(get_dir(loc, target) == dir)
return !density
else
return 1
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
if(istype(O) && O.checkpass(PASSGLASS))
return 1
if (get_dir(O.loc, target) == dir)
if(get_dir(O.loc, target) == dir)
return 0
return 1
/obj/structure/window/meteorhit()
//*****RM
//world << "glass at [x],[y],[z] Mhit"
src.health = 0
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
src.density = 0
del(src)
return
/obj/structure/window/hitby(AM as mob|obj)
..()
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(ismob(AM))
tforce = 40
else
tforce = AM:throwforce
if(reinf) tforce /= 4.0
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.health = max(0, src.health - tforce)
if (src.health <= 7 && !reinf)
src.anchored = 0
else if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf) tforce *= 0.25
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
health = max(0, health - tforce)
if(health <= 7 && !reinf)
anchored = 0
update_nearby_icons()
step(src, get_dir(AM, src))
if (src.health <= 0)
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
src.density = 0
if(health <= 0)
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
return
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
return
//These all need to be rewritten to use visiblemessage()
/obj/structure/window/attack_hand()
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
usr << "\blue You smash through the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
src.density = 0
/obj/structure/window/attack_hand(mob/user as mob)
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
else if (usr.a_intent == "hurt")
playsound(src.loc, 'Glassknock.ogg', 80, 1)
@@ -131,141 +116,112 @@
"You hear a knocking sound.")
return
/obj/structure/window/attack_paw()
if ((HULK in usr.mutations))
usr << "\blue You smash through the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
src.density = 0
/obj/structure/window/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
health -= damage
if(health <= 0)
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
return
/obj/structure/window/attack_alien()
if (istype(usr, /mob/living/carbon/alien/larva))//Safety check for larva. /N
return
usr << "\green You smash against the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes against the window."
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.health -= 15
if(src.health <= 0)
usr << "\green You smash through the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard(src.loc)
if(reinf)
new /obj/item/stack/rods(src.loc)
src.density = 0
del(src)
return
return
else //for nicer text~
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
/obj/structure/window/attack_animal(mob/living/simple_animal/M as mob)
if (M.melee_damage_upper == 0)
return
M << "\green You smash against the window."
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << "\red [M] smashes against the window."
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.health -= M.melee_damage_upper
if(src.health <= 0)
M << "\green You smash through the window."
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << "\red [M] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard(src.loc)
if(reinf)
new /obj/item/stack/rods(src.loc)
src.density = 0
del(src)
return
return
/obj/structure/window/attack_alien(mob/user as mob)
if(islarva(user)) return
attack_generic(user, 15)
/obj/structure/window/attack_metroid()
if(!istype(usr, /mob/living/carbon/metroid/adult))
return
/obj/structure/window/attack_animal(mob/user as mob)
if(!isanimal(user)) return
var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0) return
attack_generic(M, M.melee_damage_upper)
/obj/structure/window/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
attack_generic(user, rand(10, 15))
usr<< "\green You smash against the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes against the window."
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.health -= rand(10,15)
if(src.health <= 0)
usr << "\green You smash through the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard(src.loc)
if(reinf)
new /obj/item/stack/rods(src.loc)
src.density = 0
del(src)
return
return
/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return//I really wish I did not need this
if (istype(W, /obj/item/weapon/screwdriver))
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if (istype(G.affecting, /mob/living))
var/mob/living/M = G.affecting
var/state = G.state
del(W) //gotta delete it here because if window breaks, it won't get deleted
switch (state)
if(1)
M.apply_damage(7)
hit(10)
visible_message("\red [user] slams [M] against \the [src]!")
if(2)
if (prob(50))
M.Weaken(1)
M.apply_damage(10)
hit(25)
visible_message("\red <b>[user] bashes [M] against \the [src]!</b>")
if(3)
M.Weaken(5)
M.apply_damage(20)
hit(50)
visible_message("\red <big><b>[user] crushes [M] against \the [src]!</b></big>")
return
if(istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1)
state = 3 - state
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
usr << ( state==1? "You have unfastened the window from the frame." : "You have fastened the window to the frame." )
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)
anchored = !anchored
update_nearby_icons()
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (src.anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.")
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
else if(!reinf)
src.anchored = !( src.anchored )
anchored = !anchored
update_nearby_icons()
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (src.anchored ? "You have fastened the window to the floor." : "You have unfastened the window.")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <=1)
state = 1-state;
playsound(src.loc, 'sound/items/Crowbar.ogg', 75, 1)
user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.")
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1 - state
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
else
if(W.damtype == BRUTE || W.damtype == BURN)
hit(W.force)
if (src.health <= 7)
src.anchored = 0
if(health <= 7)
anchored = 0
update_nearby_icons()
step(src, get_dir(user, src))
else
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
if(reinf) damage /= 2.0
src.health = max(0, src.health - damage)
if(reinf) damage *= 0.5
health = max(0, health - damage)
if(sound_effect)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
if (src.health <= 0)
if (src.dir == SOUTHWEST)
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(health <= 0)
if(dir == SOUTHWEST)
var/index = null
index = 0
while(index < 2)
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
index++
else
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
src.density = 0
new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods(loc)
del(src)
return
@@ -275,44 +231,39 @@
set category = "Object"
set src in oview(1)
if (src.anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!"
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.dir = turn(src.dir, 90)
updateSilicate()
dir = turn(dir, 90)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
src.ini_dir = src.dir
ini_dir = dir
return
/obj/structure/window/verb/revrotate()
set name = "Rotate Window Clockwise"
set category = "Object"
set src in oview(1)
if (src.anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!"
if(anchored)
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
src.dir = turn(src.dir, 270)
updateSilicate()
dir = turn(dir, 270)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
src.ini_dir = src.dir
ini_dir = dir
return
/*
/obj/structure/window/proc/updateSilicate()
if(silicateIcon && silicate)
src.icon = initial(icon)
icon = initial(icon)
var/icon/I = icon(icon,icon_state,dir)
@@ -322,13 +273,15 @@
I.SetIntensity(r,g,b)
icon = I
silicateIcon = I
*/
/obj/structure/window/New(Loc,re=0)
..()
if(re) reinf = re
src.ini_dir = src.dir
ini_dir = dir
if(reinf)
icon_state = "rwindow"
desc = "A reinforced window."
@@ -345,26 +298,21 @@
return
/obj/structure/window/Del()
density = 0
update_nearby_tiles()
playsound(src, "shatter", 70, 1)
update_nearby_icons()
..()
/obj/structure/window/Move()
update_nearby_tiles(need_rebuild=1)
..()
src.dir = src.ini_dir
dir = ini_dir
update_nearby_tiles(need_rebuild=1)
return
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
/obj/structure/window/proc/update_nearby_tiles(need_rebuild)
@@ -394,7 +342,7 @@
//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()
src.update_icon()
update_icon()
for(var/direction in cardinal)
for(var/obj/structure/window/W in get_step(src,direction) )
W.update_icon()
@@ -406,21 +354,21 @@
//This spawn is here so windows get properly updated when one gets deleted.
spawn(2)
if(!src) return
if (!is_fulltile())
if(!is_fulltile())
return
var/junction = 0 //will be used to determine from which side the window is connected to other windows
if (src.anchored)
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(src.x-W.x)-abs(src.y-W.y) ) //doesn't count windows, placed diagonally to src
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)
src.icon_state = "twindow[junction]"
if(opacity)
icon_state = "twindow[junction]"
else
if (reinf)
src.icon_state = "rwindow[junction]"
if(reinf)
icon_state = "rwindow[junction]"
else
src.icon_state = "window[junction]"
icon_state = "window[junction]"
return
@@ -435,9 +383,9 @@
icon_state = "window"
/obj/structure/window/reinforced
reinf = 1
icon_state = "rwindow"
name = "reinforced window"
icon_state = "rwindow"
reinf = 1
/obj/structure/window/reinforced/tinted
name = "tinted window"
@@ -445,5 +393,5 @@
opacity = 1
/obj/structure/window/reinforced/tinted/frosted
icon_state = "fwindow"
name = "frosted window"
icon_state = "fwindow"