Skip to content

Commit

Permalink
Revert "Singulo engine buff (ParadiseSS13#26929)" (ParadiseSS13#27360)
Browse files Browse the repository at this point in the history
This reverts commit 627fe1e.
  • Loading branch information
Burzah authored Nov 14, 2024
1 parent f49b312 commit bff89a1
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 578 deletions.
6 changes: 0 additions & 6 deletions code/__DEFINES/misc_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@
#define STAGE_FIVE 9
#define STAGE_SIX 11 //From supermatter shard

#define STAGE_TWO_THRESHOLD 200
#define STAGE_THREE_THRESHOLD 500
#define STAGE_FOUR_THRESHOLD 1000
#define STAGE_FIVE_THRESHOLD 2000
#define STAGE_SIX_THRESHOLD 3000

/// A define for the center of the coordinate map of big machinery
#define MACH_CENTER 2

Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/radiation_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
continue
processing_list += thing.contents

/proc/radiation_pulse(atom/source, intensity, range_modifier, log = FALSE, can_contaminate = TRUE, source_radius = 0)
/proc/radiation_pulse(atom/source, intensity, range_modifier, log = FALSE, can_contaminate = TRUE)
if(!SSradiation.can_fire)
return
for(var/dir in GLOB.cardinal)
new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate, source_radius)
new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate)

var/list/things = get_rad_contents(source) //copypasta because I don't want to put special code in waves to handle their origin
for(var/k in 1 to length(things))
Expand Down
10 changes: 4 additions & 6 deletions code/datums/radiation_wave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
var/remaining_contam
/// Higher than 1 makes it drop off faster, 0.5 makes it drop off half etc
var/range_modifier
/// The distance from the source point the wave can cover without losing any strength.
var/source_radius
/// The direction of movement
var/move_dir
/// The directions to the side of the wave, stored for easy looping
var/list/__dirs
/// Whether or not this radiation wave can create contaminated objects
var/can_contaminate

/datum/radiation_wave/New(atom/_source, dir, _intensity = 0, _range_modifier = RAD_DISTANCE_COEFFICIENT, _can_contaminate = TRUE, _source_radius = 0)
/datum/radiation_wave/New(atom/_source, dir, _intensity = 0, _range_modifier = RAD_DISTANCE_COEFFICIENT, _can_contaminate = TRUE)

source = "[_source] \[[_source.UID()]\]"

Expand All @@ -35,7 +33,7 @@
remaining_contam = intensity
range_modifier = _range_modifier
can_contaminate = _can_contaminate
source_radius = _source_radius

START_PROCESSING(SSradiation, src)

/datum/radiation_wave/Destroy()
Expand All @@ -52,8 +50,8 @@
var/list/atoms = get_rad_atoms()

var/strength
if(steps > source_radius + 1)
strength = INVERSE_SQUARE(intensity, max(range_modifier * (steps - source_radius), 1), 1)
if(steps > 1)
strength = INVERSE_SQUARE(intensity, max(range_modifier * steps, 1), 1)
else
strength = intensity

Expand Down
6 changes: 0 additions & 6 deletions code/game/machinery/computer/buildandrepair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,6 @@
build_path = /obj/machinery/computer/sm_monitor
origin_tech = "programming=2;powerstorage=2"

/obj/item/circuitboard/singulo_monitor
board_name = "Singularity Monitoring Console"
icon_state = "engineering"
build_path = /obj/machinery/computer/singulo_monitor
origin_tech = "programming=2;powerstorage=2"

// RD console circuits, so that de/reconstructing one of the special consoles doesn't ruin everything forever
/obj/item/circuitboard/rdconsole
board_name = "RD Console"
Expand Down
202 changes: 0 additions & 202 deletions code/game/machinery/computer/singulo_monitor.dm

This file was deleted.

4 changes: 2 additions & 2 deletions code/modules/power/engines/singularity/containment_field.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
if(ismachinery(mover) || isstructure(mover) || ismecha(mover))
bump_field(mover)

/obj/machinery/field/containment/proc/set_master(master1, master2)
/obj/machinery/field/containment/proc/set_master(master1,master2)
if(!master1 || !master2)
return 0
FG1 = master1
Expand Down Expand Up @@ -99,7 +99,7 @@

/obj/machinery/field/proc/shock_field(mob/living/user)
if(isliving(user))
var/shock_damage = min(rand(30, 40), rand(30, 40))
var/shock_damage = min(rand(30,40),rand(30,40))

