Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…eborn into master-RuTGMC_reborn
  • Loading branch information
homexp13 committed Sep 7, 2024
2 parents e225454 + 5f42484 commit 01aca60
Show file tree
Hide file tree
Showing 139 changed files with 332 additions and 321 deletions.
2 changes: 1 addition & 1 deletion _maps/map_files/Talos/TGS_Talos.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3775,7 +3775,7 @@
/obj/machinery/door/airlock/multi_tile/mainship/blackgeneric/glass{
name = "\improper Pilot's Office";
dir = 2;
req_one_access = list(44,47)
req_one_access = list(44,47,49)
},
/turf/open/floor/mainship/stripesquare,
/area/mainship/living/pilotbunks)
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/move_force.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
#define MOVE_FORCE_VERY_STRONG ((MOVE_FORCE_DEFAULT * MOVE_FORCE_CRUSH_RATIO) - 1)
#define MOVE_FORCE_STRONG (MOVE_FORCE_DEFAULT * 2)
#define MOVE_FORCE_NORMAL MOVE_FORCE_DEFAULT
#define MOVE_FORCE_WEAK (MOVE_FORCE_DEFAULT / 2)
#define MOVE_FORCE_WEAK (MOVE_FORCE_DEFAULT * 0.5)
#define MOVE_FORCE_VERY_WEAK ((MOVE_FORCE_DEFAULT / MOVE_FORCE_CRUSH_RATIO) + 1)
#define MOVE_FORCE_EXTREMELY_WEAK (MOVE_FORCE_DEFAULT / (MOVE_FORCE_CRUSH_RATIO * 3))
2 changes: 1 addition & 1 deletion code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
high_index = length(sorted_list)
while (low_index <= high_index)
// Figure out the midpoint, rounding up for fractions. (BYOND rounds down, so add 1 if necessary.)
midway_calc = (low_index + high_index) / 2
midway_calc = (low_index + high_index) * 0.5
current_index = round(midway_calc)
if(midway_calc > current_index)
current_index++
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ params
var/admin_specific_options = ""
for(var/opt in options)
admin_specific_options += " <a href='byond://?src=[ref];adminapproval=[approval_id];option=[opt]'>\[[uppertext(opt)]\]</a>"
admin_specific_options += " Default: [uppertext(default_option)] (after [delay / 10] seconds)"
admin_specific_options += " Default: [uppertext(default_option)] (after [delay * 0.1] seconds)"
to_chat(C, span_admin("[span_prefix("APPROVAL REQUEST:")] <span class='message linkify'>[admin_message] | [admin_specific_options]</span>"))
window_flash(C)
if(admin_sound) // Additional send the sound if set
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ ColorTone(rgb, tone)
if(current_layer < 0)
if(current_layer <= -1000)
return flat
current_layer = process_set + A.layer + current_layer / 1000
current_layer = process_set + A.layer + current_layer * 0.001

for(var/p in 1 to length(layers))
var/image/cmp = layers[p]
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/math.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var/x_distance_sign = SIGN(x_distance) //Sign of x distance (+ or -)
var/y_distance_sign = SIGN(y_distance)

var/x = abs_x_distance >> 1 //Counters for steps taken, setting to distance/2
var/x = abs_x_distance >> 1 //Counters for steps taken, setting to distance * 0.5
var/y = abs_y_distance >> 1 //Bit-shifting makes me l33t. It also makes get_line() unnessecarrily fast.
if(abs_x_distance >= abs_y_distance) //x distance is greater than y
for(var/distance_counter in 0 to (abs_x_distance - 1))//It'll take abs_x_distance steps to get there
Expand Down Expand Up @@ -74,7 +74,7 @@
var/x_distance_sign = SIGN(x_distance) //Sign of x distance (+ or -)
var/y_distance_sign = SIGN(y_distance)

