mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Ports VG's DeityLink's new explosion method
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
var/automute_on = 0 //enables automuting/spam prevention
|
||||
var/jobs_have_minimal_access = 0 //determines whether jobs use minimal access or expanded access.
|
||||
|
||||
var/reactionary_explosions = 0 //If we use reactionary explosions, explosions that react to walls and doors
|
||||
|
||||
var/assistantlimit = 0 //enables assistant limiting
|
||||
var/assistantratio = 2 //how many assistants to security members
|
||||
@@ -340,6 +341,9 @@
|
||||
if("protect_roles_from_antagonist")
|
||||
config.protect_roles_from_antagonist = 1
|
||||
|
||||
if("reactionary_explosions")
|
||||
config.reactionary_explosions = 1
|
||||
|
||||
if ("probability")
|
||||
var/prob_pos = findtext(value, " ")
|
||||
var/prob_name = null
|
||||
|
||||
@@ -22,6 +22,10 @@ var/global/list/ghdel_profiling = list()
|
||||
// replaced by OPENCONTAINER flags and atom/proc/is_open_container()
|
||||
///Chemistry.
|
||||
|
||||
|
||||
//Value used to increment ex_act() if reactionary_explosions is on
|
||||
var/explosion_block = 0
|
||||
|
||||
//Detective Work, used for the duplicate data points kept in the scanners
|
||||
var/list/original_atom
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
var/hasShocked = 0 //Prevents multiple shocks from happening
|
||||
var/frozen = 0 //special condition for airlocks that are frozen shut, this will look weird on not normal airlocks because of a lack of special overlays.
|
||||
autoclose = 1
|
||||
explosion_block = 1
|
||||
|
||||
/obj/machinery/door/airlock/command
|
||||
name = "Airlock"
|
||||
@@ -283,6 +284,7 @@
|
||||
name = "High Tech Security Airlock"
|
||||
icon = 'icons/obj/doors/hightechsecurity.dmi'
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity
|
||||
explosion_block = 2
|
||||
|
||||
/obj/machinery/door/airlock/highsecurity/red
|
||||
name = "Secure Armory Airlock"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/doors/rapid_pdoor.dmi'
|
||||
icon_state = "pdoor1"
|
||||
var/id = 1.0
|
||||
explosion_block = 3
|
||||
|
||||
/obj/machinery/door/poddoor/preopen
|
||||
icon_state = "pdoor0"
|
||||
@@ -24,6 +25,30 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
//"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS.
|
||||
/obj/machinery/door/poddoor/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(prob(80))
|
||||
qdel(src)
|
||||
else
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
if(2.0)
|
||||
if(prob(20))
|
||||
qdel(src)
|
||||
else
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
|
||||
if(3.0)
|
||||
if(prob(80))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
|
||||
/obj/machinery/door/poddoor/attackby(obj/item/weapon/C as obj, mob/user as mob, params)
|
||||
src.add_fingerprint(user)
|
||||
if (!( istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1) ))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/machinery/door/unpowered
|
||||
autoclose = 0
|
||||
var/locked = 0
|
||||
|
||||
explosion_block = 1
|
||||
|
||||
Bumped(atom/AM)
|
||||
if(src.locked)
|
||||
|
||||
@@ -74,16 +74,40 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
var/dist = cheap_pythag(T.x - x0,T.y - y0)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
var/turf/Trajectory = T
|
||||
while(Trajectory != epicenter)
|
||||
Trajectory = get_step_towards(Trajectory, epicenter)
|
||||
if(Trajectory.density && Trajectory.explosion_block)
|
||||
dist += Trajectory.explosion_block
|
||||
|
||||
for(var/obj/machinery/door/D in Trajectory)
|
||||
if(D.density && D.explosion_block)
|
||||
dist += D.explosion_block
|
||||
|
||||
var/throw_dist = dist
|
||||
|
||||
if(dist < devastation_range) dist = 1
|
||||
else if(dist < heavy_impact_range) dist = 2
|
||||
else if(dist < light_impact_range) dist = 3
|
||||
else continue
|
||||
else dist = 0
|
||||
|
||||
T.ex_act(dist)
|
||||
if(T)
|
||||
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
|
||||
var/atom/movable/AM = atom_movable
|
||||
if(AM) AM.ex_act(dist)
|
||||
// if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
|
||||
// PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience!
|
||||
if(dist > 0)
|
||||
T.ex_act(dist)
|
||||
|
||||
//--- THROW ITEMS AROUND ---
|
||||
|
||||
var/throw_dir = get_dir(epicenter,T)
|
||||
for(var/obj/item/I in T)
|
||||
spawn(0) //Simultaneously not one at a time
|
||||
if(I)
|
||||
var/throw_range = rand(throw_dist, max_range)
|
||||
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
|
||||
I.throw_speed = 4 //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
|
||||
I.throw_at(throw_at, throw_range, 2)//Throw it at 2 speed, this is purely visual anyway.
|
||||
|
||||
var/took = (world.timeofday-start)/10
|
||||
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
|
||||
@@ -109,3 +133,71 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
proc/secondaryexplosion(turf/epicenter, range)
|
||||
for(var/turf/tile in trange(range, epicenter))
|
||||
tile.ex_act(2)
|
||||
|
||||
/client/proc/check_bomb_impacts()
|
||||
set name = "Check Bomb Impact"
|
||||
set category = "Debug"
|
||||
|
||||
var/newmode = alert("Use reactionary explosions?","Check Bomb Impact", "Yes", "No")
|
||||
|
||||
var/turf/epicenter = get_turf(src)
|
||||
var/dev = 0
|
||||
var/heavy = 0
|
||||
var/light = 0
|
||||
var/list/choices = list("Small Bomb","Medium Bomb","Big Bomb","Custom Bomb")
|
||||
var/choice = input("Bomb Size?") in choices
|
||||
switch(choice)
|
||||
if(null)
|
||||
return 0
|
||||
if("Small Bomb")
|
||||
dev = 1
|
||||
heavy = 2
|
||||
light = 3
|
||||
if("Medium Bomb")
|
||||
dev = 2
|
||||
heavy = 3
|
||||
light = 4
|
||||
if("Big Bomb")
|
||||
dev = 3
|
||||
heavy = 5
|
||||
light = 7
|
||||
if("Custom Bomb")
|
||||
dev = input("Devestation range (Tiles):") as num
|
||||
heavy = input("Heavy impact range (Tiles):") as num
|
||||
light = input("Light impact range (Tiles):") as num
|
||||
|
||||
var/max_range = max(dev, heavy, light)
|
||||
var/x0 = epicenter.x
|
||||
var/y0 = epicenter.y
|
||||
var/list/wipe_colours = list()
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
wipe_colours += T
|
||||
var/dist = cheap_pythag(T.x - x0, T.y - y0)
|
||||
|
||||
if(newmode == "Yes")
|
||||
var/turf/TT = T
|
||||
while(TT != epicenter)
|
||||
TT = get_step_towards(TT,epicenter)
|
||||
if(TT.density && TT.explosion_block)
|
||||
dist += TT.explosion_block
|
||||
|
||||
for(var/obj/machinery/door/D in TT)
|
||||
if(D.density && D.explosion_block)
|
||||
dist += D.explosion_block
|
||||
|
||||
if(dist < dev)
|
||||
T.color = "red"
|
||||
T.maptext = "Dev"
|
||||
else if (dist < heavy)
|
||||
T.color = "yellow"
|
||||
T.maptext = "Heavy"
|
||||
else if (dist < light)
|
||||
T.color = "blue"
|
||||
T.maptext = "Light"
|
||||
else
|
||||
continue
|
||||
|
||||
sleep(100)
|
||||
for(var/turf/T in wipe_colours)
|
||||
T.color = null
|
||||
T.maptext = ""
|
||||
|
||||
@@ -66,6 +66,19 @@
|
||||
F.make_plating()
|
||||
return
|
||||
|
||||
/turf/simulated/floor/engine/ex_act(severity,target)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if(prob(80))
|
||||
ReplaceWithLattice()
|
||||
else if(prob(50))
|
||||
qdel(src)
|
||||
else
|
||||
make_plating(1)
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
make_plating(1)
|
||||
|
||||
/turf/simulated/floor/engine/cult
|
||||
name = "engraved floor"
|
||||
icon_state = "cult"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
explosion_block = 1
|
||||
|
||||
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
|
||||
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
icon_state = "gold0"
|
||||
walltype = "gold"
|
||||
mineral = "gold"
|
||||
explosion_block = 0 //gold is a soft metal you dingus.
|
||||
//var/electro = 1
|
||||
//var/shocked = null
|
||||
|
||||
@@ -29,6 +30,7 @@
|
||||
icon_state = "diamond0"
|
||||
walltype = "diamond"
|
||||
mineral = "diamond"
|
||||
explosion_block = 3
|
||||
|
||||
/turf/simulated/wall/mineral/clown
|
||||
name = "bananium wall"
|
||||
@@ -43,6 +45,7 @@
|
||||
icon_state = "sandstone0"
|
||||
walltype = "sandstone"
|
||||
mineral = "sandstone"
|
||||
explosion_block = 0
|
||||
|
||||
/turf/simulated/wall/mineral/uranium
|
||||
name = "uranium wall"
|
||||
@@ -50,6 +53,7 @@
|
||||
icon_state = "uranium0"
|
||||
walltype = "uranium"
|
||||
mineral = "uranium"
|
||||
explosion_block = 0
|
||||
|
||||
/turf/simulated/wall/mineral/uranium/proc/radiate()
|
||||
if(!active)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "r_wall"
|
||||
opacity = 1
|
||||
density = 1
|
||||
|
||||
explosion_block = 2
|
||||
damage_cap = 200
|
||||
max_temperature = 6000
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "riveted"
|
||||
opacity = 1
|
||||
density = 1
|
||||
explosion_block = 2
|
||||
|
||||
/turf/unsimulated/wall/fakeglass
|
||||
name = "window"
|
||||
|
||||
@@ -144,7 +144,8 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/toggledebuglogs,
|
||||
/client/proc/qdel_toggle, // /vg/
|
||||
/client/proc/gc_dump_hdl,
|
||||
/client/proc/debugNatureMapGenerator
|
||||
/client/proc/debugNatureMapGenerator,
|
||||
/client/proc/check_bomb_impacts
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
|
||||
Reference in New Issue
Block a user