if(isliving(user) && !issilicon(user))
var/stun = (min(shock_damage, 15)) STATUS_EFFECT_CONSTANT
Expand Down
52 changes: 4 additions & 48 deletions code/modules/power/engines/singularity/field_generator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,50 +60,6 @@ GLOBAL_LIST_EMPTY(field_generator_fields)
if(active == FG_ONLINE)
calc_energy()

/**
* Gets a list of generators that form a field that is enclosing a given singularity, if such a field exists.
*
* Arguments:
* * _dir - The direction in which we are currently going
* * singulo - The singularity we are looking to contain
* * containment_gens - A list of generators which is the portion of the potential result we have so far.
*/
/obj/machinery/field/generator/proc/find_containment_gens(_dir, obj/singularity/singulo, list/containment_gens = list())
// We can't go in a direction that doesn't exist
if(!dir)
return

containment_gens |= src
// This is used to evaluate a path before returning it. We don't want to stop after the first dead end.
var/list/temp_gens = list()

for(var/obj/machinery/field/generator/gen in connected_gens)
// We don't ever want to do anything with the generator behind us so this check comes first
if(get_dir(src, gen) == turn(_dir, 180))
continue
// If we completed a full circle and it contains the singularity return it. Otherwise continue
if(gen in containment_gens)
if(singulo.in_containment(containment_gens))
return containment_gens
continue

// Go right if we can, forward if we can't go right, and left if we can't go forward
if(get_dir(src, gen) == turn(_dir, -90))
temp_gens = gen.find_containment_gens(turn(_dir, -90), singulo, containment_gens)
if(length(temp_gens))
return temp_gens
if(get_dir(src, gen) == _dir)
temp_gens = gen.find_containment_gens(_dir, singulo, containment_gens)
if(length(temp_gens))
return temp_gens
if(get_dir(src, gen) == turn(_dir, 90))
temp_gens = gen.find_containment_gens(turn(_dir, 90), singulo, containment_gens)
if(length(temp_gens))
return temp_gens

// We got to a dead end, temp_gens should be empty here.
return temp_gens

/obj/machinery/field/generator/attack_hand(mob/user)
if(state == FG_WELDED)
if(get_dist(src, user) <= 1)//Need to actually touch the thing to turn it on
Expand All @@ -115,7 +71,7 @@ GLOBAL_LIST_EMPTY(field_generator_fields)
"<span class='notice'>You turn on [src].</span>", \
"<span class='italics'>You hear heavy droning.</span>")
turn_on()
investigate_log("<font color='green'>activated</font> by [user.key].", "singulo")
investigate_log("<font color='green'>activated</font> by [user.key].","singulo")

add_fingerprint(user)
else
Expand Down Expand Up @@ -327,11 +283,11 @@ GLOBAL_LIST_EMPTY(field_generator_fields)

T = loc
for(var/dist in 0 to steps) // creates each field tile
var/field_dir = get_dir(T, get_step(G.loc, NSEW))
var/field_dir = get_dir(T,get_step(G.loc, NSEW))
T = get_step(T, NSEW)
if(!locate(/obj/machinery/field/containment) in T)
var/obj/machinery/field/containment/CF = new/obj/machinery/field/containment()
CF.set_master(src, G)
CF.set_master(src,G)
CF.loc = T
CF.dir = field_dir
fields += CF
Expand Down Expand Up @@ -380,7 +336,7 @@ GLOBAL_LIST_EMPTY(field_generator_fields)
// [src ? "[get_location_name(src, TRUE)] [COORD(src)]" : "nonexistent location"] [ADMIN_JMP(src)] works much better and actually works at all
// Oh and yes, this exact comment was pasted from the exact same thing I did to tcomms code. Dont at me.
message_admins("A singularity exists and a containment field has failed on the same Z-Level. Singulo location: [O ? "[get_location_name(O, TRUE)] [COORD(O)]" : "nonexistent location"] [ADMIN_JMP(O)] | Field generator location: [src ? "[get_location_name(src, TRUE)] [COORD(src)]" : "nonexistent location"] [ADMIN_JMP(src)]")
investigate_log("has <font color='red'>failed</font> whilst a singulo exists.", "singulo")
investigate_log("has <font color='red'>failed</font> whilst a singulo exists.","singulo")
O.last_warning = world.time

/obj/machinery/field/generator/shock_field(mob/living/user)
Expand Down
Loading

0 comments on commit bff89a1

Please sign in to comment.