var/x = abs_x_distance >> 1 //Counters for steps taken, setting to distance/2
var/x = abs_x_distance >> 1 //Counters for steps taken, setting to distance * 0.5
var/y = abs_y_distance >> 1 //Bit-shifting makes me l33t. It also makes get_line() unnessecarrily fast.
var/turf/final_turf = get_turf(ending_atom) //The goal
var/turf/last_turf = get_turf(starting_atom)
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/matrices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// - jitter_duration: The duration of the jitter animation.
/// - jitter_loops: The amount of times to loop this animation.
/atom/proc/do_jitter_animation(jitteriness = 1000, jitter_duration = 2, jitter_loops = 6)
var/amplitude = min(4, (jitteriness/100) + 1)
var/amplitude = min(4, (jitteriness * 0.01) + 1)
var/pixel_x_diff = rand(-amplitude, amplitude)
var/pixel_y_diff = rand(-amplitude/3, amplitude/3)
var/final_pixel_x = initial(pixel_x)
Expand Down Expand Up @@ -142,7 +142,7 @@ list(0.393,0.349,0.272,0, 0.769,0.686,0.534,0, 0.189,0.168,0.131,0, 0,0,0,1, 0,0
//Changes distance colors have from rgb(127,127,127) grey
//1 is identity. 0 makes everything grey >1 blows out colors and greys
/proc/color_matrix_contrast(value)
var/add = (1 - value) / 2
var/add = (1 - value) * 0.5
return list(value,0,0,0, 0,value,0,0, 0,0,value,0, 0,0,0,1, add,add,add,0)


Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/sorts/__main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ start the index of the first element in the range that is not already known to b
//[lo, left) elements <= pivot < [right, start) elements
//in other words, find where the pivot element should go using bisection search
while(left < right)
var/mid = (left + right) >> 1 //round((left+right)/2)
var/mid = (left + right) >> 1 //round((left+right) * 0.5)
if(call(cmp)(fetchElement(L, mid), pivot, sortkey) > 0)
right = mid
else
Expand Down
12 changes: 6 additions & 6 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//Increases delay as the server gets more overloaded,
//as sleeps aren't cheap and sleeping only to wake up and sleep again is wasteful
#define DELTA_CALC max(((max(TICK_USAGE, world.cpu) / 100) * max(Master.sleep_delta-1,1)), 1)
#define DELTA_CALC max(((max(TICK_USAGE, world.cpu) * 0.01) * max(Master.sleep_delta-1,1)), 1)

//returns the number of ticks slept
/proc/stoplag(initial_delay)
Expand Down Expand Up @@ -259,7 +259,7 @@
// Format frequency by moving the decimal.
/proc/format_frequency(frequency)
frequency = text2num(frequency)
return "[round(frequency / 10)].[frequency % 10]"
return "[round(frequency * 0.1)].[frequency % 10]"


//Opposite of format, returns as a number
Expand Down Expand Up @@ -1196,8 +1196,8 @@ will handle it, but:
* blocked - whether the cone should take into consideration solid walls
*/
/proc/generate_cone(atom/center, max_row_count = 10, starting_row = 1, cone_width = 60, cone_direction = 0, blocked = TRUE)
var/right_angle = cone_direction + cone_width/2
var/left_angle = cone_direction - cone_width/2
var/right_angle = cone_direction + cone_width * 0.5
var/left_angle = cone_direction - cone_width * 0.5

//These are needed because degrees need to be from 0 to 359 for the checks to function
if(right_angle >= 360)
Expand Down Expand Up @@ -1260,8 +1260,8 @@ will handle it, but:
* air_pass - whether to bypass non airtight atoms
*/
/proc/generate_true_cone(atom/center, max_row_count = 10, starting_row = 1, cone_width = 60, cone_direction = 0, blocked = TRUE, bypass_window = FALSE, projectile = FALSE, bypass_xeno = FALSE, air_pass = FALSE)
var/right_angle = cone_direction + cone_width/2
var/left_angle = cone_direction - cone_width/2
var/right_angle = cone_direction + cone_width * 0.5
var/left_angle = cone_direction - cone_width * 0.5

//These are needed because degrees need to be from 0 to 359 for the checks to function
if(right_angle >= 360)
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@
view = world.view

var/list/viewscales = getviewsize(view)
var/countx = CEILING((viewscales[1]/2)/(480/world.icon_size), 1)+1
var/county = CEILING((viewscales[2]/2)/(480/world.icon_size), 1)+1
var/countx = CEILING((viewscales[1] * 0.5) / (480 / world.icon_size), 1) + 1
var/county = CEILING((viewscales[2] * 0.5) / (480 / world.icon_size), 1) + 1
var/list/new_overlays = new
for(var/x in -countx to countx)
for(var/y in -county to county)
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/picture_in_picture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
if((width > 0) && (height > 0))
var/matrix/M = matrix()
M.Scale(width + 0.5, height + 0.5)
M.Translate((width-1)/2 * world.icon_size, (height-1)/2 * world.icon_size)
M.Translate((width-1) * 0.5 * world.icon_size, (height-1) * 0.5 * world.icon_size)
standard_background.transform = M
add_overlay(standard_background)

Expand Down Expand Up @@ -141,7 +141,7 @@
var/turf/T = get_turf(center)
if(!T)
return list()
var/turf/lowerleft = locate(max(1, T.x - round(width/2)), max(1, T.y - round(height/2)), T.z)
var/turf/lowerleft = locate(max(1, T.x - round(width * 0.5)), max(1, T.y - round(height * 0.5)), T.z)
var/turf/upperright = locate(min(world.maxx, lowerleft.x + width - 1), min(world.maxy, lowerleft.y + height - 1), lowerleft.z)
return block(lowerleft, upperright)

Expand Down
10 changes: 4 additions & 6 deletions code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,7 @@ GLOBAL_REAL(Master, /datum/controller/master)
// Loop.
Master.StartProcessing(0)

var/time = (REALTIMEOFDAY - start_timeofday) / 10


var/time = (REALTIMEOFDAY - start_timeofday) * 0.1

var/msg = "Initializations complete within [time] second[time == 1 ? "" : "s"]!"
to_chat(world, span_boldannounce("[msg]"))
Expand Down Expand Up @@ -297,7 +295,7 @@ GLOBAL_REAL(Master, /datum/controller/master)

// Capture end time
var/time = rustg_time_milliseconds(SS_INIT_TIMER_KEY)
var/seconds = round(time / 1000, 0.01)
var/seconds = round(time * 0.001, 0.01)

// Always update the blackbox tally regardless.
SSblackbox.record_feedback("tally", "subsystem_initialize", time, subsystem.name)
Expand Down Expand Up @@ -708,11 +706,11 @@ GLOBAL_REAL(Master, /datum/controller/master)
if (queue_node_flags & SS_TICKER)
queue_node.next_fire = world.time + (world.tick_lag * queue_node.wait)
else if (queue_node_flags & SS_POST_FIRE_TIMING)
queue_node.next_fire = world.time + queue_node.wait + (world.tick_lag * (queue_node.tick_overrun/100))
queue_node.next_fire = world.time + queue_node.wait + (world.tick_lag * (queue_node.tick_overrun * 0.01))
else if (queue_node_flags & SS_KEEP_TIMING)
queue_node.next_fire += queue_node.wait
else
queue_node.next_fire = queue_node.queued_time + queue_node.wait + (world.tick_lag * (queue_node.tick_overrun/100))
queue_node.next_fire = queue_node.queued_time + queue_node.wait + (world.tick_lag * (queue_node.tick_overrun * 0.01))

queue_node.queued_time = 0

Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/garbage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ SUBSYSTEM_DEF(garbage)
var/threshold = CONFIG_GET(number/hard_deletes_overrun_threshold)
if (threshold && (time > threshold SECONDS))
if (!(I.qdel_flags & QDEL_ITEM_ADMINS_WARNED))
log_game("Error: [type]([refID]) took longer than [threshold] seconds to delete (took [round(time/10, 0.1)] seconds to delete)")
message_admins("Error: [type]([refID]) took longer than [threshold] seconds to delete (took [round(time/10, 0.1)] seconds to delete).")
log_game("Error: [type]([refID]) took longer than [threshold] seconds to delete (took [round(time * 0.1, 0.1)] seconds to delete)")
message_admins("Error: [type]([refID]) took longer than [threshold] seconds to delete (took [round(time * 0.1, 0.1)] seconds to delete).")
I.qdel_flags |= QDEL_ITEM_ADMINS_WARNED
I.hard_deletes_over_threshold++
var/overrun_limit = CONFIG_GET(number/hard_deletes_overrun_limit)
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SUBSYSTEM_DEF(mapping)
in_transit[T] = T.get_docked()
var/go_ahead = world.time + wipe_safety_delay
if(length(in_transit))
message_admins("Shuttles in transit detected. Attempting to fast travel. Timeout is [wipe_safety_delay/10] seconds.")
message_admins("Shuttles in transit detected. Attempting to fast travel. Timeout is [wipe_safety_delay * 0.1] seconds.")
var/list/cleared = list()
for(var/i in in_transit)
INVOKE_ASYNC(src, PROC_REF(safety_clear_transit_dock), i, in_transit[i], cleared)
Expand Down Expand Up @@ -174,7 +174,7 @@ SUBSYSTEM_DEF(mapping)
if (!pm.load(1, 1, start_z + parsed_maps[P], no_changeturf = TRUE))
errorList |= pm.original_path
if(!silent)
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time) * 0.1]s!")
return parsed_maps

