Files
Bubberstation/code/datums/components/temporary_body.dm
T
JeremiahandGitHub 1116f150eb Bitrunning: Tweaks, QoL and removals (#84125)
## About The Pull Request

See changelog for shortlist

1. **Threat changes.** I was a bit unsatisfied with the rate of antag
spawns. These have been increased considerably. The clamped probability
has been increased from 1-10 to 5-15. The probability increases from 5
to 15 as domains are completed. Generally, in a standard round, the
chance of spawning at least one antag should be around ~50% at 7 domains
completed. Emagging a server doubles this rate.
2. **Map changes.** Starfront saloon was a cool idea on paper: A totally
modular map. However, it looked very uninspired and was so much of a
chore on the map loading system that it prompted players to admin help
how long it took, thinking it was broken. I've removed the map. I have
others I want to implement that don't look so bad.
3. **QoL changes**. Ghost observer experience is improved. Previously,
you could click netpods to view their avatar, and now you can click the
hololadder to return. I've included examine text to show this. The
server's examine text will now also give you clues that it's emagged
(ghost only). The examine text on hololadders has also been improved.
4. **Bitrunning antags.** These were designed as temporary, but they
were everything but. Spawning as one would prevent your revival, which
just isn't a good tradeoff for something that's going to get deleted in
a minute. Now, this system uses temp bodies just like CTF, so you can
return once you're dead. (exception: coming station side)
5. **Maps**: Syndicate assault is still one of my favorites, but there's
cheesy exploits like instantly breaking the display case to lock down
the ship, turning on turrets which are EXTRA lethal, etc. I've added
some pistols to the closets and removed some of these exploits.
6. **Cooldown**: Yes, no one seems to upgrade these ever, and it proved
a poor technique to encourage bitrunners to leave their rooms. I had
other plans to encourage this, not included here, so I think lowering
the cooldown time is beneficial. 3min -> 2min

> [!NOTE]
> File diff: removed a map

## Why It's Good For The Game
Closes #83787
General updates and QoL for bitrunning to keep it fresh. I was quite
disappointed with the scaling of threat, and most players haven't even
seen bitrunning antags except when I admin spawn them. These numbers
aren't hard set in my mind, and could be adjusted.

I generally want bitrunning easier to access and more "temporary" which
is in keeping with its design doc.
## Changelog
🆑
fix: Bitrunning made more illegal: Increased the rate at which antags
spawn.
fix: "Temporary" bitrunning antagonists and spawners are made actually
temporary. You will return to your original body after death, just like
CTF.
add: Added more examine text for ghosts to bitrunning equipment.
balance: Server cooldown reduced by 1 minute at base level.
add: As an observer, you can now switch views between station and
virtual domain by clicking the hololadder and netpod respectively.
del: Removed the starfront saloon BR map.
fix: Syndicate assault map: Added pistols, reduced exploits.
/🆑
2024-06-21 22:39:44 -04:00

62 lines
2.1 KiB
Plaintext

/**
* ##temporary_body
*
* Used on living mobs when they are meant to be a 'temporary body'
* Holds a reference to an old mind & body, to put them back in
* once the body this component is attached to, is being deleted.
*/
/datum/component/temporary_body
///The old mind we will be put back into when parent is being deleted.
var/datum/weakref/old_mind_ref
///The old body we will be put back into when parent is being deleted.
var/datum/weakref/old_body_ref
/// Returns the mind if the parent dies by any means
var/delete_on_death = FALSE
/datum/component/temporary_body/Initialize(datum/mind/old_mind, mob/living/old_body, delete_on_death = FALSE)
if(!isliving(parent) || !isliving(old_body))
return COMPONENT_INCOMPATIBLE
ADD_TRAIT(old_body, TRAIT_MIND_TEMPORARILY_GONE, REF(src))
src.old_mind_ref = WEAKREF(old_mind)
src.old_body_ref = WEAKREF(old_body)
src.delete_on_death = delete_on_death
/datum/component/temporary_body/RegisterWithParent()
RegisterSignal(parent, COMSIG_QDELETING, PROC_REF(on_parent_destroy))
if(delete_on_death)
RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(on_parent_destroy))
/datum/component/temporary_body/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_QDELETING)
/**
* Sends the mind of the temporary body back into their previous host
* If the previous host is alive, we'll force them into the body.
* Otherwise we'll let them hang out as a ghost still.
*/
/datum/component/temporary_body/proc/on_parent_destroy()
SIGNAL_HANDLER
var/datum/mind/old_mind = old_mind_ref?.resolve()
var/mob/living/old_body = old_body_ref?.resolve()
if(!old_mind || !old_body)
return
var/mob/living/living_parent = parent
var/mob/dead/observer/ghost = living_parent.ghostize()
if(!ghost)
ghost = living_parent.get_ghost()
if(!ghost)
CRASH("[src] belonging to [parent] was completely unable to find a ghost to put back into a body!")
ghost.mind = old_mind
if(old_body.stat != DEAD)
old_mind.transfer_to(old_body, force_key_move = TRUE)
else
old_mind.set_current(old_body)
REMOVE_TRAIT(old_body, TRAIT_MIND_TEMPORARILY_GONE, REF(src))
old_mind = null
old_body = null