mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-04 14:33:58 +00:00
Merge resolution.
This commit is contained in:
@@ -253,6 +253,7 @@
|
||||
'nano/templates/cryo.tmpl',
|
||||
'nano/templates/geoscanner.tmpl',
|
||||
'nano/templates/dna_modifier.tmpl',
|
||||
'nano/templates/telescience_console.tmpl',
|
||||
'nano/images/uiBackground.png',
|
||||
'nano/images/uiIcons16.png',
|
||||
'nano/images/uiIcons24.png',
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
//If you died in the game and are a ghsot - this will remain as null.
|
||||
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
|
||||
var/has_enabled_antagHUD = 0
|
||||
var/medHUD = 0
|
||||
var/antagHUD = 0
|
||||
universal_speak = 1
|
||||
var/atom/movable/following = null
|
||||
@@ -107,7 +108,61 @@ Works together with spawning an observer, noted above.
|
||||
target_list += target
|
||||
if(target_list.len)
|
||||
assess_targets(target_list, src)
|
||||
if(medHUD)
|
||||
process_medHUD(src)
|
||||
|
||||
|
||||
// Direct copied from medical HUD glasses proc, used to determine what health bar to put over the targets head.
|
||||
/mob/dead/proc/RoundHealth(var/health)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
return "health100"
|
||||
if(70 to 100)
|
||||
return "health80"
|
||||
if(50 to 70)
|
||||
return "health60"
|
||||
if(30 to 50)
|
||||
return "health40"
|
||||
if(18 to 30)
|
||||
return "health25"
|
||||
if(5 to 18)
|
||||
return "health10"
|
||||
if(1 to 5)
|
||||
return "health1"
|
||||
if(-99 to 0)
|
||||
return "health0"
|
||||
else
|
||||
return "health-100"
|
||||
return "0"
|
||||
|
||||
|
||||
// Pretty much a direct copy of Medical HUD stuff, except will show ill if they are ill instead of also checking for known illnesses.
|
||||
|
||||
/mob/dead/proc/process_medHUD(var/mob/M)
|
||||
var/client/C = M.client
|
||||
var/image/holder
|
||||
for(var/mob/living/carbon/human/patient in oview(M))
|
||||
var/foundVirus = 0
|
||||
if(patient.virus2.len)
|
||||
foundVirus = 1
|
||||
if(!C) return
|
||||
holder = patient.hud_list[HEALTH_HUD]
|
||||
if(patient.stat == 2)
|
||||
holder.icon_state = "hudhealth-100"
|
||||
else
|
||||
holder.icon_state = "hud[RoundHealth(patient.health)]"
|
||||
C.images += holder
|
||||
|
||||
holder = patient.hud_list[STATUS_HUD]
|
||||
if(patient.stat == 2)
|
||||
holder.icon_state = "huddead"
|
||||
else if(patient.status_flags & XENO_HOST)
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(foundVirus)
|
||||
holder.icon_state = "hudill"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
C.images += holder
|
||||
|
||||
|
||||
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
|
||||
@@ -238,6 +293,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
mind.current.key = key
|
||||
return 1
|
||||
|
||||
/mob/dead/observer/verb/toggle_medHUD()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle MedicHUD"
|
||||
set desc = "Toggles Medical HUD allowing you to see how everyone is doing"
|
||||
if(!client)
|
||||
return
|
||||
if(medHUD)
|
||||
medHUD = 0
|
||||
src << "\blue <B>Medical HUD Disabled</B>"
|
||||
else
|
||||
medHUD = 1
|
||||
src << "\blue <B>Medical HUD Enabled</B>"
|
||||
|
||||
/mob/dead/observer/verb/toggle_antagHUD()
|
||||
set category = "Ghost"
|
||||
set name = "Toggle AntagHUD"
|
||||
|
||||
@@ -793,8 +793,6 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
base = icon('icons/mob/human_races/r_human.dmi')
|
||||
|
||||
if(base)
|
||||
base = base.MakeLying()
|
||||
|
||||
//Changing limb's skin tone to match owner
|
||||
if(!H.species || H.species.flags & HAS_SKIN_TONE)
|
||||
if (H.s_tone >= 0)
|
||||
@@ -802,28 +800,9 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
else
|
||||
base.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
|
||||
|
||||
//this is put here since I can't easially edit the same icon from head's constructor
|
||||
if(istype(src, /obj/item/weapon/organ/head))
|
||||
//Add (facial) hair.
|
||||
if(H.f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style]
|
||||
if(facial_hair_style)
|
||||
var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_l")
|
||||
if(facial_hair_style.do_colouration)
|
||||
facial.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD)
|
||||
|
||||
base.Blend(facial, ICON_OVERLAY)
|
||||
|
||||
if(H.h_style && !(H.head && (H.head.flags & BLOCKHEADHAIR)))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style]
|
||||
if(hair_style)
|
||||
var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_l")
|
||||
if(hair_style.do_colouration)
|
||||
hair.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
|
||||
|
||||
base.Blend(hair, ICON_OVERLAY)
|
||||
|
||||
icon = base
|
||||
dir = SOUTH
|
||||
src.transform = turn(src.transform, rand(70,130))
|
||||
|
||||
|
||||
/****************************************************
|
||||
@@ -864,6 +843,24 @@ obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H)
|
||||
if(istype(H))
|
||||
src.icon_state = H.gender == MALE? "head_m" : "head_f"
|
||||
..()
|
||||
//Add (facial) hair.
|
||||
if(H.f_style)
|
||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[H.f_style]
|
||||
if(facial_hair_style)
|
||||
var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||
if(facial_hair_style.do_colouration)
|
||||
facial.Blend(rgb(H.r_facial, H.g_facial, H.b_facial), ICON_ADD)
|
||||
|
||||
overlays.Add(facial) // icon.Blend(facial, ICON_OVERLAY)
|
||||
|
||||
if(H.h_style && !(H.head && (H.head.flags & BLOCKHEADHAIR)))
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style]
|
||||
if(hair_style)
|
||||
var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
if(hair_style.do_colouration)
|
||||
hair.Blend(rgb(H.r_hair, H.g_hair, H.b_hair), ICON_ADD)
|
||||
|
||||
overlays.Add(hair) //icon.Blend(hair, ICON_OVERLAY)
|
||||
spawn(5)
|
||||
if(brainmob && brainmob.client)
|
||||
brainmob.client.screen.len = null //clear the hud
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
icon_state = "dispenser"
|
||||
use_power = 0
|
||||
idle_power_usage = 40
|
||||
var/ui_name = "Chem Dispenser 5000"
|
||||
var/energy = 100
|
||||
var/max_energy = 100
|
||||
var/amount = 30
|
||||
var/amount = 30
|
||||
var/accept_glass = 0
|
||||
var/beaker = null
|
||||
var/recharged = 0
|
||||
var/hackedcheck = 0
|
||||
@@ -116,7 +118,7 @@
|
||||
data["energy"] = energy
|
||||
data["maxEnergy"] = max_energy
|
||||
data["isBeakerLoaded"] = beaker ? 1 : 0
|
||||
|
||||
data["glass"] = accept_glass
|
||||
var beakerContents[0]
|
||||
var beakerCurrentVolume = 0
|
||||
if(beaker && beaker:reagents && beaker:reagents.reagent_list.len)
|
||||
@@ -142,7 +144,7 @@
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", "Chem Dispenser 5000", 370, 605)
|
||||
ui = new(user, src, ui_key, "chem_dispenser.tmpl", ui_name, 370, 605)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
@@ -164,7 +166,7 @@
|
||||
|
||||
if(href_list["dispense"])
|
||||
if (dispensable_reagents.Find(href_list["dispense"]) && beaker != null)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = src.beaker
|
||||
var/obj/item/weapon/reagent_containers/B = src.beaker
|
||||
var/datum/reagents/R = B.reagents
|
||||
var/space = R.maximum_volume - R.total_volume
|
||||
|
||||
@@ -173,14 +175,14 @@
|
||||
|
||||
if(href_list["ejectBeaker"])
|
||||
if(beaker)
|
||||
var/obj/item/weapon/reagent_containers/glass/B = beaker
|
||||
var/obj/item/weapon/reagent_containers/B = beaker
|
||||
B.loc = loc
|
||||
beaker = null
|
||||
|
||||
add_fingerprint(usr)
|
||||
return 1 // update UIs attached to this object
|
||||
|
||||
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob)
|
||||
/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/B as obj, var/mob/user as mob)
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
@@ -197,7 +199,9 @@
|
||||
if(src.beaker)
|
||||
user << "Something is already loaded into the machine."
|
||||
return
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass||/obj/item/weapon/reagent_containers/food))
|
||||
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B, /obj/item/weapon/reagent_containers/food))
|
||||
if(!accept_glass && istype(B,/obj/item/weapon/reagent_containers/food))
|
||||
user << "<span class='notice'>This machine only accepts beakers</span>"
|
||||
src.beaker = B
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
@@ -221,9 +225,11 @@
|
||||
icon_state = "soda_dispenser"
|
||||
name = "soda fountain"
|
||||
desc = "A drink fabricating machine, capable of producing many sugary drinks with just one touch."
|
||||
ui_name = "Soda Dispens-o-matic"
|
||||
energy = 100
|
||||
accept_glass = 1
|
||||
max_energy = 100
|
||||
dispensable_reagents = list("water","ice","coffee","tea","icetea","space_cola","spacemountainwind","dr_gibb","space_up","tonic","sodawater","lemon_lime","sugar","orangejuice","limejuice")
|
||||
dispensable_reagents = list("water","ice","coffee","cream","tea","icetea","cola","spacemountainwind","dr_gibb","space_up","tonic","sodawater","lemon_lime","sugar","orangejuice","limejuice","watermelonjuice")
|
||||
|
||||
/obj/machinery/chem_dispenser/soda/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
|
||||
..()
|
||||
@@ -242,13 +248,16 @@
|
||||
/obj/machinery/chem_dispenser/beer
|
||||
icon_state = "booze_dispenser"
|
||||
name = "booze dispenser"
|
||||
ui_name = "Booze Portal 9001"
|
||||
energy = 100
|
||||
accept_glass = 1
|
||||
max_energy = 100
|
||||
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
|
||||
dispensable_reagents = list("water","ice","coffee","tea","cream","lemon_lime","sugar","orangejuice","limejuice","cola","sodawater","tonic","beer","kahlua","whiskey","wine","vodka","gin","rum","tequila","vermouth","cognac","ale","mead")
|
||||
dispensable_reagents = list("lemon_lime","sugar","orangejuice","limejuice","sodawater","tonic","beer","kahlua","whiskey","wine","vodka","gin","rum","tequilla","vermouth","cognac","ale","mead")
|
||||
|
||||
/obj/machinery/chem_dispenser/beer/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
|
||||
..()
|
||||
|
||||
if(istype(B, /obj/item/device/multitool))
|
||||
if(hackedcheck == 0)
|
||||
user << "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes."
|
||||
@@ -441,7 +450,6 @@
|
||||
|
||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||
return
|
||||
|
||||
while (count--)
|
||||
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc)
|
||||
if(!name) name = reagents.get_master_reagent_name()
|
||||
|
||||
@@ -2626,7 +2626,7 @@ datum
|
||||
color = "#619494" // rgb: 97, 148, 148
|
||||
|
||||
drink/cold/space_cola
|
||||
name = "Cola"
|
||||
name = "Space Cola"
|
||||
id = "cola"
|
||||
description = "A refreshing beverage."
|
||||
reagent_state = LIQUID
|
||||
@@ -2649,7 +2649,7 @@ datum
|
||||
return
|
||||
|
||||
drink/cold/spacemountainwind
|
||||
name = "Space Mountain Wind"
|
||||
name = "Mountain Wind"
|
||||
id = "spacemountainwind"
|
||||
description = "Blows right through you like a space wind."
|
||||
color = "#102000" // rgb: 16, 32, 0
|
||||
|
||||
@@ -16,6 +16,12 @@ var/list/GPS_list = list()
|
||||
GPS_list.Add(src)
|
||||
name = "global positioning system ([gpstag])"
|
||||
overlays += "working"
|
||||
/obj/item/device/gps/Del()
|
||||
GPS_list.Remove(src)
|
||||
..()
|
||||
/obj/item/device/gps/Del()
|
||||
GPS_list.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/device/gps/Del()
|
||||
GPS_list.Remove(src)
|
||||
|
||||
Reference in New Issue
Block a user