mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//UNTICKED DUE TO BUGGY SHIT
|
||||
|
||||
/obj/effect/biomass
|
||||
icon = 'biomass.dmi'
|
||||
icon_state = "stage1"
|
||||
|
||||
@@ -168,6 +168,10 @@
|
||||
return
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if(istype(O, /obj/screen) || istype(O, /obj/hud)) //fix for HUD elements making their way into the world -Pete
|
||||
return
|
||||
if(O.loc == user)
|
||||
return
|
||||
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
|
||||
return
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
|
||||
@@ -182,7 +186,7 @@
|
||||
return
|
||||
step_towards(O, src.loc)
|
||||
if(user != O)
|
||||
user.show_viewers(text("\red [] stuffs [] into []!", user, O, src))
|
||||
user.show_viewers("\red [user] stuffs [O] into [src]!")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -65,17 +65,17 @@
|
||||
/obj/structure/closet/secure_closet/money_freezer/New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/weapon/spacecash/c1000(src)
|
||||
new /obj/item/weapon/spacecash/c1000(src)
|
||||
new /obj/item/weapon/spacecash/c1000(src)
|
||||
new /obj/item/weapon/spacecash/c500(src)
|
||||
new /obj/item/weapon/spacecash/c500(src)
|
||||
new /obj/item/weapon/spacecash/c500(src)
|
||||
new /obj/item/weapon/spacecash/c500(src)
|
||||
new /obj/item/weapon/spacecash/c500(src)
|
||||
new /obj/item/weapon/spacecash/c200(src)
|
||||
new /obj/item/weapon/spacecash/c200(src)
|
||||
new /obj/item/weapon/spacecash/c200(src)
|
||||
new /obj/item/weapon/spacecash/c200(src)
|
||||
new /obj/item/weapon/spacecash/c200(src)
|
||||
new /obj/item/weapon/money/c1000(src)
|
||||
new /obj/item/weapon/money/c1000(src)
|
||||
new /obj/item/weapon/money/c1000(src)
|
||||
new /obj/item/weapon/money/c500(src)
|
||||
new /obj/item/weapon/money/c500(src)
|
||||
new /obj/item/weapon/money/c500(src)
|
||||
new /obj/item/weapon/money/c500(src)
|
||||
new /obj/item/weapon/money/c500(src)
|
||||
new /obj/item/weapon/money/c200(src)
|
||||
new /obj/item/weapon/money/c200(src)
|
||||
new /obj/item/weapon/money/c200(src)
|
||||
new /obj/item/weapon/money/c200(src)
|
||||
new /obj/item/weapon/money/c200(src)
|
||||
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
/obj/structure/closet/secure_closet/cargotech
|
||||
name = "Cargo Technician's Locker"
|
||||
req_access = list(access_cargo)
|
||||
//icon_state = "secureeng1"
|
||||
//icon_closed = "secureeng"
|
||||
//icon_locked = "secureeng1"
|
||||
//icon_opened = "toolclosetopen"
|
||||
//icon_broken = "secureengbroken"
|
||||
//icon_off = "secureengoff"
|
||||
|
||||
//Needs proper sprites
|
||||
icon_state = "securecargo1"
|
||||
icon_closed = "securecargo"
|
||||
icon_locked = "securecargo1"
|
||||
icon_opened = "securecargoopen"
|
||||
icon_broken = "securecargobroken"
|
||||
icon_off = "securecargooff"
|
||||
|
||||
New()
|
||||
..()
|
||||
sleep(2)
|
||||
new /obj/item/clothing/under/rank/cargotech(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/weapon/cartridge/quartermaster(src)
|
||||
@@ -23,6 +21,12 @@
|
||||
/obj/structure/closet/secure_closet/qm_personal
|
||||
name = "Quartermaster's Locker"
|
||||
req_access = list(access_qm)
|
||||
icon_state = "secureqm1"
|
||||
icon_closed = "secureqm"
|
||||
icon_locked = "secureqm1"
|
||||
icon_opened = "secureqmopen"
|
||||
icon_broken = "secureqmbroken"
|
||||
icon_off = "secureqmoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/obj/structure/closet/secure_closet/engineering_chief
|
||||
name = "Chief Engineer's Locker"
|
||||
req_access = list(access_ce)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_broken = "secureengbroken"
|
||||
icon_off = "secureengoff"
|
||||
icon_state = "securece1"
|
||||
icon_closed = "securece"
|
||||
icon_locked = "securece1"
|
||||
icon_opened = "secureceopen"
|
||||
icon_broken = "securecebroken"
|
||||
icon_off = "secureceoff"
|
||||
|
||||
|
||||
New()
|
||||
@@ -99,7 +99,7 @@
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
icon_opened = "toolclosetopen"
|
||||
icon_opened = "secureengopen"
|
||||
icon_broken = "secureengbroken"
|
||||
icon_off = "secureengoff"
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/doctor_personal
|
||||
name = "Doctor's Locker"
|
||||
name = "Medical Doctor's Locker"
|
||||
req_access = list(access_medical)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
@@ -185,12 +185,12 @@
|
||||
/obj/structure/closet/secure_closet/chemical
|
||||
name = "Chemical Closet"
|
||||
desc = "Store dangerous chemicals in here."
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
icon_opened = "securemedopen"
|
||||
icon_broken = "securemedbroken"
|
||||
icon_off = "securemedoff"
|
||||
icon_state = "medical1"
|
||||
icon_closed = "medical"
|
||||
icon_locked = "medical1"
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(access_medical)
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
..()
|
||||
spawn(4)
|
||||
contents = list()
|
||||
new /obj/item/weapon/storage/backpack/satchel( src )
|
||||
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/device/radio/headset( src )
|
||||
return
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "Research Director"
|
||||
name = "Research Director's Locker"
|
||||
req_access = list(access_rd)
|
||||
icon_state = "rdsecure1"
|
||||
icon_closed = "rdsecure"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/captains
|
||||
name = "Captain's Closet"
|
||||
name = "Captain's Locker"
|
||||
req_access = list(access_captain)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hop
|
||||
name = "Head of Personnel"
|
||||
name = "Head of Personnel's Locker"
|
||||
req_access = list(access_hop)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
icon_locked = "capsecure1"
|
||||
icon_opened = "capsecureopen"
|
||||
icon_broken = "capsecurebroken"
|
||||
icon_off = "capsecureoff"
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
icon_opened = "hopsecureopen"
|
||||
icon_broken = "hopsecurebroken"
|
||||
icon_off = "hopsecureoff"
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/hos
|
||||
name = "Head Of Security"
|
||||
name = "Head of Security's Locker"
|
||||
req_access = list(access_hos)
|
||||
icon_state = "hossecure1"
|
||||
icon_closed = "hossecure"
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "Security Locker"
|
||||
name = "Security Officer's Locker"
|
||||
req_access = list(access_security)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
|
||||
/obj/structure/closet/secure_closet/detective
|
||||
name = "Detective"
|
||||
name = "Detective's Cabinet"
|
||||
req_access = list(access_forensics_lockers)
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
|
||||
@@ -146,6 +146,27 @@ obj/structure/closet/wardrobe/hop/New()
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
return
|
||||
|
||||
/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/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)
|
||||
return
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/genetics_white/New()
|
||||
new /obj/item/clothing/under/rank/geneticist(src)
|
||||
@@ -158,6 +179,20 @@ obj/structure/closet/wardrobe/hop/New()
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
new /obj/item/clothing/suit/storage/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/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
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/shoes/white(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/grey/New()
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
new /obj/item/clothing/under/color/grey(src)
|
||||
@@ -194,16 +229,6 @@ obj/structure/closet/wardrobe/hop/New()
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/chemistry_white/New()
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/under/rank/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/suit/storage/labcoat/chemist(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
|
||||
/obj/structure/closet/wardrobe/medic_white/New()
|
||||
new /obj/item/clothing/under/rank/medical(src)
|
||||
@@ -331,15 +356,3 @@ obj/structure/closet/wardrobe/hop/New()
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
|
||||
/obj/structure/closet/wardrobe/virology_white/New()
|
||||
new /obj/item/clothing/suit/storage/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/under/rank/virologist(src)
|
||||
new /obj/item/clothing/under/rank/virologist(src)
|
||||
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/shoes/white(src)
|
||||
@@ -542,7 +542,7 @@
|
||||
return
|
||||
|
||||
tnote += "<i><b>→ To [P.owner]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a>:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
|
||||
|
||||
// Give every ghost the ability to see all messages
|
||||
for (var/mob/dead/observer/G in world)
|
||||
@@ -559,6 +559,9 @@
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
O.show_message(text("\icon[P] *[P.ttone]*"))
|
||||
if( P.loc && ishuman(P.loc) )
|
||||
var/mob/living/carbon/human/H = P.loc
|
||||
H << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
|
||||
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
@@ -709,7 +712,7 @@
|
||||
honkamt--
|
||||
playsound(loc, 'bikehorn.ogg', 30, 1)
|
||||
|
||||
if(U.machine == src && !href_list["pAI_mess"])//Final safety.
|
||||
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
|
||||
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
|
||||
else
|
||||
U.machine = null
|
||||
|
||||
@@ -466,7 +466,7 @@ Code:
|
||||
|
||||
else
|
||||
for(var/obj/machinery/bot/mulebot/B in QC.botlist)
|
||||
menu += "<A href='byond://?src=\ref[QC];op=control;bot=\ref[B]'>[B] at [B.loc.loc]</A><BR>"
|
||||
menu += "<A href='byond://?src=\ref[QC];op=control;bot=\ref[B]'>[B] at [get_area(B)]</A><BR>"
|
||||
|
||||
menu += "<BR><A href='byond://?src=\ref[QC];op=scanbots'><img src=pda_scanner.png> Scan for active bots</A><BR>"
|
||||
|
||||
|
||||
@@ -75,6 +75,11 @@
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
if(ishuman(M) && ishuman(user) && M.stat!=DEAD)
|
||||
// kill all memes
|
||||
for(var/mob/living/parasite/meme/P in M:parasites)
|
||||
P << "\red <b>The bright flash is unbearable.. You lose consciousness and fade away..</b>"
|
||||
P.death()
|
||||
|
||||
if(user.mind && user.mind in ticker.mode.head_revolutionaries)
|
||||
var/revsafe = 0
|
||||
for(var/obj/item/weapon/implant/loyalty/L in M)
|
||||
|
||||
@@ -164,6 +164,32 @@
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
|
||||
//RIG helmet light
|
||||
/obj/item/clothing/head/helmet/space/rig/attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
on = !on
|
||||
icon_state = "rig[on]-[color]"
|
||||
item_state = "rig[on]-[color]"
|
||||
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
else
|
||||
user.total_luminosity -= brightness_on
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/pickup(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(0)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/dropped(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity -= brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
|
||||
/obj/item/device/flashlight/lamp/verb/toggle_light()
|
||||
set name = "Toggle light"
|
||||
set category = "Object"
|
||||
|
||||
@@ -72,30 +72,48 @@ obj/structure/door_assembly
|
||||
door_assembly_min
|
||||
name = "Mining Airlock Assembly"
|
||||
icon_state = "door_as_min1"
|
||||
glass_base_icon_state = "door_as_gmin"
|
||||
glass_type = /obj/machinery/door/airlock/glass/glass_mining
|
||||
airlock_type = /obj/machinery/door/airlock/mining
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gmin1"
|
||||
|
||||
door_assembly_atmo
|
||||
name = "Atmospherics Airlock Assembly"
|
||||
icon_state = "door_as_atmo1"
|
||||
glass_base_icon_state = "door_as_gatmo"
|
||||
glass_type = /obj/machinery/door/airlock/glass/glass_atmos
|
||||
airlock_type = /obj/machinery/door/airlock/atmos
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gatmo1"
|
||||
|
||||
door_assembly_research
|
||||
name = "Research Airlock Assembly"
|
||||
icon_state = "door_as_res1"
|
||||
glass_base_icon_state = "door_as_gres"
|
||||
glass_type = /obj/machinery/door/airlock/glass/glass_research
|
||||
airlock_type = /obj/machinery/door/airlock/research
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
icon_state = "door_as_gres1"
|
||||
|
||||
door_assembly_med
|
||||
name = "Medical Airlock Assembly"
|
||||
icon_state = "door_as_med1"
|
||||
@@ -243,6 +261,8 @@ obj/structure/door_assembly
|
||||
del(src)
|
||||
else
|
||||
W.loc = src.loc
|
||||
|
||||
//del(W)
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && state == 2 )
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
var/turf/T = get_turf(user)
|
||||
@@ -266,7 +286,7 @@ obj/structure/door_assembly
|
||||
if(do_after(user, 40))
|
||||
if(G)
|
||||
if(G.amount>=1)
|
||||
user << "\blue You installed glass windows into the airlock assembly!"
|
||||
user << "\blue You installed glass windows the airlock assembly!"
|
||||
G.use(1)
|
||||
src.glass = 1
|
||||
src.name = "Near finished Window Airlock Assembly"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
|
||||
user.drop_item()
|
||||
src.layer = 5
|
||||
user.update_clothing()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -123,6 +124,7 @@
|
||||
|
||||
if (!safety)
|
||||
if (src.reagents.total_volume < 1)
|
||||
usr << "\red the [src] is empty."
|
||||
return
|
||||
|
||||
if (world.time < src.last_use + 20)
|
||||
@@ -134,6 +136,28 @@
|
||||
|
||||
var/direction = get_dir(src,target)
|
||||
|
||||
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
|
||||
spawn(0)
|
||||
var/obj/B = usr.buckled
|
||||
var/movementdirection = turn(direction,180)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
|
||||
@@ -396,6 +396,12 @@ THERMAL GLASSES
|
||||
else if(src.icon_state == "labcoat_cdc")
|
||||
src.icon_state = "labcoat_cdc_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else if(src.icon_state == "fr_jacket_open")
|
||||
src.icon_state = "fr_jacket"
|
||||
usr << "You button up the labcoat."
|
||||
else if(src.icon_state == "fr_jacket")
|
||||
src.icon_state = "fr_jacket_open"
|
||||
usr << "You unbutton the labcoat."
|
||||
else
|
||||
usr << "Sorry! The suit you're wearing doesn't have buttons!"
|
||||
usr.update_clothing()
|
||||
|
||||
@@ -70,6 +70,41 @@
|
||||
|
||||
src.loc = T
|
||||
|
||||
|
||||
obj/item/verb/pick_up()
|
||||
set name = "Pick Up"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!(usr))
|
||||
return
|
||||
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
|
||||
usr << "\red You can't pick things up!"
|
||||
return
|
||||
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
|
||||
usr << "\red You can't pick things up!"
|
||||
return
|
||||
if(src.anchored) //Object isn't anchored
|
||||
usr << "\red You can't pick that up!"
|
||||
return
|
||||
if(!usr.hand && usr.r_hand) //Right hand is not full
|
||||
usr << "\red Your right hand is full."
|
||||
return
|
||||
if(usr.hand && usr.l_hand) //Left hand is not full
|
||||
usr << "\red Your left hand is full."
|
||||
return
|
||||
if(!istype(src.loc, /turf)) //Object is on a turf
|
||||
usr << "\red You can't pick that up!"
|
||||
return
|
||||
//All checks are done, time to pick it up!
|
||||
if(istype(usr, /mob/living/carbon/human))
|
||||
src.attack_hand(usr)
|
||||
if(istype(usr, /mob/living/carbon/alien))
|
||||
src.attack_alien(usr)
|
||||
if(istype(usr, /mob/living/carbon/monkey))
|
||||
src.attack_paw(usr)
|
||||
return
|
||||
|
||||
/obj/item/examine()
|
||||
set src in view()
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ RSF
|
||||
if (istype(A, /obj/structure/table) && matter >= 1)
|
||||
user << "Dispensing Dosh..."
|
||||
playsound(src.loc, 'click.ogg', 10, 1)
|
||||
new /obj/item/weapon/spacecash/c10( A.loc )
|
||||
new /obj/item/weapon/money/c10( A.loc )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
@@ -70,7 +70,7 @@ RSF
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
user << "Dispensing Dosh..."
|
||||
playsound(src.loc, 'click.ogg', 10, 1)
|
||||
new /obj/item/weapon/spacecash/c10( A )
|
||||
new /obj/item/weapon/money/c10( A )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/obj/item/weapon/implant
|
||||
name = "implant"
|
||||
desc = "An implant. Not usually seen outside a body."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "implant"
|
||||
var
|
||||
implanted = null
|
||||
mob/imp_in = null
|
||||
@@ -16,15 +19,24 @@
|
||||
trigger(emote, source as mob)
|
||||
return
|
||||
|
||||
|
||||
activate()
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(I, /obj/item/weapon/implanter))
|
||||
if (I:imp)
|
||||
return
|
||||
else
|
||||
src.loc = I
|
||||
I:imp = src
|
||||
// del(src)
|
||||
I:update()
|
||||
return
|
||||
|
||||
implanted(source as mob)
|
||||
return
|
||||
|
||||
|
||||
get_data()
|
||||
return "No information available"
|
||||
|
||||
@@ -34,8 +46,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/implant/uplink
|
||||
name = "uplink"
|
||||
desc = "Summon things."
|
||||
name = "uplink implant"
|
||||
desc = "A micro-telecrystal implant which allows for instant transportation of equipment."
|
||||
var
|
||||
activation_emote = "chuckle"
|
||||
obj/item/device/uplink/radio/uplink = null
|
||||
@@ -63,8 +75,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/implant/tracking
|
||||
name = "tracking"
|
||||
desc = "Track with this."
|
||||
name = "tracking implant"
|
||||
desc = "An implant which relays information to the appropriate tracking computer."
|
||||
var
|
||||
id = 1.0
|
||||
|
||||
@@ -89,8 +101,8 @@ Implant Specifics:<BR>"}
|
||||
|
||||
//Nuke Agent Explosive
|
||||
/obj/item/weapon/implant/dexplosive
|
||||
name = "explosive"
|
||||
desc = "And boom goes the weasel."
|
||||
name = "explosive implant"
|
||||
desc = "A military grade micro bio-explosive. Highly dangerous."
|
||||
var/activation_emote = "deathgasp"
|
||||
var/coded = 0
|
||||
|
||||
@@ -140,8 +152,8 @@ Implant Specifics:<BR>"}
|
||||
|
||||
|
||||
/obj/item/weapon/implant/chem
|
||||
name = "chem"
|
||||
desc = "Injects things."
|
||||
name = "chemical implant"
|
||||
desc = "A micro-injector that can be triggered remotely."
|
||||
allow_reagents = 1
|
||||
|
||||
get_data()
|
||||
@@ -190,8 +202,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
|
||||
|
||||
/obj/item/weapon/implant/loyalty
|
||||
name = "loyalty"
|
||||
desc = "Makes you loyal or such."
|
||||
name = "loyalty implant"
|
||||
desc = "An implant which contains a small pod of nanobots which manipulate host mental functions to induce loyalty."
|
||||
|
||||
get_data()
|
||||
var/dat = {"
|
||||
@@ -220,8 +232,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
|
||||
//BS12 Explosive
|
||||
/obj/item/weapon/implant/explosive
|
||||
name = "explosive"
|
||||
desc = "And boom goes the weasel."
|
||||
name = "explosive implant"
|
||||
desc = "A military grade micro bio-explosive. Highly dangerous."
|
||||
var/phrase = "supercalifragilisticexpialidocious"
|
||||
|
||||
|
||||
@@ -263,8 +275,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
|
||||
|
||||
/obj/item/weapon/implant/death_alarm
|
||||
name = "death alarm"
|
||||
desc = "Danger Will Robinson!"
|
||||
name = "death alarm implant"
|
||||
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
|
||||
var/mobname = "Will Robinson"
|
||||
|
||||
get_data()
|
||||
@@ -302,7 +314,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
|
||||
/obj/item/weapon/implant/compressed
|
||||
name = "compressed matter implant"
|
||||
desc = "*fwooomp*"
|
||||
desc = "Based on compressed matter technology, can store a single item."
|
||||
var/activation_emote = "sigh"
|
||||
var/obj/item/scanned = null
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ MEDICAL
|
||||
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
|
||||
affecting = M:get_organ("head")
|
||||
if(affecting.destroyed && !affecting.gauzed)
|
||||
user.visible_message("\red You do your best to stop the bleeding from [M]'s stump.", "\red [user] does [user.gender == MALE? "his" : "her"] best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You hear something like gauze being ripped.")
|
||||
user.visible_message("\red [user] does [user.gender == MALE? "his" : "her"] best to stem [M]'s bleeding from [M.gender == MALE? "his" : "her"] stump.", "\red You do your best to stop the bleeding from [M]'s stump.", "\red You hear something like gauze being ripped.")
|
||||
affecting.gauzed = 1
|
||||
use(1)
|
||||
return
|
||||
|
||||
@@ -55,14 +55,15 @@
|
||||
S.attachable = 0
|
||||
S.destroyed = 0
|
||||
S.robot = 1
|
||||
var/datum/organ/external/T = H.organs[limbloc]
|
||||
var/datum/organ/external/T = H.organs["[limbloc]"]
|
||||
T.attachable = 0
|
||||
T.destroyed = 0
|
||||
T.broken = 0
|
||||
T.robot = 1
|
||||
del(src)
|
||||
M.update_body()
|
||||
M.updatehealth()
|
||||
M.UpdateDamageIcon()
|
||||
del(src)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
return 0
|
||||
@@ -569,8 +569,48 @@ CIRCULAR SAW
|
||||
return 0
|
||||
|
||||
if(!S.bleeding)
|
||||
user << "\red [H] is not bleeding in \his [S.display_name]!"
|
||||
return 0
|
||||
if(S.implant)
|
||||
if(H != user)
|
||||
H.visible_message( \
|
||||
"\red [user] is attempting to remove the implant in [H]'s [S.display_name] with \the [src].", \
|
||||
"\red [user] attempts to remove the implant in your [S.display_name] with \the [src]!")
|
||||
else
|
||||
H.visible_message( \
|
||||
"\red [user] attempts to remove the implant in \his [S.display_name] with \the [src]!", \
|
||||
"\red You attempt to remove the implant in your [S.display_name] with \the [src]!")
|
||||
|
||||
if(do_mob(user, H, 50))
|
||||
if(prob(50))
|
||||
if(H != user)
|
||||
H.visible_message( \
|
||||
"\red [user] successfully removes the implant in [H]'s [S.display_name] with \the [src]!", \
|
||||
"\red [user] successfully removes the implant in your [S.display_name] with \the [src]!")
|
||||
else
|
||||
H.visible_message( \
|
||||
"\red [user] successfully removes the implant in \his [S.display_name] with \the [src]!", \
|
||||
"\red You successfully remove the implant in your [S.display_name] with \the [src]!")
|
||||
for(var/obj/item/weapon/implant/implant in S.implant)
|
||||
implant.loc = (get_turf(H))
|
||||
implant.implanted = 0
|
||||
S.implant = null
|
||||
playsound(user, 'squelch1.ogg', 50, 1)
|
||||
if(istype(implant, /obj/item/weapon/implant/explosive) || istype(implant, /obj/item/weapon/implant/uplink) || istype(implant, /obj/item/weapon/implant/dexplosive) || istype(implant, /obj/item/weapon/implant/explosive) || istype(implant, /obj/item/weapon/implant/compressed))
|
||||
usr << "The implant disintegrates into nothing..."
|
||||
del(implant)
|
||||
else
|
||||
if(H != user)
|
||||
H.visible_message( \
|
||||
"\red [user] fails to removes the implant!", \
|
||||
"\red [user] fails to removes the implant!")
|
||||
else
|
||||
H.visible_message( \
|
||||
"\red [user] fails to removes the implant!", \
|
||||
"\red You fail to removes the implant!")
|
||||
|
||||
return 1
|
||||
else
|
||||
user << "\red [H] is not bleeding in \his [S.display_name]!"
|
||||
return 0
|
||||
|
||||
if(H != user)
|
||||
H.visible_message( \
|
||||
|
||||
@@ -729,10 +729,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/proc/config(op)
|
||||
for (var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
if(radio_controller)
|
||||
for (var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
secure_radio_connections = new
|
||||
channels = op
|
||||
for (var/ch_name in op)
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
if(radio_controller)
|
||||
for (var/ch_name in op)
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
return
|
||||
|
||||
@@ -79,18 +79,25 @@
|
||||
src.closer.screen_loc = text("[],[]", mx, my)
|
||||
return
|
||||
|
||||
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
|
||||
//This proc draws out the inventory and places the items on it. It uses the standard position.
|
||||
/obj/item/weapon/secstorage/proc/standard_orient_objs()
|
||||
var/rows = 0
|
||||
var/cols = 6
|
||||
var/cx = 4
|
||||
var/cy = 2+rows
|
||||
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = text("[cx]:16,[cy]:16")
|
||||
O.layer = 20
|
||||
cx++
|
||||
if (cx > (4+cols))
|
||||
cx = 4
|
||||
cy--
|
||||
src.closer.screen_loc = text("11:16,2:16")
|
||||
return
|
||||
|
||||
if (src == user.l_hand)
|
||||
src.orient_objs(3, 11, 3, 4)
|
||||
else
|
||||
if (src == user.r_hand)
|
||||
src.orient_objs(1, 11, 1, 4)
|
||||
else
|
||||
if (src == user.back)
|
||||
src.orient_objs(4, 10, 4, 3)
|
||||
else
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
/obj/item/weapon/secstorage/proc/orient2hud(mob/user as mob)
|
||||
standard_orient_objs()
|
||||
return
|
||||
|
||||
/obj/item/weapon/secstorage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -160,7 +167,7 @@
|
||||
|
||||
/obj/item/weapon/secstorage/dropped(mob/user as mob)
|
||||
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
standard_orient_objs()
|
||||
return
|
||||
|
||||
/obj/item/weapon/secstorage/MouseDrop(over_object, src_location, over_location)
|
||||
@@ -168,6 +175,7 @@
|
||||
if (src.locked == 1)
|
||||
return
|
||||
|
||||
orient2hud(usr)
|
||||
if ((over_object == usr && ((get_dist(src, usr) <= 1 ||src.locked == 0) || usr.contents.Find(src)))) //|| usr.telekinesis == 1
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
@@ -258,6 +266,6 @@
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
spawn( 5 )
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
standard_orient_objs()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
New()
|
||||
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay"))
|
||||
ChangeSign(pick("pinkflamingo", "magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thedamnwall", "thecavern", "cindikate", "theorchard", "thesaucyclown", "theclownshead"))
|
||||
return
|
||||
proc/ChangeSign(var/Text)
|
||||
src.icon_state = "[Text]"
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
"You hear metal clanking")
|
||||
else
|
||||
buckled_mob.visible_message(\
|
||||
"\blue [buckled_mob.name] unbuckled himself!",\
|
||||
"\blue [buckled_mob.name] unbuckles!",\
|
||||
"You unbuckle yourself from [src].",\
|
||||
"You hear metal clanking")
|
||||
unbuckle()
|
||||
@@ -118,6 +118,8 @@
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/chair/New()
|
||||
if(anchored)
|
||||
src.verbs -= /atom/movable/verb/pull
|
||||
if(src.dir == NORTH)
|
||||
src.layer = FLY_LAYER
|
||||
..()
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
/obj/item/weapon/storage/backpack/MouseDrop(obj/over_object as obj)
|
||||
|
||||
// if (src.loc != usr)
|
||||
// return
|
||||
// if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
|
||||
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
var/mob/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
|
||||
@@ -37,17 +37,6 @@
|
||||
return
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(src.loc == user)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility
|
||||
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
|
||||
new /obj/item/weapon/spacecash(src)
|
||||
new /obj/item/weapon/spacecash(src)
|
||||
new /obj/item/weapon/spacecash(src)
|
||||
new /obj/item/weapon/money(src)
|
||||
new /obj/item/weapon/money(src)
|
||||
new /obj/item/weapon/money(src)
|
||||
|
||||
/obj/item/weapon/storage/bible/tajaran/New()
|
||||
..()
|
||||
|
||||
+164
-224
@@ -1,221 +1,11 @@
|
||||
|
||||
/obj/item/clothing/suit/storage
|
||||
var/obj/screen/storage/boxes
|
||||
var/obj/screen/close/closer
|
||||
var/obj/slot1
|
||||
var/obj/slot2
|
||||
|
||||
/obj/item/clothing/suit/storage/New()
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 9,7"
|
||||
src.boxes.layer = 19
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
src.closer.screen_loc = "9,7"
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/view_inv(mob/user as mob)
|
||||
if(!user.client)
|
||||
return
|
||||
user.client.screen += src.boxes
|
||||
user.client.screen += src.closer
|
||||
user.client.screen += src.contents
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/close(mob/user as mob)
|
||||
if(!user.client)
|
||||
return
|
||||
user.client.screen -= src.boxes
|
||||
user.client.screen -= src.closer
|
||||
user.client.screen -= src.contents
|
||||
|
||||
/obj/item/clothing/suit/storage/MouseDrop(atom/over_object)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
src.view_inv(M)
|
||||
src.orient_objs(7,7,9,7)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.w_class > 2 || src.loc == W )
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
|
||||
return
|
||||
if(src.contents.len >= 2)
|
||||
user << "\red There's nowhere to place that!"
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
else if(user.s_active == src)
|
||||
close(user)
|
||||
view_inv(user)
|
||||
orient2hud(user)
|
||||
W.dropped(user)
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
|
||||
if (src == user.l_hand)
|
||||
src.orient_objs(3, 4, 3, 3)
|
||||
else if (src == user.r_hand)
|
||||
src.orient_objs(1, 4, 1, 3)
|
||||
else if (istype(user,/mob/living/carbon/human) && src == user:wear_suit)
|
||||
src.orient_objs(1, 3, 2, 3)
|
||||
else
|
||||
src.orient_objs(4, 3, 4, 2)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
var/cx = tx
|
||||
var/cy = ty
|
||||
src.boxes.screen_loc = "[tx],[ty] to [mx],[my]"
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = "[cx],[cy]"
|
||||
O.layer = 20
|
||||
cx++
|
||||
if (cx > mx)
|
||||
cx = tx
|
||||
cy--
|
||||
src.closer.screen_loc = "[mx+1],[my]"
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/show_to(mob/user as mob)
|
||||
for(var/obj/item/weapon/mousetrap/MT in src)
|
||||
if(MT.armed)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == user)
|
||||
user.show_message(text("\red <B>You reach into the [src.name], but there was a live mousetrap in there!</B>"), 1)
|
||||
else
|
||||
user.show_message(text("\red <B>[user] reaches into the [src.name] and sets off a hidden mousetrap!</B>"), 1)
|
||||
MT.loc = user.loc
|
||||
MT.triggered(user, user.hand ? "l_hand" : "r_hand")
|
||||
MT.layer = OBJ_LAYER
|
||||
return
|
||||
user.client.screen -= src.boxes
|
||||
user.client.screen -= src.closer
|
||||
user.client.screen -= src.contents
|
||||
user.client.screen += src.boxes
|
||||
user.client.screen += src.closer
|
||||
user.client.screen += src.contents
|
||||
user.s_active = src
|
||||
return
|
||||
|
||||
/*/obj/item/clothing/suit/storage/New()
|
||||
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 10,8"
|
||||
src.boxes.layer = 19
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
spawn( 5 )
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(can_hold.len)
|
||||
var/ok = 0
|
||||
for(var/A in can_hold)
|
||||
if(istype(W, text2path(A) )) ok = 1
|
||||
if(!ok)
|
||||
user << "\red This container cannot hold [W]."
|
||||
return
|
||||
|
||||
if (src.contents.len >= 7)
|
||||
return
|
||||
if ((W.w_class >= 3 || istype(W, /obj/item/weapon/storage) || src.loc == W))
|
||||
return
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue [] has added [] to []!", user, W, src), 1)
|
||||
//Foreach goto(139)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/dropped(mob/user as mob)
|
||||
src.orient_objs(7, 8, 10, 7)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
//Foreach goto(76)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
|
||||
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
|
||||
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
|
||||
var/max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item.
|
||||
var/storage_slots = 2 //The number of storage slots in this container.
|
||||
var/obj/screen/storage/boxes = null
|
||||
var/obj/screen/close/closer = null
|
||||
|
||||
/obj/item/clothing/suit/storage/proc/return_inv()
|
||||
|
||||
@@ -267,19 +57,169 @@
|
||||
user.s_active = null
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
|
||||
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
|
||||
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
|
||||
/obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
var/cx = tx
|
||||
var/cy = ty
|
||||
src.boxes.screen_loc = text("[],[] to [],[]", tx, ty, mx, my)
|
||||
src.boxes.screen_loc = text("[tx]:,[ty] to [mx],[my]")
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = text("[],[]", cx, cy)
|
||||
O.screen_loc = text("[cx],[cy]")
|
||||
O.layer = 20
|
||||
cx++
|
||||
if (cx > mx)
|
||||
cx = tx
|
||||
cy--
|
||||
//Foreach goto(56)
|
||||
src.closer.screen_loc = text("[],[]", mx, my)
|
||||
src.closer.screen_loc = text("[mx+1],[my]")
|
||||
return
|
||||
*/
|
||||
|
||||
//This proc draws out the inventory and places the items on it. It uses the standard position.
|
||||
/obj/item/clothing/suit/storage/proc/standard_orient_objs(var/rows,var/cols)
|
||||
var/cx = 4
|
||||
var/cy = 2+rows
|
||||
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = text("[cx]:16,[cy]:16")
|
||||
O.layer = 20
|
||||
cx++
|
||||
if (cx > (4+cols))
|
||||
cx = 4
|
||||
cy--
|
||||
src.closer.screen_loc = text("[4+cols+1]:16,2:16")
|
||||
return
|
||||
|
||||
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
|
||||
/obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob)
|
||||
//var/mob/living/carbon/human/H = user
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (contents.len > 7)
|
||||
row_num = round((contents.len-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num,col_count)
|
||||
return
|
||||
|
||||
//This proc is called when you want to place an item into the storage item.
|
||||
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
|
||||
return
|
||||
|
||||
..()
|
||||
if(isrobot(user))
|
||||
user << "\blue You're a robot. No."
|
||||
return //Robots can't interact with storage items.
|
||||
|
||||
if(src.loc == W)
|
||||
return //Means the item is already in the storage item
|
||||
|
||||
if(contents.len >= storage_slots)
|
||||
user << "\red The [src] is full, make some space."
|
||||
return //Storage item is full
|
||||
|
||||
if(can_hold.len)
|
||||
var/ok = 0
|
||||
for(var/A in can_hold)
|
||||
if(istype(W, text2path(A) ))
|
||||
ok = 1
|
||||
break
|
||||
if(!ok)
|
||||
user << "\red This [src] cannot hold [W]."
|
||||
return
|
||||
|
||||
for(var/A in cant_hold) //Check for specific items which this container can't hold.
|
||||
if(istype(W, text2path(A) ))
|
||||
user << "\red This [src] cannot hold [W]."
|
||||
return
|
||||
|
||||
if (W.w_class > max_w_class)
|
||||
user << "\red This [W] is too big for \the [src]"
|
||||
return
|
||||
|
||||
var/sum_w_class = W.w_class
|
||||
for(var/obj/item/I in contents)
|
||||
sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
|
||||
|
||||
if(sum_w_class > max_combined_w_class)
|
||||
user << "\red The [src] is full, make some space."
|
||||
return
|
||||
|
||||
if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage)))
|
||||
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
|
||||
user << "\red The [src] cannot hold [W] as it's a storage item of the same size."
|
||||
return //To prevent the stacking of the same sized items.
|
||||
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
if ((user.client && user.s_active != src))
|
||||
user.client.screen -= W
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/dropped(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/MouseDrop(atom/over_object)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src))
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_hand ))
|
||||
M.u_equip(src)
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_paw(mob/user as mob)
|
||||
//playsound(src.loc, "rustle", 50, 1, -5) // what
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
src.orient2hud(user)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/storage/New()
|
||||
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 10,8"
|
||||
src.boxes.layer = 19
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
orient2hud()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/emp_act(severity)
|
||||
if(!istype(src.loc, /mob/living))
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
@@ -206,12 +206,6 @@
|
||||
..()
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
new /obj/item/clothing/suit/radiation(src)
|
||||
new /obj/item/clothing/head/radiation(src)
|
||||
|
||||
/obj/structure/closet/crate/open()
|
||||
playsound(src.loc, 'click.ogg', 15, 1, -3)
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
return
|
||||
|
||||
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
|
||||
//The numbers are calculated from the bottom-left (Right hand slot on the map) being 1,1.
|
||||
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
|
||||
/obj/item/weapon/storage/proc/orient_objs(tx, ty, mx, my)
|
||||
var/cx = tx
|
||||
var/cy = ty
|
||||
src.boxes.screen_loc = text("[tx],[ty] to [mx],[my]")
|
||||
src.boxes.screen_loc = text("[tx]:,[ty] to [mx],[my]")
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = text("[cx],[cy]")
|
||||
O.layer = 20
|
||||
@@ -77,23 +77,29 @@
|
||||
src.closer.screen_loc = text("[mx+1],[my]")
|
||||
return
|
||||
|
||||
//This proc draws out the inventory and places the items on it. It uses the standard position.
|
||||
/obj/item/weapon/storage/proc/standard_orient_objs(var/rows,var/cols)
|
||||
var/cx = 4
|
||||
var/cy = 2+rows
|
||||
src.boxes.screen_loc = text("4:16,2:16 to [4+cols]:16,[2+rows]:16")
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = text("[cx]:16,[cy]:16")
|
||||
O.layer = 20
|
||||
cx++
|
||||
if (cx > (4+cols))
|
||||
cx = 4
|
||||
cy--
|
||||
src.closer.screen_loc = text("[4+cols+1]:16,2:16")
|
||||
return
|
||||
|
||||
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
|
||||
/obj/item/weapon/storage/proc/orient2hud(mob/user as mob)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/col_num = 0
|
||||
var/row_count = min(7,storage_slots) -1 //For belts, the meanings of the two variables are inverted, so we don't have to declare new ones
|
||||
//var/mob/living/carbon/human/H = user
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (contents.len > 7)
|
||||
col_num = round((contents.len-1) / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
|
||||
if (src == user.l_hand)
|
||||
src.orient_objs(3-col_num, 3+row_count, 3, 3)
|
||||
else if(src == user.r_hand)
|
||||
src.orient_objs(1, 3+row_count, 1+col_num, 3)
|
||||
else if(src == user.back)
|
||||
src.orient_objs(4-col_num, 3+row_count, 4, 3)
|
||||
else if(istype(user, /mob/living/carbon/human) && src == H.belt)//only humans have belts
|
||||
src.orient_objs(1, 3+col_num, 1+row_count, 3)
|
||||
else
|
||||
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
|
||||
row_num = round((contents.len-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num,col_count)
|
||||
return
|
||||
|
||||
//This proc is called when you want to place an item into the storage item.
|
||||
@@ -129,7 +135,7 @@
|
||||
return
|
||||
|
||||
if (W.w_class > max_w_class)
|
||||
user << "\red This [W] is too big for this [src]"
|
||||
user << "\red This [W] is too big for \the [src]"
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/tray))
|
||||
@@ -186,15 +192,11 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/dropped(mob/user as mob)
|
||||
var/col_num = 0
|
||||
var/row_count = min(7,storage_slots) -1
|
||||
if (contents.len > 7)
|
||||
col_num = round((contents.len-1) / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
|
||||
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
orient2hud(usr)
|
||||
if ((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
@@ -207,6 +209,19 @@
|
||||
|
||||
/obj/item/weapon/storage/attack_hand(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.l_store == src && !H.get_active_hand())
|
||||
H.put_in_hand(src)
|
||||
H.l_store = null
|
||||
return
|
||||
if(H.r_store == src && !H.get_active_hand())
|
||||
H.put_in_hand(src)
|
||||
H.r_store = null
|
||||
return
|
||||
|
||||
src.orient2hud(user)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
@@ -216,7 +231,6 @@
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
@@ -232,14 +246,7 @@
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
spawn( 5 )
|
||||
var/col_num = 0
|
||||
var/row_count = min(7,storage_slots) -1
|
||||
if (contents.len > 7)
|
||||
if(contents.len % 7)
|
||||
col_num = round(contents.len / 7) // 7 is the maximum allowed column height for r_hand, l_hand and back storage items.
|
||||
src.orient_objs(5, 10+col_num, 5 + row_count, 10)
|
||||
return
|
||||
orient2hud()
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/emp_act(severity)
|
||||
@@ -430,4 +437,4 @@
|
||||
..()
|
||||
return
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -189,6 +189,7 @@ TABLE AND RACK OBJECT INTERATIONS
|
||||
"\red You hear the nauseating crunch of bone and gristle on solid metal.")
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
H.update_clothing()
|
||||
playsound(src.loc, 'tablehit1.ogg', 50, 1, -3)
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
|
||||
@@ -40,27 +40,94 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/on = 0
|
||||
var/mist = 0 //needs a var so we can make it linger~
|
||||
var/obj/effect/mist/mymist = null
|
||||
var/ismist = 0 //needs a var so we can make it linger~
|
||||
|
||||
//add heat controls? when emagged, you can freeze to death in it?
|
||||
|
||||
/obj/structure/shower/attack_hand()
|
||||
/obj/effect/mist
|
||||
name = "mist"
|
||||
icon = 'watercloset.dmi'
|
||||
icon_state = "mist"
|
||||
layer = MOB_LAYER + 1
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/structure/shower/attack_hand(mob/M as mob)
|
||||
on = !on
|
||||
update_icon()
|
||||
if(on && M.loc == loc)
|
||||
wash(M)
|
||||
|
||||
/obj/structure/shower/attackby(mob/M as mob)
|
||||
attack_hand(M)
|
||||
|
||||
/obj/structure/shower/update_icon()
|
||||
overlays = null
|
||||
if(mymist)
|
||||
del(mymist)
|
||||
|
||||
if(on)
|
||||
overlays += image('watercloset.dmi', src, "water", MOB_LAYER + 1, dir)
|
||||
spawn(50)
|
||||
if(src && on)
|
||||
overlays += image('watercloset.dmi', src, "mist", MOB_LAYER + 1, dir)
|
||||
mist = 1
|
||||
else if(mist)
|
||||
overlays += image('watercloset.dmi', src, "mist", MOB_LAYER + 1, dir)
|
||||
spawn(100)
|
||||
if(!ismist)
|
||||
spawn(50)
|
||||
if(src && on)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
else if(ismist)
|
||||
ismist = 1
|
||||
mymist = new /obj/effect/mist(loc)
|
||||
spawn(250)
|
||||
if(src && !on)
|
||||
overlays = null
|
||||
del(mymist)
|
||||
ismist = 0
|
||||
|
||||
/obj/structure/shower/HasEntered(atom/movable/O as obj|mob)
|
||||
..()
|
||||
wash(O)
|
||||
|
||||
//Yes, showers are super powerful as far as washing goes.
|
||||
/obj/structure/shower/proc/wash(atom/movable/O as obj|mob)
|
||||
..()
|
||||
if(!on) return
|
||||
|
||||
O.clean_blood()
|
||||
|
||||
if(istype(O, /mob/living/carbon))
|
||||
var/mob/living/carbon/monkey = O //it's not necessarily a monkey, but >accurate varnames
|
||||
if(monkey.r_hand)
|
||||
monkey.r_hand.clean_blood()
|
||||
if(monkey.l_hand)
|
||||
monkey.l_hand.clean_blood()
|
||||
if(monkey.wear_mask)
|
||||
monkey.wear_mask.clean_blood()
|
||||
|
||||
if(istype(O, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/washer = O
|
||||
if(washer.head)
|
||||
washer.head.clean_blood()
|
||||
if(washer.w_uniform)
|
||||
washer.w_uniform.clean_blood()
|
||||
if(washer.wear_suit)
|
||||
washer.wear_suit.clean_blood()
|
||||
if(washer.shoes)
|
||||
washer.shoes.clean_blood()
|
||||
if(washer.gloves)
|
||||
washer.gloves.clean_blood()
|
||||
if(washer.head)
|
||||
washer.head.clean_blood()
|
||||
|
||||
if(loc)
|
||||
var/turf/tile = get_turf(loc)
|
||||
loc.clean_blood()
|
||||
for(var/obj/effect/rune/R in tile)
|
||||
del(R)
|
||||
for(var/obj/effect/decal/cleanable/R in tile)
|
||||
del(R)
|
||||
for(var/obj/effect/overlay/R in tile)
|
||||
del(R)
|
||||
|
||||
|
||||
|
||||
@@ -69,4 +136,121 @@
|
||||
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
|
||||
icon = 'watercloset.dmi'
|
||||
icon_state = "rubberducky"
|
||||
item_state = "rubberducky"
|
||||
item_state = "rubberducky"
|
||||
|
||||
|
||||
|
||||
/obj/structure/sink
|
||||
name = "sink"
|
||||
icon = 'watercloset.dmi'
|
||||
icon_state = "sink"
|
||||
desc = "A sink used for washing one's hands and face."
|
||||
anchored = 1
|
||||
var/busy = 0 //Something's being washed at the moment
|
||||
|
||||
/obj/structure/sink/attack_hand(mob/M as mob)
|
||||
if(isrobot(M) || isAI(M))
|
||||
return
|
||||
|
||||
if(busy)
|
||||
M << "\red Someone's already washing here."
|
||||
return
|
||||
|
||||
var/turf/location = M.loc
|
||||
if(!isturf(location)) return
|
||||
usr << "\blue You start washing your hands."
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
busy = 0
|
||||
|
||||
if(M.loc != location) return //Person has moved away from the sink
|
||||
|
||||
if(istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/washer = C
|
||||
if(washer.gloves) //if they have gloves
|
||||
washer.gloves.clean_blood() //clean the gloves
|
||||
else //and if they don't,
|
||||
washer.clean_blood() //wash their hands (a mob being bloody means they are 'red handed')
|
||||
else
|
||||
C.clean_blood() //other things that can't wear gloves should just wash the mob.
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message(text("\blue [M] washes their hands using \the [src]."))
|
||||
|
||||
/obj/structure/sink/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(busy)
|
||||
user << "\red Someone's already washing here."
|
||||
return
|
||||
|
||||
if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket))
|
||||
O:reagents.add_reagent("water", 70)
|
||||
user.visible_message( \
|
||||
"\blue [user] fills the [O] using \the [src].", \
|
||||
"\blue You fill the [O] using \the [src].")
|
||||
return
|
||||
|
||||
if (istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks))
|
||||
O:reagents.add_reagent("water", 10)
|
||||
user.visible_message( \
|
||||
"\blue [user] fills the [O] using \the [src].", \
|
||||
"\blue You fill the [O] using \the [src].")
|
||||
return
|
||||
else if (istype(O, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = O
|
||||
if (B.charges > 0 && B.status == 1)
|
||||
flick("baton_active", src)
|
||||
user.Stun(10)
|
||||
user.stuttering = 10
|
||||
user.Weaken(10)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= 20
|
||||
else
|
||||
B.charges--
|
||||
user.visible_message( \
|
||||
"[user] was stunned by his wet [O].", \
|
||||
"\red You have wet \the [O], it shocks you!")
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!isturf(location)) return
|
||||
|
||||
var/obj/item/I = O
|
||||
if(!I || !istype(I,/obj/item)) return
|
||||
|
||||
usr << "\blue You start washing \the [I]."
|
||||
|
||||
busy = 1
|
||||
sleep(40)
|
||||
busy = 0
|
||||
|
||||
if(user.loc != location) return //User has moved
|
||||
if(!I) return //Item's been destroyed while washing
|
||||
if(user.get_active_hand() != I) return //Person has switched hands or the item in their hands
|
||||
|
||||
O.clean_blood()
|
||||
user.visible_message( \
|
||||
"\blue [user] washes \a [I] using \the [src].", \
|
||||
"\blue You wash \a [I] using \the [src].")
|
||||
|
||||
|
||||
/obj/structure/sink/kitchen
|
||||
name = "kitchen sink"
|
||||
icon_state = "sink_alt"
|
||||
|
||||
|
||||
/obj/structure/sink/puddle //splishy splashy ^_^
|
||||
name = "puddle"
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attack_hand(mob/M as mob)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
|
||||
/obj/structure/sink/puddle/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
+37
-42
@@ -79,6 +79,7 @@
|
||||
src.health = max(0, src.health - tforce)
|
||||
if (src.health <= 7 && !reinf)
|
||||
src.anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(AM, src))
|
||||
if (src.health <= 0)
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
@@ -201,22 +202,12 @@
|
||||
usr << ( state==1? "You have unfastened the window from the frame." : "You have fastened the window to the frame." )
|
||||
else if(reinf && state == 0)
|
||||
anchored = !anchored
|
||||
|
||||
for(var/obj/structure/window/w in range(src,1))
|
||||
if (w.anchored)
|
||||
w.relativewindow()
|
||||
src.relativewindow()
|
||||
|
||||
update_nearby_icons()
|
||||
playsound(src.loc, 'Screwdriver.ogg', 75, 1)
|
||||
user << (src.anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.")
|
||||
else if(!reinf)
|
||||
src.anchored = !( src.anchored )
|
||||
|
||||
for(var/obj/structure/window/w in range(src,1))
|
||||
if (w.anchored)
|
||||
w.relativewindow()
|
||||
src.relativewindow()
|
||||
|
||||
update_nearby_icons()
|
||||
playsound(src.loc, '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)
|
||||
@@ -232,12 +223,7 @@
|
||||
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
||||
if (src.health <= 7)
|
||||
src.anchored = 0
|
||||
|
||||
for(var/obj/structure/window/w in range(src,1))
|
||||
if (w.anchored)
|
||||
w.relativewindow()
|
||||
src.relativewindow()
|
||||
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
if (src.health <= 0)
|
||||
if (src.dir == SOUTHWEST)
|
||||
@@ -328,10 +314,7 @@
|
||||
icon_state = "window"
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
relativewindow()
|
||||
for(var/obj/structure/window/w in range(src,1))
|
||||
if (w.anchored)
|
||||
w.relativewindow()
|
||||
update_nearby_icons()
|
||||
|
||||
return
|
||||
|
||||
@@ -339,10 +322,11 @@
|
||||
density = 0
|
||||
|
||||
update_nearby_tiles()
|
||||
for(var/obj/structure/window/w in range(src,1))
|
||||
w.relativewindow()
|
||||
|
||||
playsound(src, "shatter", 70, 1)
|
||||
|
||||
update_nearby_icons()
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/window/Move()
|
||||
@@ -355,6 +339,7 @@
|
||||
|
||||
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)
|
||||
if(!air_master) return 0
|
||||
|
||||
@@ -378,30 +363,40 @@
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
//checks if this window is full-tile one
|
||||
/obj/structure/window/proc/is_fulltile()
|
||||
return (src.dir == SOUTHWEST || src.dir == SOUTHEAST || src.dir == NORTHWEST || src.dir == NORTHEAST)
|
||||
if(dir in list(5,6,9,10))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//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()
|
||||
for(var/direction in cardinal)
|
||||
for(var/obj/structure/window/W in get_step(src,direction) )
|
||||
W.update_icon()
|
||||
|
||||
//merges adjacent full-tile windows into one (blatant ripoff from game/smoothwall.dm)
|
||||
/obj/structure/window/proc/relativewindow()
|
||||
/obj/structure/window/update_icon()
|
||||
//A little cludge here, since I don't know how it will work with slim windows. Most likely VERY wrong.
|
||||
//this way it will only update full-tile ones
|
||||
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)
|
||||
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
|
||||
junction |= get_dir(src,W)
|
||||
if (istype(src,/obj/structure/window/basic))
|
||||
src.icon_state = "window[junction]"
|
||||
else if (istype(src,/obj/structure/window/reinforced))
|
||||
if (istype(src,/obj/structure/window/reinforced/tinted))
|
||||
//This spawn is here so windows get properly updated when one gets deleted.
|
||||
spawn(2)
|
||||
if(!src) return
|
||||
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)
|
||||
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
|
||||
junction |= get_dir(src,W)
|
||||
if (opacity)
|
||||
src.icon_state = "twindow[junction]"
|
||||
else
|
||||
src.icon_state = "rwindow[junction]"
|
||||
|
||||
return
|
||||
if (reinf)
|
||||
src.icon_state = "rwindow[junction]"
|
||||
else
|
||||
src.icon_state = "window[junction]"
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user