mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-12 18:51:53 +00:00
* Bitrunning: Combat domain [READY] (#84196) <!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Finally dusts off this project to make a deathmatch style bitrunning map. Don't be too intimidated by the file diff, lots of code organization + resized a large map. Changes: 1. Reuses the gateway beach map as a combat zone (99% of the file diff) (maptainers: i just added spawners and areas) 2. Alters how bitrunning handles spawning: Custom spawns are now available, which can be anything Misc organization: - Splits netpod.dm into separate files. - Fixes some wording in vdom map documentation. - Organizes vdom variables a bit. - Adds a permanent hololadder spawn. How bitrunning deathmatch works: - Temporary spawners are offered to both ghosts and bitrunners. - Runners spawn in like usual. Ghost can use the spawner menu. - Ghosts work to prevent avatars from collecting side objectives or try to cause mass brain damage. - The domain completes after a number of deaths accrue. Any faction. Blood for the blood god, etc. - This map can be played solo. ANY deaths. <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game I've been toying with the idea of a deathmatch style map for some time. I liked syndicate assault, the spawners were intentionally left there, and the possibility of player-controlled players made the experience more tense and challenging. This PR leans into this idea: The virtual world is dangerous. Players get a chance to compete on both sides here. It offers a lot of variety to bitrunning other than "run for box". It's also very lucrative if ghosts join in. <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 add: Added a bitrunning deathmatch map: Island Brawl. Both ghosts and runners get many more spawns than normal. fix: Lowered the static vision time in domain load in. /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> * Bitrunning: Combat domain [READY] --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
112 lines
3.6 KiB
Plaintext
112 lines
3.6 KiB
Plaintext
/// If broken via signal, disconnects all users
|
|
/obj/machinery/quantum_server/proc/on_broken(datum/source)
|
|
SIGNAL_HANDLER
|
|
|
|
sever_connections()
|
|
|
|
|
|
/// Whenever a corpse spawner makes a new corpse, add it to the list of potential mutations
|
|
/obj/machinery/quantum_server/proc/on_corpse_spawned(datum/source, mob/living/corpse)
|
|
SIGNAL_HANDLER
|
|
|
|
mutation_candidate_refs.Add(WEAKREF(corpse))
|
|
|
|
|
|
/// Being qdeleted - make sure the circuit and connected mobs go with it
|
|
/obj/machinery/quantum_server/proc/on_delete(datum/source)
|
|
SIGNAL_HANDLER
|
|
|
|
sever_connections()
|
|
|
|
if(generated_domain)
|
|
scrub_vdom()
|
|
|
|
if(is_ready)
|
|
return
|
|
// in case they're trying to cheese cooldown
|
|
var/obj/item/circuitboard/machine/quantum_server/circuit = locate(/obj/item/circuitboard/machine/quantum_server) in contents
|
|
if(circuit)
|
|
qdel(circuit)
|
|
|
|
|
|
/// Whenever something enters the send tiles, check if it's a loot crate. If so, alert players.
|
|
/obj/machinery/quantum_server/proc/on_goal_turf_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
|
SIGNAL_HANDLER
|
|
|
|
var/obj/machinery/byteforge/chosen_forge = get_random_nearby_forge()
|
|
if(isnull(chosen_forge))
|
|
return
|
|
|
|
if((obj_flags & EMAGGED) && isliving(arrived))
|
|
var/mob/living/creature = arrived
|
|
|
|
if(!creature.mind?.has_antag_datum(/datum/antagonist/bitrunning_glitch, check_subtypes = TRUE))
|
|
return
|
|
|
|
INVOKE_ASYNC(src, PROC_REF(station_spawn), arrived, chosen_forge)
|
|
return
|
|
|
|
if(istype(arrived, /obj/structure/closet/crate/secure/bitrunning/encrypted))
|
|
generate_loot(arrived, chosen_forge)
|
|
return
|
|
|
|
if(istype(arrived, /obj/item/storage/lockbox/bitrunning/encrypted))
|
|
generate_secondary_loot(arrived, chosen_forge, generated_domain)
|
|
return
|
|
|
|
|
|
/// Handles examining the server. Shows cooldown time and efficiency.
|
|
/obj/machinery/quantum_server/proc/on_goal_turf_examined(datum/source, mob/examiner, list/examine_text)
|
|
SIGNAL_HANDLER
|
|
|
|
examine_text += span_info("Beneath your gaze, the floor pulses subtly with streams of encoded data.")
|
|
examine_text += span_info("It seems to be part of the location designated for retrieving encrypted payloads.")
|
|
|
|
|
|
/// Scans over the inbound created_atoms from lazy templates
|
|
/obj/machinery/quantum_server/proc/on_template_loaded(datum/lazy_template/source, list/created_atoms)
|
|
SIGNAL_HANDLER
|
|
|
|
for(var/thing in created_atoms)
|
|
if(isliving(thing)) // so we can mutate them
|
|
var/mob/living/creature = thing
|
|
|
|
if(ismegafauna(creature))
|
|
var/mob/living/simple_animal/hostile/megafauna/boss = creature
|
|
boss.make_virtual_megafauna()
|
|
continue
|
|
|
|
mutation_candidate_refs.Add(WEAKREF(creature))
|
|
continue
|
|
|
|
if(istype(thing, /obj/effect/mob_spawn/ghost_role)) // so we get threat alerts
|
|
RegisterSignal(thing, COMSIG_GHOSTROLE_SPAWNED, PROC_REF(on_threat_created))
|
|
continue
|
|
|
|
if(istype(thing, /obj/effect/mob_spawn/corpse)) // corpses are valid targets too
|
|
var/obj/effect/mob_spawn/corpse/spawner = thing
|
|
|
|
mutation_candidate_refs.Add(spawner.spawned_mob_ref)
|
|
continue
|
|
|
|
if(istype(thing, /obj/machinery/suit_storage_unit))
|
|
var/obj/machinery/suit_storage_unit/storage = thing
|
|
storage.disable_modlink()
|
|
continue
|
|
|
|
if(istype(thing, /obj/item/mod/control))
|
|
var/obj/item/mod/control/modsuit = thing
|
|
modsuit.disable_modlink()
|
|
|
|
UnregisterSignal(source, COMSIG_LAZY_TEMPLATE_LOADED)
|
|
|
|
/// Just in case there's any special handling for the domain
|
|
generated_domain.setup_domain(created_atoms)
|
|
|
|
|
|
/// Handles when cybercops are summoned into the area or ghosts click a ghost role spawner
|
|
/obj/machinery/quantum_server/proc/on_threat_created(datum/source, mob/living/threat)
|
|
SIGNAL_HANDLER
|
|
|
|
add_threats(threat)
|