mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
- Replaced MAX_EXPLOSION_RANGE with MAX_EX_DEVASTATION_RANGE _HEAVY_ _LIGHT_ and _FLASH_.
- Moved explosion capping to explosion code, overridable by setting a proc parameter, which defaults to off, obviously. - Reduced r-walls' explosion resistance from 25 to 15. They can now be destroyed by strong bombs. - Added liquid processing to the sun part of the MC - Added additional calls to atmos processing to the MC. You can enable this by (manually, with the debug controller verb) enabling the fast_atmos_1 .. 3 variables in the configuration datum. The intent of this is to enable it in a few rounds to see if it is possible to make atmos calls more common. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5607 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -59,6 +59,10 @@
|
||||
var/wikiurl
|
||||
var/forumurl
|
||||
|
||||
var/fast_atmos_1 = 0
|
||||
var/fast_atmos_2 = 0
|
||||
var/fast_atmos_3 = 0
|
||||
|
||||
//Alert level description
|
||||
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
|
||||
@@ -97,6 +101,7 @@
|
||||
var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database
|
||||
|
||||
var/use_recursive_explosions //Defines whether the server uses recursive or circular explosions.
|
||||
var/roundstart_station_randomization = 1 //Enable this to have some randomization happen on the station.
|
||||
|
||||
var/assistant_maint = 0 //Do assistants get maint access?
|
||||
var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
|
||||
|
||||
@@ -122,10 +122,11 @@ datum/controller/game_controller/proc/process()
|
||||
|
||||
sleep(breather_ticks)
|
||||
|
||||
//SUN
|
||||
//SUN AND LIQUID
|
||||
timer = world.timeofday
|
||||
last_thing_processed = sun.type
|
||||
sun.calc_position()
|
||||
process_liquid()
|
||||
sun_cost = (world.timeofday - timer) / 10
|
||||
|
||||
sleep(breather_ticks)
|
||||
@@ -142,6 +143,14 @@ datum/controller/game_controller/proc/process()
|
||||
process_diseases()
|
||||
diseases_cost = (world.timeofday - timer) / 10
|
||||
|
||||
//AIR (Faster atmos 1!)
|
||||
if(config.fast_atmos_1)
|
||||
if(!air_processing_killed)
|
||||
timer = world.timeofday
|
||||
last_thing_processed = air_master.type
|
||||
air_master.process()
|
||||
air_cost += (world.timeofday - timer) / 10
|
||||
|
||||
sleep(breather_ticks)
|
||||
|
||||
//MACHINES
|
||||
@@ -156,6 +165,14 @@ datum/controller/game_controller/proc/process()
|
||||
process_objects()
|
||||
objects_cost = (world.timeofday - timer) / 10
|
||||
|
||||
//AIR (Faster atmos 2!)
|
||||
if(config.fast_atmos_2)
|
||||
if(!air_processing_killed)
|
||||
timer = world.timeofday
|
||||
last_thing_processed = air_master.type
|
||||
air_master.process()
|
||||
air_cost += (world.timeofday - timer) / 10
|
||||
|
||||
sleep(breather_ticks)
|
||||
|
||||
//PIPENETS
|
||||
@@ -173,6 +190,14 @@ datum/controller/game_controller/proc/process()
|
||||
|
||||
sleep(breather_ticks)
|
||||
|
||||
//AIR (Faster atmos 3!)
|
||||
if(config.fast_atmos_3)
|
||||
if(!air_processing_killed)
|
||||
timer = world.timeofday
|
||||
last_thing_processed = air_master.type
|
||||
air_master.process()
|
||||
air_cost += (world.timeofday - timer) / 10
|
||||
|
||||
//EVENTS
|
||||
timer = world.timeofday
|
||||
process_events()
|
||||
@@ -194,6 +219,17 @@ datum/controller/game_controller/proc/process()
|
||||
else
|
||||
sleep(10)
|
||||
|
||||
datum/controller/game_controller/proc/process_liquid()
|
||||
last_thing_processed = /datum/puddle
|
||||
var/i = 1
|
||||
while(i<=puddles.len)
|
||||
var/datum/puddle/Puddle = puddles[i]
|
||||
if(Puddle)
|
||||
Puddle.process()
|
||||
i++
|
||||
continue
|
||||
puddles.Cut(i,i+1)
|
||||
|
||||
datum/controller/game_controller/proc/process_mobs()
|
||||
var/i = 1
|
||||
while(i<=mob_list.len)
|
||||
@@ -288,4 +324,3 @@ datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
|
||||
else
|
||||
msg += "\t [varname] = [varval]\n"
|
||||
world.log << msg
|
||||
|
||||
|
||||
@@ -1107,13 +1107,13 @@ steam.start() -- spawns the effect
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if (round(amount/12) > 0)
|
||||
devastation = min (MAX_EXPLOSION_RANGE, devastation + round(amount/12))
|
||||
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
|
||||
|
||||
if (round(amount/6) > 0)
|
||||
heavy = min (MAX_EXPLOSION_RANGE, heavy + round(amount/6))
|
||||
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
|
||||
|
||||
if (round(amount/3) > 0)
|
||||
light = min (MAX_EXPLOSION_RANGE, light + round(amount/3))
|
||||
light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3))
|
||||
|
||||
if (flash && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
@@ -7,11 +7,23 @@
|
||||
else return dy + (0.5*dx)
|
||||
|
||||
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0)
|
||||
src = null //so we don't abort once src is deleted
|
||||
|
||||
if(!ignorecap)
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
devastation_range = min (MAX_EX_DEVESTATION_RANGE, devastation_range)
|
||||
heavy_impact_range = min (MAX_EX_HEAVY_RANGE, heavy_impact_range)
|
||||
light_impact_range = min (MAX_EX_LIGHT_RANGE, light_impact_range)
|
||||
flash_range = min (MAX_EX_FLASH_RANGE, flash_range)
|
||||
|
||||
spawn(0)
|
||||
if(config.use_recursive_explosions)
|
||||
var/power = devastation_range * 2 + heavy_impact_range + light_impact_range //The ranges add up, ie light 14 includes both heavy 7 and devestation 3. So this calculation means devestation counts for 4, heavy for 2 and light for 1 power, giving us a cap of 27 power.
|
||||
devastation_range += 1 //Original code uses -1 as no explosion, this code uses 0 as no explosion and -1 would ruin everything
|
||||
heavy_impact_range += 1
|
||||
light_impact_range += 1
|
||||
var/power = devastation_range * 3 + heavy_impact_range * 1.5 + light_impact_range * 0.75
|
||||
//So max power is (3 * 4) + (1.5 * 8) + (0.75 * 15) = 36,25
|
||||
explosion_rec(epicenter, power)
|
||||
return
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ proc/explosion_rec(turf/epicenter, power)
|
||||
explosion_resistance = 5
|
||||
|
||||
/turf/simulated/wall/r_wall
|
||||
explosion_resistance = 25
|
||||
explosion_resistance = 15
|
||||
|
||||
//Code-wise, a safe value for power is something up to ~25 or ~30.. This does quite a bit of damage to the station.
|
||||
//direction is the direction that the spread took to come to this tile. So it is pointing in the main blast direction - meaning where this tile should spread most of it's force.
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
air_contents.react()
|
||||
pressure = air_contents.return_pressure()
|
||||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
|
||||
range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE
|
||||
range = min(range, MAX_EX_LIGHT_RANGE) // was 8 - - - Changed to a configurable define -- TLE
|
||||
var/turf/epicenter = get_turf(loc)
|
||||
|
||||
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
|
||||
|
||||
@@ -1835,18 +1835,33 @@
|
||||
if("togglebombcap")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BC")
|
||||
switch(MAX_EXPLOSION_RANGE)
|
||||
if(14) MAX_EXPLOSION_RANGE = 16
|
||||
if(16) MAX_EXPLOSION_RANGE = 20
|
||||
if(20) MAX_EXPLOSION_RANGE = 28
|
||||
if(28) MAX_EXPLOSION_RANGE = 56
|
||||
if(56) MAX_EXPLOSION_RANGE = 128
|
||||
if(128) MAX_EXPLOSION_RANGE = 14
|
||||
var/range_dev = MAX_EXPLOSION_RANGE *0.25
|
||||
var/range_high = MAX_EXPLOSION_RANGE *0.5
|
||||
var/range_low = MAX_EXPLOSION_RANGE
|
||||
message_admins("\red <b> [key_name_admin(usr)] changed the bomb cap to [range_dev], [range_high], [range_low]</b>", 1)
|
||||
log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EXPLOSION_RANGE]")
|
||||
switch(MAX_EX_LIGHT_RANGE)
|
||||
if(14)
|
||||
MAX_EX_LIGHT_RANGE = 16
|
||||
MAX_EX_HEAVY_RANGE = 8
|
||||
MAX_EX_DEVESTATION_RANGE = 4
|
||||
if(16)
|
||||
MAX_EX_LIGHT_RANGE = 20
|
||||
MAX_EX_HEAVY_RANGE = 10
|
||||
MAX_EX_DEVESTATION_RANGE = 5
|
||||
if(20)
|
||||
MAX_EX_LIGHT_RANGE = 28
|
||||
MAX_EX_HEAVY_RANGE = 14
|
||||
MAX_EX_DEVESTATION_RANGE = 7
|
||||
if(28)
|
||||
MAX_EX_LIGHT_RANGE = 56
|
||||
MAX_EX_HEAVY_RANGE = 28
|
||||
MAX_EX_DEVESTATION_RANGE = 14
|
||||
if(56)
|
||||
MAX_EX_LIGHT_RANGE = 128
|
||||
MAX_EX_HEAVY_RANGE = 64
|
||||
MAX_EX_DEVESTATION_RANGE = 32
|
||||
if(128)
|
||||
MAX_EX_LIGHT_RANGE = 14
|
||||
MAX_EX_HEAVY_RANGE = 7
|
||||
MAX_EX_DEVESTATION_RANGE = 3
|
||||
message_admins("\red <b> [key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]</b>", 1)
|
||||
log_admin("[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
|
||||
|
||||
if("flicklights")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
|
||||
@@ -137,7 +137,10 @@ var/turf/space/Space_Tile = locate(/turf/space) // A space tile to reference whe
|
||||
// was 2 atm
|
||||
|
||||
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
|
||||
var/MAX_EXPLOSION_RANGE = 14
|
||||
var/MAX_EX_DEVESTATION_RANGE = 3
|
||||
var/MAX_EX_HEAVY_RANGE = 7
|
||||
var/MAX_EX_LIGHT_RANGE = 14
|
||||
var/MAX_EX_FLASH_RANGE = 14
|
||||
//#define MAX_EXPLOSION_RANGE 14 // Defaults to 12 (was 8) -- TLE
|
||||
|
||||
#define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone.
|
||||
|
||||
Reference in New Issue
Block a user