Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhials committed Jun 23, 2024
2 parents c1dfc24 + 7a8c25e commit bc61bba
Show file tree
Hide file tree
Showing 32 changed files with 217 additions and 1,951 deletions.
1,834 changes: 0 additions & 1,834 deletions _maps/virtual_domains/starfront_saloon.dmm

This file was deleted.

32 changes: 25 additions & 7 deletions _maps/virtual_domains/syndicate_assault.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
req_access = list("syndicate");
secure = 1
},
/obj/item/gun/ballistic/automatic/pistol,
/turf/open/floor/mineral/plastitanium/red,
/area/ruin/space/has_grav/powered/virtual_domain)
"cw" = (
Expand Down Expand Up @@ -388,6 +389,11 @@
/obj/structure/sign/poster/contraband/syndicate_pistol,
/turf/closed/wall/r_wall/syndicate,
/area/ruin/space/has_grav/powered/virtual_domain)
"og" = (
/obj/structure/table/reinforced,
/obj/item/reagent_containers/cup/glass/trophy/silver_cup,
/turf/open/floor/mineral/plastitanium/red,
/area/ruin/space/has_grav/powered/virtual_domain)
"oM" = (
/obj/structure/cable,
/turf/open/floor/mineral/plastitanium,
Expand Down Expand Up @@ -498,10 +504,16 @@
/turf/open/floor/mineral/plastitanium/red,
/area/ruin/space/has_grav/powered/virtual_domain)
"sH" = (
/obj/structure/displaycase{
/obj/structure/closet/syndicate{
anchored = 1;
desc = "A basic closet for all your villainous needs.";
locked = 1;
name = "Closet";
req_access = list("syndicate");
start_showpiece_type = /obj/item/gun/ballistic/automatic/pistol/deagle/camo
secure = 1
},
/obj/item/ammo_box/c9mm,
/obj/item/gun/ballistic/automatic/pistol,
/turf/open/floor/mineral/plastitanium/red,
/area/ruin/space/has_grav/powered/virtual_domain)
"sK" = (
Expand Down Expand Up @@ -600,6 +612,9 @@
/obj/item/ammo_box/c9mm,
/turf/open/floor/mineral/plastitanium/red,
/area/ruin/space/has_grav/powered/virtual_domain)
"xS" = (
/turf/closed/wall/r_wall/syndicate/nodiagonal,
/area/ruin/space/has_grav/powered/virtual_domain)
"yl" = (
/obj/machinery/door/airlock/grunge{
name = "Captain's Room"
Expand Down Expand Up @@ -688,6 +703,7 @@
/obj/item/crowbar/red,
/obj/item/ammo_box/magazine/m9mm_aps,
/obj/item/ammo_box/magazine/m9mm_aps,
/obj/item/gun/ballistic/automatic/pistol,
/turf/open/floor/carpet/royalblack,
/area/ruin/space/has_grav/powered/virtual_domain)
"Cn" = (
Expand Down Expand Up @@ -927,6 +943,7 @@
/obj/item/crowbar/red,
/obj/item/ammo_box/magazine/m9mm,
/obj/item/ammo_box/magazine/m9mm,
/obj/item/gun/ballistic/automatic/pistol,
/turf/open/floor/mineral/plastitanium,
/area/ruin/space/has_grav/powered/virtual_domain)
"Mm" = (
Expand Down Expand Up @@ -1076,6 +1093,7 @@
/obj/item/ammo_box/magazine/m9mm,
/obj/item/ammo_box/magazine/m9mm,
/obj/machinery/light/small/directional/north,
/obj/item/gun/ballistic/automatic/pistol,
/turf/open/floor/mineral/plastitanium,
/area/ruin/space/has_grav/powered/virtual_domain)
"Sq" = (
Expand Down Expand Up @@ -2206,7 +2224,7 @@ qx
qx
qx
ru
vp
og
Jg
ru
bh
Expand Down Expand Up @@ -2264,7 +2282,7 @@ qx
qx
qx
ru
sH
Kz
Kz
yl
bh
Expand Down Expand Up @@ -2743,7 +2761,7 @@ ru
ru
ru
ru
Vk
ru
qx
qx
qx
Expand Down Expand Up @@ -3091,7 +3109,7 @@ uP
ru
hD
ru
Ig
xS
qx
qx
qx
Expand Down Expand Up @@ -3203,7 +3221,7 @@ tI
Kz
Kz
ct
xJ
sH
ru
qx
qx
Expand Down
8 changes: 7 additions & 1 deletion code/datums/components/temporary_body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,23 @@
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)
/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)

Expand Down
4 changes: 2 additions & 2 deletions code/modules/antagonists/heretic/items/eldritch_painting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
icon = 'icons/obj/signs.dmi'
resistance_flags = FLAMMABLE
flags_1 = NONE
icon_state = "frame-empty"
icon_state = "eldritch_painting_debug"
result_path = /obj/structure/sign/painting/eldritch
pixel_shift = 30

/obj/structure/sign/painting/eldritch
name = "The debug and a coder who slept"
icon = 'icons/obj/signs.dmi'
icon_state = "frame-empty"
icon_state = "eldritch_painting_debug"
custom_materials = list(/datum/material/wood =SHEET_MATERIAL_AMOUNT)
resistance_flags = FLAMMABLE
buildable_sign = FALSE
Expand Down
6 changes: 4 additions & 2 deletions code/modules/bitrunning/components/virtual_entity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
/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!"))
to_chat(parent, span_boldannounce("You shiver for a moment with a sense of clarity you haven't felt before."))
to_chat(parent, span_notice("You could go <i>anywhere</i>, do <i>anything</i>! You could leave this simulation right now if you wanted!"))
to_chat(parent, span_danger("But be warned, quantum entanglement will interfere with any previous lives."))
to_chat(parent, span_notice("You'll have just one chance to go nova, and there's no turning back."))
qdel(src)
6 changes: 5 additions & 1 deletion code/modules/bitrunning/event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
if(!unlucky_server.validate_mutation_candidates())
return WAITING_FOR_SOMETHING

spawned_mobs = unlucky_server.setup_glitch(forced_role)
var/mob/spawned = unlucky_server.setup_glitch(forced_role)
if(isnull(spawned))
return WAITING_FOR_SOMETHING

spawned_mobs += spawned

return SUCCESSFUL_SPAWN
40 changes: 38 additions & 2 deletions code/modules/bitrunning/objects/hololadder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,37 @@
obj_flags = BLOCK_Z_OUT_DOWN
/// Time req to disconnect properly
var/travel_time = 3 SECONDS
/// Uses this to teleport observers back to the origin server
var/datum/weakref/server_ref

/obj/structure/hololadder/Initialize(mapload)

/obj/structure/hololadder/Initialize(mapload, obj/machinery/quantum_server/origin)
. = ..()

RegisterSignal(loc, COMSIG_ATOM_ENTERED, PROC_REF(on_enter))
server_ref = WEAKREF(origin)
register_context()


/obj/structure/hololadder/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()

context[SCREENTIP_CONTEXT_LMB] = "Disconnect"


/obj/structure/hololadder/examine(mob/user)
. = ..()

if(isnull(server_ref.resolve()))
. += span_infoplain("It's not connected to anything.")
return

if(isobserver(user))
. += span_notice("Left click to view the server that this ladder is connected to.")
return

. += span_infoplain("This ladder is connected to a server. You can click on it or walk over it to disconnect.")


/obj/structure/hololadder/attack_hand(mob/user, list/modifiers)
. = ..()
Expand All @@ -24,19 +50,29 @@

disconnect(user)


/obj/structure/hololadder/attack_ghost(mob/dead/observer/ghostie)
var/our_server = server_ref?.resolve()
if(isnull(our_server))
return ..()

ghostie.abstract_move(get_turf(our_server))


/// If there's a pilot ref- send the disconnect signal
/obj/structure/hololadder/proc/disconnect(mob/user)
if(isnull(user.mind))
return

if(!HAS_TRAIT(user, TRAIT_TEMPORARY_BODY))
balloon_alert(user, "no connection detected.")
balloon_alert(user, "no connection detected")
return

balloon_alert(user, "disconnecting...")
if(do_after(user, travel_time, src))
SEND_SIGNAL(user, COMSIG_BITRUNNER_LADDER_SEVER)


/// Helper for times when you dont have hands (gondola??)
/obj/structure/hololadder/proc/on_enter(datum/source, atom/movable/arrived, turf/old_loc)
SIGNAL_HANDLER
Expand Down
19 changes: 13 additions & 6 deletions code/modules/bitrunning/objects/netpod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,25 @@
. += 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(!isobserver(user))
. += 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.")
. += span_infoplain("It's currently unoccupied.")
return

. += span_infoplain("It's currently occupied by [occupant].")

if(isobserver(user))
. += span_notice("As an observer, you can click this netpod to jump to its avatar.")
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)
. = ..()