/datum/controller/subsystem/mapping/proc/loadWorld()
Expand Down
12 changes: 6 additions & 6 deletions code/controllers/subsystem/minimaps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ SUBSYSTEM_DEF(minimaps)
else if(yval < smallest_y)
smallest_y = yval

minimaps_by_z["[level]"].x_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_x-smallest_x)/2, 1)
minimaps_by_z["[level]"].y_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_y-smallest_y)/2, 1)
minimaps_by_z["[level]"].x_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_x-smallest_x) * 0.5, 1)
minimaps_by_z["[level]"].y_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_y-smallest_y) * 0.5, 1)

icon_gen.Shift(EAST, minimaps_by_z["[level]"].x_offset)
icon_gen.Shift(NORTH, minimaps_by_z["[level]"].y_offset)
Expand Down Expand Up @@ -427,8 +427,8 @@ SUBSYSTEM_DEF(minimaps)
// we only care about absolute coords because the map is fixed to 1,1 so no client stuff
var/list/pixel_coords = params2screenpixel(modifiers["screen-loc"])
var/zlevel = SSminimaps.updators_by_datum[src].ztarget
var/x = (pixel_coords[1] - SSminimaps.minimaps_by_z["[zlevel]"].x_offset) / 2
var/y = (pixel_coords[2] - SSminimaps.minimaps_by_z["[zlevel]"].y_offset) / 2
var/x = (pixel_coords[1] - SSminimaps.minimaps_by_z["[zlevel]"].x_offset) * 0.5
var/y = (pixel_coords[2] - SSminimaps.minimaps_by_z["[zlevel]"].y_offset) * 0.5
var/c_x = clamp(CEILING(x, 1), 1, world.maxx)
var/c_y = clamp(CEILING(y, 1), 1, world.maxy)
choices_by_mob[source] = list(c_x, c_y)
Expand Down Expand Up @@ -688,8 +688,8 @@ SUBSYSTEM_DEF(minimaps)
else if(yval < smallest_y)
smallest_y = yval

