mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Flash and flasher refactor/rework (simple mobs no longer immune edition) (#93076)
Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
if (!istype(carbon_owner))
|
||||
return
|
||||
carbon_owner.AddComponentFrom(REF(src), /datum/component/can_flash_from_behind)
|
||||
RegisterSignal(carbon_owner, COMSIG_MOB_SUCCESSFUL_FLASHED_CARBON, PROC_REF(on_mob_successful_flashed_carbon))
|
||||
RegisterSignal(carbon_owner, COMSIG_MOB_SUCCESSFUL_FLASHED_MOB, PROC_REF(on_mob_successful_flashed_mob))
|
||||
|
||||
/// Take away the ability to add more brothers
|
||||
/datum/antagonist/brother/proc/remove_conversion_skills()
|
||||
@@ -62,12 +62,12 @@
|
||||
return
|
||||
var/mob/living/carbon/carbon_owner = owner.current
|
||||
carbon_owner.RemoveComponentSource(REF(src), /datum/component/can_flash_from_behind)
|
||||
UnregisterSignal(carbon_owner, COMSIG_MOB_SUCCESSFUL_FLASHED_CARBON)
|
||||
UnregisterSignal(carbon_owner, COMSIG_MOB_SUCCESSFUL_FLASHED_MOB)
|
||||
|
||||
/datum/antagonist/brother/proc/on_mob_successful_flashed_carbon(mob/living/source, mob/living/carbon/flashed, obj/item/assembly/flash/flash)
|
||||
/datum/antagonist/brother/proc/on_mob_successful_flashed_mob(mob/living/source, mob/living/flashed, obj/item/assembly/flash/flash)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if (flashed.stat == DEAD)
|
||||
if (flashed.stat == DEAD || issilicon(flashed) || isdrone(flashed))
|
||||
return
|
||||
|
||||
if (flashed.stat != CONSCIOUS)
|
||||
|
||||
@@ -180,20 +180,20 @@
|
||||
. = ..()
|
||||
var/mob/living/real_mob = mob_override || owner.current
|
||||
real_mob.AddComponentFrom(REF(src), /datum/component/can_flash_from_behind)
|
||||
RegisterSignal(real_mob, COMSIG_MOB_SUCCESSFUL_FLASHED_CARBON, PROC_REF(on_flash_success))
|
||||
RegisterSignal(real_mob, COMSIG_MOB_SUCCESSFUL_FLASHED_MOB, PROC_REF(on_flash_success))
|
||||
|
||||
/datum/antagonist/rev/head/remove_innate_effects(mob/living/mob_override)
|
||||
. = ..()
|
||||
var/mob/living/real_mob = mob_override || owner.current
|
||||
real_mob.RemoveComponentSource(REF(src), /datum/component/can_flash_from_behind)
|
||||
UnregisterSignal(real_mob, COMSIG_MOB_SUCCESSFUL_FLASHED_CARBON)
|
||||
UnregisterSignal(real_mob, COMSIG_MOB_SUCCESSFUL_FLASHED_MOB)
|
||||
|
||||
/// Signal proc for [COMSIG_MOB_SUCCESSFUL_FLASHED_CARBON].
|
||||
/// Signal proc for [COMSIG_MOB_SUCCESSFUL_FLASHED_MOB].
|
||||
/// Bread and butter of revolution conversion, successfully flashing a carbon will make them a revolutionary
|
||||
/datum/antagonist/rev/head/proc/on_flash_success(mob/living/source, mob/living/carbon/flashed, obj/item/assembly/flash/flash, deviation)
|
||||
/datum/antagonist/rev/head/proc/on_flash_success(mob/living/source, mob/living/flashed, obj/item/assembly/flash/flash, deviation)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(flashed.stat == DEAD)
|
||||
if(flashed.stat == DEAD || issilicon(flashed) || isdrone(flashed))
|
||||
return
|
||||
if(flashed.stat != CONSCIOUS)
|
||||
to_chat(source, span_warning("[flashed.p_They()] must be conscious before you can convert [flashed.p_them()]!"))
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
var/mob/living/master = owner.enslaved_to?.resolve()
|
||||
if(master)
|
||||
owner.current.copy_languages(master, LANGUAGE_MASTER)
|
||||
ADD_TRAIT(owner, TRAIT_UNCONVERTABLE, REF(src))
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/sentient_creature/on_removal()
|
||||
REMOVE_TRAIT(owner, TRAIT_UNCONVERTABLE, REF(src))
|
||||
return ..()
|
||||
|
||||
/datum/antagonist/sentient_creature/ui_static_data(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user