Expand All @@ -74,7 +82,6 @@
context[SCREENTIP_CONTEXT_LMB] = "Pry Open"
return CONTEXTUAL_SCREENTIP_SET

return CONTEXTUAL_SCREENTIP_SET

/obj/machinery/netpod/update_icon_state()
if(!is_operational)
Expand Down
31 changes: 20 additions & 11 deletions code/modules/bitrunning/server/_parent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/// Prevents multiple user actions. Handled by loading domains and cooldowns
var/is_ready = TRUE
/// Chance multipled by threat to spawn a glitch
var/glitch_chance = 0.05
var/glitch_chance = 0.2
/// Current plugged in users
var/list/datum/weakref/avatar_connection_refs = list()
/// Cached list of mutable mobs in zone for cybercops
Expand All @@ -37,11 +37,13 @@
/// Changes how much info is available on the domain
var/scanner_tier = 1
/// Length of time it takes for the server to cool down after resetting. Here to give runners downtime so their faces don't get stuck like that
var/server_cooldown_time = 3 MINUTES
var/server_cooldown_time = 2 MINUTES
/// Applies bonuses to rewards etc
var/servo_bonus = 0
/// Determines the glitches available to spawn, builds with completion
var/threat = 0
/// Maximum rate at which a glitch can spawn
var/threat_prob_max = 15
/// The turfs we can place a hololadder on.
var/turf/exit_turfs = list()
/// Determines if we broadcast to entertainment monitors or not
Expand Down Expand Up @@ -76,23 +78,27 @@
. += span_infoplain("Can be resource intensive to run. Ensure adequate power supply.")

