mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
[MIRROR] fixes silly stuff about basic mobs [MDB IGNORE] (#18368)
* fixes silly stuff about basic mobs * merge conflicts, also apply upstream 72120 Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> Co-authored-by: tastyfish <crazychris32@gmail.com>
This commit is contained in:
@@ -38,8 +38,10 @@
|
||||
///What kind of objects this mob can smash.
|
||||
var/environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
|
||||
/// 1 for full damage , 0 for none , -1 for 1:1 heal from that source.
|
||||
/// 1 for full damage, 0 for none, -1 for 1:1 heal from that source.
|
||||
var/list/damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
|
||||
///Minimum force required to deal any damage.
|
||||
var/force_threshold = 0
|
||||
|
||||
///Verbs used for speaking e.g. "Says" or "Chitters". This can be elementized
|
||||
var/list/speak_emote = list()
|
||||
@@ -75,10 +77,6 @@
|
||||
var/icon_dead = ""
|
||||
///We only try to show a gibbing animation if this exists.
|
||||
var/icon_gib = null
|
||||
///Flip the sprite upside down on death. Mostly here for things lacking custom dead sprites.
|
||||
var/flip_on_death = FALSE
|
||||
///Removes density upon death, restores the original state if alive.
|
||||
var/become_passable_on_death = TRUE
|
||||
|
||||
///If the mob can be spawned with a gold slime core. HOSTILE_SPAWN are spawned with plasma, FRIENDLY_SPAWN are spawned with blood.
|
||||
var/gold_core_spawnable = NO_SPAWN
|
||||
@@ -139,32 +137,35 @@
|
||||
. = ..()
|
||||
if(basic_mob_flags & DEL_ON_DEATH)
|
||||
qdel(src)
|
||||
else
|
||||
health = 0
|
||||
icon_state = icon_dead
|
||||
if(flip_on_death)
|
||||
transform = transform.Turn(180)
|
||||
if (become_passable_on_death)
|
||||
set_density(FALSE)
|
||||
return
|
||||
health = 0
|
||||
icon_state = icon_dead
|
||||
if(basic_mob_flags & FLIP_ON_DEATH)
|
||||
transform = transform.Turn(180)
|
||||
if(basic_mob_flags & UNDENSIFY_ON_DEATH)
|
||||
set_density(FALSE)
|
||||
|
||||
/mob/living/basic/revive(full_heal_flags = NONE, excess_healing = 0, force_grab_ghost = FALSE)
|
||||
. = ..()
|
||||
if (!.)
|
||||
return
|
||||
icon_state = icon_living
|
||||
if (flip_on_death)
|
||||
if(basic_mob_flags & FLIP_ON_DEATH)
|
||||
transform = transform.Turn(180)
|
||||
if (become_passable_on_death)
|
||||
if(basic_mob_flags & UNDENSIFY_ON_DEATH)
|
||||
set_density(initial(density))
|
||||
|
||||
/mob/living/basic/proc/melee_attack(atom/target)
|
||||
src.face_atom(target)
|
||||
/mob/living/basic/proc/melee_attack(atom/target, list/modifiers)
|
||||
face_atom(target)
|
||||
if(SEND_SIGNAL(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, target) & COMPONENT_HOSTILE_NO_ATTACK)
|
||||
return FALSE //but more importantly return before attack_animal called
|
||||
var/result = target.attack_basic_mob(src)
|
||||
var/result = target.attack_basic_mob(src, modifiers)
|
||||
SEND_SIGNAL(src, COMSIG_HOSTILE_POST_ATTACKINGTARGET, target, result)
|
||||
return result
|
||||
|
||||
/mob/living/basic/resolve_unarmed_attack(atom/attack_target, list/modifiers)
|
||||
melee_attack(attack_target, modifiers)
|
||||
|
||||
/mob/living/basic/vv_edit_var(vname, vval)
|
||||
. = ..()
|
||||
if(vname == NAMEOF(src, speed))
|
||||
|
||||
Reference in New Issue
Block a user