mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-20 11:40:07 +01:00
New mob fire! (#66746)
This is a port of TauCeti's pending fire icons, I really like them, and have been given spritetainer approval to port these. This PR also changes how fire is handled, or at least, returns the way it used to be handled, while also updating it to use species to choose what kind of fire overlay to use.
This commit is contained in:
@@ -1414,27 +1414,3 @@
|
||||
our_splatter.blood_dna_info = get_blood_dna_list()
|
||||
var/turf/targ = get_ranged_target_turf(src, splatter_direction, splatter_strength)
|
||||
our_splatter.fly_towards(targ, splatter_strength)
|
||||
|
||||
/mob/living/carbon/update_fire_overlay(stacks, on_fire, last_icon_state, suffix = "")
|
||||
var/fire_icon = "generic_burning[suffix]"
|
||||
|
||||
if(!GLOB.fire_appearances[fire_icon])
|
||||
var/mutable_appearance/new_fire_overlay = mutable_appearance('icons/mob/onfire.dmi', fire_icon, -FIRE_LAYER)
|
||||
new_fire_overlay.appearance_flags = RESET_COLOR
|
||||
GLOB.fire_appearances[fire_icon] = new_fire_overlay
|
||||
|
||||
if((stacks > 0 && on_fire) || HAS_TRAIT(src, TRAIT_PERMANENTLY_ONFIRE))
|
||||
if(fire_icon == last_icon_state)
|
||||
return last_icon_state
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
overlays_standing[FIRE_LAYER] = GLOB.fire_appearances[fire_icon]
|
||||
apply_overlay(FIRE_LAYER)
|
||||
return fire_icon
|
||||
|
||||
if(!last_icon_state)
|
||||
return last_icon_state
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
apply_overlay(FIRE_LAYER)
|
||||
return null
|
||||
|
||||
@@ -77,6 +77,28 @@
|
||||
overlays_standing[HANDS_LAYER] = hands
|
||||
apply_overlay(HANDS_LAYER)
|
||||
|
||||
/mob/living/carbon/update_fire_overlay(stacks, on_fire, last_icon_state, suffix = "")
|
||||
var/fire_icon = "[dna?.species.fire_overlay || "human"]_[stacks > MOB_BIG_FIRE_STACK_THRESHOLD ? "big_fire" : "small_fire"][suffix]"
|
||||
|
||||
if(!GLOB.fire_appearances[fire_icon])
|
||||
GLOB.fire_appearances[fire_icon] = mutable_appearance('icons/mob/onfire.dmi', fire_icon, -FIRE_LAYER, appearance_flags = RESET_COLOR)
|
||||
|
||||
if((stacks > 0 && on_fire) || HAS_TRAIT(src, TRAIT_PERMANENTLY_ONFIRE))
|
||||
if(fire_icon == last_icon_state)
|
||||
return last_icon_state
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
overlays_standing[FIRE_LAYER] = GLOB.fire_appearances[fire_icon]
|
||||
apply_overlay(FIRE_LAYER)
|
||||
return fire_icon
|
||||
|
||||
if(!last_icon_state)
|
||||
return last_icon_state
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
apply_overlay(FIRE_LAYER)
|
||||
return null
|
||||
|
||||
/mob/living/carbon/update_damage_overlays()
|
||||
remove_overlay(DAMAGE_LAYER)
|
||||
|
||||
|
||||
@@ -1024,35 +1024,6 @@
|
||||
for(var/obj/item/burning in burning_items)
|
||||
burning.fire_act((stacks * 25 * delta_time)) //damage taken is reduced to 2% of this value by fire_act()
|
||||
|
||||
/mob/living/carbon/human/update_fire_overlay(stacks, on_fire, last_icon_state, suffix = "")
|
||||
var/fire_icon = "generic_burning[suffix]"
|
||||
if(stacks > HUMAN_FIRE_STACK_ICON_NUM)
|
||||
if(dna && dna.species)
|
||||
fire_icon = "[dna.species.fire_overlay][suffix]"
|
||||
else
|
||||
fire_icon = "human_burning[suffix]"
|
||||
|
||||
if(!GLOB.fire_appearances[fire_icon])
|
||||
var/mutable_appearance/new_fire_overlay = mutable_appearance('icons/mob/onfire.dmi', fire_icon, -FIRE_LAYER)
|
||||
new_fire_overlay.appearance_flags = RESET_COLOR
|
||||
GLOB.fire_appearances[fire_icon] = new_fire_overlay
|
||||
|
||||
if((stacks > 0 && on_fire) || HAS_TRAIT(src, TRAIT_PERMANENTLY_ONFIRE))
|
||||
if(fire_icon == last_icon_state)
|
||||
return last_icon_state
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
overlays_standing[FIRE_LAYER] = GLOB.fire_appearances[fire_icon]
|
||||
apply_overlay(FIRE_LAYER)
|
||||
return fire_icon
|
||||
|
||||
if(!last_icon_state)
|
||||
return last_icon_state
|
||||
|
||||
remove_overlay(FIRE_LAYER)
|
||||
apply_overlay(FIRE_LAYER)
|
||||
return null
|
||||
|
||||
/mob/living/carbon/human/on_fire_stack(delta_time, times_fired, datum/status_effect/fire_handler/fire_stacks/fire_handler)
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_BURNING)
|
||||
burn_clothing(delta_time, times_fired, fire_handler.stacks)
|
||||
|
||||
@@ -165,7 +165,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
var/bodytemp_cold_damage_limit = BODYTEMP_COLD_DAMAGE_LIMIT
|
||||
|
||||
/// The icon_state of the fire overlay added when sufficently ablaze and standing. see onfire.dmi
|
||||
var/fire_overlay = "human_burning"
|
||||
var/fire_overlay = "human"
|
||||
|
||||
///the species that body parts are surgically compatible with (found in _DEFINES/mobs.dm)
|
||||
///current acceptable bitfields are HUMAN_BODY, ALIEN_BODY, LARVA_BODY, MONKEY_BODY, or NONE
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
BODY_ZONE_R_LEG = /obj/item/bodypart/r_leg/monkey,
|
||||
BODY_ZONE_CHEST = /obj/item/bodypart/chest/monkey,
|
||||
)
|
||||
fire_overlay = "monkey_burning"
|
||||
fire_overlay = "monkey"
|
||||
dust_anim = "dust-m"
|
||||
gib_anim = "gibbed-m"
|
||||
|
||||
|
||||
@@ -985,7 +985,7 @@
|
||||
to_chat(src, span_notice("Your frustration has empowered you! You can now right yourself faster!"))
|
||||
|
||||
/mob/living/silicon/robot/update_fire_overlay(stacks, on_fire, last_icon_state, suffix = "")
|
||||
var/fire_icon = "generic_burning[suffix]"
|
||||
var/fire_icon = "generic_fire[suffix]"
|
||||
|
||||
if(!GLOB.fire_appearances[fire_icon])
|
||||
var/mutable_appearance/new_fire_overlay = mutable_appearance('icons/mob/onfire.dmi', fire_icon, -FIRE_LAYER)
|
||||
|
||||
Reference in New Issue
Block a user