mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[MIRROR] Adds more bitrunning antagonists + fixes (READY) [MDB IGNORE] (#25054)
* Adds more bitrunning antagonists + fixes (READY) * Update role_preferences.dm * Update poll_ignore.dm * Update poll_ignore.dm * Update cyber_police.dm --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
co-authored by
Jeremiah
Bloop
parent
6c11290c8e
commit
3238023f73
@@ -5,7 +5,7 @@
|
||||
desc = "A machine used by the quantum server. Quantum code converges here, materializing decrypted assets from the virtual abyss."
|
||||
icon = 'icons/obj/machines/bitrunning.dmi'
|
||||
icon_state = "byteforge"
|
||||
obj_flags = BLOCKS_CONSTRUCTION
|
||||
obj_flags = BLOCKS_CONSTRUCTION | CAN_BE_HIT
|
||||
/// Idle particles
|
||||
var/mutable_appearance/byteforge_particles
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
/obj/machinery/byteforge/LateInitialize()
|
||||
. = ..()
|
||||
|
||||
byteforge_particles = mutable_appearance(initial(icon), "on_particles", ABOVE_MOB_LAYER)
|
||||
setup_particles()
|
||||
|
||||
/obj/machinery/byteforge/update_appearance(updates)
|
||||
@@ -25,31 +24,44 @@
|
||||
|
||||
setup_particles()
|
||||
|
||||
/// Adds the particle overlays to the byteforge
|
||||
/obj/machinery/byteforge/proc/setup_particles()
|
||||
cut_overlays()
|
||||
|
||||
if(is_operational)
|
||||
add_overlay(byteforge_particles)
|
||||
|
||||
/// Begins spawning the crate - lights, overlays, etc
|
||||
/obj/machinery/byteforge/proc/start_to_spawn(obj/structure/closet/crate/secure/bitrunning/encrypted/cache)
|
||||
addtimer(CALLBACK(src, PROC_REF(spawn_crate), cache), 1 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)
|
||||
|
||||
var/mutable_appearance/lighting = mutable_appearance(initial(icon), "on_overlay")
|
||||
flick_overlay_view(lighting, 1 SECONDS)
|
||||
|
||||
set_light(l_range = 2, l_power = 1.5, l_color = LIGHT_COLOR_BABY_BLUE, l_on = TRUE)
|
||||
|
||||
/// Sparks, moves the crate to the location
|
||||
/obj/machinery/byteforge/proc/spawn_crate(obj/structure/closet/crate/secure/bitrunning/encrypted/cache)
|
||||
if(QDELETED(cache))
|
||||
return
|
||||
|
||||
/// Does some sparks after it's done
|
||||
/obj/machinery/byteforge/proc/flash(atom/movable/thing)
|
||||
playsound(src, 'sound/magic/blink.ogg', 50, TRUE)
|
||||
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new()
|
||||
sparks.set_up(5, 1, loc)
|
||||
sparks.start()
|
||||
|
||||
cache.forceMove(loc)
|
||||
set_light(l_on = FALSE)
|
||||
|
||||
/// Forge begins to process
|
||||
/obj/machinery/byteforge/proc/flicker(angry = FALSE)
|
||||
var/mutable_appearance/lighting = mutable_appearance(initial(icon), "on_overlay[angry ? "_angry" : ""]")
|
||||
flick_overlay_view(lighting, 1 SECONDS)
|
||||
|
||||
set_light(l_range = 2, l_power = 1.5, l_color = angry ? LIGHT_COLOR_BUBBLEGUM : LIGHT_COLOR_BABY_BLUE, l_on = TRUE)
|
||||
|
||||
/// Adds the particle overlays to the byteforge
|
||||
/obj/machinery/byteforge/proc/setup_particles(angry = FALSE)
|
||||
cut_overlay(byteforge_particles)
|
||||
|
||||
byteforge_particles = mutable_appearance(initial(icon), "on_particles[angry ? "_angry" : ""]", ABOVE_MOB_LAYER)
|
||||
|
||||
if(is_operational)
|
||||
add_overlay(byteforge_particles)
|
||||
|
||||
/// Forge is done processing
|
||||
/obj/machinery/byteforge/proc/spawn_cache(obj/cache)
|
||||
if(QDELETED(cache))
|
||||
return
|
||||
|
||||
flash()
|
||||
|
||||
cache.forceMove(loc)
|
||||
|
||||
/// Timed flash
|
||||
/obj/machinery/byteforge/proc/start_to_spawn(obj/cache)
|
||||
flicker()
|
||||
|
||||
addtimer(CALLBACK(src, PROC_REF(spawn_cache), cache), 1 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/obj/item/bitrunning_debug
|
||||
name = "bitrunning debug item"
|
||||
desc = "Adds points and reduces cooldown time for debugging"
|
||||
icon = 'icons/obj/assemblies/module.dmi'
|
||||
base_icon_state = "datadisk"
|
||||
icon_state = "datadisk0"
|
||||
|
||||
@@ -18,22 +18,20 @@
|
||||
|
||||
icon_state = "[base_icon_state][rand(0, 7)]"
|
||||
update_icon()
|
||||
RegisterSignal(src, COMSIG_ATOM_EXAMINE, PROC_REF(on_examined))
|
||||
|
||||
/obj/item/bitrunning_disk/proc/on_examined(datum/source, mob/examiner, list/examine_text)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
examine_text += span_infoplain("This disk must be carried on your person into a netpod to be used.")
|
||||
/obj/item/bitrunning_disk/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_infoplain("This disk must be carried on your person into a netpod to be used.")
|
||||
|
||||
if(isnull(choice_made))
|
||||
examine_text += span_notice("To make a selection, toggle the disk in hand.")
|
||||
. += span_notice("To make a selection, toggle the disk in hand.")
|
||||
return
|
||||
|
||||
examine_text += span_info("It has been used to select: <b>[choice_made]</b>.")
|
||||
examine_text += span_notice("It cannot make another selection.")
|
||||
. += span_info("It has been used to select: <b>[choice_made]</b>.")
|
||||
. += span_notice("It cannot make another selection.")
|
||||
|
||||
/obj/item/bitrunning_disk/ability
|
||||
desc = "A disk containing source code. It can be used to preload abilities into the virtual domain."
|
||||
desc = "A disk containing source code. It can be used to preload abilities into the virtual domain. Duplicate abilities will be ignored."
|
||||
/// The selected ability that this grants
|
||||
var/datum/action/granted_action
|
||||
/// The list of actions that this can grant
|
||||
@@ -131,16 +129,16 @@
|
||||
/obj/item/bitrunning_disk/item/tier2
|
||||
name = "bitrunning gear: complex"
|
||||
selectable_items = list(
|
||||
/obj/item/chainsaw,
|
||||
/obj/item/reagent_containers/hypospray/medipen/survival/luxury,
|
||||
/obj/item/gun/ballistic/automatic/pistol,
|
||||
/obj/item/melee/energy/blade/hardlight,
|
||||
/obj/item/clothing/suit/armor/vest,
|
||||
)
|
||||
|
||||
/// Tier 3 items. Very powerful, game breaking.
|
||||
/obj/item/bitrunning_disk/item/tier3
|
||||
name = "bitrunning gear: advanced"
|
||||
selectable_items = list(
|
||||
/obj/item/gun/energy/tesla_cannon,
|
||||
/obj/item/gun/energy/e_gun/nuclear,
|
||||
/obj/item/dualsaber/green,
|
||||
/obj/item/melee/beesword,
|
||||
/obj/item/grenade/syndieminibomb,
|
||||
)
|
||||
|
||||
@@ -6,43 +6,6 @@
|
||||
/// In case you want to gate the crate behind a special condition.
|
||||
/obj/effect/landmark/bitrunning/loot_signal
|
||||
name = "Mysterious aura"
|
||||
/// The amount required to spawn a crate
|
||||
var/points_goal = 10
|
||||
/// A special condition limits this from spawning a crate
|
||||
var/points_received = 0
|
||||
/// Finished the special condition
|
||||
var/revealed = FALSE
|
||||
|
||||
/obj/effect/landmark/bitrunning/loot_signal/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
RegisterSignal(src, COMSIG_BITRUNNER_GOAL_POINT, PROC_REF(on_add_point))
|
||||
|
||||
/// Listens for points to be added which will eventually spawn a crate.
|
||||
/obj/effect/landmark/bitrunning/loot_signal/proc/on_add_point(datum/source, points_to_add)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(revealed)
|
||||
return
|
||||
|
||||
points_received += points_to_add
|
||||
|
||||
if(points_received < points_goal)
|
||||
return
|
||||
|
||||
reveal()
|
||||
|
||||
/// Spawns the crate with some effects
|
||||
/obj/effect/landmark/bitrunning/loot_signal/proc/reveal()
|
||||
playsound(src, 'sound/magic/blink.ogg', 50, TRUE)
|
||||
|
||||
var/turf/tile = get_turf(src)
|
||||
var/obj/structure/closet/crate/secure/bitrunning/encrypted/loot = new(tile)
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new(tile)
|
||||
sparks.set_up(5, 1, get_turf(loot))
|
||||
sparks.start()
|
||||
|
||||
qdel(src)
|
||||
|
||||
/// Where the exit hololadder spawns
|
||||
/obj/effect/landmark/bitrunning/hololadder_spawn
|
||||
@@ -57,7 +20,7 @@
|
||||
/// Where you want the crate to spawn
|
||||
/obj/effect/landmark/bitrunning/cache_spawn
|
||||
name = "Bitrunning crate spawn"
|
||||
icon_state = "spawn"
|
||||
icon_state = "crate"
|
||||
|
||||
/// Where the safehouse will spawn
|
||||
/obj/effect/landmark/bitrunning/safehouse_spawn
|
||||
@@ -73,7 +36,10 @@
|
||||
/obj/effect/landmark/bitrunning/crate_replacer/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
#ifndef UNIT_TESTS
|
||||
#ifdef UNIT_TESTS
|
||||
return
|
||||
#endif
|
||||
|
||||
var/list/crate_list = list()
|
||||
var/obj/structure/closet/crate/secure/bitrunning/encrypted/encrypted_crate
|
||||
var/area/my_area = get_area(src)
|
||||
@@ -100,4 +66,7 @@
|
||||
encrypted_crate.abstract_move(selected_crate.loc)
|
||||
selected_crate.abstract_move(original_location)
|
||||
|
||||
#endif
|
||||
/// A location for mobs to spawn.
|
||||
/obj/effect/landmark/bitrunning/mob_segment
|
||||
name = "Bitrunning modular mob segment"
|
||||
icon_state = "mob_segment"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
name = "encrypted cache"
|
||||
desc = "Needs decrypted at the safehouse to be opened."
|
||||
locked = TRUE
|
||||
damage_deflection = 30
|
||||
|
||||
/obj/structure/closet/crate/secure/bitrunning/encrypted/can_unlock(mob/living/user, obj/item/card/id/player_id, obj/item/card/id/registered_id)
|
||||
return FALSE
|
||||
@@ -72,7 +73,7 @@
|
||||
/obj/structure/closet/crate/secure/bitrunning/decrypted/proc/spawn_loot(list/extra_loot)
|
||||
for(var/path in extra_loot)
|
||||
if(!ispath(path))
|
||||
continue
|
||||
return FALSE
|
||||
|
||||
if(isnull(extra_loot[path]))
|
||||
return FALSE
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
disconnect_damage = BASE_DISCONNECT_DAMAGE
|
||||
find_server()
|
||||
|
||||
RegisterSignal(src, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
|
||||
RegisterSignal(src, COMSIG_ATOM_TAKE_DAMAGE, PROC_REF(on_damage_taken))
|
||||
RegisterSignal(src, COMSIG_MACHINERY_POWER_LOST, PROC_REF(on_power_loss))
|
||||
RegisterSignals(src, list(COMSIG_QDELETING, COMSIG_MACHINERY_BROKEN),PROC_REF(on_broken))
|
||||
@@ -45,7 +44,27 @@
|
||||
|
||||
/obj/machinery/netpod/Destroy()
|
||||
. = ..()
|
||||
cached_outfits.Cut()
|
||||
|
||||
QDEL_LIST(cached_outfits)
|
||||
|
||||
/obj/machinery/netpod/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
if(isnull(server_ref?.resolve()))
|
||||
. += span_infoplain("It's not connected to anything.")
|
||||
. += span_infoplain("Netpods must be built within 4 tiles of a server.")
|
||||
return
|
||||
|
||||
. += span_infoplain("Drag yourself into the pod to engage the link.")
|
||||
. += span_infoplain("It has limited resuscitation capabilities. Remaining in the pod can heal some injuries.")
|
||||
. += span_infoplain("It has a security system that will alert the occupant if it is tampered with.")
|
||||
|
||||
if(isnull(occupant))
|
||||
. += span_notice("It is currently unoccupied.")
|
||||
return
|
||||
|
||||
. += span_notice("It is currently occupied by [occupant].")
|
||||
. += span_notice("It can be pried open with a crowbar, but its safety mechanisms will alert the occupant.")
|
||||
|
||||
/obj/machinery/netpod/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = ..()
|
||||
@@ -401,26 +420,6 @@
|
||||
|
||||
QDEL_NULL(avatar)
|
||||
|
||||
/// User inspects the machine
|
||||
/obj/machinery/netpod/proc/on_examine(datum/source, mob/examiner, list/examine_text)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(isnull(server_ref?.resolve()))
|
||||
examine_text += span_infoplain("It's not connected to anything.")
|
||||
examine_text += span_infoplain("Netpods must be built within 4 tiles of a server.")
|
||||
return
|
||||
|
||||
examine_text += span_infoplain("Drag yourself into the pod to engage the link.")
|
||||
examine_text += span_infoplain("It has limited resuscitation capabilities. Remaining in the pod can heal some injuries.")
|
||||
examine_text += span_infoplain("It has a security system that will alert the occupant if it is tampered with.")
|
||||
|
||||
if(isnull(occupant))
|
||||
examine_text += span_notice("It is currently unoccupied.")
|
||||
return
|
||||
|
||||
examine_text += span_notice("It is currently occupied by [occupant].")
|
||||
examine_text += span_notice("It can be pried open with a crowbar, but its safety mechanisms will alert the occupant.")
|
||||
|
||||
/// Boots out anyone in the machine && opens it
|
||||
/obj/machinery/netpod/proc/on_power_loss(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
/obj/machinery/computer/quantum_console/LateInitialize()
|
||||
. = ..()
|
||||
|
||||
if(isnull(server_ref?.resolve()))
|
||||
find_server()
|
||||
find_server()
|
||||
|
||||
/obj/machinery/computer/quantum_console/ui_interact(mob/user, datum/tgui/ui)
|
||||
. = ..()
|
||||
@@ -26,9 +25,6 @@
|
||||
if(!is_operational)
|
||||
return
|
||||
|
||||
if(isnull(server_ref?.resolve()))
|
||||
find_server()
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "QuantumConsole")
|
||||
@@ -76,17 +72,13 @@
|
||||
|
||||
switch(action)
|
||||
if("random_domain")
|
||||
var/map_id = server.get_random_domain_id()
|
||||
if(!map_id)
|
||||
return TRUE
|
||||
|
||||
server.cold_boot_map(usr, map_id)
|
||||
server.cold_boot_map(server.get_random_domain_id())
|
||||
return TRUE
|
||||
if("refresh")
|
||||
ui.send_full_update()
|
||||
return TRUE
|
||||
if("set_domain")
|
||||
server.cold_boot_map(usr, params["id"])
|
||||
server.cold_boot_map(params["id"])
|
||||
return TRUE
|
||||
if("stop_domain")
|
||||
server.begin_shutdown(usr)
|
||||
|
||||
Reference in New Issue
Block a user