mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport
This commit is contained in:
@@ -186,10 +186,19 @@
|
||||
src.update_damages()
|
||||
|
||||
proc/bandage()
|
||||
var/rval = 0
|
||||
status |= ORGAN_BANDAGED
|
||||
for(var/datum/wound/W in wounds)
|
||||
rval |= !W.bandaged
|
||||
W.bandaged = 1
|
||||
return rval
|
||||
|
||||
proc/salve()
|
||||
var/rval = 0
|
||||
for(var/datum/wound/W in wounds)
|
||||
rval |= !W.salved
|
||||
W.salved = 1
|
||||
return rval
|
||||
|
||||
proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
|
||||
|
||||
+123
-154
@@ -6,16 +6,16 @@
|
||||
/obj/machinery/bot/medbot
|
||||
name = "Medibot"
|
||||
desc = "A little medical robot. He looks somewhat underwhelmed."
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
icon = 'aibots.dmi'
|
||||
icon_state = "medibot0"
|
||||
layer = 5.0
|
||||
density = 0
|
||||
density = 1
|
||||
anchored = 0
|
||||
health = 20
|
||||
maxhealth = 20
|
||||
req_access =list(access_medical)
|
||||
var/stunned = 0 //It can be stunned by tasers. Delicate circuits.
|
||||
//var/emagged = 0
|
||||
var/obj/machinery/camera/cam = null
|
||||
var/list/botcard_access = list(access_medical, access_morgue, access_genetics, access_robotics)
|
||||
var/obj/item/weapon/reagent_containers/glass/reagent_glass = null //Can be set to draw from this for reagents.
|
||||
var/skin = null //Set to "tox", "ointment" or "o2" for the other two firstaid kits.
|
||||
@@ -27,27 +27,29 @@
|
||||
var/last_found = 0
|
||||
var/last_newpatient_speak = 0 //Don't spam the "HEY I'M COMING" messages
|
||||
var/currently_healing = 0
|
||||
var/injection_amount = 15 //How much reagent do we inject at a time?
|
||||
var/injection_amount = 5 //How much reagent do we inject at a time?
|
||||
var/heal_threshold = 15 //Start healing when they have this much damage in a category
|
||||
var/use_beaker = 0 //Use reagents in beaker instead of default treatment agents.
|
||||
var/use_beaker = 1 //Use reagents in beaker instead of default treatment agents.
|
||||
//Setting which reagents to use to treat what by default. By id.
|
||||
var/treatment_brute = "bicaridine"
|
||||
var/treatment_oxy = "dexalin"
|
||||
var/treatment_fire = "kelotane"
|
||||
var/treatment_tox = "anti_toxin"
|
||||
var/treatment_virus = "spaceacillin"
|
||||
var/reagent_id = "inaprovaline"
|
||||
var/shut_up = 0 //self explanatory :)
|
||||
var/always_inject = 0
|
||||
|
||||
/obj/machinery/bot/medbot/mysterious
|
||||
name = "Mysterious Medibot"
|
||||
desc = "International Medibot of mystery."
|
||||
skin = "bezerk"
|
||||
treatment_oxy = "dexalinp"
|
||||
reagent_id = "dexalinp"
|
||||
|
||||
/obj/item/weapon/firstaid_arm_assembly
|
||||
name = "first aid/robot arm assembly"
|
||||
desc = "A first aid kit with a robot arm permanently grafted to it."
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
icon = 'aibots.dmi'
|
||||
icon_state = "firstaid_arm"
|
||||
var/build_step = 0
|
||||
var/created_name = "Medibot" //To preserve the name if it's a unique medbot I guess
|
||||
@@ -58,7 +60,7 @@
|
||||
..()
|
||||
spawn(5)
|
||||
if(src.skin)
|
||||
src.overlays += image('icons/obj/aibots.dmi', "kit_skin_[src.skin]")
|
||||
src.overlays += image('aibots.dmi', "kit_skin_[src.skin]")
|
||||
|
||||
|
||||
/obj/machinery/bot/medbot/New()
|
||||
@@ -67,13 +69,16 @@
|
||||
|
||||
spawn(4)
|
||||
if(src.skin)
|
||||
src.overlays += image('icons/obj/aibots.dmi', "medskin_[src.skin]")
|
||||
src.overlays += image('aibots.dmi', "medskin_[src.skin]")
|
||||
|
||||
src.botcard = new /obj/item/weapon/card/id(src)
|
||||
if(isnull(src.botcard_access) || (src.botcard_access.len < 1))
|
||||
src.botcard.access = get_access("Medical Doctor")
|
||||
else
|
||||
src.botcard.access = src.botcard_access
|
||||
src.cam = new /obj/machinery/camera(src)
|
||||
src.cam.c_tag = src.name
|
||||
src.cam.network = "Medbay"
|
||||
|
||||
/obj/machinery/bot/medbot/turn_on()
|
||||
. = ..()
|
||||
@@ -101,7 +106,6 @@
|
||||
var/dat
|
||||
dat += "<TT><B>Automatic Medical Unit v1.0</B></TT><BR><BR>"
|
||||
dat += "Status: <A href='?src=\ref[src];power=1'>[src.on ? "On" : "Off"]</A><BR>"
|
||||
dat += "Maintenance panel panel is [src.open ? "opened" : "closed"]<BR>"
|
||||
dat += "Beaker: "
|
||||
if (src.reagent_glass)
|
||||
dat += "<A href='?src=\ref[src];eject=1'>Loaded \[[src.reagent_glass.reagents.total_volume]/[src.reagent_glass.reagents.maximum_volume]\]</a>"
|
||||
@@ -126,6 +130,9 @@
|
||||
dat += "Reagent Source: "
|
||||
dat += "<a href='?src=\ref[src];use_beaker=1'>[src.use_beaker ? "Loaded Beaker (When available)" : "Internal Synthesizer"]</a><br>"
|
||||
|
||||
dat += "Inject: "
|
||||
dat += "<a href='?src=\ref[src];toggle_inject=1'>[src.always_inject ? "Always" : "If loaded chemical is known to help"]</a><br>"
|
||||
|
||||
dat += "The speaker switch is [src.shut_up ? "off" : "on"]. <a href='?src=\ref[src];togglevoice=[1]'>Toggle</a>"
|
||||
|
||||
user << browse("<HEAD><TITLE>Medibot v1.0 controls</TITLE></HEAD>[dat]", "window=automed")
|
||||
@@ -161,13 +168,12 @@
|
||||
|
||||
else if((href_list["use_beaker"]) && (!src.locked))
|
||||
src.use_beaker = !src.use_beaker
|
||||
else if((href_list["toggle_inject"]) && (!src.locked))
|
||||
src.always_inject = !src.always_inject
|
||||
|
||||
else if (href_list["eject"] && (!isnull(src.reagent_glass)))
|
||||
if(!src.locked)
|
||||
src.reagent_glass.loc = get_turf(src)
|
||||
src.reagent_glass = null
|
||||
else
|
||||
usr << "<span class='notice'>You cannot eject the beaker because the panel is locked.</span>"
|
||||
src.reagent_glass.loc = get_turf(src)
|
||||
src.reagent_glass = null
|
||||
|
||||
else if ((href_list["togglevoice"]) && (!src.locked))
|
||||
src.shut_up = !src.shut_up
|
||||
@@ -177,30 +183,22 @@
|
||||
|
||||
/obj/machinery/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
if (src.allowed(user) && !open && !emagged)
|
||||
if (src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
user << "<span class='notice'>Controls are now [src.locked ? "locked." : "unlocked."]</span>"
|
||||
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
if(emagged)
|
||||
user << "<span class='warning'>ERROR</span>"
|
||||
if(open)
|
||||
user << "<span class='warning'>Please close the access panel before locking it.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
user << "\red Access denied."
|
||||
|
||||
else if (istype(W, /obj/item/weapon/reagent_containers/glass))
|
||||
if(src.locked)
|
||||
user << "<span class='notice'>You cannot insert a beaker because the panel is locked.</span>"
|
||||
return
|
||||
if(!isnull(src.reagent_glass))
|
||||
user << "<span class='notice'>There is already a beaker loaded.</span>"
|
||||
user << "There is already a beaker loaded!"
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.reagent_glass = W
|
||||
user << "<span class='notice'>You insert [W].</span>"
|
||||
user << "You insert [W]."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -211,20 +209,19 @@
|
||||
|
||||
/obj/machinery/bot/medbot/Emag(mob/user as mob)
|
||||
..()
|
||||
if(open && !locked)
|
||||
if(user) user << "<span class='warning'>You short out [src]'s reagent synthesis circuits.</span>"
|
||||
spawn(0)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\red <B>[src] buzzes oddly!</B>", 1)
|
||||
flick("medibot_spark", src)
|
||||
src.patient = null
|
||||
if(user) src.oldpatient = user
|
||||
src.currently_healing = 0
|
||||
src.last_found = world.time
|
||||
src.anchored = 0
|
||||
src.emagged = 2
|
||||
src.on = 1
|
||||
src.icon_state = "medibot[src.on]"
|
||||
if(user) user << "\red You short out [src]'s reagent synthesis circuits."
|
||||
spawn(0)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\red <B>[src] buzzes oddly!</B>", 1)
|
||||
flick("medibot_spark", src)
|
||||
src.patient = null
|
||||
if(user) src.oldpatient = user
|
||||
src.currently_healing = 0
|
||||
src.last_found = world.time
|
||||
src.anchored = 0
|
||||
src.emagged = 1
|
||||
src.on = 1
|
||||
src.icon_state = "medibot[src.on]"
|
||||
|
||||
/obj/machinery/bot/medbot/process()
|
||||
set background = 1
|
||||
@@ -254,7 +251,7 @@
|
||||
src.path = new()
|
||||
|
||||
if(!src.patient)
|
||||
if(!src.shut_up && prob(1))
|
||||
if(prob(1) && (!src.shut_up))
|
||||
var/message = pick("Radar, put a mask on!","There's always a catch, and it's the best there is.","I knew it, I should've been a plastic surgeon.","What kind of medbay is this? Everyone's dropping like dead flies.","Delicious!")
|
||||
src.speak(message)
|
||||
|
||||
@@ -265,6 +262,9 @@
|
||||
if ((C == src.oldpatient) && (world.time < src.last_found + 100))
|
||||
continue
|
||||
|
||||
if(C.getOxyLoss() < 5 && reagent_id == "inaprovaline" && !src.emagged && !src.reagent_glass)
|
||||
continue
|
||||
|
||||
if(src.assess_patient(C))
|
||||
src.patient = C
|
||||
src.oldpatient = C
|
||||
@@ -324,7 +324,7 @@
|
||||
if(C.suiciding)
|
||||
return 0 //Kevorkian school of robotic medical assistants.
|
||||
|
||||
if(src.emagged == 2) //Everyone needs our medicine. (Our medicine is toxins)
|
||||
if(src.emagged) //Everyone needs our medicine. (Our medicine is toxins)
|
||||
return 1
|
||||
|
||||
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
|
||||
@@ -335,25 +335,18 @@
|
||||
continue
|
||||
|
||||
//They're injured enough for it!
|
||||
if((C.getBruteLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_brute)))
|
||||
if(C.getBruteLoss() >= heal_threshold)
|
||||
return 1 //If they're already medicated don't bother!
|
||||
|
||||
if((C.getOxyLoss() >= (15 + heal_threshold)) && (!C.reagents.has_reagent(src.treatment_oxy)))
|
||||
if(C.getOxyLoss() >= (15 + heal_threshold))
|
||||
return 1
|
||||
|
||||
if((C.getFireLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_fire)))
|
||||
if(C.getFireLoss() >= heal_threshold)
|
||||
return 1
|
||||
|
||||
if((C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_tox)))
|
||||
if(C.getToxLoss() >= heal_threshold)
|
||||
return 1
|
||||
|
||||
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
if((D.stage > 1) || (D.spread_type == AIRBORNE))
|
||||
|
||||
if (!C.reagents.has_reagent(src.treatment_virus))
|
||||
return 1 //STOP DISEASE FOREVER
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/bot/medbot/proc/medicate_patient(mob/living/carbon/C as mob)
|
||||
@@ -376,40 +369,37 @@
|
||||
src.last_found = world.time
|
||||
return
|
||||
|
||||
var/reagent_id = null
|
||||
|
||||
//Use whatever is inside the loaded beaker. If there is one.
|
||||
//See if we have anything inside the beaker to help.
|
||||
if((src.use_beaker) && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume))
|
||||
reagent_id = "internal_beaker"
|
||||
if(always_inject)
|
||||
reagent_id = "internal_beaker"
|
||||
else if (C.getBruteLoss() >= heal_threshold && reagent_glass.reagents.has_reagent(src.treatment_brute))
|
||||
reagent_id = "internal_beaker"
|
||||
|
||||
if(src.emagged == 2) //Emagged! Time to poison everybody.
|
||||
else if (C.getOxyLoss() >= (15 + heal_threshold) && reagent_glass.reagents.has_reagent(src.treatment_oxy))
|
||||
reagent_id = "internal_beaker"
|
||||
|
||||
else if (C.getFireLoss() >= heal_threshold && reagent_glass.reagents.has_reagent(src.treatment_fire))
|
||||
reagent_id = "internal_beaker"
|
||||
|
||||
else if (C.getToxLoss() >= heal_threshold && reagent_glass.reagents.has_reagent(src.treatment_tox))
|
||||
reagent_id = "internal_beaker"
|
||||
|
||||
else if (100 - C.health >= heal_threshold && reagent_glass.reagents.has_reagent("tricordrazine"))
|
||||
reagent_id = "internal_beaker"
|
||||
|
||||
|
||||
if(src.emagged) //Emagged! Time to poison everybody.
|
||||
reagent_id = "toxin"
|
||||
|
||||
var/virus = 0
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
virus = 1
|
||||
if(reagent_id == "internal_beaker" && \
|
||||
src.patient.reagents.has_reagent(src.reagent_glass.reagents.get_master_reagent_id()) )
|
||||
if(prob(10))
|
||||
var/message = pick("Oops, that's an overdose!", "You're going to be just fine!")
|
||||
src.speak(message)
|
||||
return
|
||||
|
||||
if (!reagent_id && (virus))
|
||||
if(!C.reagents.has_reagent(src.treatment_virus))
|
||||
reagent_id = src.treatment_virus
|
||||
|
||||
if (!reagent_id && (C.getBruteLoss() >= heal_threshold))
|
||||
if(!C.reagents.has_reagent(src.treatment_brute))
|
||||
reagent_id = src.treatment_brute
|
||||
|
||||
if (!reagent_id && (C.getOxyLoss() >= (15 + heal_threshold)))
|
||||
if(!C.reagents.has_reagent(src.treatment_oxy))
|
||||
reagent_id = src.treatment_oxy
|
||||
|
||||
if (!reagent_id && (C.getFireLoss() >= heal_threshold))
|
||||
if(!C.reagents.has_reagent(src.treatment_fire))
|
||||
reagent_id = src.treatment_fire
|
||||
|
||||
if (!reagent_id && (C.getToxLoss() >= heal_threshold))
|
||||
if(!C.reagents.has_reagent(src.treatment_tox))
|
||||
reagent_id = src.treatment_tox
|
||||
|
||||
if(!reagent_id) //If they don't need any of that they're probably cured!
|
||||
if(C.getOxyLoss() < 10 && reagent_id == "inaprovaline") //If they don't need any of that they're probably cured!
|
||||
src.oldpatient = src.patient
|
||||
src.patient = null
|
||||
src.currently_healing = 0
|
||||
@@ -433,10 +423,9 @@
|
||||
|
||||
src.icon_state = "medibot[src.on]"
|
||||
src.currently_healing = 0
|
||||
reagent_id = "inaprovaline"
|
||||
return
|
||||
|
||||
// src.speak(reagent_id)
|
||||
reagent_id = null
|
||||
return
|
||||
|
||||
|
||||
@@ -452,6 +441,11 @@
|
||||
src.stunned = min(stunned+10,20)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot/medbot/emp_act(severity)
|
||||
if (cam)
|
||||
cam.emp_act(severity)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot/medbot/explode()
|
||||
src.on = 0
|
||||
for(var/mob/O in hearers(src, null))
|
||||
@@ -478,53 +472,24 @@
|
||||
return
|
||||
|
||||
/obj/machinery/bot/medbot/Bump(M as mob|obj) //Leave no door unopened!
|
||||
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
|
||||
var/obj/machinery/door/D = M
|
||||
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
|
||||
D.open()
|
||||
spawn(0)
|
||||
if ((istype(M, /obj/machinery/door)) && (!isnull(src.botcard)))
|
||||
var/obj/machinery/door/D = M
|
||||
if (!istype(D, /obj/machinery/door/firedoor) && D.check_access(src.botcard))
|
||||
D.open()
|
||||
src.frustration = 0
|
||||
else if ((istype(M, /mob/living/)) && (!src.anchored))
|
||||
src.loc = M:loc
|
||||
src.frustration = 0
|
||||
else if ((istype(M, /mob/living/)) && (!src.anchored))
|
||||
src.loc = M:loc
|
||||
src.frustration = 0
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
/* terrible
|
||||
/obj/machinery/bot/medbot/Bumped(atom/movable/M as mob|obj)
|
||||
spawn(0)
|
||||
if (M)
|
||||
var/turf/T = get_turf(src)
|
||||
M:loc = T
|
||||
*/
|
||||
|
||||
/*
|
||||
* Pathfinding procs, allow the medibot to path through doors it has access to.
|
||||
*/
|
||||
|
||||
//Pretty ugh
|
||||
/*
|
||||
/turf/proc/AdjacentTurfsAllowMedAccess()
|
||||
var/L[] = new()
|
||||
for(var/turf/t in oview(src,1))
|
||||
if(!t.density)
|
||||
if(!LinkBlocked(src, t) && !TurfBlockedNonWindowNonDoor(t,get_access("Medical Doctor")))
|
||||
L.Add(t)
|
||||
return L
|
||||
|
||||
|
||||
//It isn't blocked if we can open it, man.
|
||||
/proc/TurfBlockedNonWindowNonDoor(turf/loc, var/list/access)
|
||||
for(var/obj/O in loc)
|
||||
if(O.density && !istype(O, /obj/structure/window) && !istype(O, /obj/machinery/door))
|
||||
return 1
|
||||
|
||||
if (O.density && (istype(O, /obj/machinery/door)) && (access.len))
|
||||
var/obj/machinery/door/D = O
|
||||
for(var/req in D.req_access)
|
||||
if(!(req in access)) //doesn't have this access
|
||||
return 1
|
||||
|
||||
return 0
|
||||
*/
|
||||
|
||||
/*
|
||||
* Medbot Assembly -- Can be made out of all three medkits.
|
||||
@@ -538,7 +503,7 @@
|
||||
|
||||
//Making a medibot!
|
||||
if(src.contents.len >= 1)
|
||||
user << "<span class='notice'>You need to empty [src] out first.</span>"
|
||||
user << "\red You need to empty [src] out first!"
|
||||
return
|
||||
|
||||
var/obj/item/weapon/firstaid_arm_assembly/A = new /obj/item/weapon/firstaid_arm_assembly
|
||||
@@ -548,44 +513,48 @@
|
||||
A.skin = "tox"
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/o2))
|
||||
A.skin = "o2"
|
||||
else if(istype(src,/obj/item/weapon/storage/firstaid/adv))
|
||||
A.skin = "adv"
|
||||
|
||||
A.loc = user
|
||||
if (user.r_hand == S)
|
||||
user.u_equip(S)
|
||||
user.r_hand = A
|
||||
else
|
||||
user.u_equip(S)
|
||||
user.l_hand = A
|
||||
A.layer = 20
|
||||
user << "You add the robot arm to the first aid kit"
|
||||
del(S)
|
||||
user.put_in_hands(A)
|
||||
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
|
||||
if((istype(W, /obj/item/device/healthanalyzer)) && (!src.build_step))
|
||||
src.build_step++
|
||||
user << "You add the health sensor to [src]!"
|
||||
src.name = "First aid/robot arm/health analyzer assembly"
|
||||
src.overlays += image('aibots.dmi', "na_scanner")
|
||||
del(W)
|
||||
|
||||
else if((isprox(W)) && (src.build_step == 1))
|
||||
src.build_step++
|
||||
user << "You complete the Medibot! Beep boop."
|
||||
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot
|
||||
S.skin = src.skin
|
||||
S.loc = get_turf(src)
|
||||
S.name = src.created_name
|
||||
del(W)
|
||||
del(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
|
||||
t = copytext(sanitize(t), 1, MAX_NAME_LEN)
|
||||
if (!t)
|
||||
return
|
||||
if (!in_range(src, usr) && src.loc != usr)
|
||||
return
|
||||
|
||||
src.created_name = t
|
||||
else
|
||||
switch(build_step)
|
||||
if(0)
|
||||
if(istype(W, /obj/item/device/healthanalyzer))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
src.build_step++
|
||||
user << "<span class='notice'>You add the health sensor to [src].</span>"
|
||||
src.name = "First aid/robot arm/health analyzer assembly"
|
||||
src.overlays += image('icons/obj/aibots.dmi', "na_scanner")
|
||||
|
||||
if(1)
|
||||
if(isprox(W))
|
||||
user.drop_item()
|
||||
del(W)
|
||||
src.build_step++
|
||||
user << "<span class='notice'>You complete the Medibot! Beep boop.</span>"
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/machinery/bot/medbot/S = new /obj/machinery/bot/medbot(T)
|
||||
S.skin = src.skin
|
||||
S.name = src.created_name
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -366,6 +366,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
// --- Filter the message; place it in quotes apply a verb ---
|
||||
|
||||
if(!M) return
|
||||
var/quotedmsg = M.say_quote(message)
|
||||
|
||||
// --- This following recording is intended for research and feedback in the use of department radio channels ---
|
||||
|
||||
@@ -62,11 +62,21 @@
|
||||
else if(affecting.name == "l_leg")
|
||||
child = H.get_organ("l_foot")
|
||||
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn) || child.heal_damage(src.heal_brute, src.heal_burn))
|
||||
H.UpdateDamageIcon()
|
||||
if(src.heal_brute)
|
||||
if(!affecting.bandage() && !child.bandage())
|
||||
user << "\red The wounds on this limb have already been bandaged."
|
||||
else if(src.heal_burn)
|
||||
if(!affecting.salve() && !child.salve())
|
||||
user << "\red The wounds on this limb have already been salved."
|
||||
else
|
||||
if (affecting.heal_damage(src.heal_brute, src.heal_burn))
|
||||
H.UpdateDamageIcon()
|
||||
if(src.heal_brute)
|
||||
if(!affecting.bandage())
|
||||
user << "\red The wounds on this limb have already been bandaged."
|
||||
else if(src.heal_burn)
|
||||
if(!affecting.salve())
|
||||
user << "\red The wounds on this limb have already been salved."
|
||||
|
||||
H.UpdateDamageIcon()
|
||||
M.updatehealth()
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
@@ -96,11 +96,25 @@
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
|
||||
/obj/item/roller
|
||||
name = "roller bed"
|
||||
desc = "A collapsed roller bed that can be carried around."
|
||||
icon = 'rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
w_class = 4.0 // Can't be put in backpacks. Oh well.
|
||||
|
||||
attack_self(mob/user)
|
||||
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/bed/roller/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = src.loc
|
||||
else
|
||||
buckled_mob = null
|
||||
|
||||
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
|
||||
@@ -122,4 +136,15 @@
|
||||
density = 0
|
||||
icon_state = "down"
|
||||
..()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
if(buckled_mob) return 0
|
||||
visible_message("[usr] collapses \the [src.name]")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
@@ -9,12 +9,13 @@ var/global/floorIsLava = 0
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
var/msg = rendered
|
||||
if (admin_ref)
|
||||
msg = dd_replacetext(msg, "%admin_ref%", "\ref[C]")
|
||||
if (admin_holder_ref && C.holder)
|
||||
msg = dd_replacetext(msg, "%holder_ref%", "\ref[C.holder]")
|
||||
C << msg
|
||||
if (C.holder.level >= 1)
|
||||
var/msg = rendered
|
||||
if (admin_ref)
|
||||
msg = dd_replacetext(msg, "%admin_ref%", "\ref[C]")
|
||||
if (admin_holder_ref && C.holder)
|
||||
msg = dd_replacetext(msg, "%holder_ref%", "\ref[C.holder]")
|
||||
C << msg
|
||||
|
||||
|
||||
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
|
||||
@@ -22,9 +23,10 @@ var/global/floorIsLava = 0
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
if(!C.STFU_atklog)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
if (C.holder.level >= 1)
|
||||
if(!C.STFU_atklog)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
|
||||
@@ -212,30 +212,8 @@
|
||||
else//Brain is gone, doesn't matter if they are AFK or present
|
||||
msg += "<span class='deadsay'>It appears that [t_his] brain is missing...</span>\n"
|
||||
|
||||
var/temp_dam = getBruteLoss() //no need to calculate each of these twice
|
||||
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
if(temp_dam)
|
||||
if(temp_dam < 30)
|
||||
msg += "[t_He] [t_has] minor bruising.\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
|
||||
|
||||
temp_dam = getFireLoss()
|
||||
if(temp_dam)
|
||||
if(temp_dam < 30)
|
||||
msg += "[t_He] [t_has] minor burns.\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
|
||||
|
||||
temp_dam = getCloneLoss()
|
||||
if(temp_dam)
|
||||
if(temp_dam < 30)
|
||||
msg += "[t_He] [t_has] minor genetic deformities.\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe genetic deformities.</B>\n"
|
||||
|
||||
if(nutrition < 100)
|
||||
msg += "[t_He] [t_is] severely malnourished.\n"
|
||||
else if(nutrition >= 500)
|
||||
|
||||
@@ -253,9 +253,14 @@ var/list/department_radio_keys = list(
|
||||
return
|
||||
|
||||
if ("department")
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, message_mode)
|
||||
used_radios += src:ears
|
||||
if(istype(src, /mob/living/carbon))
|
||||
if (src:ears)
|
||||
src:ears.talk_into(src, message, message_mode)
|
||||
used_radios += src:ears
|
||||
else if(istype(src, /mob/living/silicon/robot))
|
||||
if (src:radio)
|
||||
src:radio.talk_into(src, message, message_mode)
|
||||
used_radios += src:radio
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
icon_state = "landmate"
|
||||
modtype = "Eng"
|
||||
feedback_inc("cyborg_engineering",1)
|
||||
channels = list("Engineering" = 0)
|
||||
channels = list("Engineering" = 1)
|
||||
|
||||
if("Janitor")
|
||||
updatename(mod)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
message = copytext(message, 3)
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
robot_talk(message)
|
||||
else if ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H"))
|
||||
else if (isAI(src) && ((copytext(message, 1, 3) == ":h") || (copytext(message, 1, 3) == ":H")))
|
||||
if(isAI(src)&&client)//For patching directly into AI holopads.
|
||||
var/mob/living/silicon/ai/U = src
|
||||
message = copytext(message, 3)
|
||||
|
||||
@@ -363,9 +363,13 @@
|
||||
|
||||
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
|
||||
if (ticker.current_state == GAME_STATE_PLAYING)
|
||||
var/mob/living/silicon/ai/announcer = new (null)
|
||||
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
|
||||
a.autosay("\"[character.real_name],[character.wear_id.assignment ? " [character.wear_id.assignment]," : "" ] has arrived on the station.\"", "Arrivals Announcement Computer")
|
||||
announcer.name = "Arrivals Announcement Computer"
|
||||
announcer.real_name = "Arrivals Announcement Computer"
|
||||
a.autosay("\"[character.real_name],[character.wear_id.assignment ? " [character.wear_id.assignment]," : "" ] has arrived on the station.\"", announcer)
|
||||
del(a)
|
||||
del(announcer)
|
||||
|
||||
proc/LateChoices()
|
||||
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
|
||||
|
||||
@@ -185,6 +185,9 @@
|
||||
var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null
|
||||
var/mode = 0
|
||||
var/condi = 0
|
||||
var/bottlesprite = "1" //yes, strings
|
||||
var/pillsprite = "1"
|
||||
var/client/has_sprites = list()
|
||||
var/useramount = 30 // Last used amount
|
||||
|
||||
/obj/machinery/chem_master/New()
|
||||
@@ -347,6 +350,7 @@
|
||||
P.name = "[name] pill"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = "pill"+pillsprite
|
||||
reagents.trans_to(P,50)
|
||||
|
||||
else if (href_list["createbottle"])
|
||||
@@ -357,11 +361,33 @@
|
||||
P.name = "[name] bottle"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = "bottle"+bottlesprite
|
||||
reagents.trans_to(P,30)
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
|
||||
reagents.trans_to(P,50)
|
||||
|
||||
else if(href_list["change_pill"])
|
||||
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&pill_sprite=[i]\"><img src=\"pill[i].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
else if(href_list["change_bottle"])
|
||||
#define MAX_BOTTLE_SPRITE 20 //max icon state of the bottle sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_BOTTLE_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&bottle_sprite=[i]\"><img src=\"bottle[i].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
else if(href_list["pill_sprite"])
|
||||
pillsprite = href_list["pill_sprite"]
|
||||
else if(href_list["bottle_sprite"])
|
||||
bottlesprite = href_list["bottle_sprite"]
|
||||
else
|
||||
usr << browse(null, "window=chem_master")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -372,6 +398,13 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(!(user.client in has_sprites)) //yes, it's in three places, so they get downloaded even when they arent going to be shown, because they could be in the future
|
||||
spawn()
|
||||
has_sprites += user.client
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
usr << browse_rsc(icon('chemical.dmi', "pill" + num2text(i)), "pill[i].png")
|
||||
for(var/i = 1 to MAX_BOTTLE_SPRITE)
|
||||
usr << browse_rsc(icon('chemical.dmi', "bottle" + num2text(i)), "bottle[i].png")
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
@@ -418,8 +451,8 @@
|
||||
else
|
||||
dat += "Empty<BR>"
|
||||
if(!condi)
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A>"
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A><a href=\"?src=\ref[src]&change_bottle=1\"><img src=\"bottle[bottlesprite].png\" /></a>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (50 units max)</A>"
|
||||
if(!condi)
|
||||
|
||||
@@ -20,6 +20,10 @@ em {font-style: normal; font-weight: bold;}
|
||||
.adminobserver {color: #996600; font-weight: bold;}
|
||||
.admin {color: #386aff; font-weight: bold;}
|
||||
|
||||
.mod {color: #735638; font-weight: bold;}
|
||||
.modooc {color: #184880; font-weight: bold;}
|
||||
.adminmod {color: #402A14; font-weight: bold;}
|
||||
|
||||
.name { font-weight: bold;}
|
||||
|
||||
.say {}
|
||||
|
||||
Reference in New Issue
Block a user