minimaps_by_z["[zlevel]"].x_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_x-smallest_x)/2, 1)
minimaps_by_z["[zlevel]"].y_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_y-smallest_y)/2, 1)
minimaps_by_z["[zlevel]"].x_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_x-smallest_x) * 0.5, 1)
minimaps_by_z["[zlevel]"].y_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_y-smallest_y) * 0.5, 1)

icon_gen.Shift(EAST, minimaps_by_z["[zlevel]"].x_offset)
icon_gen.Shift(NORTH, minimaps_by_z["[zlevel]"].y_offset)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SUBSYSTEM_DEF(mobs)
least = length(crates[i])
least_idx = i
if(least_idx != most_idx)
for(var/i in 1 to ((most-least)/2))
for(var/i in 1 to ((most-least) * 0.5))
var/mob/living/L = pick_n_take(crates[most_idx])
crates[WRAP(most_idx+1, 1, 5)] += L

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/server_maint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SUBSYSTEM_DEF(server_maint)
continue

if(C && world.time - C.connection_time >= PING_BUFFER_TIME && C.inactivity < (wait - 1))
winset(C, null, "command=.update_ping+[world.time + world.tick_lag * TICK_USAGE_REAL / 100]")
winset(C, null, "command=.update_ping+[world.time + world.tick_lag * TICK_USAGE_REAL * 0.01]")

