mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 16:42:13 +00:00
Overview Adds thirst mechanics. Thirst mechanics work exactly like hunger mechanics where if you don't drink enough liquid, you become thirsty and move slower. Several other mechanics involving drinks were also changed. For organic races, you gain hydration by consuming beverages and water. Water is the most effective way of hydrating yourself. IPCs are not affected by hydration and do not have to worry about it. If you overeat or overdrink, your nutrition decreases faster until you are of normal hunger and thirst levels. Penalties for not eating or drinking are now more severe. If you refuse to drink or eat all shift, you will be up to 33% slower and take twice as much pain damage. The amount scales based on your hunger or thirst levels. If you are considered hungry or thirsty, it starts scaling until you're starving or seriously dehydrated. If you overeat and overdrink as well, you get a ~5% reduced movement and pain tolerance with each mechanic. The icons for hunger have been updated to be more specific, and they match the new thirst indicators as well. https://i.imgur.com/QQbWxYI.png You can now also inject beverages into your blood for x4 effectiveness. Before, IV dripping yourself with vodka did nothing but give you a small amount of toxins, but now it should be a hell of a party. Dionaea can now be affected by beverages with respect to nutrition gains and temperature changes. Dionaea cannot be affected by some effects, such as stuttering and intoxication, still. Healing effects for certain beverages (tea, milk) were removed. This a HRP server, milk shouldn't heal you.
400 lines
11 KiB
Plaintext
400 lines
11 KiB
Plaintext
/mob/living/carbon/human/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
|
|
HUD.human_hud(ui_style, ui_color, ui_alpha, src)
|
|
|
|
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen/white.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/carbon/human/target)
|
|
var/datum/hud_data/hud_data
|
|
if(!istype(target))
|
|
hud_data = new()
|
|
else
|
|
hud_data = target.species.hud
|
|
|
|
if(hud_data.icon)
|
|
ui_style = hud_data.icon
|
|
|
|
src.adding = list()
|
|
src.other = list()
|
|
src.hotkeybuttons = list() //These can be disabled for hotkey usersx
|
|
|
|
var/list/hud_elements = list()
|
|
var/obj/screen/using
|
|
var/obj/screen/inventory/inv_box
|
|
|
|
// Draw the various inventory equipment slots.
|
|
var/has_hidden_gear
|
|
for(var/gear_slot in hud_data.gear)
|
|
|
|
inv_box = new /obj/screen/inventory()
|
|
inv_box.icon = ui_style
|
|
inv_box.layer = 19
|
|
inv_box.color = ui_color
|
|
inv_box.alpha = ui_alpha
|
|
|
|
var/list/slot_data = hud_data.gear[gear_slot]
|
|
inv_box.name = gear_slot
|
|
inv_box.screen_loc = slot_data["loc"]
|
|
inv_box.slot_id = slot_data["slot"]
|
|
inv_box.icon_state = slot_data["state"]
|
|
|
|
if(slot_data["dir"])
|
|
inv_box.set_dir(slot_data["dir"])
|
|
|
|
if(slot_data["toggle"])
|
|
src.other += inv_box
|
|
has_hidden_gear = 1
|
|
else
|
|
src.adding += inv_box
|
|
|
|
if(has_hidden_gear)
|
|
using = new /obj/screen()
|
|
using.name = "toggle"
|
|
using.icon = ui_style
|
|
using.icon_state = "other"
|
|
using.screen_loc = ui_inventory
|
|
using.layer = 20
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
src.adding += using
|
|
|
|
// Draw the attack intent dialogue.
|
|
if(hud_data.has_a_intent)
|
|
|
|
using = new /obj/screen()
|
|
using.name = "act_intent"
|
|
using.icon = ui_style
|
|
using.icon_state = "intent_"+mymob.a_intent
|
|
using.screen_loc = ui_acti
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
using.layer = 20
|
|
src.adding += using
|
|
action_intent = using
|
|
|
|
hud_elements |= using
|
|
|
|
//intent small hud objects
|
|
var/icon/ico
|
|
|
|
ico = new(ui_style, "black")
|
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
|
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
|
using = new /obj/screen( src )
|
|
using.name = I_HELP
|
|
using.icon = ico
|
|
using.screen_loc = ui_acti
|
|
using.alpha = ui_alpha
|
|
using.layer = 21
|
|
src.adding += using
|
|
help_intent = using
|
|
|
|
ico = new(ui_style, "black")
|
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
|
using = new /obj/screen( src )
|
|
using.name = I_DISARM
|
|
using.icon = ico
|
|
using.screen_loc = ui_acti
|
|
using.alpha = ui_alpha
|
|
using.layer = 21
|
|
src.adding += using
|
|
disarm_intent = using
|
|
|
|
ico = new(ui_style, "black")
|
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
|
using = new /obj/screen( src )
|
|
using.name = I_GRAB
|
|
using.icon = ico
|
|
using.screen_loc = ui_acti
|
|
using.alpha = ui_alpha
|
|
using.layer = 21
|
|
src.adding += using
|
|
grab_intent = using
|
|
|
|
ico = new(ui_style, "black")
|
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
|
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
|
using = new /obj/screen( src )
|
|
using.name = I_HURT
|
|
using.icon = ico
|
|
using.screen_loc = ui_acti
|
|
using.alpha = ui_alpha
|
|
using.layer = 21
|
|
src.adding += using
|
|
hurt_intent = using
|
|
//end intent small hud objects
|
|
|
|
if(hud_data.has_m_intent)
|
|
using = new /obj/screen/movement_intent()
|
|
using.icon = ui_style
|
|
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
src.adding += using
|
|
move_intent = using
|
|
|
|
if(hud_data.has_drop)
|
|
using = new /obj/screen()
|
|
using.name = "drop"
|
|
using.icon = ui_style
|
|
using.icon_state = "act_drop"
|
|
using.screen_loc = ui_drop_throw
|
|
using.layer = 19
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
src.hotkeybuttons += using
|
|
|
|
if(hud_data.has_hands)
|
|
|
|
using = new /obj/screen()
|
|
using.name = "equip"
|
|
using.icon = ui_style
|
|
using.icon_state = "act_equip"
|
|
using.screen_loc = ui_equip
|
|
using.layer = 20
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
src.adding += using
|
|
|
|
inv_box = new /obj/screen/inventory()
|
|
inv_box.name = "r_hand"
|
|
inv_box.icon = ui_style
|
|
inv_box.icon_state = "r_hand_inactive"
|
|
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
|
|
inv_box.icon_state = "r_hand_active"
|
|
inv_box.screen_loc = ui_rhand
|
|
inv_box.slot_id = slot_r_hand
|
|
inv_box.layer = 19
|
|
inv_box.color = ui_color
|
|
inv_box.alpha = ui_alpha
|
|
|
|
src.r_hand_hud_object = inv_box
|
|
src.adding += inv_box
|
|
|
|
inv_box = new /obj/screen/inventory()
|
|
inv_box.name = "l_hand"
|
|
inv_box.icon = ui_style
|
|
inv_box.icon_state = "l_hand_inactive"
|
|
if(mymob && mymob.hand) //This being 1 means the left hand is in use
|
|
inv_box.icon_state = "l_hand_active"
|
|
inv_box.screen_loc = ui_lhand
|
|
inv_box.slot_id = slot_l_hand
|
|
inv_box.layer = 19
|
|
inv_box.color = ui_color
|
|
inv_box.alpha = ui_alpha
|
|
src.l_hand_hud_object = inv_box
|
|
src.adding += inv_box
|
|
|
|
using = new /obj/screen/inventory()
|
|
using.name = "hand"
|
|
using.icon = ui_style
|
|
using.icon_state = "hand1"
|
|
using.screen_loc = ui_swaphand1
|
|
using.layer = 19
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
src.adding += using
|
|
|
|
using = new /obj/screen/inventory()
|
|
using.name = "hand"
|
|
using.icon = ui_style
|
|
using.icon_state = "hand2"
|
|
using.screen_loc = ui_swaphand2
|
|
using.layer = 19
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
src.adding += using
|
|
|
|
if(hud_data.has_resist)
|
|
using = new /obj/screen()
|
|
using.name = "resist"
|
|
using.icon = ui_style
|
|
using.icon_state = "act_resist"
|
|
using.screen_loc = ui_pull_resist
|
|
using.layer = 19
|
|
using.color = ui_color
|
|
using.alpha = ui_alpha
|
|
src.hotkeybuttons += using
|
|
|
|
if(hud_data.has_throw)
|
|
mymob.throw_icon = new /obj/screen()
|
|
mymob.throw_icon.icon = ui_style
|
|
mymob.throw_icon.icon_state = "act_throw_off"
|
|
mymob.throw_icon.name = "throw"
|
|
mymob.throw_icon.screen_loc = ui_drop_throw
|
|
mymob.throw_icon.color = ui_color
|
|
mymob.throw_icon.alpha = ui_alpha
|
|
src.hotkeybuttons += mymob.throw_icon
|
|
hud_elements |= mymob.throw_icon
|
|
|
|
mymob.pullin = new /obj/screen()
|
|
mymob.pullin.icon = ui_style
|
|
mymob.pullin.icon_state = "pull0"
|
|
mymob.pullin.name = "pull"
|
|
mymob.pullin.screen_loc = ui_pull_resist
|
|
src.hotkeybuttons += mymob.pullin
|
|
hud_elements |= mymob.pullin
|
|
|
|
if(hud_data.has_internals)
|
|
mymob.internals = new /obj/screen/internals()
|
|
mymob.internals.icon = ui_style
|
|
hud_elements |= mymob.internals
|
|
|
|
if(hud_data.has_warnings)
|
|
mymob.oxygen = new /obj/screen()
|
|
mymob.oxygen.icon = ui_style
|
|
mymob.oxygen.icon_state = "oxy0"
|
|
mymob.oxygen.name = "oxygen"
|
|
mymob.oxygen.screen_loc = ui_oxygen
|
|
hud_elements |= mymob.oxygen
|
|
|
|
mymob.toxin = new /obj/screen()
|
|
mymob.toxin.icon = ui_style
|
|
mymob.toxin.icon_state = "tox0"
|
|
mymob.toxin.name = "toxin"
|
|
mymob.toxin.screen_loc = ui_toxin
|
|
hud_elements |= mymob.toxin
|
|
|
|
mymob.fire = new /obj/screen()
|
|
mymob.fire.icon = ui_style
|
|
mymob.fire.icon_state = "fire0"
|
|
mymob.fire.name = "fire"
|
|
mymob.fire.screen_loc = ui_fire
|
|
hud_elements |= mymob.fire
|
|
|
|
mymob.healths = new /obj/screen()
|
|
mymob.healths.icon = ui_style
|
|
mymob.healths.icon_state = "health0"
|
|
mymob.healths.name = "health"
|
|
mymob.healths.screen_loc = ui_health
|
|
hud_elements |= mymob.healths
|
|
|
|
if(hud_data.has_pressure)
|
|
mymob.pressure = new /obj/screen()
|
|
mymob.pressure.icon = ui_style
|
|
mymob.pressure.icon_state = "pressure0"
|
|
mymob.pressure.name = "pressure"
|
|
mymob.pressure.screen_loc = ui_pressure
|
|
hud_elements |= mymob.pressure
|
|
|
|
if(hud_data.has_bodytemp)
|
|
mymob.bodytemp = new /obj/screen()
|
|
mymob.bodytemp.icon = ui_style
|
|
mymob.bodytemp.icon_state = "temp1"
|
|
mymob.bodytemp.name = "body temperature"
|
|
mymob.bodytemp.screen_loc = ui_temp
|
|
hud_elements |= mymob.bodytemp
|
|
|
|
if(hud_data.has_nutrition)
|
|
mymob.nutrition_icon = new /obj/screen()
|
|
mymob.nutrition_icon.icon = ui_style
|
|
mymob.nutrition_icon.icon_state = "nutrition0"
|
|
mymob.nutrition_icon.name = "nutrition"
|
|
mymob.nutrition_icon.screen_loc = ui_nutrition
|
|
hud_elements |= mymob.nutrition_icon
|
|
|
|
if(hud_data.has_hydration)
|
|
mymob.hydration_icon = new /obj/screen()
|
|
mymob.hydration_icon.icon = ui_style
|
|
mymob.hydration_icon.icon_state = "thirst0"
|
|
mymob.hydration_icon.name = "thirst"
|
|
mymob.hydration_icon.screen_loc = ui_hydration
|
|
hud_elements |= mymob.hydration_icon
|
|
|
|
if(hud_data.has_up_hint)
|
|
mymob.up_hint = new /obj/screen()
|
|
mymob.up_hint.icon = ui_style
|
|
mymob.up_hint.icon_state = "uphint0"
|
|
mymob.up_hint.name = "up hint"
|
|
mymob.up_hint.screen_loc = ui_up_hint
|
|
hud_elements |= mymob.up_hint
|
|
|
|
mymob.blind = new /obj/screen()
|
|
mymob.blind.icon = 'icons/mob/screen/full.dmi'
|
|
mymob.blind.icon_state = "blackimageoverlay"
|
|
mymob.blind.name = " "
|
|
mymob.blind.screen_loc = "1,1"
|
|
mymob.blind.mouse_opacity = 0
|
|
mymob.blind.invisibility = 101
|
|
hud_elements |= mymob.blind
|
|
|
|
mymob.damageoverlay = new /obj/screen()
|
|
mymob.damageoverlay.icon = 'icons/mob/screen/full.dmi'
|
|
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
|
|
mymob.damageoverlay.name = "dmg"
|
|
mymob.damageoverlay.screen_loc = "1,1"
|
|
mymob.damageoverlay.mouse_opacity = 0
|
|
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
|
|
hud_elements |= mymob.damageoverlay
|
|
|
|
mymob.flash = new /obj/screen()
|
|
mymob.flash.icon = ui_style
|
|
mymob.flash.icon_state = "blank"
|
|
mymob.flash.name = "flash"
|
|
mymob.flash.screen_loc = ui_entire_screen
|
|
mymob.flash.layer = 17
|
|
mymob.flash.mouse_opacity = 0
|
|
hud_elements |= mymob.flash
|
|
|
|
mymob.pain = new /obj/screen( null )
|
|
|
|
mymob.zone_sel = new /obj/screen/zone_sel( null )
|
|
mymob.zone_sel.icon = ui_style
|
|
mymob.zone_sel.color = ui_color
|
|
mymob.zone_sel.alpha = ui_alpha
|
|
mymob.zone_sel.cut_overlays()
|
|
mymob.zone_sel.add_overlay(image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]"))
|
|
hud_elements |= mymob.zone_sel
|
|
|
|
//Handle the gun settings buttons
|
|
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
|
|
mymob.gun_setting_icon.icon = ui_style
|
|
mymob.gun_setting_icon.color = ui_color
|
|
mymob.gun_setting_icon.alpha = ui_alpha
|
|
hud_elements |= mymob.gun_setting_icon
|
|
|
|
mymob.item_use_icon = new /obj/screen/gun/item(null)
|
|
mymob.item_use_icon.icon = ui_style
|
|
mymob.item_use_icon.color = ui_color
|
|
mymob.item_use_icon.alpha = ui_alpha
|
|
|
|
mymob.gun_move_icon = new /obj/screen/gun/move(null)
|
|
mymob.gun_move_icon.icon = ui_style
|
|
mymob.gun_move_icon.color = ui_color
|
|
mymob.gun_move_icon.alpha = ui_alpha
|
|
|
|
mymob.radio_use_icon = new /obj/screen/gun/radio(null)
|
|
mymob.radio_use_icon.icon = ui_style
|
|
mymob.radio_use_icon.color = ui_color
|
|
mymob.radio_use_icon.alpha = ui_alpha
|
|
|
|
mymob.client.screen = null
|
|
|
|
mymob.client.screen += hud_elements
|
|
mymob.client.screen += src.adding + src.hotkeybuttons
|
|
inventory_shown = 0;
|
|
|
|
return
|
|
|
|
|
|
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
|
|
set category = "OOC"
|
|
set name = "Toggle hotkey buttons"
|
|
set desc = "This disables or enables the user interface buttons which can be used with hotkeys."
|
|
|
|
if(hud_used.hotkey_ui_hidden)
|
|
client.screen += hud_used.hotkeybuttons
|
|
hud_used.hotkey_ui_hidden = 0
|
|
else
|
|
client.screen -= hud_used.hotkeybuttons
|
|
hud_used.hotkey_ui_hidden = 1
|
|
|
|
//Used for new human mobs created by cloning/goleming/etc.
|
|
/mob/living/carbon/human/proc/set_cloned_appearance()
|
|
f_style = "Shaved"
|
|
if(dna.species == "Human") //no more xenos losing ears/tentacles
|
|
h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
|
|
undershirt = null
|
|
underwear = null
|
|
socks = null
|
|
regenerate_icons()
|