mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-19 22:23:11 +00:00
## About The Pull Request This touches up on the bitrunning ghost roles that come with some maps, namely Corsair Cove and Syndicate Assault. The gist of it is: Ghost role spawners and Digital Anomalies (the random event boss mobs) are now restricted from entering the VDOM safehouse, and other areas where critical equipment is stored. Here's an example from Syndicate Assault -- The X-ed out area is considered "out of bounds" for digital anomalies/ghost roles:  Additionally, this also fixes the matter of pirate ghost role spawns creating their own antag datum/pirate team, which would carry into the roundend report. Since these are no longer legitimate pirate spawners and are now specifically designed spawners for virtual domains. Naturally, emagging the server jailbreaks all of these restrictions and notifies any virtual entities. The new subtype of spawners should also be scalable enough that new VDOMs should be able to implement new ghost role spawners with ease. ## Why It's Good For The Game It's one thing to have sentient mobs to fight, which can shake up the otherwise somewhat static nature of bitrunning maps, but when players are tossing equipment, spawncamping, or otherwise making it impossible for the runners to fight them it ends up being unfun for everyone involved. You can't get into a good fight with a bitrunner avatar if their only recourse is to wipe the map and everything (YOU) in it. This ensures a level of fairness between the (typically vindictive) ghost roles of a VDOM and the players. Also, pirate spawns don't make a new pirate team/datum. That's one of the fixes I was aiming for with this. ## Changelog 🆑 Rhials balance: Virtual domain ghost roles can no longer enter the safehouse/"equipment" areas of a domain. fix: Pirate virtual domain ghost roles will no longer make a pirate team antag datum. /🆑 --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
37 lines
1.6 KiB
Plaintext
37 lines
1.6 KiB
Plaintext
/// Handles all special considerations for "virtual entities" such as bitrunning ghost roles or digital anomaly antagonists.
|
|
/datum/component/virtual_entity
|
|
///The cooldown for balloon alerts, so the player isn't spammed while trying to enter a restricted area.
|
|
COOLDOWN_DECLARE(OOB_cooldown)
|
|
|
|
/datum/component/virtual_entity/Initialize(obj/machinery/quantum_server)
|
|
. = ..()
|
|
|
|
if(quantum_server.obj_flags & EMAGGED)
|
|
jailbreak_mobs() //This just sends a message and self-deletes, a bit messy but it works.
|
|
return
|
|
|
|
RegisterSignal(parent, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(on_parent_pre_move))
|
|
RegisterSignal(quantum_server, COMSIG_ATOM_EMAG_ACT, PROC_REF(jailbreak_mobs))
|
|
|
|
///Prevents entry to a certain area if it has flags preventing virtual entities from entering.
|
|
/datum/component/virtual_entity/proc/on_parent_pre_move(atom/movable/source, atom/new_location)
|
|
SIGNAL_HANDLER
|
|
|
|
var/area/location_area = get_area(new_location)
|
|
if(!location_area)
|
|
stack_trace("Virtual entity entered a location with no area!")
|
|
return
|
|
|
|
if(location_area.area_flags & VIRTUAL_SAFE_AREA)
|
|
source.balloon_alert(source, "out of bounds!")
|
|
COOLDOWN_START(src, OOB_cooldown, 2 SECONDS)
|
|
return COMPONENT_MOVABLE_BLOCK_PRE_MOVE
|
|
|
|
///Self-destructs the component, allowing free-roam by all entities with this restriction.
|
|
/datum/component/virtual_entity/proc/jailbreak_mobs()
|
|
SIGNAL_HANDLER
|
|
|
|
to_chat(parent, span_big("You shiver for a moment, then suddenly feel a sense of clarity you haven't felt before. \
|
|
You can go anywhere, do anything! You could leave this simulation right now if you wanted!"))
|
|
qdel(src)
|