if(MC_TICK_CHECK)
return
Expand Down
8 changes: 4 additions & 4 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ SUBSYSTEM_DEF(ticker)
for(var/client/C in GLOB.clients)
window_flash(C)
to_chat(world, span_round_body("Welcome to the pre-game lobby of [CONFIG_GET(string/server_name)]!"))
to_chat(world, span_role_body("Please, setup your character and select ready. Game will start in [round(time_left / 10) || CONFIG_GET(number/lobby_countdown)] seconds."))
to_chat(world, span_role_body("Please, setup your character and select ready. Game will start in [round(time_left * 0.1) || CONFIG_GET(number/lobby_countdown)] seconds."))
current_state = GAME_STATE_PREGAME
to_chat(world, SSpersistence.seasons_info_message())
fire()
Expand Down Expand Up @@ -169,7 +169,7 @@ SUBSYSTEM_DEF(ticker)

GLOB.datacore.manifest()

log_world("Game start took [(world.timeofday - init_start) / 10]s")
log_world("Game start took [(world.timeofday - init_start) * 0.1]s")
round_start_time = world.time
SSdbcore.SetRoundStart()

Expand Down Expand Up @@ -251,8 +251,8 @@ SUBSYSTEM_DEF(ticker)

/datum/controller/subsystem/ticker/proc/GetTimeLeft()
if(isnull(SSticker.time_left))
return round(max(0, start_at - world.time) / 10)
return round(time_left / 10)
return round(max(0, start_at - world.time) * 0.1)
return round(time_left * 0.1)


/datum/controller/subsystem/ticker/proc/SetTimeLeft(newtime)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/tts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ SUBSYSTEM_DEF(tts)
continue

var/sound_volume = ((listening_mob == target)? 60 : 85) + volume_offset
sound_volume = sound_volume * (volume_to_play_at / 100)
sound_volume = sound_volume * (volume_to_play_at * 0.01)
var/datum/language_holder/holder = listening_mob.get_language_holder()
var/audio_to_use = (tts_pref == TTS_SOUND_BLIPS) ? audio_blips : audio
if(!holder.has_language(language))
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ SUBSYSTEM_DEF(vote)
/datum/controller/subsystem/vote/fire()
if(!mode)
return
time_remaining = round((started_time + CONFIG_GET(number/vote_period) - world.time)/10)
time_remaining = round((started_time + CONFIG_GET(number/vote_period) - world.time) * 0.1)
if(time_remaining < 0)
result()
SStgui.close_uis(src)
Expand Down Expand Up @@ -353,7 +353,7 @@ SUBSYSTEM_DEF(vote)
var/vp = CONFIG_GET(number/vote_period)
SEND_SOUND(world, sound('sound/ambience/votestart.ogg', channel = CHANNEL_NOTIFY, volume = 50))
to_chat(world, "<br><font color='purple'><b>[text]</b><br>Type <b>vote</b> or click on vote action (top left) to place your votes.<br>You have [DisplayTimeText(vp)] to vote.</font>")
time_remaining = round(vp/10)
time_remaining = round(vp * 0.1)
vote_happening = TRUE
for(var/c in GLOB.clients)
var/client/C = c
Expand Down
4 changes: 2 additions & 2 deletions code/datums/autocells/explosion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ as having entered the turf.
if(!epicenter)
return

