mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
..()
|
||||
sd_SetLuminosity(NODERANGE)
|
||||
ul_SetLuminosity(NODERANGE)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/proc/Life()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
sd_SetLuminosity(1)
|
||||
ul_SetLuminosity(0,3,0)
|
||||
|
||||
spawn(1200) // 2 minutes
|
||||
del(src)
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/secure_closet/ert/commander
|
||||
name = "\improper ERT commander locker"
|
||||
req_access = list(access_security)
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
icon_locked = "capsecure1"
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/ert/security
|
||||
name = "\improper ERT security locker"
|
||||
req_access = list(access_security)
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
icon_locked = "sec1"
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/ert/engineer
|
||||
name = "\improper ERT engineer locker"
|
||||
req_access = list(access_engine)
|
||||
req_access = list(ACCESS_ENGINE)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/ert/medical
|
||||
name = "\improper ERT medical locker"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
if(prob(20))
|
||||
new /obj/item/weapon/storage/belt/utility(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(30))
|
||||
new /obj/item/weapon/cable_coil(src)
|
||||
new /obj/item/weapon/cable_coil/random(src)
|
||||
if(prob(20))
|
||||
new /obj/item/device/multitool(src)
|
||||
if(prob(5))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/secure_closet/cargotech
|
||||
name = "Cargo Technician's Locker"
|
||||
req_access = list(access_cargo)
|
||||
req_access = list(ACCESS_CARGO)
|
||||
icon_state = "securecargo1"
|
||||
icon_closed = "securecargo"
|
||||
icon_locked = "securecargo1"
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/qm_personal
|
||||
name = "Quartermaster's Locker"
|
||||
req_access = list(access_qm)
|
||||
req_access = list(ACCESS_QM)
|
||||
icon_state = "secureqm1"
|
||||
icon_closed = "secureqm"
|
||||
icon_locked = "secureqm1"
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/cargo_tech_personal
|
||||
name = "Cargo Tech's Locker"
|
||||
req_access = list(access_cargo)
|
||||
req_access = list(ACCESS_CARGO)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/miner_personal
|
||||
name = "Miner's Locker"
|
||||
req_access = list(access_cargo)
|
||||
req_access = list(ACCESS_CARGO)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/chef_personal
|
||||
name = "Chef's Locker"
|
||||
req_access = list(access_kitchen)
|
||||
req_access = list(ACCESS_KITCHEN)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/bar
|
||||
name = "Booze"
|
||||
req_access = list(access_bar)
|
||||
req_access = list(ACCESS_BAR)
|
||||
|
||||
|
||||
New()
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/barman_personal
|
||||
name = "Barman's Locker"
|
||||
req_access = list(access_bar)
|
||||
req_access = list(ACCESS_BAR)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/hydro_personal
|
||||
name = "Botanist's Locker"
|
||||
req_access = list(access_hydroponics)
|
||||
req_access = list(ACCESS_HYDROPONICS)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/janitor_personal
|
||||
name = "Janitor's Locker"
|
||||
req_access = list(access_janitor)
|
||||
req_access = list(ACCESS_JANITOR)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/lawyer_personal
|
||||
name = "Lawyer's Locker"
|
||||
req_access = list(access_lawyer)
|
||||
req_access = list(ACCESS_LAWYER)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/librarian_personal
|
||||
name = "Librarian's Locker"
|
||||
req_access = list(access_library)
|
||||
req_access = list(ACCESS_LIBRARY)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/counselor_personal
|
||||
name = "Counselor's Locker"
|
||||
req_access = list(access_chapel_office)
|
||||
req_access = list(ACCESS_CHAPEL_OFFICE)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/secure_closet/engineering_chief
|
||||
name = "Chief Engineer's Locker"
|
||||
req_access = list(access_ce)
|
||||
req_access = list(ACCESS_CE)
|
||||
icon_state = "securece1"
|
||||
icon_closed = "securece"
|
||||
icon_locked = "securece1"
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_electrical
|
||||
name = "Electrical Supplies"
|
||||
req_access = list(access_engine)
|
||||
req_access = list(ACCESS_ENGINE)
|
||||
icon_state = "secureengelec1"
|
||||
icon_closed = "secureengelec"
|
||||
icon_locked = "secureengelec1"
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_welding
|
||||
name = "Welding Supplies"
|
||||
req_access = list(access_engine)
|
||||
req_access = list(ACCESS_ENGINE)
|
||||
icon_state = "secureengweld1"
|
||||
icon_closed = "secureengweld"
|
||||
icon_locked = "secureengweld1"
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/engineering_personal
|
||||
name = "Engineer's Locker"
|
||||
req_access = list(access_engine)
|
||||
req_access = list(ACCESS_ENGINE)
|
||||
icon_state = "secureeng1"
|
||||
icon_closed = "secureeng"
|
||||
icon_locked = "secureeng1"
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/atmos_personal
|
||||
name = "Atmospheric Technician's Locker"
|
||||
req_access = list(access_atmospherics)
|
||||
req_access = list(ACCESS_ATMOSPHERICS)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -144,7 +144,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/roboticist_personal
|
||||
name = "Roboticist's Locker"
|
||||
req_access = list(access_robotics)
|
||||
req_access = list(ACCESS_ROBOTICS)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/secure_closet/hydroponics
|
||||
name = "Botanist's locker"
|
||||
req_access = list(access_hydroponics)
|
||||
req_access = list(ACCESS_HYDROPONICS)
|
||||
icon_state = "hydrosecure1"
|
||||
icon_closed = "hydrosecure"
|
||||
icon_locked = "hydrosecure1"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
|
||||
New()
|
||||
@@ -35,7 +35,7 @@
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
|
||||
New()
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/doctor_personal
|
||||
name = "Medical Doctor's Locker"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
icon_state = "securemed1"
|
||||
icon_closed = "securemed"
|
||||
icon_locked = "securemed1"
|
||||
@@ -70,7 +70,7 @@
|
||||
var/obj/item/weapon/storage/box/B = new(BPK)
|
||||
new /obj/item/weapon/pen(B)
|
||||
new /obj/item/device/pda/medical(src)
|
||||
new /obj/item/weapon/storage/firstaid/regular(src)
|
||||
new /obj/item/weapon/storage/firstaid/adv(src)
|
||||
new /obj/item/device/flashlight/pen(src)
|
||||
switch(pick("blue", "green", "purple"))
|
||||
if ("blue")
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/chemist_personal
|
||||
name = "Chemist's Locker"
|
||||
req_access = list(access_chemistry)
|
||||
req_access = list(ACCESS_CHEMISTRY)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/genetics_personal
|
||||
name = "Geneticist's Locker"
|
||||
req_access = list(access_genetics)
|
||||
req_access = list(ACCESS_GENETICS)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/viro_personal
|
||||
name = "Virologist's Locker"
|
||||
req_access = list(access_virology)
|
||||
req_access = list(ACCESS_VIROLOGY)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/CMO
|
||||
name = "Chief Medical Officer's Locker"
|
||||
req_access = list(access_cmo)
|
||||
req_access = list(ACCESS_CMO)
|
||||
icon_state = "cmosecure1"
|
||||
icon_closed = "cmosecure"
|
||||
icon_locked = "cmosecure1"
|
||||
@@ -158,7 +158,7 @@
|
||||
var/obj/item/weapon/storage/box/B = new(BPK)
|
||||
new /obj/item/weapon/pen(B)
|
||||
new /obj/item/device/pda/heads/cmo(src)
|
||||
new /obj/item/weapon/storage/firstaid/regular(src)
|
||||
new /obj/item/weapon/storage/firstaid/adv(src)
|
||||
new /obj/item/device/flashlight/pen(src)
|
||||
new /obj/item/weapon/cartridge/cmo(src)
|
||||
new /obj/item/device/radio/headset/heads/cmo(src)
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/animal
|
||||
name = "Animal Control"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
|
||||
New()
|
||||
@@ -193,7 +193,7 @@
|
||||
icon_opened = "medicalopen"
|
||||
icon_broken = "medicalbroken"
|
||||
icon_off = "medicaloff"
|
||||
req_access = list(access_medical)
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/personal/var/registered_name = null
|
||||
/obj/structure/closet/secure_closet/personal/req_access = list(access_all_personal_lockers)
|
||||
/obj/structure/closet/secure_closet/personal/req_access = list(ACCESS_ALL_PERSONAL_LOCKERS)
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/New()
|
||||
..()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/secure_closet/scientist
|
||||
name = "Scientist's Locker"
|
||||
req_access = list(access_research)
|
||||
req_access = list(ACCESS_RESEARCH)
|
||||
icon_state = "secureres1"
|
||||
icon_closed = "secureres"
|
||||
icon_locked = "secureres1"
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/rd
|
||||
name = "Research Director's Locker"
|
||||
req_access = list(access_rd)
|
||||
req_access = list(ACCESS_RD)
|
||||
icon_state = "rdsecure1"
|
||||
icon_closed = "rdsecure"
|
||||
icon_locked = "rdsecure1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/secure_closet/RD
|
||||
name = "Research Director's Locker"
|
||||
req_access = list(access_rd)
|
||||
req_access = list(ACCESS_RD)
|
||||
icon_state = "rdsecure1"
|
||||
icon_closed = "rdsecure"
|
||||
icon_locked = "rdsecure1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/structure/closet/secure_closet/captains
|
||||
name = "Captain's Locker"
|
||||
req_access = list(access_captain)
|
||||
req_access = list(ACCESS_CAPTAIN)
|
||||
icon_state = "capsecure1"
|
||||
icon_closed = "capsecure"
|
||||
icon_locked = "capsecure1"
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/hop
|
||||
name = "Head of Personnel's Locker"
|
||||
req_access = list(access_hop)
|
||||
req_access = list(ACCESS_HOP)
|
||||
icon_state = "hopsecure1"
|
||||
icon_closed = "hopsecure"
|
||||
icon_locked = "hopsecure1"
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/hos
|
||||
name = "Head of Security's Locker"
|
||||
req_access = list(access_hos)
|
||||
req_access = list(ACCESS_HOS)
|
||||
icon_state = "hossecure1"
|
||||
icon_closed = "hossecure"
|
||||
icon_locked = "hossecure1"
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "Warden's Locker"
|
||||
req_access = list(access_armory)
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
icon_state = "wardensecure1"
|
||||
icon_closed = "wardensecure"
|
||||
icon_locked = "wardensecure1"
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/security
|
||||
name = "Security Officer's Locker"
|
||||
req_access = list(access_security)
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "sec1"
|
||||
icon_closed = "sec"
|
||||
icon_locked = "sec1"
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/detective
|
||||
name = "Detective's Cabinet"
|
||||
req_access = list(access_forensics_lockers)
|
||||
req_access = list(ACCESS_FORENSICS_LOCKERS)
|
||||
icon_state = "cabinetdetective_locked"
|
||||
icon_closed = "cabinetdetective"
|
||||
icon_locked = "cabinetdetective_locked"
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/injection
|
||||
name = "Lethal Injections"
|
||||
req_access = list(access_hos)
|
||||
req_access = list(ACCESS_HOS)
|
||||
|
||||
|
||||
New()
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/brig
|
||||
name = "Brig Locker"
|
||||
req_access = list(access_brig)
|
||||
req_access = list(ACCESS_BRIG)
|
||||
anchored = 1
|
||||
var/id = null
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/courtroom
|
||||
name = "Courtroom Locker"
|
||||
req_access = list(access_court)
|
||||
req_access = list(ACCESS_COURT)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
/obj/structure/closet/walllocker/security
|
||||
name = "wall locker"
|
||||
req_access = list(access_security)
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
icon_state = "wall-locker1"
|
||||
density = 1
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
|
||||
|
||||
#define NUM_OF_POSTER_DESIGNS 17
|
||||
#define NUM_OF_POSTER_DESIGNS 22
|
||||
#define BS12_POSTERS_START 18
|
||||
|
||||
/obj/item/weapon/contraband
|
||||
name = "contraband item"
|
||||
@@ -20,7 +21,11 @@
|
||||
|
||||
/obj/item/weapon/contraband/poster/New(turf/loc,var/given_serial=0)
|
||||
if(given_serial==0)
|
||||
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
|
||||
//add an increased chance for BS12 specific posters to spawn
|
||||
if(prob(10))
|
||||
serial_number = rand(BS12_POSTERS_START,NUM_OF_POSTER_DESIGNS)
|
||||
else
|
||||
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
|
||||
src.resulting_poster = new(serial_number)
|
||||
else
|
||||
serial_number = given_serial
|
||||
@@ -78,10 +83,16 @@ obj/effect/decal/poster/New(var/serial)
|
||||
|
||||
src.serial_number = serial
|
||||
|
||||
if(serial_number==src.loc){serial_number = rand(1,NUM_OF_POSTER_DESIGNS);} //This is for the mappers that want individual posters without having to use rolled posters.
|
||||
if(serial_number==src.loc)
|
||||
//add an increased chance for BS12 specific posters to spawn
|
||||
if(prob(10))
|
||||
serial_number = rand(BS12_POSTERS_START,NUM_OF_POSTER_DESIGNS)
|
||||
else
|
||||
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
|
||||
|
||||
icon_state = "poster[serial_number]"
|
||||
|
||||
//This is for the mappers that want individual posters without having to use rolled posters.
|
||||
switch(serial_number)
|
||||
if(1)
|
||||
name += " - Unlucky Space Explorer"
|
||||
@@ -134,6 +145,24 @@ obj/effect/decal/poster/New(var/serial)
|
||||
if(17)
|
||||
name += " - Dangerous Static"
|
||||
desc += " This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, urging you to \"tear this poster in half to receive your free sample\"."
|
||||
if(18)
|
||||
name += " - Pinup Girl Val" //art thou incensed, brethren?
|
||||
desc += " Luscious Val McNeil, the vertically challenged Legal Extraordinaire, winner of Miss Space two years running and favoured pinup girl of Lawyers Weekly."
|
||||
if(19)
|
||||
name += " - Derpman, Enforcer of the State"
|
||||
desc += " Here to protect and serve... your donuts! A generously proportioned man, he teaches you the value of hiding your snacks."
|
||||
if(20)
|
||||
name += " - Tajaran Today, Special #222"
|
||||
desc += " A controversial front page pinup from NTFashion, banned on numerous stations for its unreasonably cute depictions."
|
||||
if(21)
|
||||
name += " - Respect a Soghun"
|
||||
desc += " This poster depicts a well dressed looking Soghun receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
|
||||
if(22)
|
||||
name += " - Skrell Twilight"
|
||||
desc += " This poster depicts a mysteriously inscrutable, alien scene. Numerous Skrell can be seen conversing amidst great, crystalline towers rising above crashing waves"
|
||||
/*if(20)
|
||||
name += " - the Disabled Triptarch: Ironfoot, Seber and Ore"
|
||||
desc += " This poster depicts a genetics researcher, a chemist and a medical doctor in various states of miscommunication."*/
|
||||
else
|
||||
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
|
||||
desc = "Why are you still here?"
|
||||
|
||||
@@ -173,13 +173,13 @@
|
||||
*/
|
||||
/obj/item/device/pda/pickup(mob/user)
|
||||
if (fon)
|
||||
sd_SetLuminosity(0)
|
||||
user.total_luminosity += f_lum
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + (f_lum - 1), user.LuminosityGreen + (f_lum - 1), user.LuminosityBlue + (f_lum + 1))
|
||||
|
||||
/obj/item/device/pda/dropped(mob/user)
|
||||
if (fon)
|
||||
user.total_luminosity -= f_lum
|
||||
sd_SetLuminosity(f_lum)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - (f_lum - 1), user.LuminosityGreen - (f_lum - 1), user.LuminosityBlue - (f_lum + 1))
|
||||
ul_SetLuminosity(f_lum - 1, f_lum - 1, f_lum + 1)
|
||||
|
||||
/obj/item/device/pda/New()
|
||||
..()
|
||||
@@ -243,6 +243,7 @@
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=pda_notes.png> Notekeeper</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=pda_mail.png> Messenger</a></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=41'><img src=pda_notes.png> View Crew Manifest</a></li>"
|
||||
//dat += "<li><a href='byond://?src=\red[src];choice=chatroom'><img src=pda_chatroom.png> Nanotrasen Relay Chat</a></li>"
|
||||
|
||||
if (cartridge)
|
||||
if (cartridge.access_clown)
|
||||
@@ -382,6 +383,17 @@
|
||||
dat += "OTHER: [round(unknown_level)]%<br>"
|
||||
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
|
||||
dat += "<br>"
|
||||
|
||||
if (5)
|
||||
dat += "<h4><img src=pda_chatroom.png> Nanotrasen Relay Chat</h4>"
|
||||
|
||||
dat += "<h4><img src=pda_menu.png> Detected Channels</h4>: <li>"
|
||||
for(var/datum/chatroom/C in chatrooms)
|
||||
dat += "<a href='byond://?src=\ref[src];pdachannel=[C.name]'>#[html_encode(lowertext(C.name))]"
|
||||
if(C.password != "")
|
||||
dat += " <img src=pda_locked.png>"
|
||||
dat += "</li>"
|
||||
|
||||
if (41) //crew manifest
|
||||
|
||||
dat += "<h4><img src=pda_notes.png> Crew Manifest</h4>"
|
||||
@@ -404,7 +416,7 @@
|
||||
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
|
||||
|
||||
if(can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
|
||||
if ( !(U.stat || U.restrained()) )
|
||||
if ( !(U.stat || U.restrained()) && (src in U.contents))
|
||||
|
||||
add_fingerprint(U)
|
||||
U.machine = src
|
||||
@@ -454,12 +466,14 @@
|
||||
mode = 2
|
||||
if("21")//Read messeges
|
||||
mode = 21
|
||||
if("41")//Read messeges
|
||||
if("41")//Check Manifest
|
||||
mode = 41
|
||||
if("3")//Atmos scan
|
||||
mode = 3
|
||||
if("4")//Redirects to hub
|
||||
mode = 0
|
||||
if("chatroom") // chatroom hub
|
||||
mode = 5
|
||||
|
||||
|
||||
//MAIN FUNCTIONS===================================
|
||||
@@ -468,11 +482,11 @@
|
||||
fon = (!fon)
|
||||
if (src in U.contents)
|
||||
if (fon)
|
||||
U.total_luminosity += f_lum
|
||||
U.ul_SetLuminosity(U.LuminosityRed + (f_lum - 1), U.LuminosityGreen + (f_lum - 1), U.LuminosityBlue + (f_lum + 1))
|
||||
else
|
||||
U.total_luminosity -= f_lum
|
||||
U.ul_SetLuminosity(U.LuminosityRed - (f_lum - 1), U.LuminosityGreen - (f_lum - 1), U.LuminosityBlue - (f_lum + 1))
|
||||
else
|
||||
sd_SetLuminosity(fon * f_lum)
|
||||
ul_SetLuminosity(fon * f_lum)
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
scanmode = 0
|
||||
@@ -555,70 +569,84 @@
|
||||
return
|
||||
|
||||
last_text = world.time
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
if(useMS) // only send the message if it's stable
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
|
||||
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> ([ownjob]):</b></i><br>[t]<br>"
|
||||
|
||||
var/AnsweringMS = 0
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
if(MS.active)
|
||||
AnsweringMS++
|
||||
// Give every ghost the ability to see all messages
|
||||
for (var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>PDA message from <b>[src.owner]</b> to <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if(!AnsweringMS)
|
||||
return
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src.owner
|
||||
if(prob(50))
|
||||
who = P:owner
|
||||
for(var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
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> ([ownjob]):</b></i><br>[t]<br>"
|
||||
|
||||
// Give every ghost the ability to see all messages
|
||||
for (var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>PDA message from <b>[src.owner]</b> to <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src.owner
|
||||
if(prob(50))
|
||||
who = P:owner
|
||||
for(var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
if (!P.silent)
|
||||
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")
|
||||
if (!P.silent)
|
||||
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>)"
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
P.overlays = null
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
else
|
||||
U << "ERROR: Server isn't responding."
|
||||
|
||||
// pAI Message
|
||||
else
|
||||
|
||||
var/AnsweringMS = 0
|
||||
for (var/obj/machinery/message_server/MS in world)
|
||||
MS.send_pda_message("[P]","[src]","[t]")
|
||||
if(MS.active)
|
||||
AnsweringMS++
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(message_servers)
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
if(useMS) // only send the message if it's stable
|
||||
useMS.send_pda_message("[P.owner]","[owner]","[t]")
|
||||
tnote += "<i><b>→ To [P]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
|
||||
if(!AnsweringMS)
|
||||
return
|
||||
// Give every ghost the ability to see all messages
|
||||
for (var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>PDA message from <b>[src.owner]</b> to <b>[P:owner]</b>: [t]</i>")
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src
|
||||
if(prob(50))
|
||||
who = P
|
||||
for (var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
tnote += "<i><b>→ To [P]:</b></i><br>[t]<br>"
|
||||
P.tnote += "<i><b>← From <a href='byond://?src=\ref[P];soft=pdamessage;target=\ref[src]'>[src]</a>:</b></i><br>[t]<br>"
|
||||
if (!P.silent)
|
||||
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>)"
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
else
|
||||
U << "ERROR: Server isn't responding."
|
||||
|
||||
|
||||
if (prob(15)) //Give the AI a chance of intercepting the message
|
||||
var/who = src
|
||||
if(prob(50))
|
||||
who = P
|
||||
for (var/mob/living/silicon/ai/ai in world)
|
||||
ai.show_message("<i>Intercepted message from <b>[who]</b>: [t]</i>")
|
||||
|
||||
playsound(P.loc, 'twobeep.ogg', 50, 1)
|
||||
|
||||
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
|
||||
|
||||
|
||||
if("Send Honk")//Honk virus
|
||||
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
|
||||
@@ -653,7 +681,7 @@
|
||||
|
||||
if("Toggle Door")
|
||||
if(!isnull(cartridge) && cartridge.access_remote_door)
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
for(var/obj/machinery/door/poddoor/M in world) //world is probably a bad idea, but at least it works?
|
||||
if(M.id == cartridge.remote_door_id)
|
||||
if(M.density)
|
||||
spawn(0)
|
||||
@@ -756,6 +784,37 @@
|
||||
id.loc = get_turf(src)
|
||||
id = null
|
||||
|
||||
/obj/item/device/pda/proc/telecomms_process(var/receipent, var/originator, var/data)
|
||||
var/telecomms_intact = 0
|
||||
/* Make sure telecomms is intact */
|
||||
for (var/obj/machinery/telecomms/receiver/R in world)
|
||||
|
||||
if((1459 in R.freq_listening) && R.on)
|
||||
|
||||
for (var/obj/machinery/telecomms/bus/B in R.links)
|
||||
|
||||
if((1459 in B.freq_listening) && B.on)
|
||||
|
||||
for(var/obj/machinery/telecomms/server/S in B.links)
|
||||
|
||||
if((1459 in S.freq_listening) && S.on)
|
||||
// Add a log
|
||||
S.add_entry("[originator] sent to [receipent]: \"[data]\"", "PDA log")
|
||||
|
||||
for(var/obj/machinery/telecomms/broadcaster/C in S.links)
|
||||
|
||||
if(((1459 in C.freq_listening || C.freq_listening.len == 0)) && C.on)
|
||||
|
||||
telecomms_intact = 1
|
||||
break
|
||||
|
||||
break
|
||||
break
|
||||
break
|
||||
|
||||
return telecomms_intact
|
||||
|
||||
|
||||
/obj/item/device/pda/verb/verb_remove_id()
|
||||
set category = "Object"
|
||||
set name = "Remove id"
|
||||
@@ -939,7 +998,7 @@
|
||||
if (src in M.contents)
|
||||
if(fon)
|
||||
fon = 0
|
||||
M.total_luminosity -= f_lum
|
||||
M.ul_SetLuminosity(M.LuminosityRed + (f_lum - 1), M.LuminosityGreen + (f_lum - 1), M.LuminosityBlue + (f_lum + 1))
|
||||
if(T)
|
||||
T.hotspot_expose(700,125)
|
||||
|
||||
@@ -1017,17 +1076,28 @@
|
||||
|
||||
if (selected:toff)
|
||||
return
|
||||
var/obj/machinery/message_server/useMS = null
|
||||
if(!isnull(message_servers))
|
||||
for (var/obj/machinery/message_server/MS in message_servers)
|
||||
//PDAs are now dependant on the Message Server.
|
||||
if(MS.active)
|
||||
useMS = MS
|
||||
break
|
||||
if(!isnull(useMS)) // only send the message if it's stable
|
||||
useMS.send_pda_message("[selected:owner]","[usr.name]","[t]")
|
||||
|
||||
usr.show_message("<i>PDA message to <b>[selected:owner]</b>: [t]</i>")
|
||||
selected:tnote += "<i><b>← From (AI) [usr.name]:</b></i><br>[t]<br>"
|
||||
usr.show_message("<i>PDA message to <b>[selected:owner]</b>: [t]</i>")
|
||||
selected:tnote += "<i><b>← From (AI) [usr.name]:</b></i><br>[t]<br>"
|
||||
|
||||
if (!selected:silent)
|
||||
playsound(selected.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, selected.loc))
|
||||
O.show_message(text("\icon[selected] *[selected:ttone]*"))
|
||||
if (!selected:silent)
|
||||
playsound(selected.loc, 'twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, selected.loc))
|
||||
O.show_message(text("\icon[selected] *[selected:ttone]*"))
|
||||
|
||||
selected.overlays = null
|
||||
selected.overlays += image('pda.dmi', "pda-r")
|
||||
selected.overlays = null
|
||||
selected.overlays += image('pda.dmi', "pda-r")
|
||||
else
|
||||
usr << "ERROR: Server isn't responding."
|
||||
|
||||
|
||||
//Some spare PDAs in a box
|
||||
|
||||
@@ -612,9 +612,9 @@ Code:
|
||||
blood[main_blood] = A.blood_DNA[blood]
|
||||
return 1
|
||||
var/list/sum_list[4] //Pack it back up!
|
||||
sum_list[1] = A.fingerprints
|
||||
sum_list[2] = A.suit_fibers
|
||||
sum_list[3] = A.blood_DNA
|
||||
sum_list[1] = A.fingerprints ? A.fingerprints.Copy() : null
|
||||
sum_list[2] = A.suit_fibers ? A.suit_fibers.Copy() : null
|
||||
sum_list[3] = A.blood_DNA ? A.blood_DNA.Copy() : null
|
||||
sum_list[4] = "\The [A] in \the [get_area(A)]"
|
||||
stored_data["\ref [A]"] = sum_list
|
||||
return 0
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
var/list/chatrooms = list()
|
||||
|
||||
/datum/chatroom
|
||||
var/name = "Generic Chatroom"
|
||||
var/list/logged_in = list()
|
||||
var/list/logs = list() // chat logs
|
||||
var/list/banned = list() // banned users
|
||||
var/list/whitelist = list() // whitelisted users
|
||||
var/list/muted = list()
|
||||
var/topic = "" // topic message for the chatroom
|
||||
var/password = "" // blank for no password.
|
||||
var/operator = "" // name of the operator
|
||||
|
||||
/datum/chatroom/proc/attempt_connect(var/obj/item/device/pda/device, var/obj/password)
|
||||
if(!device)
|
||||
return
|
||||
@@ -17,30 +17,30 @@
|
||||
..()
|
||||
if (on)
|
||||
icon_state = icon_on
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
src.ul_SetLuminosity(brightness_on, brightness_on, 0)
|
||||
else
|
||||
icon_state = icon_off
|
||||
src.sd_SetLuminosity(0)
|
||||
src.ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
|
||||
if (on)
|
||||
icon_state = icon_on
|
||||
if(src.loc == user)
|
||||
user.total_luminosity += brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
|
||||
else if (isturf(src.loc))
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
ul_SetLuminosity(brightness_on, brightness_on, 0)
|
||||
|
||||
else
|
||||
icon_state = icon_off
|
||||
if(src.loc == user)
|
||||
user.total_luminosity -= brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
|
||||
else if (isturf(src.loc))
|
||||
src.sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/device/flashlight/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
|
||||
// if(!isturf(user.loc))
|
||||
// user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
// return
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
return
|
||||
@@ -82,14 +82,14 @@
|
||||
|
||||
/obj/item/device/flashlight/pickup(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
src.sd_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(0)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity -= brightness_on
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
@@ -148,21 +148,19 @@
|
||||
item_state = "hardhat[on]_[color]"
|
||||
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
else
|
||||
user.total_luminosity -= brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - (brightness_on - 1), user.LuminosityBlue)
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/pickup(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/dropped(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity -= brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_SetLuminosity(brightness_on, brightness_on - 1, 0)
|
||||
|
||||
//RIG helmet light
|
||||
/obj/item/clothing/head/helmet/space/rig/attack_self(mob/user)
|
||||
@@ -174,21 +172,19 @@
|
||||
item_state = "rig[on]-[color]"
|
||||
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
else
|
||||
user.total_luminosity -= brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/pickup(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_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)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_SetLuminosity(brightness_on, brightness_on-1, 0)
|
||||
|
||||
// the desk lamps are a bit special
|
||||
/obj/item/device/flashlight/lamp
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
for(var/mob/M in viewers(user))
|
||||
if(M == user) continue
|
||||
M << "[user] detaches the power sink from the cable."
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
icon_state = "powersink0"
|
||||
|
||||
return
|
||||
@@ -85,7 +85,7 @@
|
||||
if(M == user) continue
|
||||
M << "[user] deactivates the power sink!"
|
||||
mode = 1
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
icon_state = "powersink0"
|
||||
processing_objects.Remove(src)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
var/datum/powernet/PN = attached.get_powernet()
|
||||
if(PN)
|
||||
if(!luminosity)
|
||||
sd_SetLuminosity(12)
|
||||
ul_SetLuminosity(12,3,0)
|
||||
|
||||
|
||||
// found a powernet, so drain up to max power from it
|
||||
|
||||
@@ -119,7 +119,13 @@ MASS SPECTROMETER
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/name in H.organs)
|
||||
var/datum/organ/external/e = H.organs[name]
|
||||
if(e.broken)
|
||||
var/limb = e.getDisplayName()
|
||||
if(e.status & BROKEN)
|
||||
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!e.status & SPLINTED))
|
||||
user << "\red Unsecured fracture in subject [limb]. Splinting recommended for transport."
|
||||
for(var/name in H.organs)
|
||||
var/datum/organ/external/e = H.organs[name]
|
||||
if(e.status & BROKEN)
|
||||
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
|
||||
break
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -2,22 +2,24 @@ obj/structure/door_assembly
|
||||
icon = 'door_assembly.dmi'
|
||||
|
||||
name = "Airlock Assembly"
|
||||
icon_state = "door_as0"
|
||||
icon_state = "door_as_0"
|
||||
anchored = 0
|
||||
density = 1
|
||||
var/state = 0
|
||||
var/glass = 0
|
||||
var/base_icon_state
|
||||
var/mineral = null
|
||||
var/base_icon_state = "door_as_0"
|
||||
var/glass_base_icon_state = "door_as_g0"
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
var/glass_type = /obj/machinery/door/airlock/glass //the type path of the airlock if changed into a glass airlock
|
||||
var/glass_base_icon_state = "door_as_g"
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/glass = null
|
||||
|
||||
New()
|
||||
base_icon_state = copytext(icon_state,1,lentext(icon_state))
|
||||
|
||||
door_assembly_0
|
||||
name = "Airlock Assembly"
|
||||
icon_state = "door_as1"
|
||||
icon_state = "door_as_1"
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
anchored = 1
|
||||
density = 1
|
||||
@@ -117,22 +119,18 @@ obj/structure/door_assembly
|
||||
door_assembly_med
|
||||
name = "Medical Airlock Assembly"
|
||||
icon_state = "door_as_med1"
|
||||
glass_base_icon_state = "door_as_gmed"
|
||||
glass_type = /obj/machinery/door/airlock/glass/glass_medical
|
||||
airlock_type = /obj/machinery/door/airlock/medical
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
glass
|
||||
glass = 1
|
||||
mineral = "glass"
|
||||
icon_state = "door_as_gmed1"
|
||||
|
||||
door_assembly_mai
|
||||
name = "Maintenance Airlock Assembly"
|
||||
icon_state = "door_as_mai1"
|
||||
glass_type = null
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance
|
||||
anchored = 1
|
||||
density = 1
|
||||
@@ -142,7 +140,6 @@ obj/structure/door_assembly
|
||||
door_assembly_ext
|
||||
name = "External Airlock Assembly"
|
||||
icon_state = "door_as_ext1"
|
||||
glass_type = null
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
anchored = 1
|
||||
density = 1
|
||||
@@ -152,7 +149,6 @@ obj/structure/door_assembly
|
||||
door_assembly_fre
|
||||
name = "Freezer Airlock Assembly"
|
||||
icon_state = "door_as_fre1"
|
||||
glass_type = null
|
||||
airlock_type = /obj/machinery/door/airlock/freezer
|
||||
anchored = 1
|
||||
density = 1
|
||||
@@ -162,21 +158,84 @@ obj/structure/door_assembly
|
||||
door_assembly_mhatch
|
||||
name = "Airtight Maintenance Hatch Assembly"
|
||||
icon_state = "door_as_mhatch1"
|
||||
glass_type = null
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 0
|
||||
|
||||
door_assembly_g
|
||||
door_assembly_glass
|
||||
name = "Glass Airlock Assembly"
|
||||
icon_state = "door_as_g1"
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
glass = 1
|
||||
mineral = "glass"
|
||||
|
||||
door_assembly_gold
|
||||
name = "Gold Airlock Assembly"
|
||||
icon_state = "door_as_gold1"
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "gold"
|
||||
|
||||
door_assembly_silver
|
||||
name = "Silver Airlock Assembly"
|
||||
icon_state = "door_as_silver1"
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "silver"
|
||||
|
||||
door_assembly_diamond
|
||||
name = "Diamond Airlock Assembly"
|
||||
icon_state = "door_as_diamond1"
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "diamond"
|
||||
|
||||
door_assembly_uranium
|
||||
name = "Uranium Airlock Assembly"
|
||||
icon_state = "door_as_uranium1"
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "uranium"
|
||||
|
||||
door_assembly_plasma
|
||||
name = "Plasma Airlock Assembly"
|
||||
icon_state = "door_as_plasma1"
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "plasma"
|
||||
|
||||
door_assembly_clown
|
||||
name = "Bananium Airlock Assembly"
|
||||
desc = "Honk"
|
||||
icon_state = "door_as_clown1"
|
||||
airlock_type = /obj/machinery/door/airlock/clown
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "clown"
|
||||
|
||||
door_assembly_sandstone
|
||||
name = "Sandstone Airlock Assembly"
|
||||
icon_state = "door_as_sandstone1"
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
anchored = 1
|
||||
density = 1
|
||||
state = 1
|
||||
mineral = "sandstone"
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && !anchored )
|
||||
@@ -189,8 +248,30 @@ 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)
|
||||
if(src.glass==1)
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
switch(mineral)
|
||||
if("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))
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You need more welding fuel to dissassemble the airlock assembly."
|
||||
@@ -284,19 +365,100 @@ obj/structure/door_assembly
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
else if(istype(W, /obj/item/stack/sheet) && !mineral)
|
||||
var/obj/item/stack/sheet/G = W
|
||||
if(G)
|
||||
if(G.amount>=1)
|
||||
switch(G.type)
|
||||
if(/obj/item/stack/sheet/rglass)
|
||||
playsound(src.loc, '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_glass" //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, '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, '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, '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, '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, '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, '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!HONK"
|
||||
G.use(2)
|
||||
playsound(src.loc, '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, '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"
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet/rglass) && glass == 0 && ispath(glass_type))
|
||||
playsound(src.loc, 'Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds reinforced glass windows to the airlock assembly.", "You start to install reinforced glass windows into the airlock assembly.")
|
||||
var/obj/item/stack/sheet/rglass/G = W
|
||||
if(do_after(user, 40))
|
||||
if(G)
|
||||
if(G.amount>=1)
|
||||
user << "\blue You installed glass windows the airlock assembly!"
|
||||
G.use(1)
|
||||
src.glass = 1
|
||||
src.name = "Near finished Window Airlock Assembly"
|
||||
src.airlock_type = glass_type
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
user << "\blue Now finishing the airlock."
|
||||
@@ -305,10 +467,33 @@ obj/structure/door_assembly
|
||||
if(!src) return
|
||||
user << "\blue You finish the airlock!"
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(glass)
|
||||
door = new src.glass_type( src.loc )
|
||||
else
|
||||
door = new src.airlock_type( src.loc )
|
||||
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 )
|
||||
//door.req_access = src.req_access
|
||||
door.electronics = src.electronics
|
||||
door.req_access = src.electronics.conf_access
|
||||
@@ -316,10 +501,7 @@ obj/structure/door_assembly
|
||||
del(src)
|
||||
else
|
||||
..()
|
||||
if(glass)
|
||||
icon_state = "[glass_base_icon_state][state]"
|
||||
else
|
||||
icon_state = "[base_icon_state][state]"
|
||||
icon_state = "[base_icon_state][state]"
|
||||
//This updates the icon_state. They are named as "door_as1_eng" where the 1 in that example
|
||||
//represents what state it's in. So the most generic algorithm for the correct updating of
|
||||
//this is simply to change the number.
|
||||
@@ -975,10 +975,10 @@ steam.start() -- spawns the effect
|
||||
..()
|
||||
update_nearby_tiles(1)
|
||||
spawn(1)
|
||||
sd_NewOpacity(1)
|
||||
ul_SetOpacity(1)
|
||||
|
||||
Del()
|
||||
sd_NewOpacity(0)
|
||||
ul_SetOpacity(0)
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
..()
|
||||
|
||||
@@ -2,6 +2,8 @@ var/roundExplosions = 1
|
||||
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
|
||||
if(!epicenter) return
|
||||
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]")
|
||||
log_file << "Explosion | \The [get_area(epicenter)] | [devastation_range], [heavy_impact_range], [light_impact_range], [flash_range]"
|
||||
spawn(0)
|
||||
if(defer_powernet_rebuild != 2)
|
||||
defer_powernet_rebuild = 1
|
||||
@@ -28,22 +30,91 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
E.set_up(epicenter)
|
||||
E.start()
|
||||
|
||||
var/list/dTurfs = list() //Holds the turfs in devestation range.
|
||||
var/list/hTurfs = list() //Holds the turfs in heavy impact range, minus turfs in devestation range.
|
||||
var/list/lTurfs = list() //Holds the turfs in light impact range, minus turfs in devestation range and heavy impact range.
|
||||
var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty)
|
||||
var/list/dTurfs = list() //Holds the turfs in devestation range.
|
||||
var/list/hTurfs = list() //Holds the turfs in heavy impact range, minus turfs in devestation range.
|
||||
var/list/lTurfs = list() //Holds the turfs in light impact range, minus turfs in devestation range and heavy impact range.
|
||||
var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty)
|
||||
|
||||
//cael - replaced range() and circlerange() with FloodFill() to prevent explosions getting through shielding (ultrarealism mode)
|
||||
//also lag is pre'y bad
|
||||
/*
|
||||
if(roundExplosions)
|
||||
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
|
||||
fTurfs = ExplosionCircleFloodFill(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = ExplosionCircleFloodFill(epicenter,devastation_range)
|
||||
hTurfs = ExplosionCircleFloodFill(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = ExplosionCircleFloodFill(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = circlerange(epicenter,devastation_range)
|
||||
hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
|
||||
//add some stress to nearby shields
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, devastation_range))
|
||||
E.Stress(3)
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, heavy_impact_range))
|
||||
E.Stress(2)
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, light_impact_range))
|
||||
E.Stress(1)
|
||||
else
|
||||
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
|
||||
fTurfs = ExplosionFloodFill(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = ExplosionFloodFill(epicenter,devastation_range)
|
||||
hTurfs = ExplosionFloodFill(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = ExplosionFloodFill(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = range(epicenter,devastation_range)
|
||||
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
|
||||
//add some stress to nearby shields
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, devastation_range))
|
||||
E.Stress(3)
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, heavy_impact_range))
|
||||
E.Stress(2)
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, light_impact_range))
|
||||
E.Stress(1)*/
|
||||
|
||||
if(roundExplosions)
|
||||
fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = circlerange(epicenter,devastation_range)
|
||||
hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = range(epicenter,devastation_range)
|
||||
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
if(locate(/obj/effect/energy_field) in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
|
||||
fTurfs = circlerangeturfs(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = circlerangeturfs(epicenter,devastation_range)
|
||||
hTurfs = circlerangeturfs(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = circlerangeturfs(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = circlerangeturfs(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = circlerangeturfs(epicenter,devastation_range)
|
||||
hTurfs = circlerangeturfs(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = circlerangeturfs(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
|
||||
//add some stress to nearby shields
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, devastation_range))
|
||||
E.Stress(3)
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, heavy_impact_range))
|
||||
E.Stress(2)
|
||||
for(var/obj/effect/energy_field/E in circlerange(epicenter, light_impact_range))
|
||||
E.Stress(1)
|
||||
else
|
||||
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
|
||||
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = range(epicenter,devastation_range)
|
||||
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
else
|
||||
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
|
||||
dTurfs = range(epicenter,devastation_range)
|
||||
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
|
||||
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
|
||||
|
||||
//add some stress to nearby shields
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, devastation_range))
|
||||
E.Stress(3)
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, heavy_impact_range))
|
||||
E.Stress(2)
|
||||
for(var/obj/effect/energy_field/E in range(epicenter, light_impact_range))
|
||||
E.Stress(1)
|
||||
|
||||
for(var/turf/T in dTurfs) //Loop through the turfs in devestation range.
|
||||
spawn() //Try to pop each turf into it's own thread, speed things along.
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
icon_state = "glowshroomf"
|
||||
|
||||
spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation
|
||||
sd_SetLuminosity(potency/10)
|
||||
ul_SetLuminosity(potency/10)
|
||||
spawn(delay)
|
||||
if(src)
|
||||
Spread()
|
||||
|
||||
@@ -23,8 +23,10 @@
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message("\red <B>[user] is trying to put handcuffs on [M]!</B>", 1)
|
||||
spawn(30)
|
||||
if(!M) return
|
||||
if(p_loc == user.loc && p_loc_m == M.loc)
|
||||
M.handcuffed = new /obj/item/weapon/handcuffs(M)
|
||||
M.update_clothing()
|
||||
|
||||
else
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
@@ -64,8 +66,10 @@
|
||||
M.requests += O
|
||||
spawn( 0 )
|
||||
if(istype(src, /obj/item/weapon/handcuffs/cable))
|
||||
// feedback_add_details("handcuffs","C")
|
||||
playsound(src.loc, 'cablecuff.ogg', 30, 1, -2)
|
||||
else
|
||||
// feedback_add_details("handcuffs","H")
|
||||
playsound(src.loc, 'handcuffs.ogg', 30, 1, -2)
|
||||
O.process()
|
||||
return
|
||||
@@ -394,7 +398,7 @@
|
||||
return
|
||||
|
||||
var/datum/organ/external/head = H.organs["head"]
|
||||
if(head.destroyed)
|
||||
if(head.status & DESTROYED)
|
||||
user << "\blue Put it where? There's no head."
|
||||
|
||||
//since these people will be dead M != usr
|
||||
@@ -536,6 +540,38 @@
|
||||
istype(W,/obj/item/projectile)\
|
||||
)
|
||||
|
||||
proc/is_hot(obj/item/W as obj)
|
||||
switch(W.type)
|
||||
if(/obj/item/weapon/weldingtool)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
return 3800
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/lighter)
|
||||
if(W:lit)
|
||||
return 1500
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/match)
|
||||
if(W:lit)
|
||||
return 1000
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/clothing/mask/cigarette)
|
||||
if(W:lit)
|
||||
return 1000
|
||||
else
|
||||
return 0
|
||||
if(/obj/item/weapon/pickaxe/plasmacutter)
|
||||
return 3800
|
||||
if(/obj/item/weapon/melee/energy)
|
||||
return 3500
|
||||
else
|
||||
return 0
|
||||
|
||||
return 0
|
||||
|
||||
/proc/is_cut(obj/item/W as obj)
|
||||
return ( \
|
||||
istype(W, /obj/item/weapon/wirecutters) || \
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf_loc(usr)
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "\red APC cannot be placed on this spot."
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
/obj/item/blueprints
|
||||
name = "station blueprints"
|
||||
desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it. Looks like you can edit the station's layout with these."
|
||||
icon = 'items.dmi'
|
||||
icon_state = "blueprints"
|
||||
|
||||
var/list/image/helper_images = list()
|
||||
|
||||
var/const/AREA_ERRNONE = 0
|
||||
var/const/AREA_STATION = 1
|
||||
var/const/AREA_SPACE = 2
|
||||
@@ -9,6 +16,7 @@
|
||||
var/const/BORDER_BETWEEN = 2
|
||||
var/const/BORDER_2NDTILE = 3
|
||||
var/const/BORDER_SPACE = 4
|
||||
var/const/BORDER_AREA = 5
|
||||
|
||||
var/const/ROOM_ERR_LOLWAT = 0
|
||||
var/const/ROOM_ERR_SPACE = -1
|
||||
@@ -16,7 +24,7 @@
|
||||
|
||||
/obj/item/blueprints/attack_self(mob/M as mob)
|
||||
if (!istype(M,/mob/living/carbon/human))
|
||||
M << "This is stack of useless pieces of harsh paper." //monkeys cannot into projecting
|
||||
M << "This is stack of useless pieces of heavy paper." //monkeys cannot into projecting
|
||||
return
|
||||
interact()
|
||||
return
|
||||
@@ -32,12 +40,24 @@
|
||||
if (get_area_type()!=AREA_SPACE)
|
||||
interact()
|
||||
return
|
||||
create_area()
|
||||
spawn()
|
||||
create_area(usr.client)
|
||||
if(usr && usr.client)
|
||||
for(var/image/to_remove in helper_images)
|
||||
if(to_remove in usr.client.images)
|
||||
usr.client.images.Remove(to_remove)
|
||||
del(to_remove)
|
||||
if ("edit_area")
|
||||
if (get_area_type()!=AREA_STATION)
|
||||
interact()
|
||||
return
|
||||
edit_area()
|
||||
spawn()
|
||||
edit_area(usr.client)
|
||||
if(usr && usr.client)
|
||||
for(var/image/to_remove in helper_images)
|
||||
if(to_remove in usr.client.images)
|
||||
usr.client.images.Remove(to_remove)
|
||||
del(to_remove)
|
||||
|
||||
/obj/item/blueprints/proc/interact()
|
||||
var/area/A = get_area()
|
||||
@@ -48,18 +68,18 @@
|
||||
switch (get_area_type())
|
||||
if (AREA_SPACE)
|
||||
text += {"
|
||||
<p>According this blueprints you are in <b>open space</b> now.</p>
|
||||
<p><a href='?src=\ref[src];action=create_area'>Mark this place as new area.</a></p>
|
||||
<p>According \the [src] you are in <b>open space</b> now.</p>
|
||||
<p><a href='?src=\ref[src];action=create_area'>Mark this place as a new area.</a></p>
|
||||
"}
|
||||
if (AREA_STATION)
|
||||
text += {"
|
||||
<p>According this blueprints you are in <b>[A.name]</b> now.</p>
|
||||
<p>According \the [src] you are in <b>\The [A]</b> now.</p>
|
||||
<p>You may <a href='?src=\ref[src];action=edit_area'>
|
||||
move an amendment</a> to the drawing.</p>
|
||||
move an amendment</a> to the designs.</p>
|
||||
"}
|
||||
if (AREA_SPECIAL)
|
||||
text += {"
|
||||
<p>This place doesn't noted on this blueprints.</p>
|
||||
<p>This place isn't noted on \the [src].</p>
|
||||
"}
|
||||
else
|
||||
return
|
||||
@@ -67,14 +87,10 @@ move an amendment</a> to the drawing.</p>
|
||||
usr << browse(text, "window=blueprints")
|
||||
onclose(usr, "blueprints")
|
||||
|
||||
|
||||
/obj/item/blueprints/proc/get_area()
|
||||
var/turf/T = get_turf_loc(usr)
|
||||
var/area/A = T.loc
|
||||
A = A.master
|
||||
return A
|
||||
|
||||
/obj/item/blueprints/proc/get_area_type(var/area/A = get_area())
|
||||
/obj/item/blueprints/proc/get_area_type(var/turf/T = get_turf(src))
|
||||
if(!T)
|
||||
return AREA_SPECIAL
|
||||
var/area/A = get_area(T)
|
||||
if (A.name == "Space")
|
||||
return AREA_SPACE
|
||||
var/list/SPECIALS = list(
|
||||
@@ -87,99 +103,237 @@ move an amendment</a> to the drawing.</p>
|
||||
/area/syndicate_station,
|
||||
/area/wizard_station,
|
||||
/area/prison
|
||||
// /area/derelict //commented out, all hail derelict-rebuilders!
|
||||
)
|
||||
for (var/type in SPECIALS)
|
||||
if ( istype(A,type) )
|
||||
return AREA_SPECIAL
|
||||
return AREA_STATION
|
||||
|
||||
/obj/item/blueprints/proc/create_area()
|
||||
/obj/item/blueprints/proc/create_area(var/client/user)
|
||||
//world << "DEBUG: create_area"
|
||||
var/res = detect_room(get_turf_loc(usr))
|
||||
if(!istype(res,/list))
|
||||
switch(res)
|
||||
var/list/turf/turfs = detect_room(get_turf(user.mob),user)
|
||||
if(!istype(turfs))
|
||||
switch(turfs)
|
||||
if(ROOM_ERR_SPACE)
|
||||
usr << "\red New area must be complete airtight!"
|
||||
usr << "\red The new area must be completly airtight!"
|
||||
return
|
||||
if(ROOM_ERR_TOOLARGE)
|
||||
usr << "\red New area too large!"
|
||||
usr << "\red The new area is too large!"
|
||||
return
|
||||
else
|
||||
usr << "\red Error! Please notify administration!"
|
||||
return
|
||||
var/list/turf/turfs = res
|
||||
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing")))
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
var/area/A = new
|
||||
A.name = str
|
||||
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
|
||||
//var/ma
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
//world << "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
|
||||
A.power_equip = 0
|
||||
A.power_light = 0
|
||||
A.power_environ = 0
|
||||
move_turfs_to_area(turfs, A)
|
||||
var/choice = alert("Would you like to add this to an adjacent area, or make a brand new one?","Creating new area.","New Area", "Add to Area", "Cancel")
|
||||
switch(choice)
|
||||
|
||||
if("New Area")
|
||||
var/list/turf/new_turfs = list()
|
||||
for(var/reference in turfs)
|
||||
if(turfs[reference] == "Space")
|
||||
var/turf/simulated/T = locate(reference) in world
|
||||
if(istype(T))
|
||||
new_turfs |= T
|
||||
if(!new_turfs.len)
|
||||
usr << "No aporpriate tiles found."
|
||||
return
|
||||
if(new_turfs.len > 500)
|
||||
usr << "\red Too big of an area!"
|
||||
return
|
||||
|
||||
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing") as null|text))
|
||||
if(!str || !length(str)) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
var/area/A = new
|
||||
A.name = str
|
||||
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
|
||||
A.power_equip = 0
|
||||
A.power_light = 0
|
||||
A.power_environ = 0
|
||||
A.contents |= new_turfs
|
||||
|
||||
|
||||
if("Add to Area")
|
||||
var/list/adjacent_areas = list()
|
||||
for(var/reference in turfs)
|
||||
adjacent_areas |= turfs[reference]
|
||||
|
||||
|
||||
//POSSIBLE FUTURE CHANGE
|
||||
adjacent_areas.Remove("Space") //It's not something you want... or is it? We can try this out later.
|
||||
|
||||
|
||||
var/decision = input("Which adjacent area do you want to combine with?","Blueprints Interface") as null|anything in adjacent_areas
|
||||
if(decision && decision in adjacent_areas)
|
||||
var/area/merge_target
|
||||
for(var/reference in turfs)
|
||||
if(turfs[reference] == decision)
|
||||
var/turf/simulated/T = locate(reference)
|
||||
if(istype(T))
|
||||
merge_target = get_area(T)
|
||||
break
|
||||
if(!merge_target)
|
||||
usr << "Something's gone badly wrong. Sorry!"
|
||||
return
|
||||
|
||||
var/list/turf/new_turfs = list()
|
||||
for(var/reference in turfs)
|
||||
if(turfs[reference] == "Space")
|
||||
var/turf/simulated/T = locate(reference) in world
|
||||
if(istype(T))
|
||||
new_turfs |= T
|
||||
merge_target.contents |= new_turfs
|
||||
spawn(2)
|
||||
merge_target.power_change()
|
||||
|
||||
else
|
||||
return
|
||||
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
spawn(5)
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
//world << "DEBUG: create_area(5): <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
|
||||
interact()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/blueprints/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
|
||||
A.contents.Add(turfs)
|
||||
//oldarea.contents.Remove(usr.loc) // not needed
|
||||
//T.loc = A //error: cannot change constant value
|
||||
|
||||
|
||||
/obj/item/blueprints/proc/edit_area()
|
||||
var/area/A = get_area()
|
||||
/obj/item/blueprints/proc/edit_area(var/client/user)
|
||||
var/area/A = get_area(src)
|
||||
//world << "DEBUG: edit_area"
|
||||
var/prevname = A.name
|
||||
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",prevname)))
|
||||
if(!str || !length(str) || str==prevname) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
set_area_machinery_title(A,str,prevname)
|
||||
for(var/area/RA in A.related)
|
||||
RA.name = str
|
||||
usr << "\blue You set the area '[prevname]' title to '[str]'."
|
||||
interact()
|
||||
var/choice = alert("Would you like to rename the area, or merge it with an adjacent one?", "Blueprint Interface", "Rename", "Merge", "Cancel")
|
||||
switch(choice)
|
||||
if("Rename")
|
||||
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",A.name) as null|text))
|
||||
if(!str || !length(str) || str==A.name) //cancel
|
||||
return
|
||||
if(length(str) > 50)
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
var/old_name = A.name
|
||||
for(var/area/RA in A.related)
|
||||
RA.name = str
|
||||
A.name = str
|
||||
A.set_area_machinery_title(old_name)
|
||||
usr << "\blue You retitle the area '[A.name]' to '[str]'."
|
||||
|
||||
|
||||
if("Merge")
|
||||
usr << "We appologize, but this function is not availible"
|
||||
/*
|
||||
var/list/turf/search_remaining_turfs = A.contents.Copy()
|
||||
var/list/turfs = list()
|
||||
for(var/turf/simulated/T in search_remaining_turfs)
|
||||
if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T)
|
||||
search_remaining_turfs.Remove(T)
|
||||
|
||||
var/limiter = 50
|
||||
|
||||
var/iteration = 0
|
||||
while(search_remaining_turfs.len > (A.contents.len)/10 )
|
||||
iteration++
|
||||
if(iteration > limiter)
|
||||
break
|
||||
var/turf/simulated/test_turf = pick(search_remaining_turfs)
|
||||
if(!istype(test_turf))
|
||||
continue
|
||||
var/list/turf/temp_turf_list = detect_room(test_turf,user)
|
||||
if(!istype(temp_turf_list))
|
||||
switch(temp_turf_list)
|
||||
if(ROOM_ERR_SPACE)
|
||||
usr << "\red \The [A] is not completly airtight!"
|
||||
return
|
||||
if(ROOM_ERR_TOOLARGE)
|
||||
usr << "\red \The [A] is too large to expand!"
|
||||
return
|
||||
else
|
||||
usr << "\red Error! Please notify administration!"
|
||||
return
|
||||
for(var/reference in temp_turf_list)
|
||||
var/turf/simulated/T = locate(reference)
|
||||
if(T)
|
||||
search_remaining_turfs.Remove(T)
|
||||
turfs |= temp_turf_list
|
||||
|
||||
var/list/adjacent_areas = list()
|
||||
for(var/reference in turfs)
|
||||
adjacent_areas |= turfs[reference]
|
||||
adjacent_areas.Remove("[A]")
|
||||
|
||||
var/decision = input("Which adjacent area do you want to merge with?","Blueprints Interface") as null|anything in adjacent_areas
|
||||
if(decision && decision in adjacent_areas)
|
||||
var/area/merge_target
|
||||
for(var/reference in turfs)
|
||||
if(turfs[reference] == decision)
|
||||
var/turf/simulated/T = locate(reference)
|
||||
if(istype(T))
|
||||
merge_target = get_area(T)
|
||||
break
|
||||
|
||||
if(!merge_target)
|
||||
usr << "Something's gone badly wrong. Sorry!"
|
||||
return
|
||||
|
||||
search_remaining_turfs = merge_target.contents.Copy()
|
||||
for(var/turf/simulated/T in search_remaining_turfs)
|
||||
if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T)
|
||||
search_remaining_turfs.Remove(T)
|
||||
|
||||
var/turf/simulated/T
|
||||
iteration = 0
|
||||
while(search_remaining_turfs.len > (merge_target.contents.len)/10 )
|
||||
T = pick(search_remaining_turfs)
|
||||
if(istype(T))
|
||||
var/list/turf_references = detect_room(T,user)
|
||||
if(!istype(turf_references))
|
||||
switch(turf_references)
|
||||
if(ROOM_ERR_SPACE)
|
||||
usr << "\red \The [merge_target] is not completly airtight!"
|
||||
return
|
||||
if(ROOM_ERR_TOOLARGE)
|
||||
usr << "\red \The [merge_target] is too large to expand!"
|
||||
return
|
||||
else
|
||||
usr << "\red Error! Please notify administration!"
|
||||
return
|
||||
for(var/reference in turf_references)
|
||||
T = locate(reference)
|
||||
if(T)
|
||||
search_remaining_turfs.Remove(T)
|
||||
iteration++
|
||||
if(iteration >= limiter)
|
||||
break
|
||||
|
||||
var/area_master = alert("If this is approximately the right shape for the combined area, which should the new area be?", "Blueprint Interface", "\The [A]", "\The [merge_target]", "Looks Wrong/Cancel")
|
||||
if(area_master == "\The [A]")
|
||||
|
||||
A.absorb(merge_target)
|
||||
|
||||
else if(area_master == "\The [merge_target]")
|
||||
|
||||
merge_target.absorb(A)
|
||||
|
||||
else if(area_master == "Looks Wrong/Cancel")
|
||||
return
|
||||
|
||||
else
|
||||
return*/
|
||||
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
spawn(5)
|
||||
interact()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/blueprints/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle)
|
||||
if (!oldtitle) // or dd_replacetext goes to infinite loop
|
||||
return
|
||||
for(var/area/RA in A.related)
|
||||
for(var/obj/machinery/alarm/M in RA)
|
||||
M.name = dd_replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/power/apc/M in RA)
|
||||
M.name = dd_replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in RA)
|
||||
M.name = dd_replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/M in RA)
|
||||
M.name = dd_replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/door/M in RA)
|
||||
M.name = dd_replacetext(M.name,oldtitle,title)
|
||||
//TODO: much much more. Unnamed airlocks, cameras, etc.
|
||||
|
||||
/obj/item/blueprints/proc/check_tile_is_border(var/turf/T2,var/dir)
|
||||
if (istype(T2, /turf/space))
|
||||
return BORDER_SPACE //omg hull breach we all going to die here
|
||||
if (istype(T2, /turf/simulated/shuttle))
|
||||
return BORDER_SPACE
|
||||
if (get_area_type(T2.loc)!=AREA_SPACE)
|
||||
return BORDER_BETWEEN
|
||||
if (istype(T2, /turf/simulated/wall))
|
||||
return BORDER_2NDTILE
|
||||
if (!istype(T2, /turf/simulated))
|
||||
@@ -200,41 +354,80 @@ move an amendment</a> to the drawing.</p>
|
||||
if (locate(/obj/structure/falserwall) in T2)
|
||||
return BORDER_2NDTILE
|
||||
|
||||
|
||||
if(get_area_type(T2) == AREA_SPECIAL)
|
||||
return BORDER_BETWEEN
|
||||
|
||||
return BORDER_NONE
|
||||
|
||||
/obj/item/blueprints/proc/detect_room(var/turf/first)
|
||||
var/list/turf/found = new
|
||||
var/list/turf/pending = list(first)
|
||||
while(pending.len)
|
||||
if (found.len+pending.len > 300)
|
||||
/obj/item/blueprints/proc/detect_room(var/turf/first, var/client/user)
|
||||
var/list/found = list()
|
||||
var/list/pending = list(first)
|
||||
var/area/B = get_area(first)
|
||||
var/list/areas = list(B.name)
|
||||
do
|
||||
if (found.len+pending.len > 800)
|
||||
return ROOM_ERR_TOOLARGE
|
||||
var/turf/T = pending[1] //why byond havent list::pop()?
|
||||
pending -= T
|
||||
var/turf/T = pending[1]
|
||||
pending.Remove(T)
|
||||
B = get_area(T)
|
||||
for (var/dir in cardinal)
|
||||
var/skip = 0
|
||||
for (var/obj/structure/window/W in T)
|
||||
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
|
||||
skip = 1; break
|
||||
if (skip) continue
|
||||
skip = 1
|
||||
break
|
||||
if (skip)
|
||||
continue
|
||||
for(var/obj/machinery/door/window/D in T)
|
||||
if(dir == D.dir)
|
||||
skip = 1; break
|
||||
if (skip) continue
|
||||
skip = 1
|
||||
break
|
||||
if (skip)
|
||||
continue
|
||||
|
||||
var/turf/NT = get_step(T,dir)
|
||||
if (!isturf(NT) || (NT in found) || (NT in pending))
|
||||
|
||||
if (!istype(NT))
|
||||
continue
|
||||
if("\ref[NT]" in found)
|
||||
continue
|
||||
if("\ref[NT]" in pending)
|
||||
continue
|
||||
|
||||
switch(check_tile_is_border(NT,dir))
|
||||
if(BORDER_NONE)
|
||||
pending+=NT
|
||||
var/area/A = get_area(NT)
|
||||
if( ( A.name in areas || A.name == "Space" || B.name == "Space" ) &&\
|
||||
!( "\ref[NT]" in pending || "\ref[NT]" in found) )
|
||||
//If it is another area, and neither of them are space AND it is not in the list of adjacent areas, then do not add it.
|
||||
pending |= NT
|
||||
areas |= A.name
|
||||
if(BORDER_BETWEEN)
|
||||
//do nothing, may be later i'll add 'rejected' list as optimization
|
||||
found["\ref[NT]"] = "[get_area(NT)]"
|
||||
if(user && !locate(/image) in NT)
|
||||
var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19)
|
||||
helper_images |= Z
|
||||
user.images += Z
|
||||
|
||||
if(BORDER_2NDTILE)
|
||||
found+=NT //tile included to new area, but we dont seek more
|
||||
found["\ref[NT]"] = "[get_area(NT)]" //tile included to new area, but we dont seek more
|
||||
if(user && !locate(/image) in NT)
|
||||
var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19)
|
||||
helper_images |= Z
|
||||
user.images += Z
|
||||
if(BORDER_SPACE)
|
||||
return ROOM_ERR_SPACE
|
||||
found+=T
|
||||
found["\ref[T]"] = "[get_area(T)]"
|
||||
if(user)
|
||||
for(var/image/I in user.images)
|
||||
if(I.loc == T)
|
||||
user.images.Remove(I)
|
||||
del(I)
|
||||
var/image/Z = image('ULIcons.dmi',T,"0-0-7",19)
|
||||
helper_images |= Z
|
||||
user.images += Z
|
||||
while(pending.len)
|
||||
return found
|
||||
|
||||
/*
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
//src.damtype = "fire"
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(flavor_text, 1)
|
||||
sd_SetLuminosity(CANDLE_LUM)
|
||||
ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM -2, 0)
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
@@ -74,20 +74,19 @@
|
||||
if(lit)
|
||||
lit = 0
|
||||
update_icon()
|
||||
sd_SetLuminosity(0)
|
||||
user.total_luminosity -= CANDLE_LUM
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
|
||||
|
||||
|
||||
pickup(mob/user)
|
||||
if(lit)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.total_luminosity += CANDLE_LUM
|
||||
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + CANDLE_LUM, user.LuminosityGreen + (CANDLE_LUM - 2), user.LuminosityBlue)
|
||||
|
||||
dropped(mob/user)
|
||||
if(lit)
|
||||
user.total_luminosity -= CANDLE_LUM
|
||||
src.sd_SetLuminosity(CANDLE_LUM)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM, 0)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ MONKEY CUBE BOX
|
||||
usr.put_in_hand(D)
|
||||
usr << "You take a donut out of the box."
|
||||
else
|
||||
D.loc = get_turf_loc(src)
|
||||
D.loc = get_turf(src)
|
||||
usr << "You take a donut out of the box."
|
||||
|
||||
src.update()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/proc/get_turf(turf/location as turf)
|
||||
while (location)
|
||||
if (istype(location, /turf))
|
||||
if (istype(location))
|
||||
return location
|
||||
|
||||
location = location.loc
|
||||
|
||||
@@ -97,13 +97,13 @@
|
||||
if (user.hand)
|
||||
if(ishuman(user))
|
||||
var/datum/organ/external/temp = user:organs["l_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
user << "\blue Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ishuman(user))
|
||||
var/datum/organ/external/temp = user:organs["r_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
user << "\blue Yo- wait a minute."
|
||||
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
@@ -136,7 +136,7 @@
|
||||
if (user.hand)
|
||||
if(ishuman(user))
|
||||
var/datum/organ/external/temp = user:organs["l_hand"]
|
||||
if(!temp.destroyed)
|
||||
if(!(temp.status & DESTROYED))
|
||||
user.l_hand = src
|
||||
else
|
||||
user << "\blue You pick \the [src] up with your ha- wait a minute."
|
||||
@@ -148,7 +148,7 @@
|
||||
else
|
||||
if(ishuman(user))
|
||||
var/datum/organ/external/temp = user:organs["r_hand"]
|
||||
if(!temp.destroyed)
|
||||
if(!(temp.status & DESTROYED))
|
||||
user.r_hand = src
|
||||
else
|
||||
user << "\blue You pick \the [src] up with your ha- wait a minute."
|
||||
@@ -176,13 +176,13 @@
|
||||
if (user.hand)
|
||||
if(ismonkey(user))
|
||||
var/datum/organ/external/temp = user:organs["l_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
user << "\blue Yo- wait a minute."
|
||||
return
|
||||
else
|
||||
if(ismonkey(user))
|
||||
var/datum/organ/external/temp = user:organs["r_hand"]
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
user << "\blue Yo- wait a minute."
|
||||
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
|
||||
@@ -122,9 +122,17 @@ ZIPPO
|
||||
var/icon_butt = "cigbutt"
|
||||
var/lastHolder = null
|
||||
var/smoketime = 300
|
||||
var/chem_volume = 15
|
||||
var/butt_count = 5 //count of butt sprite variations
|
||||
|
||||
/obj/item/clothing/mask/cigarette/New()
|
||||
..()
|
||||
flags |= NOREACT // so it doesn't react until you light it
|
||||
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Del()
|
||||
..()
|
||||
del(reagents)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -155,10 +163,37 @@ ZIPPO
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob)
|
||||
..()
|
||||
if(istype(glass)) // you can dip cigarettes into beakers
|
||||
var/transfered = glass.reagents.trans_to(src, chem_volume)
|
||||
if(transfered) // if reagents were transfered, show the message
|
||||
user << "\blue You dip \the [src] into \the [glass]."
|
||||
else // if not, either the beaker was empty, or the cigarette was full
|
||||
if(!glass.reagents.total_volume)
|
||||
user << "\red [glass] is empty."
|
||||
else
|
||||
user << "\red [src] is full."
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
src.damtype = "fire"
|
||||
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
|
||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||
e.set_up(round (src.reagents.get_reagent_amount("plasma")/2.5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
del(src)
|
||||
return
|
||||
if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently
|
||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||
e.set_up(round (src.reagents.get_reagent_amount("fuel")/5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
del(src)
|
||||
return
|
||||
src.flags &= ~NOREACT // allowing reagents to react after being lit
|
||||
src.reagents.handle_reactions()
|
||||
src.icon_state = icon_on
|
||||
src.item_state = icon_on
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
@@ -181,6 +216,14 @@ ZIPPO
|
||||
return
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
if(reagents && reagents.total_volume) // check if it has any reagents at all
|
||||
if( iscarbon(src.loc) && (src == loc:wear_mask) ) // if it's in the human/monkey mouth, transfer reagents to the mob
|
||||
var/mob/living/carbon/C = loc
|
||||
if(prob(15)) // so it's not an instarape in case of acid
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM)
|
||||
else // else just remove some of the reagents
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
return
|
||||
|
||||
|
||||
@@ -214,6 +257,7 @@ ZIPPO
|
||||
throw_speed = 0.5
|
||||
item_state = "cigaroff"
|
||||
smoketime = 1500
|
||||
chem_volume = 20
|
||||
butt_count = 0
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
@@ -230,6 +274,7 @@ ZIPPO
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
smoketime = 7200
|
||||
chem_volume = 30
|
||||
|
||||
/obj/item/weapon/cigbutt
|
||||
name = "cigarette butt"
|
||||
@@ -360,6 +405,14 @@ ZIPPO
|
||||
slot_flags = SLOT_BELT
|
||||
var/cigcount = 6
|
||||
|
||||
New()
|
||||
..()
|
||||
flags |= NOREACT
|
||||
create_reagents(15)//so people can inject cigarettes without opening a packet
|
||||
|
||||
Del()
|
||||
..()
|
||||
del(reagents)
|
||||
|
||||
update_icon()
|
||||
icon_state = "[initial(icon_state)][cigcount]"
|
||||
@@ -375,6 +428,7 @@ ZIPPO
|
||||
else
|
||||
cigcount--
|
||||
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
|
||||
reagents.trans_to(W, reagents.total_volume)
|
||||
user.put_in_hand(W)
|
||||
else
|
||||
return ..()
|
||||
@@ -441,7 +495,7 @@ ZIPPO
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message("\red After a few attempts, \the [user] manages to light \the [src], they however burn themself in the process.", 1)
|
||||
|
||||
user.total_luminosity += 2
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
src.lit = 0
|
||||
@@ -454,7 +508,7 @@ ZIPPO
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message("\red [user] quietly shuts off the [src].", 1)
|
||||
|
||||
user.total_luminosity -= 2
|
||||
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
|
||||
processing_objects.Remove(src)
|
||||
else
|
||||
return ..()
|
||||
@@ -483,13 +537,13 @@ ZIPPO
|
||||
|
||||
pickup(mob/user)
|
||||
if(lit)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.total_luminosity += 2
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
|
||||
return
|
||||
|
||||
|
||||
dropped(mob/user)
|
||||
if(lit)
|
||||
user.total_luminosity -= 2
|
||||
src.sd_SetLuminosity(2)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
|
||||
ul_SetLuminosity(2,1,0)
|
||||
return
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob)
|
||||
M.radiation += rand(20,50)
|
||||
if(istype(M,/mob/living))
|
||||
M.radiation += rand(20,50)
|
||||
|
||||
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
|
||||
if (dnatype == "ui")
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
CONTAINS:
|
||||
EMP GRENADE
|
||||
FLASHBANG
|
||||
CRITTER GRENADE
|
||||
|
||||
*/
|
||||
|
||||
@@ -289,7 +290,7 @@ FLASHBANG
|
||||
|
||||
/obj/item/weapon/flashbang/clusterbang
|
||||
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
|
||||
name = "Clusterbang"
|
||||
name = "clusterbang"
|
||||
icon = 'grenade.dmi'
|
||||
icon_state = "clusterbang"
|
||||
var/child = 0
|
||||
@@ -367,6 +368,159 @@ FLASHBANG
|
||||
|
||||
|
||||
|
||||
/****************************Critter Grenades***********************************************/
|
||||
|
||||
|
||||
/obj/item/weapon/spawnergrenade
|
||||
desc = "It is set to detonate in 3 seconds. It will unleash unleash an unspecified anomaly into the vicinity."
|
||||
name = "delivery grenade"
|
||||
icon = 'grenade.dmi'
|
||||
icon_state = "delivery"
|
||||
w_class = 2.0
|
||||
item_state = "flashbang"
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "materials=3;magnets=4"
|
||||
var/active = 0
|
||||
var/det_time = 30
|
||||
var/banglet = 0
|
||||
var/spawner_type = null // must be an object path
|
||||
var/deliveryamt = 1 // amount of type to deliver
|
||||
|
||||
|
||||
proc/prime()
|
||||
return
|
||||
|
||||
proc/clown_check(var/mob/living/user)
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (isscrewdriver(W))
|
||||
switch(src.det_time)
|
||||
if ("1")
|
||||
src.det_time = 30
|
||||
user.show_message("\blue You set the delivery grenade for 3 second detonation time.")
|
||||
src.desc = "It is set to detonate in 3 seconds."
|
||||
if ("30")
|
||||
src.det_time = 100
|
||||
user.show_message("\blue You set the delivery grenade for 10 second detonation time.")
|
||||
src.desc = "It is set to detonate in 10 seconds."
|
||||
if ("100")
|
||||
src.det_time = 1
|
||||
user.show_message("\blue You set the delivery grenade for instant detonation.")
|
||||
src.desc = "It is set to detonate instantly."
|
||||
src.add_fingerprint(user)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.equipped() == src)&&(!active)&&(clown_check(user)))
|
||||
user << "\red You prime the delivery grenade! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "delivery1"
|
||||
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(src.det_time)
|
||||
prime()
|
||||
return
|
||||
user.dir = get_dir(user, target)
|
||||
user.drop_item()
|
||||
var/t = (isturf(target) ? target : target.loc)
|
||||
walk_towards(src, t, 3)
|
||||
return
|
||||
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
return
|
||||
|
||||
prime() // Prime now just handles the two loops that query for people in lockers and people who can see it.
|
||||
|
||||
if(spawner_type && deliveryamt)
|
||||
// Make a quick flash
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, 'phasein.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(T, null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash) // flash dose faggots
|
||||
|
||||
for(var/i=1, i<=deliveryamt, i++)
|
||||
var/atom/movable/x = new spawner_type
|
||||
x.loc = T
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(x, pick(NORTH,SOUTH,EAST,WEST))
|
||||
|
||||
// Spawn some hostile syndicate critters
|
||||
if(istype(x, /obj/effect/critter))
|
||||
var/obj/effect/critter/C = x
|
||||
|
||||
C.atkcarbon = 1
|
||||
C.atksilicon = 1
|
||||
C.atkmech = 0
|
||||
C.atksynd = 0
|
||||
C.aggressive = 1
|
||||
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
user << "\red You prime the delivery grenade! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "delivery1"
|
||||
add_fingerprint(user)
|
||||
spawn( src.det_time )
|
||||
prime()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
clown_check(var/mob/living/user)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red Huh? How does this thing work?!"
|
||||
src.active = 1
|
||||
src.icon_state = "delivery1"
|
||||
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn( 5 )
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/spawnergrenade/manhacks
|
||||
name = "manhack delivery grenade"
|
||||
spawner_type = /obj/effect/critter/manhack
|
||||
deliveryamt = 5
|
||||
origin_tech = "materials=3;magnets=4;syndicate=4"
|
||||
|
||||
/obj/item/weapon/spawnergrenade/spesscarp
|
||||
name = "carp delivery grenade"
|
||||
spawner_type = /obj/effect/critter/spesscarp
|
||||
deliveryamt = 5
|
||||
origin_tech = "materials=3;magnets=4;syndicate=4"
|
||||
|
||||
/obj/item/weapon/spawnergrenade/elitespesscarp
|
||||
name = "elite carp delivery grenade"
|
||||
spawner_type = /obj/effect/critter/spesscarp/elite
|
||||
deliveryamt = 2
|
||||
origin_tech = "materials=3;magnets=4;syndicate=4"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:05
|
||||
|
||||
/obj/item/weapon/implant
|
||||
name = "implant"
|
||||
desc = "An implant. Not usually seen outside a body."
|
||||
@@ -240,6 +238,44 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
H << "\blue You feel a surge of loyalty towards NanoTrasen."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/implant/adrenalin
|
||||
name = "adrenalin"
|
||||
desc = "Removes all stuns and knockdowns."
|
||||
var/uses
|
||||
|
||||
get_data()
|
||||
var/dat = {"
|
||||
<b>Implant Specifications:</b><BR>
|
||||
<b>Name:</b> Cybersun Industries Adrenalin Implant<BR>
|
||||
<b>Life:</b> Five days.<BR>
|
||||
<b>Important Notes:</b> <font color='red'>Illegal</font><BR>
|
||||
<HR>
|
||||
<b>Implant Details:</b> Subjects injected with implant can activate a massive injection of adrenalin.<BR>
|
||||
<b>Function:</b> Contains nanobots to stimulate body to mass-produce Adrenalin.<BR>
|
||||
<b>Special Features:</b> Will prevent and cure most forms of brainwashing.<BR>
|
||||
<b>Integrity:</b> Implant can only be used three times before the nanobots are depleted."}
|
||||
return dat
|
||||
|
||||
|
||||
trigger(emote, mob/source as mob)
|
||||
if (src.uses < 1) return 0
|
||||
if (emote == "pale")
|
||||
src.uses--
|
||||
source << "\blue You feel a sudden surge of energy!"
|
||||
source.SetStunned(0)
|
||||
source.SetWeakened(0)
|
||||
source.SetParalysis(0)
|
||||
|
||||
return
|
||||
|
||||
|
||||
implanted(mob/source as mob)
|
||||
source.mind.store_memory("A implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted freedom implant can be activated by using the pale emote, <B>say *pale</B> to attempt to activate."
|
||||
return
|
||||
|
||||
|
||||
//BS12 Explosive
|
||||
/obj/item/weapon/implant/explosive
|
||||
name = "explosive implant"
|
||||
@@ -271,8 +307,8 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
if(istype(imp_in, /mob/))
|
||||
var/mob/T = imp_in
|
||||
T.gib()
|
||||
explosion(find_loc(imp_in), 1, 3, 4, 6, 3)
|
||||
var/turf/t = find_loc(imp_in)
|
||||
explosion(get_turf(imp_in), 1, 3, 4, 6, 3)
|
||||
var/turf/t = get_turf(imp_in)
|
||||
if(t)
|
||||
t.hotspot_expose(3500,125)
|
||||
del(src)
|
||||
|
||||
@@ -26,20 +26,22 @@
|
||||
if (M != user)
|
||||
user.visible_message("\red \The [user] tries to implant \the [M] with \the [src]!","\red You try to implant \the [M] with \the [src]!")
|
||||
else
|
||||
user.visible_message("\red \The [user] tries to implant [user.get_gender_form("itself")] with \the [src]!","\red You try to implant yourself with \the [src]!")
|
||||
user.visible_message("\red \The [user] tries to implant [user.get_visible_gender() == MALE ? "himself" : user.get_visible_gender() == FEMALE ? "herself" : "themselves"] with \the [src]!","\red You try to implant yourself with \the [src]!")
|
||||
if(!do_mob(user, M,60))
|
||||
return
|
||||
if(hasorgans(M))
|
||||
var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting))
|
||||
if(target.destroyed)
|
||||
if(target.status & DESTROYED)
|
||||
user << "What [target.display_name]?"
|
||||
return
|
||||
if(!target.implant)
|
||||
target.implant = list()
|
||||
target.implant += imp
|
||||
imp.loc = target
|
||||
if (M != user)
|
||||
user.visible_message("\red \The [user] implants \the [M]'s [target.display_name] with \the [src]!","\red You implant \the [M]'s [target.display_name] with \the [src]!")
|
||||
else
|
||||
user.visible_message("\red \The [user] implants [user.get_gender_form("its")] own [target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!")
|
||||
user.visible_message("\red \The [user] implants [user.get_visible_gender() == MALE ? "his" : user.get_visible_gender() == FEMALE ? "her" : "their"] own [target.display_name] with \the [src]!","\red You implant your [target.display_name] with \the [src]!")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src] ([imp]) by [user] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src] ([imp]) to implant [M] ([M.ckey])</font>")
|
||||
log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
|
||||
@@ -74,6 +76,15 @@
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin
|
||||
name = "implanter-adrenalin"
|
||||
|
||||
/obj/item/weapon/implanter/adrenalin/New()
|
||||
src.imp = new /obj/item/weapon/implant/adrenalin(src)
|
||||
..()
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implanter/compressed
|
||||
name = "implanter (C)"
|
||||
icon_state = "cimplanter0"
|
||||
|
||||
@@ -7,8 +7,18 @@ MEDICAL
|
||||
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
var/heal_cap = 0
|
||||
|
||||
if(istype(src, /obj/item/stack/medical/advanced))
|
||||
heal_cap = -50
|
||||
|
||||
if (M.stat == 2)
|
||||
user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!"
|
||||
var/t_him = "it"
|
||||
if (M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
user << "\red \The [M] is dead, you cannot help [t_him]!"
|
||||
return
|
||||
|
||||
if (!istype(M))
|
||||
@@ -21,165 +31,93 @@ MEDICAL
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
var/stoppedblood = 0
|
||||
if(hasorgans(M))
|
||||
var/datum/organ/external/affecting = M:get_organ("chest")
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/affecting = H.get_organ("chest")
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/user2 = user
|
||||
affecting = M:get_organ(check_zone(user2.zone_sel.selecting))
|
||||
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
|
||||
else
|
||||
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
|
||||
affecting = M:get_organ("head")
|
||||
if(affecting.destroyed && !affecting.gauzed)
|
||||
user.visible_message("\red \The [user] does [user.get_gender_form("its")] best to stem \the [M]'s bleeding from [M.get_gender_form("its")] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.")
|
||||
affecting.gauzed = 1
|
||||
use(1)
|
||||
return
|
||||
if(!istype(affecting, /datum/organ/external))
|
||||
affecting = H.get_organ("head")
|
||||
|
||||
if(affecting.robot)
|
||||
if(affecting.status & ROBOT)
|
||||
user << "Medical equipment for a robot arm? Better get a welder..."
|
||||
return
|
||||
|
||||
for(var/datum/organ/wound/W in affecting.wounds)
|
||||
if(W.bleeding || !W.is_healing)
|
||||
if(heal_brute && W.wound_type == 2)
|
||||
continue
|
||||
if(heal_burn && W.wound_type < 2)
|
||||
continue
|
||||
if(W.wound_size > 3 && (W.bleeding || !W.is_healing))
|
||||
if(stoppedblood)
|
||||
stoppedblood += 1
|
||||
break
|
||||
W.bleeding = 0
|
||||
W.is_healing = 1
|
||||
stoppedblood = 1
|
||||
else if(W.wound_size <= 3)
|
||||
if(stoppedblood)
|
||||
stoppedblood += 1
|
||||
break
|
||||
W.stopbleeding()
|
||||
stoppedblood = 1
|
||||
|
||||
if (user && stoppedblood)
|
||||
if(istype(src, /obj/item/stack/medical/splint))
|
||||
var/limb = affecting.getDisplayName()
|
||||
if(!((affecting.name == "l_arm") || (affecting.name == "r_arm") || (affecting.name == "l_leg") || (affecting.name == "r_leg")))
|
||||
user << "\red You can't apply a splint there!"
|
||||
return
|
||||
if(!affecting.status & BROKEN)
|
||||
user << "\red [M]'s [limb] isn't broken!"
|
||||
return
|
||||
if(affecting.status & SPLINTED)
|
||||
user << "\red [M]'s [limb] is already splinted!"
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
|
||||
user.visible_message("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
|
||||
else
|
||||
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.get_gender_form("its")] own cuts with \the [src].", "\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].", "\red You hear something like gauze being ripped.")
|
||||
else if(user)
|
||||
user << "\red Nothing to patch up!"
|
||||
if((!user.hand && affecting.name == "r_arm") || (user.hand && affecting.name == "l_arm"))
|
||||
user << "\red You can't apply a splint to the arm you're using!"
|
||||
return
|
||||
user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.")
|
||||
if(do_after(user, 50))
|
||||
if (M != user)
|
||||
user.visible_message("\red [user] finishes applying \the [src] to [M]'s [limb].", "\red You finish applying \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
|
||||
else
|
||||
if(prob(25))
|
||||
user.visible_message("\red [user] successfully applies \the [src] to their [limb].", "\red You successfully apply \the [src] to your [limb].", "\red You hear something being wrapped.")
|
||||
else
|
||||
user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
|
||||
return
|
||||
affecting.status |= SPLINTED
|
||||
use(1)
|
||||
M.update_clothing()
|
||||
return
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
use(1)
|
||||
if (M.health < heal_cap)
|
||||
var/t_him = "it"
|
||||
if (M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
user << "\red \The [M] is wounded badly, this item cannot help [t_him]!"
|
||||
return
|
||||
|
||||
// if (M.health < 50 && !stoppedblood)
|
||||
// var/t_him = "it"
|
||||
// if (M.gender == MALE)
|
||||
// t_him = "him"
|
||||
// else if (M.gender == FEMALE)
|
||||
// t_him = "her"
|
||||
// user << "\red \The [M] is wounded badly, this item cannot help [t_him]!"
|
||||
// return
|
||||
|
||||
// if (user)
|
||||
// if (M != user)
|
||||
// user.visible_message( \
|
||||
// "\blue [M] has been applied with [src] by [user].", \
|
||||
// "\blue You apply \the [src] to [M]." \
|
||||
// )
|
||||
// else
|
||||
// var/t_himself = "itself"
|
||||
// if (user.gender == MALE)
|
||||
// t_himself = "himself"
|
||||
// else if (user.gender == FEMALE)
|
||||
// t_himself = "herself"
|
||||
|
||||
// user.visible_message( \
|
||||
// "\blue [M] applied [src] on [t_himself].", \
|
||||
// "\blue You apply \the [src] on yourself." \
|
||||
// )
|
||||
|
||||
// if (istype(M, /mob/living/carbon/human))
|
||||
// var/mob/living/carbon/human/H = M
|
||||
// var/datum/organ/external/affecting = H.get_organ("chest")
|
||||
|
||||
// if(istype(user, /mob/living/carbon/human))
|
||||
// var/mob/living/carbon/human/user2 = user
|
||||
// affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
|
||||
// else
|
||||
// if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
|
||||
// affecting = H.get_organ("head")
|
||||
//
|
||||
// if (affecting.heal_damage(src.heal_brute, src.heal_burn))
|
||||
// H.UpdateDamageIcon()
|
||||
// M.updatehealth()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/stack/medical/advanced/attack(mob/living/carbon/M as mob, mob/user as mob)
|
||||
if (M.stat == 2)
|
||||
user << "\red \The [M] is dead, you cannot help [M.get_gender_form("it")]!"
|
||||
return
|
||||
|
||||
if (!istype(M))
|
||||
user << "\red \The [src] cannot be applied to \the [M]!"
|
||||
return 1
|
||||
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon) || \
|
||||
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
|
||||
var/stoppedblood = 0
|
||||
if(hasorgans(M))
|
||||
var/datum/organ/external/affecting = M:get_organ("chest")
|
||||
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/user2 = user
|
||||
affecting = M:get_organ(check_zone(user2.zone_sel.selecting))
|
||||
else
|
||||
if(!istype(affecting, /datum/organ/external) || affecting:burn_dam <= 0)
|
||||
affecting = M:get_organ("head")
|
||||
if(affecting.destroyed && !affecting.gauzed)
|
||||
M.visible_message("\red \The [user] does their best to stem \the [M]'s bleeding from [M.get_gender_form("its")] stump.", "\red You do your best to stop the bleeding from \the [M]'s stump.", "\red You hear something like gauze being ripped.")
|
||||
affecting.gauzed = 1
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
|
||||
H.UpdateDamageIcon()
|
||||
if (user)
|
||||
if (M != user)
|
||||
user.visible_message("\red \The [H]'s [affecting.display_name] has been bandaged with \a [src] by \the [user].",\
|
||||
"\red You bandage \the [H]'s [affecting.display_name] with \the [src].",\
|
||||
"You hear gauze being ripped.")
|
||||
else
|
||||
var/t_his = "its"
|
||||
if (user.gender == MALE)
|
||||
t_his = "his"
|
||||
else if (user.gender == FEMALE)
|
||||
t_his = "her"
|
||||
user.visible_message("\red \The [user] bandages [t_his] [affecting.display_name] with \a [src].",\
|
||||
"\red You bandage your [affecting.display_name] with \the [src].",\
|
||||
"You hear gauze being ripped.")
|
||||
use(1)
|
||||
return
|
||||
if(affecting.robot)
|
||||
user << "Medical equipment for a robot arm? Better get a welder..."
|
||||
return
|
||||
else
|
||||
user << "Nothing to patch up!"
|
||||
|
||||
for(var/datum/organ/wound/W in affecting.wounds)
|
||||
if(W.bleeding || !W.healing_state)
|
||||
if(heal_brute && W.wound_type == 2)
|
||||
continue
|
||||
if(heal_burn && W.wound_type < 2)
|
||||
continue
|
||||
if(stoppedblood)
|
||||
stoppedblood++
|
||||
break
|
||||
W.stopbleeding()
|
||||
stoppedblood = 1
|
||||
|
||||
if (user && stoppedblood)
|
||||
if (M != user)
|
||||
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s cuts with \the [src].",\
|
||||
"\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] \the [M]'s [heal_burn? "burns" : "wounds"].",\
|
||||
"\red You hear something like gauze being ripped.")
|
||||
else
|
||||
user.visible_message("\red \The [user] [heal_burn? "salves" : "bandages"] [stoppedblood - 1 ? "some of" : "the last of"] [user.get_gender_form("its")] own cuts with \the [src].",\
|
||||
"\red You [heal_burn? "salve" : "bandage up"] [stoppedblood - 1 ? "some of" : "the last of"] your [heal_burn? "burns" : "wounds"].",\
|
||||
"\red You hear something like gauze being ripped.")
|
||||
else if(user)
|
||||
user << "\red Nothing to patch up!"
|
||||
return
|
||||
M.updatehealth()
|
||||
else
|
||||
if (M.health < heal_cap)
|
||||
var/t_him = "it"
|
||||
if (M.gender == MALE)
|
||||
t_him = "him"
|
||||
else if (M.gender == FEMALE)
|
||||
t_him = "her"
|
||||
user << "\red \The [M] is wounded badly, this item cannot help [t_him]!"
|
||||
return
|
||||
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
use(1)
|
||||
use(1)
|
||||
@@ -22,6 +22,11 @@ NOTEBOOK
|
||||
src.overlays += "paper_words"
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/Del()
|
||||
if(burning && istype(loc, /mob))
|
||||
loc.ul_SetLuminosity(loc.LuminosityRed - 8, loc.LuminosityGreen - 6, loc.LuminosityBlue)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/paper/process()
|
||||
if(iteration < 5)
|
||||
var/turf/location = src.loc
|
||||
@@ -35,11 +40,6 @@ NOTEBOOK
|
||||
else
|
||||
for(var/mob/M in viewers(5, get_turf(src)))
|
||||
M << "\red \the [src] burns up."
|
||||
if(istype(src.loc,/mob))
|
||||
var/mob/M = src.loc
|
||||
M.total_luminosity -= 8
|
||||
else
|
||||
src.sd_SetLuminosity(0)
|
||||
processing_objects.Remove(src)
|
||||
del(src)
|
||||
|
||||
@@ -53,13 +53,13 @@ NOTEBOOK
|
||||
|
||||
/obj/item/weapon/paper/pickup(mob/user)
|
||||
if(burning)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.total_luminosity += 8
|
||||
src.ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 8, user.LuminosityGreen + 6, user.LuminosityBlue)
|
||||
|
||||
/obj/item/weapon/paper/dropped(mob/user)
|
||||
if(burning)
|
||||
user.total_luminosity -= 8
|
||||
src.sd_SetLuminosity(8)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - 8, user.LuminosityGreen - 6, user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(8,6,0)
|
||||
|
||||
/obj/item/weapon/paper/examine()
|
||||
set src in view()
|
||||
@@ -163,7 +163,7 @@ NOTEBOOK
|
||||
if(is_burn(P))
|
||||
for(var/mob/M in viewers(5, get_turf(src)))
|
||||
M << "\red [user] sets \the [src] on fire."
|
||||
user.total_luminosity += 8
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 8, user.LuminosityGreen + 6, user.LuminosityBlue)
|
||||
burning = 1
|
||||
processing_objects.Add(src)
|
||||
update_icon()
|
||||
@@ -360,7 +360,7 @@ NOTEBOOK
|
||||
usr.put_in_hand(P)
|
||||
usr << "You take a paper out of the bin."
|
||||
else
|
||||
P.loc = get_turf_loc(src)
|
||||
P.loc = get_turf(src)
|
||||
usr << "You take a paper out of the bin."
|
||||
|
||||
src.update()
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/obj/item/weapon/melee/baton
|
||||
name = "stun baton"
|
||||
desc = "A stun baton for incapacitating people with."
|
||||
icon_state = "stunbaton"
|
||||
item_state = "baton"
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
force = 10
|
||||
throwforce = 7
|
||||
w_class = 3
|
||||
var/charges = 10
|
||||
var/status = 0
|
||||
origin_tech = "combat=2"
|
||||
|
||||
/obj/item/weapon/melee/baton/update_icon()
|
||||
if(status)
|
||||
icon_state = "stunbaton_active"
|
||||
else
|
||||
icon_state = "stunbaton"
|
||||
|
||||
/obj/item/weapon/melee/baton/attack_self(mob/user as mob)
|
||||
if(status && (CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You grab the [src] on the wrong side."
|
||||
user.Weaken(30)
|
||||
charges--
|
||||
if(charges < 1)
|
||||
status = 0
|
||||
update_icon()
|
||||
return
|
||||
if(charges > 0)
|
||||
status = !status
|
||||
user << "<span class='notice'>\The [src] is now [status ? "on" : "off"].</span>"
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
update_icon()
|
||||
else
|
||||
status = 0
|
||||
user << "<span class='warning'>\The [src] is out of charge.</span>"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob)
|
||||
if(status && (CLUMSY in user.mutations) && prob(50))
|
||||
user << "<span class='danger'>You accidentally hit yourself with the [src]!</span>"
|
||||
user.Weaken(30)
|
||||
charges--
|
||||
if(charges < 1)
|
||||
status = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if(isrobot(M))
|
||||
..()
|
||||
return
|
||||
|
||||
if(user.a_intent != "help")
|
||||
if(!..()) return
|
||||
H.apply_effect(5, WEAKEN, 0)
|
||||
H.visible_message("<span class='danger'>[M] has been beaten with the [src] by [user]!</span>")
|
||||
playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
else if(!status)
|
||||
H.visible_message("<span class='warning'>[M] has been prodded with the [src] by [user]. Luckily it was off.</span>")
|
||||
return
|
||||
|
||||
if(status)
|
||||
H.apply_effect(10, STUN, 0)
|
||||
H.apply_effect(10, WEAKEN, 0)
|
||||
H.apply_effect(10, STUTTER, 0)
|
||||
user.lastattacked = M
|
||||
H.lastattacker = user
|
||||
charges--
|
||||
H.visible_message("<span class='danger'>[M] has been stunned with the [src] by [user]!</span>")
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
if(charges < 1)
|
||||
status = 0
|
||||
update_icon()
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/melee/baton/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
charges = 0
|
||||
if(2)
|
||||
charges = max(0, charges - 5)
|
||||
if(charges < 1)
|
||||
status = 0
|
||||
update_icon()
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
|
||||
if(S.destroyed)
|
||||
if(!S.attachable)
|
||||
if(S.status & DESTROYED)
|
||||
if(!(S.status & ATTACHABLE))
|
||||
user << "\red The wound is not ready for a replacement!"
|
||||
return 0
|
||||
if(M != user)
|
||||
@@ -51,15 +51,17 @@
|
||||
user << "\red You mess up!"
|
||||
S.take_damage(15)
|
||||
|
||||
S.broken = 0
|
||||
S.attachable = 0
|
||||
S.destroyed = 0
|
||||
S.robot = 1
|
||||
S.status &= ~BROKEN
|
||||
S.status &= ~SPLINTED
|
||||
S.status &= ~ATTACHABLE
|
||||
S.status &= ~DESTROYED
|
||||
S.status |= ROBOT
|
||||
var/datum/organ/external/T = H.organs["[limbloc]"]
|
||||
T.attachable = 0
|
||||
T.destroyed = 0
|
||||
T.broken = 0
|
||||
T.robot = 1
|
||||
T.status &= ~BROKEN
|
||||
T.status &= ~SPLINTED
|
||||
T.status &= ~ATTACHABLE
|
||||
T.status &= ~DESTROYED
|
||||
T.status |= ROBOT
|
||||
M.update_body()
|
||||
M.updatehealth()
|
||||
M.UpdateDamageIcon()
|
||||
|
||||
@@ -24,11 +24,11 @@ CIRCULAR SAW
|
||||
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
|
||||
if(S.destroyed)
|
||||
if(S.bleeding)
|
||||
if(S.status & DESTROYED)
|
||||
if(S.status & BLEEDING)
|
||||
user << "\red There's too much blood here!"
|
||||
return 0
|
||||
if(!S.cutaway)
|
||||
if(!(S.status & CUT_AWAY))
|
||||
user << "\red The flesh hasn't been cleanly cut!"
|
||||
return 0
|
||||
if(M != user)
|
||||
@@ -245,17 +245,17 @@ CIRCULAR SAW
|
||||
if(!S || !istype(S))
|
||||
return 0
|
||||
|
||||
if(S.destroyed)
|
||||
if(S.status & DESTROYED)
|
||||
return ..()
|
||||
|
||||
if(S.robot)
|
||||
if(S.status & ROBOT)
|
||||
user << "Medical equipment for a robot arm? How would that do any good..."
|
||||
return
|
||||
|
||||
if(!S.open)
|
||||
user << "\red There is skin in the way!"
|
||||
return 0
|
||||
if(S.bleeding)
|
||||
if(S.status & BLEEDING)
|
||||
user << "\red [H] is profusely bleeding in \his [S.display_name]!"
|
||||
return 0
|
||||
|
||||
@@ -303,11 +303,11 @@ CIRCULAR SAW
|
||||
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
|
||||
if(S.destroyed)
|
||||
if(!S.bleeding)
|
||||
if(S.status & DESTROYED)
|
||||
if(!(S.status & BLEEDING))
|
||||
user << "\red There is nothing bleeding here!"
|
||||
return 0
|
||||
if(!S.cutaway)
|
||||
if(!(S.status & CUT_AWAY))
|
||||
user << "\red The flesh hasn't been cleanly cut!"
|
||||
return 0
|
||||
if(M != user)
|
||||
@@ -333,7 +333,7 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
S.take_damage(15)
|
||||
|
||||
S.bleeding = 0
|
||||
S.status &= ~BLEEDING
|
||||
M.updatehealth()
|
||||
M.UpdateDamageIcon()
|
||||
|
||||
@@ -559,10 +559,10 @@ CIRCULAR SAW
|
||||
if(!S || !istype(S))
|
||||
return 0
|
||||
|
||||
if(S.destroyed)
|
||||
if(S.status & DESTROYED)
|
||||
return ..()
|
||||
|
||||
if(S.robot)
|
||||
if(S.status & ROBOT)
|
||||
user << "Medical equipment for a robot arm? How would that do any good?"
|
||||
return
|
||||
|
||||
@@ -570,7 +570,7 @@ CIRCULAR SAW
|
||||
user << "\red There is skin in the way!"
|
||||
return 0
|
||||
|
||||
if(!S.bleeding)
|
||||
if(!(S.status & BLEEDING))
|
||||
if(S.implant)
|
||||
if(H != user)
|
||||
H.visible_message( \
|
||||
@@ -581,33 +581,34 @@ CIRCULAR SAW
|
||||
"\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)
|
||||
do
|
||||
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 \a [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 \a [src]!", \
|
||||
"\red You successfully remove the implant in your [S.display_name] with \the [src]!")
|
||||
var/obj/item/weapon/implant/implant = pick(S.implant)
|
||||
implant.loc = (get_turf(H))
|
||||
implant.implanted = 0
|
||||
S.implant = null
|
||||
S.implant.Remove(implant)
|
||||
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!")
|
||||
if(!S.implant.len)
|
||||
del S.implant
|
||||
else
|
||||
H.visible_message( \
|
||||
"\red [user] fails to removes the implant!", \
|
||||
"\red You fail to removes the implant!")
|
||||
"\red [user] fails to remove the implant!", \
|
||||
"\red You fail to remove the implant!")
|
||||
else
|
||||
break
|
||||
while (S.implant && S.implant.len)
|
||||
|
||||
return 1
|
||||
else
|
||||
@@ -637,7 +638,7 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
S.take_damage(15)
|
||||
|
||||
S.bleeding = 0
|
||||
S.status &= ~BLEEDING
|
||||
|
||||
H.updatehealth()
|
||||
H.UpdateDamageIcon()
|
||||
@@ -813,7 +814,7 @@ CIRCULAR SAW
|
||||
if(!S.open)
|
||||
usr << "<b>You have to cut the limb open first!</b>"
|
||||
return
|
||||
if(S.robot)
|
||||
if(S.status & ROBOT)
|
||||
user << "Medical equipment for a robot arm? How would that do any good?"
|
||||
return
|
||||
for(var/mob/O in viewers(M))
|
||||
@@ -837,11 +838,11 @@ CIRCULAR SAW
|
||||
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
|
||||
if(S.destroyed)
|
||||
if(S.bleeding)
|
||||
if(S.status & DESTROYED)
|
||||
if(S.status & BLEEDING)
|
||||
user << "\red There's too much blood here!"
|
||||
return 0
|
||||
if(!S.cutaway)
|
||||
if(!(S.status & CUT_AWAY))
|
||||
user << "\red The flesh hasn't been cleanly cut!"
|
||||
return 0
|
||||
if(S.open != 3)
|
||||
@@ -872,7 +873,7 @@ CIRCULAR SAW
|
||||
|
||||
S.open = 0
|
||||
S.stage = 0
|
||||
S.attachable = 1
|
||||
S.status |= ATTACHABLE
|
||||
M.updatehealth()
|
||||
M.UpdateDamageIcon()
|
||||
|
||||
@@ -1028,10 +1029,10 @@ CIRCULAR SAW
|
||||
if(!S || !istype(S))
|
||||
return 0
|
||||
|
||||
if(S.destroyed)
|
||||
if(S.status & DESTROYED)
|
||||
user << "What [S.display_name]?"
|
||||
|
||||
if(S.robot)
|
||||
if(S.status & ROBOT)
|
||||
user << "Medical equipment for a robot arm? How would that do any good..."
|
||||
return
|
||||
if(!S.open)
|
||||
@@ -1096,7 +1097,7 @@ CIRCULAR SAW
|
||||
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
|
||||
if(S.destroyed)
|
||||
if(S.status & DESTROYED)
|
||||
if(M != user)
|
||||
M.visible_message( \
|
||||
"\red [user] is beginning to cut away at the flesh where [H]'s [S.display_name] used to be with [src].", \
|
||||
@@ -1116,8 +1117,7 @@ CIRCULAR SAW
|
||||
"\red [user] finishes cutting where \his [S.display_name] used to be with [src]!", \
|
||||
"\red You finish cutting where your [S.display_name] used to be with [src]!")
|
||||
|
||||
S.cutaway = 1
|
||||
S.bleeding = 1
|
||||
S.status |= BLEEDING|CUT_AWAY
|
||||
M.updatehealth()
|
||||
M.UpdateDamageIcon()
|
||||
else
|
||||
@@ -1190,7 +1190,7 @@ CIRCULAR SAW
|
||||
|
||||
if(istype(H) && H.organs["head"])
|
||||
var/datum/organ/external/affecting = H.organs["head"]
|
||||
if(affecting.destroyed)
|
||||
if(affecting.status & DESTROYED)
|
||||
return ..()
|
||||
|
||||
if(istype(H) && ( \
|
||||
@@ -1242,7 +1242,7 @@ CIRCULAR SAW
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/datum/organ/external/affecting = M:get_organ("head")
|
||||
affecting.take_damage(7)
|
||||
affecting.open = 1
|
||||
affecting.status |= OPEN
|
||||
else
|
||||
M.take_organ_damage(7)
|
||||
|
||||
@@ -1420,10 +1420,10 @@ CIRCULAR SAW
|
||||
if(!S || !istype(S))
|
||||
return 0
|
||||
|
||||
if(S.destroyed)
|
||||
if(S.status & DESTROYED)
|
||||
return ..()
|
||||
|
||||
if(S.robot)
|
||||
if(S.status & ROBOT)
|
||||
user << "Medical equipment for a robot arm? How would that do any good..."
|
||||
return
|
||||
|
||||
@@ -1454,8 +1454,7 @@ CIRCULAR SAW
|
||||
user << "\red You mess up!"
|
||||
S.take_damage(15)
|
||||
|
||||
S.open = 1
|
||||
S.bleeding = 1
|
||||
S.status |= OPEN|BLEEDING
|
||||
if(S.display_name == "chest")
|
||||
H:embryo_op_stage = 1.0
|
||||
if(S.display_name == "groin")
|
||||
@@ -1467,14 +1466,13 @@ CIRCULAR SAW
|
||||
var/msg
|
||||
if(a == 1)
|
||||
msg = "\red [user]'s move slices open [H]'s wound, causing massive bleeding"
|
||||
S.brute_dam += 35
|
||||
S.createwound(rand(1,3))
|
||||
S.take_damage(35, 0, 1, "Malpractice")
|
||||
else if(a == 2)
|
||||
msg = "\red [user]'s move slices open [H]'s wound, and causes \him to accidentally stab himself"
|
||||
S.brute_dam += 35
|
||||
S.take_damage(35, 0, 1, "Malpractice")
|
||||
var/datum/organ/external/userorgan = user:organs["chest"]
|
||||
if(userorgan)
|
||||
userorgan.brute_dam += 35
|
||||
userorgan.take_damage(35, 0, 1, "Malpractice")
|
||||
else
|
||||
user.take_organ_damage(35)
|
||||
else if(a == 3)
|
||||
@@ -1524,7 +1522,7 @@ CIRCULAR SAW
|
||||
if(!hasorgans(M))
|
||||
return ..()
|
||||
var/datum/organ/external/S = M:organs["head"]
|
||||
if(S.destroyed)
|
||||
if(S.status & DESTROYED)
|
||||
return
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [M] gets \his [S.display_name] sawed at with [src] by [user].... It looks like [user] is trying to cut it off!"), 1)
|
||||
@@ -1534,7 +1532,7 @@ CIRCULAR SAW
|
||||
return
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [M] gets \his [S.display_name] sawed off with [src] by [user]."), 1)
|
||||
S.destroyed = 1
|
||||
S.status |= DESTROYED
|
||||
S.droplimb()
|
||||
M:update_body()
|
||||
if(1.0)
|
||||
@@ -1624,10 +1622,10 @@ CIRCULAR SAW
|
||||
else if(user.zone_sel.selecting != "chest" && hasorgans(M))
|
||||
var/mob/living/carbon/H = M
|
||||
var/datum/organ/external/S = H:organs[user.zone_sel.selecting]
|
||||
if(S.destroyed)
|
||||
if(S.status & DESTROYED)
|
||||
return
|
||||
|
||||
if(S.robot)
|
||||
if(S.status & ROBOT)
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, M)
|
||||
spark_system.attach(M)
|
||||
@@ -1688,32 +1686,33 @@ CIRCULAR SAW
|
||||
var/datum/organ/external/temp = M.organs[zone]
|
||||
var/msg
|
||||
|
||||
if(temp.destroyed)
|
||||
if(temp.status & DESTROYED)
|
||||
return ..()
|
||||
|
||||
// quickly convert embryo removal to bone surgery
|
||||
if(zone == "chest" && M.embryo_op_stage == 3)
|
||||
M.embryo_op_stage = 0
|
||||
temp.open = 2
|
||||
temp.bleeding = 0
|
||||
temp.status &= ~BLEEDING
|
||||
|
||||
// quickly convert appendectomy to bone surgery
|
||||
if(zone == "groin" && M.appendix_op_stage == 3)
|
||||
M.appendix_op_stage = 0
|
||||
temp.open = 2
|
||||
temp.bleeding = 0
|
||||
temp.status &= ~BLEEDING
|
||||
|
||||
msg = get_message(1,M,user,temp)
|
||||
for(var/mob/O in viewers(M,null))
|
||||
O.show_message("\red [msg]",1)
|
||||
if(do_mob(user,M,time))
|
||||
if(temp.open == 2 && !temp.bleeding)
|
||||
if(temp.wound in wound)
|
||||
if(temp.open == 2 && !(temp.status & BLEEDING))
|
||||
if(temp.broken_description in wound)
|
||||
if(temp.stage in stage)
|
||||
temp.stage += 1
|
||||
|
||||
if(IsFinalStage(temp.stage))
|
||||
temp.broken = 0
|
||||
temp.status &= ~BROKEN
|
||||
temp.status &= ~SPLINTED
|
||||
temp.stage = 0
|
||||
temp.perma_injury = 0
|
||||
temp.brute_dam = temp.min_broken_damage -1
|
||||
@@ -1811,16 +1810,17 @@ CIRCULAR SAW
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/name in H.organs)
|
||||
var/datum/organ/external/e = H.organs[name]
|
||||
if(e.destroyed) // this is nanites, not space magic
|
||||
if(e.status & DESTROYED) // this is nanites, not space magic
|
||||
continue
|
||||
e.brute_dam = 0.0
|
||||
e.burn_dam = 0.0
|
||||
e.bandaged = 0.0
|
||||
e.status &= ~BANDAGED
|
||||
e.max_damage = initial(e.max_damage)
|
||||
e.bleeding = 0
|
||||
e.status &= ~BLEEDING
|
||||
e.open = 0
|
||||
e.broken = 0
|
||||
e.destroyed = 0
|
||||
e.status &= ~BROKEN
|
||||
e.status &= ~DESTROYED
|
||||
e.status &= ~SPLINTED
|
||||
e.perma_injury = 0
|
||||
e.update_icon()
|
||||
H.update_body()
|
||||
|
||||
@@ -3,7 +3,7 @@ CONTAINS:
|
||||
SWORD
|
||||
BLADE
|
||||
AXE
|
||||
STUN BATON
|
||||
CLASSIC BATON
|
||||
ENERGY SHIELD (where else should i even put this)
|
||||
*/
|
||||
|
||||
@@ -95,104 +95,6 @@ ENERGY SHIELD (where else should i even put this)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
// STUN BATON
|
||||
|
||||
/obj/item/weapon/melee/baton/update_icon()
|
||||
if(src.status)
|
||||
icon_state = "stunbaton_active"
|
||||
else
|
||||
icon_state = "stunbaton"
|
||||
|
||||
/obj/item/weapon/melee/baton/attack_self(mob/user as mob)
|
||||
src.status = !( src.status )
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
usr << "\red You grab the stunbaton on the wrong side."
|
||||
usr.Paralyse(60)
|
||||
return
|
||||
if (src.status)
|
||||
user << "\blue The baton is now on."
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
else
|
||||
user << "\blue The baton is now off."
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
|
||||
update_icon()
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob)
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
usr << "\red You grab the stunbaton on the wrong side."
|
||||
usr.Weaken(30)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey]) (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
log_admin("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) attacked [M] ([M.ckey]) with [src].")
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
|
||||
|
||||
if(isrobot(M))
|
||||
..()
|
||||
return
|
||||
|
||||
if (status == 0 || (status == 1 && charges ==0))
|
||||
if(user.a_intent == "hurt")
|
||||
if(!..()) return
|
||||
M.Weaken(5)
|
||||
for(var/mob/O in viewers(M))
|
||||
if (O.client) O.show_message("\red <B>[M] has been beaten with the stun baton by [user]!</B>", 1)
|
||||
if(status == 1 && charges == 0)
|
||||
user << "\red Not enough charge"
|
||||
return
|
||||
else
|
||||
for(var/mob/O in viewers(M))
|
||||
if (O.client) O.show_message("\red <B>[M] has been prodded with the stun baton by [user]! Luckily it was off.</B>", 1)
|
||||
if(status == 1 && charges == 0)
|
||||
user << "\red Not enough charge"
|
||||
return
|
||||
if((charges > 0 && status == 1) && (istype(H, /mob/living/carbon)))
|
||||
flick("baton_active", src)
|
||||
if (user.a_intent == "hurt")
|
||||
if(!..()) return
|
||||
playsound(src.loc, 'Genhit.ogg', 50, 1, -1)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= 20
|
||||
else
|
||||
charges--
|
||||
if (M.stuttering < 1 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
||||
M.stuttering = 1
|
||||
M.Stun(1)
|
||||
M.Weaken(1)
|
||||
else
|
||||
playsound(src.loc, 'Egloves.ogg', 50, 1, -1)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.cell.charge -= 20
|
||||
else
|
||||
charges--
|
||||
if (M.stuttering < 10 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
|
||||
M.stuttering = 10
|
||||
M.Stun(10)
|
||||
M.Weaken(10)
|
||||
user.lastattacked = M
|
||||
M.lastattacker = user
|
||||
for(var/mob/O in viewers(M))
|
||||
if (O.client) O.show_message("\red <B>[M] has been stunned with the stun baton by [user]!</B>", 1, "\red You hear someone fall", 2)
|
||||
|
||||
/obj/item/weapon/melee/baton/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.charges = 0
|
||||
if(2)
|
||||
charges -= 5
|
||||
|
||||
/obj/item/weapon/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You club yourself over the head."
|
||||
|
||||
@@ -28,7 +28,7 @@ TILES
|
||||
/obj/item/weapon/wire/attack(mob/M as mob, mob/user as mob)
|
||||
if(hasorgans(M))
|
||||
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
|
||||
if(!S.robot || user.a_intent != "help")
|
||||
if(!(S.status & ROBOT) || user.a_intent != "help")
|
||||
return ..()
|
||||
if(S.brute_dam)
|
||||
S.heal_damage(0,15,0,1)
|
||||
|
||||
@@ -327,7 +327,7 @@ WELDINGTOOOL
|
||||
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
|
||||
if(hasorgans(M))
|
||||
var/datum/organ/external/S = M:organs[user.zone_sel.selecting]
|
||||
if(!S.robot || user.a_intent != "help")
|
||||
if(!(S.status & ROBOT) || user.a_intent != "help")
|
||||
return ..()
|
||||
if(S.brute_dam)
|
||||
S.heal_damage(15,0,0,1)
|
||||
@@ -397,11 +397,11 @@ WELDINGTOOOL
|
||||
|
||||
/obj/item/weapon/wirecutters/attack(mob/M as mob, mob/user as mob)
|
||||
if((M.handcuffed) && (istype(M:handcuffed, /obj/item/weapon/handcuffs/cable)))
|
||||
M.visible_message("You cut \the [M]'s restraints with \the [src]!",\
|
||||
"\The [usr] cuts \the [M]'s restraints with \the [src]!",\
|
||||
usr.visible_message("\The [usr] cuts \the [M]'s restraints with \the [src]!",\
|
||||
"You cut \the [M]'s restraints with \the [src]!",\
|
||||
"You hear cable being cut.")
|
||||
M.handcuffed = null
|
||||
M.update_clothing()
|
||||
return
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
opacity = 1
|
||||
|
||||
icon = 'mineral_doors.dmi'
|
||||
icon_state = "iron"
|
||||
icon_state = "metal"
|
||||
|
||||
var/mineralType = "iron"
|
||||
var/mineralType = "metal"
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
var/hardness = 1
|
||||
@@ -116,9 +116,13 @@
|
||||
|
||||
proc/Dismantle(devastated = 0)
|
||||
if(!devastated)
|
||||
var/ore = text2path("/obj/item/weapon/ore/[mineralType]")
|
||||
var/ore = text2path("/obj/item/stack/sheet/[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))
|
||||
del(src)
|
||||
|
||||
ex_act(severity = 1)
|
||||
@@ -154,7 +158,7 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/mineral_door/iron
|
||||
mineralType = "iron"
|
||||
mineralType = "metal"
|
||||
hardness = 3
|
||||
|
||||
/obj/structure/mineral_door/silver
|
||||
@@ -170,7 +174,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
sd_SetLuminosity(3)
|
||||
ul_SetLuminosity(0,3,0)
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
mineralType = "sandstone"
|
||||
@@ -205,7 +209,7 @@
|
||||
var/toxinsToDeduce = temperature/10
|
||||
|
||||
napalm.toxins = toxinsToDeduce
|
||||
napalm.temperature = 400+T0C
|
||||
napalm.temperature = 200+T0C
|
||||
napalm.update_values()
|
||||
|
||||
target_tile.assume_air(napalm)
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
return
|
||||
|
||||
/obj/item/device/radio/electropack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
src.e_pads = !( src.e_pads )
|
||||
if (src.e_pads)
|
||||
@@ -46,32 +44,33 @@
|
||||
user.show_message("\blue The electric pads have been reinserted!")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
else if (istype(W, /obj/item/clothing/head/helmet))
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'assemblies.dmi'
|
||||
W.loc = A
|
||||
A.part1 = W
|
||||
W.layer = initial(W.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= W
|
||||
if (user.r_hand == W)
|
||||
user.u_equip(W)
|
||||
user.r_hand = A
|
||||
else
|
||||
user.u_equip(W)
|
||||
user.l_hand = A
|
||||
W.master = A
|
||||
src.master = A
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
src.loc = A
|
||||
A.part2 = src
|
||||
A.layer = 20
|
||||
src.add_fingerprint(user)
|
||||
A.add_fingerprint(user)
|
||||
else
|
||||
if (istype(W, /obj/item/clothing/head/helmet))
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit( user )
|
||||
A.icon = 'assemblies.dmi'
|
||||
W.loc = A
|
||||
A.part1 = W
|
||||
W.layer = initial(W.layer)
|
||||
if (user.client)
|
||||
user.client.screen -= W
|
||||
if (user.r_hand == W)
|
||||
user.u_equip(W)
|
||||
user.r_hand = A
|
||||
else
|
||||
user.u_equip(W)
|
||||
user.l_hand = A
|
||||
W.master = A
|
||||
src.master = A
|
||||
src.layer = initial(src.layer)
|
||||
user.u_equip(src)
|
||||
if (user.client)
|
||||
user.client.screen -= src
|
||||
src.loc = A
|
||||
A.part2 = src
|
||||
A.layer = 20
|
||||
src.add_fingerprint(user)
|
||||
A.add_fingerprint(user)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/device/radio/electropack/Topic(href, href_list)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
name = "Head of Personnel's Encryption Key"
|
||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||
icon_state = "hop_cypherkey"
|
||||
channels = list("Command" = 1, "Security" = 0, "Cargo" = 1, "Mining" = 0)
|
||||
channels = list("Command" = 1, "Cargo" = 1, "Mining" = 0)
|
||||
|
||||
/obj/item/device/encryptionkey/headset_mine
|
||||
name = "Mining Radio Encryption Key"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
user.put_in_hand(pinned_target)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
pinned_target.loc = get_turf_loc(user)
|
||||
pinned_target.loc = get_turf(user)
|
||||
user << "You take the target out of the stake."
|
||||
|
||||
pinned_target = null
|
||||
@@ -122,7 +122,7 @@
|
||||
user.put_in_hand(src)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
src.loc = get_turf_loc(user)
|
||||
src.loc = get_turf(user)
|
||||
user << "You take the target out of the stake."
|
||||
|
||||
stake.pinned_target = null
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
return
|
||||
proc/ChangeSign(var/Text)
|
||||
src.icon_state = "[Text]"
|
||||
//ul_SetLuminosity(4)
|
||||
ul_SetLuminosity(3,0,0)
|
||||
return
|
||||
|
||||
/obj/effect/sign/securearea/ex_act(severity)
|
||||
|
||||
@@ -264,7 +264,7 @@ SHARDS
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!((H.shoes) || (H.wear_suit && H.wear_suit.body_parts_covered & FEET)))
|
||||
var/datum/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(affecting.robot)
|
||||
if(affecting.status & ROBOT)
|
||||
return
|
||||
H.Weaken(3)
|
||||
affecting.take_damage(5, 0)
|
||||
|
||||
@@ -74,6 +74,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
|
||||
new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("filling cabinet", /obj/structure/filingcabinet, 3, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
@@ -84,6 +85,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("small machine frame", /obj/machinery/small_constructable_frame, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wall machine frame", /obj/machinery/constructable_frame/wallmount_frame, 2, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
|
||||
@@ -6,6 +6,7 @@ WOOD PLANKS
|
||||
var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
|
||||
new/datum/stack_recipe("coat rack", /obj/machinery/coatrack, 2), \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 30, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
|
||||
@@ -9,33 +9,33 @@
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 21
|
||||
|
||||
proc/can_use()
|
||||
if(!ismob(loc)) return 0
|
||||
var/mob/M = loc
|
||||
if(src in M.get_equipped_items())
|
||||
return 1
|
||||
/obj/item/weapon/storage/belt/proc/can_use()
|
||||
if(!ismob(loc)) return 0
|
||||
var/mob/M = loc
|
||||
if(src in M.get_equipped_items())
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!M.restrained() && !M.stat && can_use())
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
M.u_equip(src)
|
||||
M.r_hand = src
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if(!istype(over_object, /obj/screen))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!M.restrained() && !M.stat && can_use())
|
||||
if (over_object.name == "r_hand")
|
||||
if (!( M.r_hand ))
|
||||
if (over_object.name == "l_hand")
|
||||
if (!( M.l_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
|
||||
M.l_hand = src
|
||||
M.update_clothing()
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/weapon/cable_coil(src,30,pick("red","yellow"))
|
||||
new /obj/item/weapon/cable_coil(src,30,pick("red","yellow","orange"))
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility/atmostech/New()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/item/weapon/storage/firstaid/regular/New()
|
||||
..()
|
||||
if (empty) return
|
||||
new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src )
|
||||
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
new /obj/item/stack/medical/bruise_pack(src)
|
||||
@@ -67,13 +67,13 @@
|
||||
/obj/item/weapon/storage/firstaid/adv/New()
|
||||
..()
|
||||
if (empty) return
|
||||
new /obj/item/weapon/reagent_containers/syringe/inaprovaline( src )
|
||||
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
|
||||
new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
new /obj/item/stack/medical/advanced/ointment(src)
|
||||
new /obj/item/stack/medical/advanced/ointment(src)
|
||||
new /obj/item/stack/medical/advanced/ointment(src)
|
||||
new /obj/item/stack/medical/splint(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/kelotane
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
||||
storage_slots = 4
|
||||
req_access = list(access_armory)
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
var/locked = 1
|
||||
var/broken = 0
|
||||
var/icon_locked = "lockbox+l"
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
/obj/item/weapon/storage/lockbox/loyalty
|
||||
name = "Lockbox (Loyalty Implants)"
|
||||
req_access = list(access_security)
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -87,7 +87,7 @@
|
||||
/obj/item/weapon/storage/lockbox/clusterbang
|
||||
name = "lockbox (clusterbang)"
|
||||
desc = "You have a bad feeling about opening this."
|
||||
req_access = list(access_security)
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
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)
|
||||
user.show_message(text("\red <B>You reach into \the [src], 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)
|
||||
user.show_message(text("\red <B>\The [user] reaches into \the [src] 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
|
||||
@@ -116,7 +116,7 @@
|
||||
return //Means the item is already in the storage item
|
||||
|
||||
if(contents.len >= storage_slots)
|
||||
user << "\red The [src] is full, make some space."
|
||||
user << "\red \The [src] is full, make some space."
|
||||
return //Storage item is full
|
||||
|
||||
if(can_hold.len)
|
||||
@@ -184,11 +184,11 @@
|
||||
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
|
||||
for(var/mob/M in viewers(user, null))
|
||||
if (M == user)
|
||||
user << "\blue You put the \the [W] into \the [src]."
|
||||
user << "\blue You put \the [W] into \the [src]."
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message(text("\blue \The [user] puts \the [W] into \the [src]."))
|
||||
M.show_message(text("\blue \The [user] puts \a [W] into \the [src]."))
|
||||
else if (W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
|
||||
M.show_message(text("\blue \The [user] puts \the [W] into \the [src]."))
|
||||
M.show_message(text("\blue \The [user] puts \a [W] into \the [src]."))
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/dropped(mob/user as mob)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/obj/item/weapon/storage/toolbox/electrical/New()
|
||||
..()
|
||||
var/color = pick("red","yellow","green","blue")
|
||||
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/device/t_scanner(src)
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/obj/item/weapon/storage/toolbox/syndicate/New()
|
||||
..()
|
||||
var/color = pick("red","yellow","green","blue")
|
||||
var/color = pick("red","yellow","green","blue","pink","orange","cyan","white")
|
||||
new /obj/item/weapon/screwdriver(src)
|
||||
new /obj/item/weapon/wrench(src)
|
||||
new /obj/item/weapon/weldingtool(src)
|
||||
|
||||
+390
-43
@@ -50,19 +50,65 @@ obj/structure/meteorhit(obj/O as obj)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
else if((istype(W, /obj/item/stack/sheet/metal)) && (W:amount >= 2) && istype(src,/obj/structure/girder/displaced))
|
||||
else if(istype(W, /obj/item/stack/sheet) && !anchored)
|
||||
switch(W.type)
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
W:use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
if(/obj/item/stack/sheet/plasteel)
|
||||
W:use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falserwall (src.loc)
|
||||
if(/obj/item/stack/sheet/gold)
|
||||
W: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)
|
||||
if(/obj/item/stack/sheet/silver)
|
||||
W: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)
|
||||
if(/obj/item/stack/sheet/diamond)
|
||||
W: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)
|
||||
if(/obj/item/stack/sheet/uranium)
|
||||
W: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)
|
||||
if(/obj/item/stack/sheet/plasma)
|
||||
W: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)
|
||||
if(/obj/item/stack/sheet/clown)
|
||||
W: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)
|
||||
if(/obj/item/stack/sheet/sandstone)
|
||||
W: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)
|
||||
/* if(/obj/item/stack/sheet/wood)
|
||||
W:use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall/wood (src.loc)*/
|
||||
add_hiddenprint(usr)
|
||||
del(src)
|
||||
|
||||
|
||||
/* else if((istype(W, /obj/item/stack/sheet/metal)) && (W:amount >= 2) && istype(src,/obj/structure/girder/displaced))
|
||||
W:use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
add_hiddenprint(usr)
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel) && istype(src,/obj/structure/girder/displaced))
|
||||
W:use(2)
|
||||
user << "\blue You create a false r wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falserwall (src.loc)
|
||||
add_hiddenprint(usr)
|
||||
del(src)
|
||||
del(src)*/
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
|
||||
playsound(src.loc, 'Screwdriver.ogg', 100, 1)
|
||||
@@ -95,49 +141,145 @@ obj/structure/meteorhit(obj/O as obj)
|
||||
new/obj/structure/girder( src.loc )
|
||||
del(src)
|
||||
|
||||
else if((istype(W, /obj/item/stack/sheet/metal)) && (W:amount >= 2))
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
if(!W)
|
||||
return
|
||||
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
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
else if((istype(W, /obj/item/stack/sheet)) && (W:amount >= 2))
|
||||
switch(W.type)
|
||||
|
||||
else if (istype(W, /obj/item/stack/sheet/plasteel))
|
||||
if (src.icon_state == "reinforced") //Time to finalize!
|
||||
user << "\blue Now finalising reinforced wall."
|
||||
if(do_after(user, 50))
|
||||
if(!W)
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
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
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
if (W)
|
||||
W:use(1)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "\blue Now reinforcing girders"
|
||||
if (do_after(user,60))
|
||||
if(!W)
|
||||
|
||||
if (/obj/item/stack/sheet/plasteel)
|
||||
if (src.icon_state == "reinforced") //Time to finalize!
|
||||
user << "\blue Now finalising reinforced wall."
|
||||
if(do_after(user, 50))
|
||||
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
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
if (W)
|
||||
W:use(1)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "\blue Now reinforcing girders"
|
||||
if (do_after(user,60))
|
||||
user << "\blue Girders reinforced!"
|
||||
W:use(1)
|
||||
new/obj/structure/girder/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/gold)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
user << "\blue Girders reinforced!"
|
||||
W:use(1)
|
||||
new/obj/structure/girder/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/silver)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/diamond)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/uranium)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/plasma)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/clown)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/sandstone)
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
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)
|
||||
if (W) W:use(2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/pipe))
|
||||
var/obj/item/pipe/P = W
|
||||
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
|
||||
@@ -266,3 +408,208 @@ obj/structure/meteorhit(obj/O as obj)
|
||||
del(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/falsewall
|
||||
var/mineral = "metal"
|
||||
|
||||
/obj/structure/falserwall
|
||||
var/mineral = "metal"
|
||||
|
||||
/obj/structure/falsewall/gold
|
||||
mineral = "gold"
|
||||
|
||||
/obj/structure/falsewall/silver
|
||||
mineral = "silver"
|
||||
|
||||
/obj/structure/falsewall/diamond
|
||||
mineral = "diamond"
|
||||
|
||||
/obj/structure/falsewall/uranium
|
||||
mineral = "uranium"
|
||||
var/active = null
|
||||
var/last_event = 0
|
||||
|
||||
/obj/structure/falsewall/plasma
|
||||
mineral = "plasma"
|
||||
|
||||
/obj/structure/falsewall/clown
|
||||
mineral = "clown"
|
||||
|
||||
/obj/structure/falsewall/sandstone
|
||||
mineral = "sandstone"
|
||||
|
||||
/*/obj/structure/falsewall/wood
|
||||
mineral = "wood"*/
|
||||
|
||||
/obj/structure/falsewall/attack_hand(mob/user as mob)
|
||||
if(density)
|
||||
// Open wall
|
||||
icon_state = "[mineral]fwall_open"
|
||||
flick("[mineral]fwall_opening", src)
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.ul_SetOpacity(0)
|
||||
var/turf/T = src.loc
|
||||
T.ul_Recalculate()
|
||||
|
||||
else
|
||||
flick("[mineral]fwall_closing", src)
|
||||
icon_state = "[mineral]0"
|
||||
sleep(15)
|
||||
src.density = 1
|
||||
src.ul_SetOpacity(1)
|
||||
var/turf/T = src.loc
|
||||
//T.ul_LumUpdate()
|
||||
src.relativewall()
|
||||
T.ul_Recalculate()
|
||||
|
||||
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
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)
|
||||
T.ReplaceWithWall()
|
||||
else
|
||||
T.ReplaceWithMineralWall(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()
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
if(mineral != "plasma")//Stupid shit keeps me from pushing the attackby() to plasma walls -Sieve
|
||||
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)
|
||||
if(!mineral)
|
||||
T.ReplaceWithWall()
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
if(mineral != "plasma")
|
||||
T = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
del(src)
|
||||
|
||||
//DRILLING
|
||||
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
var/turf/T = get_turf(src)
|
||||
if(!mineral)
|
||||
T.ReplaceWithWall()
|
||||
else
|
||||
T.ReplaceWithMineralWall(mineral)
|
||||
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)
|
||||
if(!mineral)
|
||||
T.ReplaceWithWall()
|
||||
else
|
||||
T.ReplaceWithMineralWall(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/falserwall/
|
||||
attack_hand(mob/user as mob)
|
||||
if(density)
|
||||
// Open wall
|
||||
icon_state = "frwall_open"
|
||||
flick("frwall_opening", src)
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.ul_SetOpacity(0)
|
||||
var/turf/T = src.loc
|
||||
T.ul_Recalculate()
|
||||
|
||||
else
|
||||
icon_state = "r_wall"
|
||||
flick("frwall_closing", src)
|
||||
sleep(15)
|
||||
src.density = 1
|
||||
src.ul_SetOpacity(1)
|
||||
var/turf/T = src.loc
|
||||
//T.ul_LumUpdate()
|
||||
src.relativewall()
|
||||
T.ul_Recalculate()
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
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 r wall.")
|
||||
T.ReplaceWithWall() //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 = 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 = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
del(src)
|
||||
|
||||
//DRILLING
|
||||
else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
var/turf/T = get_turf(src)
|
||||
T.ReplaceWithWall()
|
||||
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 = get_turf(src)
|
||||
T.attackby(W,user)
|
||||
del(src)
|
||||
|
||||
/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()
|
||||
last_event = world.time
|
||||
active = null
|
||||
return
|
||||
return
|
||||
|
||||
@@ -170,12 +170,12 @@ TABLE AND RACK OBJECT INTERATIONS
|
||||
"\red You hear the nauseating crunch of bone and gristle on solid metal and the squeal of said metal deforming.")
|
||||
dented++
|
||||
else if(prob(50))
|
||||
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\
|
||||
"\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] bone and cartilage making a loud crunch!",\
|
||||
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] bone and cartilage making a loud crunch!",\
|
||||
"\red You smash \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] bone and cartilage making a loud crunch!",\
|
||||
"\red You hear the nauseating crunch of bone and gristle on solid metal, the noise echoing through the room.")
|
||||
else
|
||||
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\
|
||||
"\red You smash \the [H]'s head on \the [src], [H.get_gender_form("its")] nose smashed and face bloodied!",\
|
||||
G.assailant.visible_message("\red [G.assailant] smashes \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] nose smashed and face bloodied!",\
|
||||
"\red You smash \the [H]'s head on \the [src], [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] nose smashed and face bloodied!",\
|
||||
"\red You hear the nauseating crunch of bone and gristle on solid metal and the gurgling gasp of someone who is trying to breathe through their own blood.")
|
||||
else
|
||||
affecting.take_damage(rand(5,10), 0)
|
||||
|
||||
@@ -179,81 +179,4 @@
|
||||
// this doesn't do anything but the timer etc. expects it to be here
|
||||
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
|
||||
/obj/item/device/transfer_valve/proc/c_state()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/falsewall
|
||||
attack_hand(mob/user as mob)
|
||||
if(density)
|
||||
// Open wall
|
||||
icon_state = "fwall_open"
|
||||
flick("fwall_opening", src)
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
var/turf/T = src.loc
|
||||
T.sd_LumReset()
|
||||
|
||||
else
|
||||
icon_state = "wall"
|
||||
flick("fwall_closing", src)
|
||||
sleep(15)
|
||||
src.density = 1
|
||||
src.sd_SetOpacity(1)
|
||||
var/turf/T = src.loc
|
||||
//T.sd_LumUpdate()
|
||||
src.relativewall()
|
||||
T.sd_LumReset()
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
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.")
|
||||
T.ReplaceWithWall()
|
||||
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/falserwall/
|
||||
attack_hand(mob/user as mob)
|
||||
if(density)
|
||||
// Open wall
|
||||
icon_state = "frwall_open"
|
||||
flick("frwall_opening", src)
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
var/turf/T = src.loc
|
||||
T.sd_LumReset()
|
||||
|
||||
else
|
||||
icon_state = "r_wall"
|
||||
flick("frwall_closing", src)
|
||||
sleep(15)
|
||||
src.density = 1
|
||||
src.sd_SetOpacity(1)
|
||||
var/turf/T = src.loc
|
||||
//T.sd_LumUpdate()
|
||||
src.relativewall()
|
||||
T.sd_LumReset()
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
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 r wall.")
|
||||
T.ReplaceWithWall() //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
|
||||
del(src)
|
||||
return
|
||||
@@ -375,7 +375,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
var/obj/item/weapon/implant/uplink/U = src.loc
|
||||
var/mob/living/A = U.imp_in
|
||||
var/datum/organ/external/head = A:organs["head"]
|
||||
head.destroyed = 1
|
||||
head.status |= DESTROYED
|
||||
spawn(2)
|
||||
head.droplimb()
|
||||
del(src.master)
|
||||
|
||||
@@ -4,28 +4,56 @@
|
||||
name = "toilet"
|
||||
desc = "The HT-451, a torque rotation-based, waste disposal unit for small matter. This one seems remarkably clean."
|
||||
icon = 'watercloset.dmi'
|
||||
icon_state = "toilet0"
|
||||
icon_state = "toilet00"
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/open = 0
|
||||
var/mob/swirlie = null
|
||||
var/open = 0 //if the lid is up
|
||||
var/cistern = 0 //if the cistern bit is open
|
||||
var/w_items = 0 //the combined w_class of all the items in the cistern
|
||||
var/mob/swirlie = null //the mob being given a swirlie
|
||||
|
||||
/obj/structure/toilet/New()
|
||||
open = round(rand(0, 1))
|
||||
update_icon()
|
||||
|
||||
/obj/structure/toilet/attack_hand()
|
||||
if(!swirlie)
|
||||
open = !open
|
||||
update_icon()
|
||||
else
|
||||
usr.visible_message("<span class='danger'>[usr] slams the toilet seat onto [swirlie.name]'s head!</span>", "<span class='notice'>You slam the toilet seat onto [swirlie.name]'s head!</span>", "You hear reverberating porcelain.")
|
||||
/obj/structure/toilet/attack_hand(mob/user as mob)
|
||||
if(swirlie)
|
||||
usr.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie.name]'s head!</span>", "<span class='notice'>You slam the toilet seat onto [swirlie.name]'s head!</span>", "You hear reverberating porcelain.")
|
||||
swirlie.adjustBruteLoss(8)
|
||||
return
|
||||
|
||||
if(cistern && !open)
|
||||
if(!contents.len)
|
||||
user << "<span class='notice'>The cistern is empty.</span>"
|
||||
return
|
||||
else
|
||||
var/obj/item/I = pick(contents)
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
I.loc = user.loc
|
||||
user.put_in_hand(I)
|
||||
else
|
||||
I.loc = get_turf(src)
|
||||
user << "<span class='notice'>You find \an [I] in the cistern.</span>"
|
||||
w_items -= I.w_class
|
||||
return
|
||||
|
||||
open = !open
|
||||
update_icon()
|
||||
|
||||
/obj/structure/toilet/update_icon()
|
||||
icon_state = "toilet[open]"
|
||||
icon_state = "toilet[open][cistern]"
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
user << "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].</span>"
|
||||
playsound(loc, 'stonedoor_openclose.ogg', 50, 1)
|
||||
if(do_after(user, 30))
|
||||
user.visible_message("<span class='notice'>[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!</span>", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "You hear grinding porcelain.")
|
||||
cistern = !cistern
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/toilet/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
var/mob/GM = G.affecting
|
||||
@@ -45,6 +73,19 @@
|
||||
else
|
||||
user << "<span class='notice'>You need a tighter grip.</span>"
|
||||
|
||||
if(cistern)
|
||||
if(I.w_class > 3)
|
||||
user << "<span class='notice'>\The [I] does not fit.</span>"
|
||||
return
|
||||
if(w_items + I.w_class > 5)
|
||||
user << "<span class='notice'>The cistern is full.</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
w_items += I.w_class
|
||||
user << "You carefully place \the [I] into the cistern."
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/structure/urinal
|
||||
@@ -55,7 +96,7 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/urinal/attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/structure/urinal/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
var/mob/GM = G.affecting
|
||||
@@ -97,7 +138,7 @@
|
||||
wash(M)
|
||||
check_heat(M)
|
||||
|
||||
/obj/machinery/shower/attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/machinery/shower/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
|
||||
@@ -95,6 +95,13 @@
|
||||
/atom/proc/blob_act()
|
||||
return
|
||||
|
||||
/atom/proc/acid_act(var/datum/reagent/R)
|
||||
return 0
|
||||
/*/obj/proc/acid_act(var/datum/reagent/R)
|
||||
return 0
|
||||
/mob/proc/acid_act(var/datum/reagent/R)
|
||||
return 0*/
|
||||
|
||||
// bullet_act called when anything is hit buy a projectile (bullet, tazer shot, laser, etc.)
|
||||
// flag is projectile type, can be:
|
||||
//PROJECTILE_TASER = 1 taser gun
|
||||
@@ -130,12 +137,14 @@
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_organ(pick("l_leg", "r_leg"))
|
||||
if(!affecting.robot) H.Weaken(3)
|
||||
if(!(affecting.status & ROBOT))
|
||||
H.Weaken(3)
|
||||
if("l_hand", "r_hand")
|
||||
if(!H.gloves)
|
||||
affecting = H.get_organ(type)
|
||||
if(!affecting.robot) H.Stun(3)
|
||||
if(affecting && !affecting.robot)
|
||||
if(!(affecting.status & ROBOT))
|
||||
H.Stun(3)
|
||||
if(affecting && !(affecting.status & ROBOT))
|
||||
affecting.take_damage(1, 0)
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
|
||||
@@ -229,12 +229,11 @@
|
||||
step(src, get_dir(user, src))
|
||||
if (src.health <= 0)
|
||||
if (src.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)
|
||||
index++
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf)
|
||||
new /obj/item/stack/rods( src.loc)
|
||||
new /obj/item/stack/rods( src.loc)
|
||||
else
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
if(reinf) new /obj/item/stack/rods( src.loc)
|
||||
@@ -323,7 +322,7 @@
|
||||
/obj/structure/window/Del()
|
||||
density = 0
|
||||
|
||||
update_nearby_tiles()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
playsound(src, "shatter", 70, 1)
|
||||
|
||||
@@ -344,6 +343,14 @@
|
||||
//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
|
||||
if(!dir in cardinal)
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
if(istype(source))
|
||||
air_master.tiles_to_update |= source
|
||||
for(var/dir in cardinal)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
return 1
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
|
||||
Reference in New Issue
Block a user