if(capacitor_coefficient < 1)
. += span_infoplain("Its coolant capacity reduces cooldown time by [(1 - capacitor_coefficient) * 100]%.")
. += span_infoplain("- Its coolant capacity reduces cooldown time by [(1 - capacitor_coefficient) * 100]%.")

if(servo_bonus > 0.2)
. += span_infoplain("Its manipulation potential is increasing rewards by [servo_bonus]x.")
. += span_infoplain("Injury from unsafe ejection reduced [servo_bonus * 100]%.")
. += span_infoplain("- Its manipulation potential is increasing rewards by [servo_bonus]x.")
. += span_infoplain("- Injury from unsafe ejection reduced [servo_bonus * 100]%.")

if(!is_ready)
. += span_notice("It is currently cooling down. Give it a few moments.")

if(isobserver(user) && (obj_flags & EMAGGED))
. += span_notice("Ominous warning lights are blinking red. This server has been tampered with.")

/obj/machinery/quantum_server/emag_act(mob/user, obj/item/card/emag/emag_card)
. = ..()

if(obj_flags & EMAGGED)
return

obj_flags |= EMAGGED
glitch_chance = 0.09
glitch_chance *= 2
threat_prob_max *= 2

add_overlay(mutable_appearance('icons/obj/machines/bitrunning.dmi', "emag_overlay"))
balloon_alert(user, "system jailbroken...")
Expand All @@ -116,11 +122,14 @@

/obj/machinery/quantum_server/attackby(obj/item/weapon, mob/user, params)
. = ..()
if(istype(weapon, /obj/item/bitrunning_debug))
obj_flags |= EMAGGED
glitch_chance = 0.5
capacitor_coefficient = 0.01
points = 100

if(!istype(weapon, /obj/item/bitrunning_debug))
return

obj_flags |= EMAGGED
glitch_chance = 0.5
capacitor_coefficient = 0.1
points = 100

/obj/machinery/quantum_server/crowbar_act(mob/living/user, obj/item/crowbar)
. = ..()
Expand Down
3 changes: 2 additions & 1 deletion code/modules/bitrunning/server/map_handling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@

is_ready = TRUE

if(prob(clamp((threat * glitch_chance), 1, 10)))
var/spawn_chance = clamp((threat * glitch_chance), 5, threat_prob_max)
if(prob(spawn_chance))
setup_glitch()

playsound(src, 'sound/machines/terminal_insert_disc.ogg', 30, vary = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/bitrunning/server/obj_generation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
if(isnull(destination))
return

var/obj/structure/hololadder/wayout = new(destination)
var/obj/structure/hololadder/wayout = new(destination, src)
if(isnull(wayout))
return

Expand Down
Loading

0 comments on commit bc61bba

Please sign in to comment.