Skip to content

Commit

Permalink
bugfix: diona "Evacuation" evacuate right into nullspace (#5626)
Browse files Browse the repository at this point in the history
* fix

* fix v2

* fix3
  • Loading branch information
Samirakis authored Aug 2, 2024
1 parent ab3151e commit 6898588
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,8 @@
#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed"
///from [/obj/effect/mine/proc/triggermine]:
#define COMSIG_MINE_TRIGGERED "minegoboom"
///from [/obj/item/organ/internal/remove]:
#define COMSIG_ORGAN_REMOVED "organ_removed"

/// Defib-specific signals

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/friendly/diona.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
/datum/action/innate/diona/evolve
name = "Evolve"
icon_icon = 'icons/obj/machines/cloning.dmi'
button_icon_state = "pod_1"
button_icon_state = "pod_cloning"

/datum/action/innate/diona/evolve/Activate()
var/mob/living/simple_animal/diona/user = owner
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/organs/organ.dm
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
return

SEND_SIGNAL(owner, COMSIG_CARBON_LOSE_ORGAN, src)
SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, owner)
owner.internal_organs -= src

var/obj/item/organ/external/affected = owner.get_organ(parent_organ_zone)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/surgery/organs/organ_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
action.Remove(organ_owner)

if(send_signal)
SEND_SIGNAL(target, COMSIG_CARBON_LOSE_ORGAN, src)
SEND_SIGNAL(organ_owner, COMSIG_CARBON_LOSE_ORGAN, src)
SEND_SIGNAL(src, COMSIG_ORGAN_REMOVED, organ_owner)

owner = null
START_PROCESSING(SSobj, src)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/surgery/organs/subtypes/diona.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
if(istype(parent, /obj/item/organ/internal))
RegisterSignal(parent, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(transform_organ))
RegisterSignal(parent, COMSIG_ORGAN_REMOVED, PROC_REF(transform_organ))


/datum/component/diona_internals/proc/transform_organ()
SIGNAL_HANDLER
SIGNAL_HANDLER // COMSIG_ORGAN_REMOVED

if(is_int_organ(parent))
var/obj/item/organ/internal/organ = parent
Expand Down

0 comments on commit 6898588

Please sign in to comment.