-
Notifications
You must be signed in to change notification settings - Fork 55
Cloning fixes #439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloning fixes #439
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,22 +2,41 @@ | |
| // still floating around .. somewhere. | ||
| /mob/living/limbo | ||
| use_me = 0 | ||
| stat = UNCONSCIOUS | ||
|
|
||
| /mob/living/limbo/Initialize() | ||
| . = ..() | ||
| var/obj/item/organ/internal/stack/cortical_stack | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You sure it's a good idea to keep a ref directly like that? Because, if it has a stack it'll be iniside of it, no?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, the cortical stack should clear this on deletion. |
||
|
|
||
| /mob/living/limbo/Initialize(mapload, obj/item/organ/internal/stack/new_stack) | ||
| ..() | ||
| verbs |= /mob/proc/resleeve | ||
| verbs |= /mob/proc/death_give_up | ||
|
|
||
| if(new_stack) | ||
| cortical_stack = new_stack | ||
|
|
||
| var/datum/action/resleeve/resleeve_act = new(src) | ||
| resleeve_act.Grant(src) | ||
|
|
||
| var/datum/action/death_give_up/give_up_act = new(src) | ||
| give_up_act.Grant(src) | ||
|
|
||
| return INITIALIZE_HINT_LATELOAD | ||
|
|
||
| /mob/living/limbo/LateInitialize() | ||
| if(cortical_stack) | ||
| if(loc != cortical_stack) | ||
| forceMove(cortical_stack) | ||
| else if(loc != SSchargen.limbo_holder) | ||
| forceMove(SSchargen.limbo_holder) | ||
| . = ..() | ||
|
|
||
| /mob/living/limbo/Destroy() | ||
| for(var/datum/action/death_action in actions) | ||
| death_action.SetTarget(null) | ||
| qdel(death_action) | ||
|
|
||
| cortical_stack?.stackmob = null | ||
| cortical_stack = null | ||
| . = ..() | ||
|
|
||
| // Do not call parent, as we do not want the area text to appear. | ||
|
|
@@ -42,4 +61,6 @@ | |
| procname = "death_give_up" | ||
| action_type = AB_GENERIC | ||
| button_icon = 'mods/persistence/icons/obj/action_buttons/actions.dmi' | ||
| button_icon_state = "give_up" | ||
| button_icon_state = "give_up" | ||
|
|
||
| SAVED_VAR(/mob/living/limbo, cortical_stack) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that'll work for now, but that's a bit rough around the edges XD