diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index d58e5a2df5..ab37fa4867 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -135,37 +135,57 @@ var/list/global_huds = list(
var/list/obj/screen/item_action/item_action_list = list() //Used for the item action ui buttons.
-
datum/hud/New(mob/owner)
mymob = owner
instantiate()
..()
-
/datum/hud/proc/hidden_inventory_update()
if(!mymob) return
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
- if(inventory_shown && hud_shown)
- if(H.shoes) H.shoes.screen_loc = ui_shoes
- if(H.gloves) H.gloves.screen_loc = ui_gloves
- if(H.l_ear) H.l_ear.screen_loc = ui_l_ear
- if(H.r_ear) H.r_ear.screen_loc = ui_r_ear
- if(H.glasses) H.glasses.screen_loc = ui_glasses
- if(H.w_uniform) H.w_uniform.screen_loc = ui_iclothing
- if(H.wear_suit) H.wear_suit.screen_loc = ui_oclothing
- if(H.wear_mask) H.wear_mask.screen_loc = ui_mask
- if(H.head) H.head.screen_loc = ui_head
- else
- if(H.shoes) H.shoes.screen_loc = null
- if(H.gloves) H.gloves.screen_loc = null
- if(H.l_ear) H.l_ear.screen_loc = null
- if(H.r_ear) H.r_ear.screen_loc = null
- if(H.glasses) H.glasses.screen_loc = null
- if(H.w_uniform) H.w_uniform.screen_loc = null
- if(H.wear_suit) H.wear_suit.screen_loc = null
- if(H.wear_mask) H.wear_mask.screen_loc = null
- if(H.head) H.head.screen_loc = null
+ for(var/gear_slot in H.species.hud.gear)
+ var/list/hud_data = H.species.hud.gear[gear_slot]
+ if(inventory_shown && hud_shown)
+ switch(hud_data["slot"])
+ if(slot_head)
+ if(H.head) H.head.screen_loc = hud_data["loc"]
+ if(slot_shoes)
+ if(H.shoes) H.shoes.screen_loc = hud_data["loc"]
+ if(slot_l_ear)
+ if(H.l_ear) H.l_ear.screen_loc = hud_data["loc"]
+ if(slot_r_ear)
+ if(H.r_ear) H.r_ear.screen_loc = hud_data["loc"]
+ if(slot_gloves)
+ if(H.gloves) H.gloves.screen_loc = hud_data["loc"]
+ if(slot_glasses)
+ if(H.glasses) H.glasses.screen_loc = hud_data["loc"]
+ if(slot_w_uniform)
+ if(H.w_uniform) H.w_uniform.screen_loc = hud_data["loc"]
+ if(slot_wear_suit)
+ if(H.wear_suit) H.wear_suit.screen_loc = hud_data["loc"]
+ if(slot_wear_mask)
+ if(H.wear_mask) H.wear_mask.screen_loc = hud_data["loc"]
+ else
+ switch(hud_data["slot"])
+ if(slot_head)
+ if(H.head) H.head.screen_loc = null
+ if(slot_shoes)
+ if(H.shoes) H.shoes.screen_loc = null
+ if(slot_l_ear)
+ if(H.l_ear) H.l_ear.screen_loc = null
+ if(slot_r_ear)
+ if(H.r_ear) H.r_ear.screen_loc = null
+ if(slot_gloves)
+ if(H.gloves) H.gloves.screen_loc = null
+ if(slot_glasses)
+ if(H.glasses) H.glasses.screen_loc = null
+ if(slot_w_uniform)
+ if(H.w_uniform) H.w_uniform.screen_loc = null
+ if(slot_wear_suit)
+ if(H.wear_suit) H.wear_suit.screen_loc = null
+ if(slot_wear_mask)
+ if(H.wear_mask) H.wear_mask.screen_loc = null
/datum/hud/proc/persistant_inventory_update()
@@ -174,20 +194,36 @@ datum/hud/New(mob/owner)
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
- if(hud_shown)
- if(H.s_store) H.s_store.screen_loc = ui_sstore1
- if(H.wear_id) H.wear_id.screen_loc = ui_id
- if(H.belt) H.belt.screen_loc = ui_belt
- if(H.back) H.back.screen_loc = ui_back
- if(H.l_store) H.l_store.screen_loc = ui_storage1
- if(H.r_store) H.r_store.screen_loc = ui_storage2
- else
- if(H.s_store) H.s_store.screen_loc = null
- if(H.wear_id) H.wear_id.screen_loc = null
- if(H.belt) H.belt.screen_loc = null
- if(H.back) H.back.screen_loc = null
- if(H.l_store) H.l_store.screen_loc = null
- if(H.r_store) H.r_store.screen_loc = null
+ for(var/gear_slot in H.species.hud.gear)
+ var/list/hud_data = H.species.hud.gear[gear_slot]
+ if(hud_shown)
+ switch(hud_data["slot"])
+ if(slot_s_store)
+ if(H.s_store) H.s_store.screen_loc = hud_data["loc"]
+ if(slot_wear_id)
+ if(H.wear_id) H.wear_id.screen_loc = hud_data["loc"]
+ if(slot_belt)
+ if(H.belt) H.belt.screen_loc = hud_data["loc"]
+ if(slot_back)
+ if(H.back) H.back.screen_loc = hud_data["loc"]
+ if(slot_l_store)
+ if(H.l_store) H.l_store.screen_loc = hud_data["loc"]
+ if(slot_r_store)
+ if(H.r_store) H.r_store.screen_loc = hud_data["loc"]
+ else
+ switch(hud_data["slot"])
+ if(slot_s_store)
+ if(H.s_store) H.s_store.screen_loc = null
+ if(slot_wear_id)
+ if(H.wear_id) H.wear_id.screen_loc = null
+ if(slot_belt)
+ if(H.belt) H.belt.screen_loc = null
+ if(slot_back)
+ if(H.back) H.back.screen_loc = null
+ if(slot_l_store)
+ if(H.l_store) H.l_store.screen_loc = null
+ if(slot_r_store)
+ if(H.r_store) H.r_store.screen_loc = null
/datum/hud/proc/instantiate()
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index ff52033bb7..653079134e 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -98,7 +98,7 @@
holder.icon_state = "hudhealth-100"
C.images += holder
else
- holder.icon_state = "hud[RoundHealth((patient.health-config.health_threshold_crit)/(patient.species.total_health-config.health_threshold_crit)*100)]"
+ holder.icon_state = "hud[RoundHealth((patient.health-config.health_threshold_crit)/(patient.maxHealth-config.health_threshold_crit)*100)]"
C.images += holder
holder = patient.hud_list[STATUS_HUD]
diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm
index c0db7773a8..074543296f 100644
--- a/code/game/objects/items/weapons/dice.dm
+++ b/code/game/objects/items/weapons/dice.dm
@@ -8,7 +8,7 @@
attack_verb = list("diced")
/obj/item/weapon/dice/New()
- icon_state = "[name][rand(sides)]"
+ icon_state = "[name][rand(1,sides)]"
/obj/item/weapon/dice/d20
name = "d20"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index a64385efb4..a37933f57f 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1141,6 +1141,8 @@
species.handle_post_spawn(src)
+ maxHealth = species.total_health
+
spawn(0)
regenerate_icons()
vessel.add_reagent("blood",560-vessel.total_volume)
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index e9a754e78d..60f1f8a3a2 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -2,7 +2,7 @@
/mob/living/carbon/human/updatehealth()
if(status_flags & GODMODE)
- health = species.total_health
+ health = maxHealth
stat = CONSCIOUS
return
var/total_burn = 0
@@ -15,10 +15,10 @@
var/tox_l = ((species.flags & NO_POISON) ? 0 : getToxLoss())
var/clone_l = getCloneLoss()
- health = species.total_health - oxy_l - tox_l - clone_l - total_burn - total_brute
+ health = maxHealth - oxy_l - tox_l - clone_l - total_burn - total_brute
//TODO: fix husking
- if( ((species.total_health - total_burn) < config.health_threshold_dead) && stat == DEAD)
+ if( ((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD)
ChangeToHusk()
return
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 194050bc26..0f13a6dbfd 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1614,7 +1614,7 @@
if(stat == 2)
holder.icon_state = "hudhealth-100" // X_X
else
- var/percentage_health = RoundHealth((health-config.health_threshold_crit)/(species.total_health-config.health_threshold_crit)*100)
+ var/percentage_health = RoundHealth((health-config.health_threshold_crit)/(maxHealth-config.health_threshold_crit)*100)
holder.icon_state = "hud[percentage_health]"
hud_list[HEALTH_HUD] = holder
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index 64783251ef..8bdfa8a59d 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -204,7 +204,7 @@
// Called when using the shredding behavior.
/datum/species/proc/can_shred(var/mob/living/carbon/human/H, var/ignore_intent)
- if(ignore_intent && H.a_intent != "hurt")
+ if(!ignore_intent && H.a_intent != "hurt")
return 0
for(var/datum/unarmed_attack/attack in unarmed_attacks)
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
index 0f942f3c4d..167271aef9 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
@@ -139,20 +139,10 @@
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "You cannot dissolve this object."
return
-
// TURF CHECK
- else if(istype(O, /turf/simulated))
- var/turf/T = O
- // R WALL
- if(istype(T, /turf/simulated/wall/r_wall))
- src << "You cannot dissolve this object."
- return
- // R FLOOR
- if(istype(T, /turf/simulated/floor/engine))
- src << "You cannot dissolve this object."
- return
- else// Not a type we can acid.
- return
+ else if(istype(O, /turf/simulated/wall/r_wall) || istype(O, /turf/simulated/floor/engine))
+ src << "You cannot dissolve this object."
+ return
if(check_alien_ability(200,0,"acid gland"))
new /obj/effect/alien/acid(get_turf(O), O)
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm
index 5159dba0fa..15cf1ce728 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm
@@ -108,7 +108,7 @@
if (prob(5))
H << "You feel a soothing sensation come over you..."
return 1
-
+
//next internal organs
for(var/datum/organ/internal/I in H.internal_organs)
if(I.damage > 0)
@@ -116,7 +116,7 @@
if (prob(5))
H << "You feel a soothing sensation within your [I.parent_organ]..."
return 1
-
+
//next mend broken bones, approx 10 ticks each
for(var/datum/organ/external/E in H.bad_external_organs)
if (E.status & ORGAN_BROKEN)
@@ -124,7 +124,7 @@
if (E.mend_fracture())
H << "You feel something mend itself inside your [E.display_name]."
return 1
-
+
return 0
/datum/species/xenos/handle_login_special(var/mob/living/carbon/human/H)
@@ -268,9 +268,6 @@
/mob/living/carbon/human/proc/resin
)
- //maxHealth = 250
- //health = 250
-
/datum/species/xenos/queen/handle_login_special(var/mob/living/carbon/human/H)
..()
// Make sure only one official queen exists at any point.
diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm
index ca3d955109..ba738e81ef 100644
--- a/code/modules/mob/living/carbon/human/unarmed_attack.dm
+++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm
@@ -86,6 +86,7 @@
edge = 0
/datum/unarmed_attack/bite/is_usable(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone)
+
if (user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/muzzle))
return 0
if (user == target && (zone == "head" || zone == "eyes" || zone == "mouth"))
@@ -171,9 +172,13 @@
damage = 0
/datum/unarmed_attack/stomp/is_usable(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone)
+
if (user.legcuffed)
return 0
+ if(!istype(target))
+ return 0
+
if (!user.lying && (target.lying || zone in list("l_foot", "r_foot")))
if(target.grabbed_by == user && target.lying)
return 0
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index a82aefe9f5..98512d92fc 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -640,7 +640,7 @@
can_break_cuffs = 1
else if(istype(CM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = CM
- if(H.species.can_shred(H))
+ if(H.species.can_shred(H,1))
can_break_cuffs = 1
if(can_break_cuffs) //Don't want to do a lot of logic gating here.
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm
index c98a8b06b3..7750ab9b9a 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm
@@ -186,21 +186,20 @@
else if(istype(M,/mob/living/silicon/robot/drone) && !M.client)
- var/mob/living/silicon/robot/drone/D = src.loc
+ var/mob/living/silicon/robot/D = src.loc
if(!istype(D))
return
- D << "\red You begin decompiling the other drone."
+ D << "You begin decompiling [M]."
if(!do_after(D,50))
- D << "\red You need to remain still while decompiling such a large object."
+ D << "You need to remain still while decompiling such a large object."
return
if(!M || !D) return
- D << "\red You carefully and thoroughly decompile your downed fellow, storing as much of its resources as you can within yourself."
-
+ D << "You carefully and thoroughly decompile [M], storing as much of its resources as you can within yourself."
del(M)
new/obj/effect/decal/cleanable/blood/oil(get_turf(src))
@@ -208,7 +207,6 @@
stored_comms["glass"] += 15
stored_comms["wood"] += 5
stored_comms["plastic"] += 5
-
return
else
continue