mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
Merge remote-tracking branch 'remotes/upstream/dev-freeze' into conscience
Conflicts: code/modules/mob/living/carbon/human/human_attackhand.dm
This commit is contained in:
@@ -223,7 +223,7 @@
|
||||
chance = !hand ? 40 : 20
|
||||
|
||||
if (prob(chance))
|
||||
visible_message("<spawn class=danger>[src]'s [W.name] goes off during struggle!")
|
||||
visible_message("<span class='danger'>[src]'s [W.name] goes off during struggle!")
|
||||
var/list/turfs = list()
|
||||
for(var/turf/T in view())
|
||||
turfs += T
|
||||
|
||||
@@ -215,10 +215,11 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
|
||||
//set redraw_mob to 0 if you don't wish the hud to be updated - if you're doing it manually in your own proc.
|
||||
/mob/living/carbon/human/equip_to_slot(obj/item/W as obj, slot, redraw_mob = 1)
|
||||
|
||||
if(!slot) return
|
||||
if(!istype(W)) return
|
||||
if(!has_organ_for_slot(slot)) return
|
||||
|
||||
if(!species || !species.hud || !(slot in species.hud.equip_slots)) return
|
||||
W.loc = src
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
@@ -337,7 +338,7 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
|
||||
W.layer = 20
|
||||
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/effect/equip_e
|
||||
name = "equip e"
|
||||
|
||||
@@ -856,37 +856,47 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
r_hand.screen_loc = ui_rhand //TODO
|
||||
|
||||
var/t_icon = INV_R_HAND_DEF_ICON
|
||||
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
|
||||
t_icon = r_hand.item_icons[icon_r_hand]
|
||||
|
||||
var/t_state = r_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
|
||||
if(r_hand.icon_override)
|
||||
t_state = "[t_state]_r"
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]")
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = "[t_state]")
|
||||
|
||||
if (handcuffed) drop_r_hand()
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
l_hand.screen_loc = ui_lhand //TODO
|
||||
|
||||
var/t_icon = INV_L_HAND_DEF_ICON
|
||||
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
|
||||
t_icon = l_hand.item_icons[icon_l_hand]
|
||||
|
||||
var/t_state = l_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
|
||||
if(l_hand.icon_override)
|
||||
t_state = "[t_state]_l"
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]")
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = "[t_state]")
|
||||
|
||||
if (handcuffed) drop_l_hand()
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
|
||||
overlays_standing[TAIL_LAYER] = null
|
||||
|
||||
@@ -55,26 +55,38 @@
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
|
||||
if(r_hand)
|
||||
var/t_icon = INV_R_HAND_DEF_ICON
|
||||
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
|
||||
t_icon = r_hand.item_icons[icon_r_hand]
|
||||
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
overlays_standing[M_R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
|
||||
|
||||
overlays_standing[M_R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
|
||||
r_hand.screen_loc = ui_rhand
|
||||
if (handcuffed) drop_r_hand()
|
||||
else
|
||||
overlays_standing[M_R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1)
|
||||
if(l_hand)
|
||||
var/t_icon = INV_L_HAND_DEF_ICON
|
||||
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
|
||||
t_icon = l_hand.item_icons[icon_l_hand]
|
||||
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
overlays_standing[M_L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
|
||||
|
||||
overlays_standing[M_L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
|
||||
l_hand.screen_loc = ui_lhand
|
||||
if (handcuffed) drop_l_hand()
|
||||
else
|
||||
overlays_standing[M_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
|
||||
|
||||
@@ -417,11 +417,11 @@
|
||||
//pull damage with injured people
|
||||
if(prob(25))
|
||||
M.adjustBruteLoss(1)
|
||||
visible_message("\red \The [M]'s wounds open more from being dragged!")
|
||||
visible_message("<span class='danger'>\The [M]'s [M.isSynthetic() ? "state worsens": "wounds open more"] from being dragged!</span>")
|
||||
if(M.pull_damage())
|
||||
if(prob(25))
|
||||
M.adjustBruteLoss(2)
|
||||
visible_message("\red \The [M]'s wounds worsen terribly from being dragged!")
|
||||
visible_message("<span class='danger'>\The [M]'s [M.isSynthetic() ? "state" : "wounds"] worsen terribly from being dragged!</span>")
|
||||
var/turf/location = M.loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_blood(M)
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
|
||||
if(health < 1)
|
||||
death()
|
||||
return
|
||||
|
||||
if(health > maxHealth)
|
||||
health = maxHealth
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
del(W)
|
||||
else
|
||||
if(!disable_warning)
|
||||
src << "\red You are unable to equip that." //Only print if del_on_fail is false
|
||||
src << "\red You are unable to equip \the [W]." //Only print if del_on_fail is false
|
||||
return 0
|
||||
|
||||
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
|
||||
|
||||
@@ -85,13 +85,22 @@
|
||||
|
||||
/mob/living/silicon/isSilicon()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/proc/isAI()
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/ai/isAI()
|
||||
return 1
|
||||
|
||||
/mob/proc/isSynthetic()
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/isSynthetic()
|
||||
return species.flags & IS_SYNTHETIC
|
||||
|
||||
/mob/living/silicon/isSynthetic()
|
||||
return 1
|
||||
|
||||
/proc/ispAI(A)
|
||||
if(istype(A, /mob/living/silicon/pai))
|
||||
return 1
|
||||
@@ -240,7 +249,7 @@ var/list/global/organ_rel_size = list(
|
||||
for(var/obj/item/weapon/grab/G in target.grabbed_by)
|
||||
if(G.state >= GRAB_AGGRESSIVE)
|
||||
return zone
|
||||
|
||||
|
||||
var/miss_chance = 10
|
||||
if (zone in base_miss_chance)
|
||||
miss_chance = base_miss_chance[zone]
|
||||
|
||||
@@ -375,7 +375,7 @@ datum/preferences
|
||||
if(LAWYER)
|
||||
clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "briefcase"), ICON_UNDERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
@@ -534,7 +534,7 @@ datum/preferences
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "toolbox_blue"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
if(2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
@@ -620,7 +620,7 @@ datum/preferences
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "blueprints"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
if(2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
//Most of these are defined at this level to reduce on checks elsewhere in the code.
|
||||
//Having them here also makes for a nice reference list of the various overlay-updating procs available
|
||||
|
||||
//default item on-mob icons
|
||||
#define INV_L_HAND_DEF_ICON 'icons/mob/items/lefthand.dmi'
|
||||
#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi'
|
||||
|
||||
|
||||
/mob/proc/regenerate_icons() //TODO: phase this out completely if possible
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user