falloff = max(falloff, power / 100)
falloff = max(falloff, power * 0.01)
if(adminlog)
log_game("Explosion with power of [power] and falloff of [falloff] at [AREACOORD(epicenter)]!")
if(is_mainship_level(epicenter.z))
Expand All @@ -250,7 +250,7 @@ as having entered the turf.
// Stereo users will also hear the direction of the explosion!

// Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
var/far_dist = power / 10
var/far_dist = power * 0.1
if(!silent)
var/frequency = GET_RAND_FREQUENCY
var/sound/explosion_sound = sound(get_sfx("explosion_large"))
Expand Down
12 changes: 6 additions & 6 deletions code/datums/components/chem_booster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@
return
update_resource(-resource_drain_amount)

wearer.adjustToxLoss(-tox_heal*boost_amount)
wearer.heal_overall_damage(6*boost_amount*brute_heal_amp, 6*boost_amount*burn_heal_amp)
wearer.adjustToxLoss(-tox_heal * boost_amount)
wearer.heal_overall_damage(6 * boost_amount*brute_heal_amp, 6 * boost_amount * burn_heal_amp)
vali_necro_timer = world.time - processing_start
if(vali_necro_timer > 20 SECONDS)
return
if(connected_weapon)
wearer.adjustStaminaLoss(-7*stamina_regen_amp*((20 - (vali_necro_timer)/10)/20)) //stamina gain scales inversely with passed time, up to 20 seconds
wearer.adjustStaminaLoss(-7 * stamina_regen_amp * ((20 - (vali_necro_timer) * 0.1) * 0.05)) //stamina gain scales inversely with passed time, up to 20 seconds
if(vali_necro_timer > 10 SECONDS)
to_chat(wearer, span_bold("WARNING: You have [(200 - (vali_necro_timer))/10] seconds before necrotic tissue forms on your limbs."))
to_chat(wearer, span_bold("WARNING: You have [(200 - (vali_necro_timer)) * 0.1] seconds before necrotic tissue forms on your limbs."))
if(vali_necro_timer > 15 SECONDS)
wearer.overlay_fullscreen("degeneration", /atom/movable/screen/fullscreen/animated/infection, 1)
to_chat(wearer, span_highdanger("The process of necrosis begins to set in. Turn it off before it's too late!"))
Expand Down Expand Up @@ -241,7 +241,7 @@
SIGNAL_HANDLER
if(!boost_on)
if(!COOLDOWN_CHECK(src, chemboost_activation_cooldown))
wearer.balloon_alert(wearer, "You need to wait another [COOLDOWN_TIMELEFT(src, chemboost_activation_cooldown)/10] seconds")
wearer.balloon_alert(wearer, "You need to wait another [COOLDOWN_TIMELEFT(src, chemboost_activation_cooldown) * 0.10] seconds")
return
if(resource_storage_current < resource_drain_amount)
wearer.balloon_alert(wearer, "Insufficient green blood to begin operation")
Expand All @@ -255,7 +255,7 @@
STOP_PROCESSING(SSobj, src)
wearer.clear_fullscreen("degeneration")
vali_necro_timer = world.time - processing_start
var/necrotized_counter = FLOOR(min(vali_necro_timer, 20 SECONDS)/200 + (vali_necro_timer-20 SECONDS)/100, 1)
var/necrotized_counter = FLOOR(min(vali_necro_timer, 20 SECONDS) * 0.005 + (vali_necro_timer - 20 SECONDS) * 0.01, 1)
if(necrotized_counter >= 1)
for(var/datum/limb/limb_to_ruin AS in shuffle(wearer.limbs))
if(limb_to_ruin.limb_status & LIMB_NECROTIZED)
Expand Down
Loading

0 comments on commit 01aca60

Please sign in to comment.