-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
[SEMI-MODULAR] Ghostrole Cryoing #1003
base: master
Are you sure you want to change the base?
Conversation
Wouldn't this also disallow the ghost role to spawn since there is no longer a spawner for them to come from? |
Not sure what you mean! All ghostrole spawners delete themselves by default once they're done spawning. This code makes them drop a cryopod once that's done. The cryopod they drop is also capable of doing the same. It'll delete itself and create a new spawner once it's done cryo-ing the specific type of ghostrole that it was created by. So, Hotel Spawner -> Cryopod (Watching for Hotel Staff) -> Hotel Spawner |
@@ -198,7 +202,15 @@ GLOBAL_LIST_EMPTY(cryopod_computers) | |||
if(!control_computer_weakref) | |||
control_computer_weakref = cryo_find_control_computer(src, urgent = TRUE) | |||
|
|||
despawn_occupant() | |||
if(mob_occupant.mind) //SPLURT Addition - Ghostrole cryoing |
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.
This will not work with the autocryo system, as it checks for occupant.mind which is erased upon ghosting or being disconnected for too long.
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.
Very fair. Certainly won't deal with ghostroles that just quit and don't bother using the cryo sleeper.
But that'd require a different implementation signalling the original sleeper somehow which is a touch beyond me this year.
Should work just fine in its limited scope, and not break autocryoing since this check happens before it even reaches the proc autocryo also calls.
Cheers for taking a look at it all!
But incidentally autocryo also uses occupant.mind to clear job slots. Wouldn't the mind still exist, but the client be erased?
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.
Very fair. Certainly won't deal with ghostroles that just quit and don't bother using the cryo sleeper.
But that'd require a different implementation signalling the original sleeper somehow which is a touch beyond me this year.
Should work just fine in its limited scope, and not break autocryoing since this check happens before it even reaches the proc autocryo also calls.
Cheers for taking a look at it all!
But incidentally autocryo also uses occupant.mind to clear job slots. Wouldn't the mind still exist, but the client be erased?
I hadn't taken a look at the base despawn proc, I believed it checked for client.assigned_job rather than mind.assigned_job (which was a thing done by /tg/ to better track people ghosting and respawning as ghostroles).
Either way, it should be fine for a testmerge; further improvements can be made, but for now this'll be a massive QOL.
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.
This in theory works, the code itself looks mostly solid past the aformentioned potential bug with mob.mind handling.
About The Pull Request
Adds a new variant of ghostrole spawners that create a Cryopod when used. If the ghostrole player enters their relevant cryopod, it will delete itself and spawn a new ghostrole spawner.
Implemented only in the Hotel and Lavaland Syndicate, but it can be expanded to other roles fairly easily.
Very possibly shitcode. Would appreciate a review!
A Port?
All new.
Pre-Merge Checklist
Changelog
🆑
add: Hotel and Lavaland Syndicate ghostrole sleepers now function as Cryopods when empty. If used by the original occupant, the ghostrole is refreshed.
remove: Lavaland Syndicates no longer have a skeleton in their closet
/:cl: