mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
oh no fox lost it
This commit is contained in:
+134
-7
@@ -69,21 +69,24 @@
|
||||
|
||||
/obj/effect/hotspot/proc/perform_exposure()
|
||||
var/turf/simulated/location = loc
|
||||
if(!istype(location) || !(location.air)) return 0
|
||||
if(!istype(location) || !(location.air))
|
||||
return FALSE
|
||||
|
||||
if(volume > CELL_VOLUME*0.95) bypassing = 1
|
||||
else bypassing = 0
|
||||
if(volume > CELL_VOLUME * 0.95)
|
||||
bypassing = TRUE
|
||||
else
|
||||
bypassing = FALSE
|
||||
|
||||
if(bypassing)
|
||||
if(!just_spawned)
|
||||
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
|
||||
volume = location.air.fuel_burnt * FIRE_GROWTH_RATE
|
||||
temperature = location.air.temperature
|
||||
else
|
||||
var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
|
||||
var/datum/gas_mixture/affected = location.air.remove_ratio(volume / location.air.volume)
|
||||
affected.temperature = temperature
|
||||
affected.react()
|
||||
temperature = affected.temperature
|
||||
volume = affected.fuel_burnt*FIRE_GROWTH_RATE
|
||||
volume = affected.fuel_burnt * FIRE_GROWTH_RATE
|
||||
location.assume_air(affected)
|
||||
|
||||
for(var/A in loc)
|
||||
@@ -93,7 +96,7 @@
|
||||
|
||||
color = heat2color(temperature)
|
||||
set_light(l_color = color)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/effect/hotspot/process()
|
||||
@@ -186,3 +189,127 @@
|
||||
..()
|
||||
if(isliving(L))
|
||||
L.fire_act()
|
||||
|
||||
/proc/fireflash(atom/center, radius, temp)
|
||||
if(!temp)
|
||||
temp = rand(2800, 3200)
|
||||
for(var/turf/T in view(radius, get_turf(center)))
|
||||
if(istype(T, /turf/space))
|
||||
continue
|
||||
if(locate(/obj/effect/hotspot) in T)
|
||||
continue
|
||||
if(!can_line(get_turf(center), T, radius + 1))
|
||||
continue
|
||||
|
||||
var/obj/effect/hotspot/H = new(T)
|
||||
H.temperature = temp
|
||||
H.volume = 400
|
||||
if(istype(T, /turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
S.active_hotspot = H
|
||||
|
||||
T.hotspot_expose(H.temperature, H.volume)
|
||||
|
||||
if(istype(T, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = T
|
||||
F.burn_tile()
|
||||
|
||||
for(var/mob/living/L in T)
|
||||
L.adjust_fire_stacks(3)
|
||||
L.IgniteMob()
|
||||
L.bodytemperature = max(temp / 3, L.bodytemperature)
|
||||
|
||||
/proc/fireflash_s(atom/center, radius, temp, falloff)
|
||||
if(temp < T0C + 60)
|
||||
return list()
|
||||
var/list/open = list()
|
||||
var/list/affected = list()
|
||||
var/list/closed = list()
|
||||
var/turf/Ce = get_turf(center)
|
||||
var/max_dist = radius
|
||||
if(falloff)
|
||||
max_dist = min((temp - (T0C + 60)) / falloff, radius)
|
||||
open[Ce] = 0
|
||||
while(open.len)
|
||||
var/turf/T = open[1]
|
||||
var/dist = open[T]
|
||||
open -= T
|
||||
closed += T
|
||||
|
||||
if(isspaceturf(T))
|
||||
continue
|
||||
if(dist > max_dist)
|
||||
continue
|
||||
if(!ff_cansee(Ce, T))
|
||||
continue
|
||||
|
||||
var/obj/effect/hotspot/existing_hotspot = locate(/obj/effect/hotspot) in T
|
||||
var/prev_temp = 0
|
||||
var/need_expose = 0
|
||||
var/expose_temp = 0
|
||||
if(!existing_hotspot)
|
||||
var/obj/effect/hotspot/H = new(T)
|
||||
need_expose = TRUE
|
||||
H.temperature = temp - dist * falloff
|
||||
expose_temp = H.temperature
|
||||
H.volume = 400
|
||||
if(istype(T, /turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
S.active_hotspot = H
|
||||
existing_hotspot = H
|
||||
|
||||
else if(existing_hotspot.temperature < temp - dist * falloff)
|
||||
expose_temp = (temp - dist * falloff) - existing_hotspot.temperature
|
||||
prev_temp = existing_hotspot.temperature
|
||||
if(expose_temp > prev_temp * 3)
|
||||
need_expose = TRUE
|
||||
existing_hotspot.temperature = temp - dist * falloff
|
||||
|
||||
affected[T] = existing_hotspot.temperature
|
||||
if(need_expose && expose_temp)
|
||||
T.hotspot_expose(expose_temp, existing_hotspot.volume)
|
||||
if(istype(T, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = T
|
||||
F.burn_tile()
|
||||
for(var/mob/living/L in T)
|
||||
L.adjust_fire_stacks(3)
|
||||
L.bodytemperature = (2 * L.bodytemperature + temp) / 3
|
||||
|
||||
if(T.density)
|
||||
continue
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
continue
|
||||
if(dist == max_dist)
|
||||
continue
|
||||
|
||||
for(var/dir in cardinal)
|
||||
var/turf/link = get_step(T, dir)
|
||||
if (!link)
|
||||
continue
|
||||
var/dx = link.x - Ce.x
|
||||
var/dy = link.y - Ce.y
|
||||
var/target_dist = max((dist + 1 + sqrt(dx * dx + dy * dy)) / 2, dist)
|
||||
if(!(link in closed))
|
||||
if(link in open)
|
||||
if(open[link] > target_dist)
|
||||
open[link] = target_dist
|
||||
else
|
||||
open[link] = target_dist
|
||||
|
||||
return affected
|
||||
|
||||
/proc/fireflash_sm(atom/center, radius, temp, falloff, capped = TRUE, bypass_rng = FALSE)
|
||||
var/list/affected = fireflash_s(center, radius, temp, falloff)
|
||||
for(var/turf/simulated/T in affected)
|
||||
var/mytemp = affected[T]
|
||||
var/melt = 1643.15 // default steel melting point
|
||||
var/divisor = melt
|
||||
if(mytemp >= melt * 2)
|
||||
var/chance = mytemp / divisor
|
||||
if(capped)
|
||||
chance = min(chance, 30)
|
||||
if(prob(chance) || bypass_rng)
|
||||
T.visible_message("<span class='warning'>[T] melts!</span>")
|
||||
T.burn_down()
|
||||
return affected
|
||||
@@ -74,6 +74,19 @@
|
||||
//turfs += centerturf
|
||||
return atoms
|
||||
|
||||
/proc/ff_cansee(atom/A, atom/B)
|
||||
var/AT = get_turf(A)
|
||||
var/BT = get_turf(B)
|
||||
if(AT == BT)
|
||||
return 1
|
||||
var/list/line = getline(A, B)
|
||||
for(var/turf/T in line)
|
||||
if(T == AT || T == BT)
|
||||
break
|
||||
if(T.density)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
|
||||
var/dx = Loc1.x - Loc2.x
|
||||
var/dy = Loc1.y - Loc2.y
|
||||
|
||||
@@ -216,6 +216,23 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
line+=locate(px,py,M.z)
|
||||
return line
|
||||
|
||||
//Same as the thing below just for density and without support for atoms.
|
||||
/proc/can_line(atom/source, atom/target, length = 5)
|
||||
var/turf/current = get_turf(source)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
var/steps = 0
|
||||
|
||||
while(current != target_turf)
|
||||
if(steps > length)
|
||||
return FALSE
|
||||
if(!current)
|
||||
return FALSE
|
||||
if(current.density)
|
||||
return FALSE
|
||||
current = get_step_towards(current, target_turf)
|
||||
steps++
|
||||
return TRUE
|
||||
|
||||
//Returns whether or not a player is a guest using their ckey as an input
|
||||
/proc/IsGuestKey(key)
|
||||
if(findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
return
|
||||
|
||||
/obj/item/proc/pre_attackby(atom/A, mob/living/user, params) //do stuff before attackby!
|
||||
if(is_hot(src) && A.reagents && !ismob(A))
|
||||
to_chat(user, "<span class='notice'>You heat [A] with [src].</span>")
|
||||
A.reagents.temperature_reagents(is_hot(src))
|
||||
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
|
||||
|
||||
// No comment
|
||||
@@ -123,9 +126,7 @@
|
||||
// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
|
||||
// Click parameters is the params string from byond Click() code, see that documentation.
|
||||
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(is_hot(src) && target.reagents && !ismob(target) && proximity_flag)
|
||||
to_chat(user, "<span class='notice'>You heat [target].</span>")
|
||||
target.reagents.temperature_reagents(is_hot(src))
|
||||
return
|
||||
|
||||
/obj/item/proc/get_clamped_volume()
|
||||
if(w_class)
|
||||
|
||||
@@ -79,6 +79,9 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
src.hotspot_expose(1000,CELL_VOLUME)
|
||||
return
|
||||
|
||||
/turf/simulated/floor/burn_down()
|
||||
ex_act(2)
|
||||
|
||||
/turf/simulated/floor/is_shielded()
|
||||
for(var/obj/structure/A in contents)
|
||||
if(A.level == 3)
|
||||
|
||||
@@ -201,6 +201,11 @@
|
||||
for(var/i=0, i<number_rots, i++)
|
||||
new /obj/effect/overlay/wall_rot(src)
|
||||
|
||||
/turf/simulated/wall/burn_down()
|
||||
if(istype(sheet_type, /obj/item/stack/sheet/mineral/diamond))
|
||||
return
|
||||
ChangeTurf(/turf/simulated/floor)
|
||||
|
||||
/turf/simulated/wall/proc/thermitemelt(mob/user as mob, speed)
|
||||
var/wait = 100
|
||||
if(speed)
|
||||
@@ -282,9 +287,6 @@
|
||||
if(rotting && try_rot(I, user, params))
|
||||
return
|
||||
|
||||
if(thermite && try_thermite(I, user, params))
|
||||
return
|
||||
|
||||
if(try_decon(I, user, params))
|
||||
return
|
||||
|
||||
@@ -316,20 +318,6 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/turf/simulated/wall/proc/try_thermite(obj/item/I, mob/user, params)
|
||||
if(iswelder(I))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
thermitemelt(user)
|
||||
return TRUE
|
||||
|
||||
else if(istype(I, /obj/item/gun/energy/plasmacutter))
|
||||
thermitemelt(user)
|
||||
return TRUE
|
||||
|
||||
|
||||
return FALSE
|
||||
|
||||
/turf/simulated/wall/proc/try_decon(obj/item/I, mob/user, params)
|
||||
if(iswelder(I))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
|
||||
@@ -247,6 +247,9 @@
|
||||
/turf/simulated/wall/mineral/titanium/nodecon/thermitemelt(mob/user as mob, speed)
|
||||
return
|
||||
|
||||
/turf/simulated/wall/mineral/titanium/nodecon/burn_down()
|
||||
return
|
||||
|
||||
/////////////////////Plastitanium walls/////////////////////
|
||||
|
||||
/turf/simulated/wall/mineral/plastitanium
|
||||
|
||||
@@ -282,6 +282,9 @@
|
||||
/turf/proc/Bless()
|
||||
flags |= NOJAUNT
|
||||
|
||||
/turf/proc/burn_down()
|
||||
return
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// Navigation procs
|
||||
// Used for A-star pathfinding
|
||||
|
||||
@@ -205,6 +205,18 @@
|
||||
taste_message = "motor oil"
|
||||
process_flags = ORGANIC | SYNTHETIC
|
||||
|
||||
/datum/reagent/oil/reaction_temperature(exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 600)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
holder.my_atom.visible_message("<b>The oil burns!</b>")
|
||||
fireflash(T, min(max(0, volume / 40), 8))
|
||||
var/datum/effect_system/smoke_spread/bad/BS = new
|
||||
BS.set_up(1, 0, T)
|
||||
BS.start()
|
||||
if(holder)
|
||||
holder.add_reagent("ash", round(volume * 0.5))
|
||||
holder.del_reagent(id)
|
||||
|
||||
/datum/reagent/oil/reaction_turf(turf/T, volume)
|
||||
if(volume >= 3 && !isspaceturf(T) && !locate(/obj/effect/decal/cleanable/blood/oil) in T)
|
||||
new /obj/effect/decal/cleanable/blood/oil(T)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/datum/reagent/consumable/drink/apple_pocalypse/on_mob_life(mob/living/M)
|
||||
if(prob(1))
|
||||
var/turf/simulated/T = get_turf(M)
|
||||
goonchem_vortex(T, 0, 2, 1)
|
||||
goonchem_vortex(T, 1, 0)
|
||||
to_chat(M, "<span class='notice'>You briefly feel super-massive, like a black hole. Probably just your imagination...</span>")
|
||||
..()
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
/datum/reagent/consumable/drink/grape_granade/on_mob_life(mob/living/M)
|
||||
if(prob(1))
|
||||
var/turf/simulated/T = get_turf(M)
|
||||
goonchem_vortex(T, 1, 1, 2)
|
||||
goonchem_vortex(T, 0, 0)
|
||||
M.emote("burp")
|
||||
to_chat(M, "<span class='notice'>You feel ready to burst! Oh wait, just a burp...</span>")
|
||||
else if(prob(25))
|
||||
|
||||
@@ -8,6 +8,43 @@
|
||||
drink_name = "Glass of welder fuel"
|
||||
drink_desc = "Unless you are an industrial tool, this is probably not safe for consumption."
|
||||
taste_message = "mistakes"
|
||||
var/max_radius = 7
|
||||
var/min_radius = 0
|
||||
var/volume_radius_modifier = -0.15
|
||||
var/volume_radius_multiplier = 0.09
|
||||
var/explosion_threshold = 100
|
||||
var/min_explosion_radius = 0
|
||||
var/max_explosion_radius = 4
|
||||
var/volume_explosion_radius_multiplier = 0.005
|
||||
var/volume_explosion_radius_modifier = 0
|
||||
var/combustion_temp = T0C + 200
|
||||
|
||||
/datum/reagent/fuel/reaction_temperature(exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > combustion_temp)
|
||||
if(volume < 1)
|
||||
if(holder)
|
||||
holder.del_reagent(id)
|
||||
return
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
var/radius = min(max(min_radius, volume * volume_radius_multiplier + volume_radius_modifier), max_radius)
|
||||
fireflash_sm(T, radius, 2200 + radius * 250, radius * 50)
|
||||
if(holder && volume >= explosion_threshold)
|
||||
if(holder.my_atom)
|
||||
holder.my_atom.visible_message("<span class='danger'>[holder.my_atom] explodes!</span>")
|
||||
message_admins("Fuel explosion ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
|
||||
log_game("Fuel explosion ([holder.my_atom], reagent type: [id]) at [COORD(holder.my_atom.loc)]. Last touched by: [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"].")
|
||||
holder.my_atom.investigate_log("A fuel explosion, last touched by [holder.my_atom.fingerprintslast ? "[holder.my_atom.fingerprintslast]" : "*null*"], triggered at [COORD(holder.my_atom.loc)].", INVESTIGATE_BOMB)
|
||||
var/boomrange = min(max(min_explosion_radius, round(volume * volume_explosion_radius_multiplier + volume_explosion_radius_modifier)), max_explosion_radius)
|
||||
explosion(T, -1, -1, boomrange, 1)
|
||||
if(holder)
|
||||
holder.del_reagent(id)
|
||||
|
||||
/datum/reagent/fuel/reaction_turf(turf/T, volume) //Don't spill the fuel, or you'll regret it
|
||||
if(isspaceturf(T))
|
||||
return
|
||||
if(!T.reagents)
|
||||
T.create_reagents(50)
|
||||
T.reagents.add_reagent("fuel", volume)
|
||||
|
||||
/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite!
|
||||
if(method == TOUCH)
|
||||
@@ -23,6 +60,12 @@
|
||||
color = "#7A2B94"
|
||||
taste_message = "corporate assets going to waste"
|
||||
|
||||
/datum/reagent/plasma/reaction_temperature(exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature >= T0C + 100)
|
||||
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
|
||||
if(holder)
|
||||
holder.del_reagent(id)
|
||||
|
||||
/datum/reagent/plasma/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
update_flags |= M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
@@ -48,11 +91,27 @@
|
||||
process_flags = ORGANIC | SYNTHETIC
|
||||
taste_message = "rust"
|
||||
|
||||
/datum/reagent/thermite/reaction_turf(turf/simulated/wall/W, volume)
|
||||
if(volume >= 5 && istype(W))
|
||||
W.thermite = 1
|
||||
W.overlays.Cut()
|
||||
W.overlays = image('icons/effects/effects.dmi', icon_state = "thermite")
|
||||
/datum/reagent/thermite/reaction_temperature(exposed_temperature, exposed_volume)
|
||||
var/turf/simulated/S = holder.my_atom
|
||||
if(!istype(S))
|
||||
return
|
||||
|
||||
if(exposed_temperature >= T0C + 100)
|
||||
var/datum/reagents/Holder = holder
|
||||
var/Id = id
|
||||
var/Volume = volume
|
||||
Holder.del_reagent(Id)
|
||||
fireflash_sm(S, 0, rand(20000, 25000) + Volume * 2500, 0, 0, 1)
|
||||
|
||||
/datum/reagent/thermite/reaction_turf(turf/simulated/S, volume)
|
||||
if(istype(S))
|
||||
if(!S.reagents)
|
||||
S.create_reagents(volume)
|
||||
S.reagents.add_reagent("thermite", volume)
|
||||
S.overlays.Cut()
|
||||
S.overlays = image('icons/effects/effects.dmi', icon_state = "thermite")
|
||||
if(S.active_hotspot)
|
||||
S.reagents.temperature_reagents(S.active_hotspot.temperature, S.active_hotspot.volume, 10, 300)
|
||||
|
||||
/datum/reagent/glycerol
|
||||
name = "Glycerol"
|
||||
@@ -87,21 +146,11 @@
|
||||
update_flags |= M.adjustFireLoss(burndmg, FALSE)
|
||||
return ..() | update_flags
|
||||
|
||||
/datum/reagent/clf3/reaction_turf(turf/simulated/T, volume)
|
||||
if(prob(1) && istype(T, /turf/simulated/floor/plating))
|
||||
var/turf/simulated/floor/plating/F = T
|
||||
F.ChangeTurf(/turf/space)
|
||||
if(istype(T, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = T
|
||||
if(prob(volume/10))
|
||||
F.make_plating()
|
||||
if(istype(F, /turf/simulated/floor))
|
||||
new /obj/effect/hotspot(F)
|
||||
if(prob(volume/10) && istype(T, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = T
|
||||
W.ChangeTurf(/turf/simulated/floor)
|
||||
if(istype(T, /turf/simulated/shuttle))
|
||||
new /obj/effect/hotspot(T)
|
||||
/datum/reagent/clf3/reaction_turf(turf/T, volume)
|
||||
if(volume < 3)
|
||||
return
|
||||
var/radius = min((volume - 3) * 0.15, 3)
|
||||
fireflash_sm(T, radius, 4500 + volume * 500, 350)
|
||||
|
||||
/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume)
|
||||
if(method == TOUCH)
|
||||
@@ -116,6 +165,15 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#FFA500"
|
||||
|
||||
/datum/reagent/sorium/reaction_turf(turf/T, volume) // oh no
|
||||
if(prob(75))
|
||||
return
|
||||
if(isspaceturf(T))
|
||||
return
|
||||
if(!T.reagents)
|
||||
T.create_reagents(50)
|
||||
T.reagents.add_reagent("sorium", 5)
|
||||
|
||||
/datum/reagent/sorium_vortex
|
||||
name = "sorium_vortex"
|
||||
id = "sorium_vortex"
|
||||
@@ -130,6 +188,15 @@
|
||||
color = "#800080"
|
||||
taste_message = "the end of the world"
|
||||
|
||||
/datum/reagent/liquid_dark_matter/reaction_turf(turf/T, volume) //Oh gosh, why
|
||||
if(prob(75))
|
||||
return
|
||||
if(isspaceturf(T))
|
||||
return
|
||||
if(!T.reagents)
|
||||
T.create_reagents(50)
|
||||
T.reagents.add_reagent("liquid_dark_matter", 5)
|
||||
|
||||
/datum/reagent/ldm_vortex
|
||||
name = "LDM Vortex"
|
||||
id = "ldm_vortex"
|
||||
@@ -292,6 +359,12 @@
|
||||
color = "#500064" // rgb: 80, 0, 100
|
||||
taste_message = "corporate assets going to waste"
|
||||
|
||||
/datum/reagent/plasma_dust/reaction_temperature(exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature >= T0C + 100)
|
||||
fireflash(get_turf(holder.my_atom), min(max(0, volume / 10), 8))
|
||||
if(holder)
|
||||
holder.del_reagent(id)
|
||||
|
||||
/datum/reagent/plasma_dust/on_mob_life(mob/living/M)
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
update_flags |= M.adjustToxLoss(3, FALSE)
|
||||
|
||||
@@ -65,17 +65,16 @@ var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(C, pick(NORTH,SOUTH,EAST,WEST))
|
||||
|
||||
/proc/goonchem_vortex(turf/simulated/T, setting_type, range, pull_times)
|
||||
for(var/atom/movable/X in orange(range, T))
|
||||
/proc/goonchem_vortex(turf/T, setting_type, volume)
|
||||
if(setting_type)
|
||||
playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this.
|
||||
else
|
||||
playsound(T, 'sound/effects/bang.ogg', 25, 1)
|
||||
for(var/atom/movable/X in view(2 + setting_type + (volume > 30 ? 1 : 0), T))
|
||||
if(istype(X, /obj/effect))
|
||||
continue //stop pulling smoke and hotspots please
|
||||
if(istype(X, /atom/movable))
|
||||
if((X) && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT)
|
||||
if(setting_type)
|
||||
playsound(T, 'sound/effects/bang.ogg', 25, 1)
|
||||
for(var/i = 0, i < pull_times, i++)
|
||||
step_away(X,T)
|
||||
else
|
||||
playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this.
|
||||
for(var/i = 0, i < pull_times, i++)
|
||||
step_towards(X,T)
|
||||
if(X && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT)
|
||||
if(setting_type)
|
||||
X.throw_at(T, 20 + round(volume * 2), 1 + round(volume / 10))
|
||||
else
|
||||
X.throw_at(get_edge_target_turf(T, get_dir(T, X)), 20 + round(volume * 2), 1 + round(volume / 10))
|
||||
@@ -19,9 +19,8 @@
|
||||
|
||||
/datum/chemical_reaction/crank/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
for(var/turf/turf in range(1,T))
|
||||
new /obj/effect/hotspot(turf)
|
||||
explosion(T,0,0,2)
|
||||
fireflash(holder.my_atom, 1)
|
||||
explosion(T, 0, 0, 2)
|
||||
|
||||
/datum/chemical_reaction/krokodil
|
||||
name = "Krokodil"
|
||||
|
||||
@@ -171,16 +171,6 @@
|
||||
mix_message = "The mixture bubbles and gives off an unpleasant medicinal odor."
|
||||
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
|
||||
|
||||
/datum/chemical_reaction/ash
|
||||
name = "Ash"
|
||||
id = "ash"
|
||||
result = "ash"
|
||||
required_reagents = list("oil" = 1)
|
||||
result_amount = 0.5
|
||||
min_temp = T0C + 600
|
||||
mix_sound = null
|
||||
no_message = 1
|
||||
|
||||
/datum/chemical_reaction/colorful_reagent
|
||||
name = "colorful_reagent"
|
||||
id = "colorful_reagent"
|
||||
|
||||
@@ -83,9 +83,7 @@
|
||||
min_temp = T0C + 150
|
||||
|
||||
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
for(var/turf/turf in range(1,T))
|
||||
new /obj/effect/hotspot(turf)
|
||||
fireflash(holder.my_atom, 1, 7000)
|
||||
|
||||
/datum/chemical_reaction/sorium
|
||||
name = "Sorium"
|
||||
@@ -98,7 +96,7 @@
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1))
|
||||
goonchem_vortex(T, 0, created_volume)
|
||||
holder.remove_reagent("sorium", created_volume)
|
||||
|
||||
/datum/chemical_reaction/sorium_vortex
|
||||
@@ -111,7 +109,7 @@
|
||||
|
||||
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1))
|
||||
goonchem_vortex(T, 0, created_volume)
|
||||
holder.remove_reagent("sorium_vortex", created_volume)
|
||||
|
||||
/datum/chemical_reaction/liquid_dark_matter
|
||||
@@ -125,7 +123,7 @@
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1))
|
||||
goonchem_vortex(T, 1, created_volume)
|
||||
holder.remove_reagent("liquid_dark_matter", created_volume)
|
||||
|
||||
/datum/chemical_reaction/ldm_vortex
|
||||
@@ -138,7 +136,7 @@
|
||||
|
||||
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1))
|
||||
goonchem_vortex(T, 1, created_volume)
|
||||
holder.remove_reagent("ldm_vortex", created_volume)
|
||||
|
||||
/datum/chemical_reaction/blackpowder
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
..()
|
||||
|
||||
/obj/structure/reagent_dispensers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(reagents)
|
||||
for(var/i in 1 to 8)
|
||||
reagents.temperature_reagents(exposed_temperature, exposed_volume)
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>[src] ruptures!</span>")
|
||||
chem_splash(loc, 5, list(reagents))
|
||||
@@ -68,6 +74,7 @@
|
||||
desc = "A tank full of industrial welding fuel. Do not consume."
|
||||
icon_state = "fuel"
|
||||
reagent_id = "fuel"
|
||||
tank_volume = 4000
|
||||
var/obj/item/assembly_holder/rig = null
|
||||
var/accepts_rig = 1
|
||||
|
||||
@@ -85,13 +92,13 @@
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/boom(var/rigtrigger = FALSE) // Prevent case where someone who rigged the tank is blamed for the explosion when the rig isn't what triggered the explosion
|
||||
if(reagents.has_reagent("fuel"))
|
||||
if(rigtrigger == TRUE) // If the explosion is triggered by an assembly holder
|
||||
message_admins("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank
|
||||
log_game("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]")
|
||||
investigate_log("A fueltank, last rigged by [lastrigger], exploded at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
explosion(loc, 0, 1, 5, 7, 10, flame_range = 5)
|
||||
qdel(src)
|
||||
if(rigtrigger == TRUE) // If the explosion is triggered by an assembly holder
|
||||
message_admins("A fueltank, last rigged by [lastrigger], was triggered at [COORD(loc)]") // Then admin is informed of the last person who rigged the fuel tank
|
||||
log_game("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]")
|
||||
investigate_log("A fueltank, last rigged by [lastrigger], triggered at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
if(reagents)
|
||||
reagents.set_reagent_temp(1000) //uh-oh
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/blob_act()
|
||||
boom()
|
||||
@@ -168,7 +175,7 @@
|
||||
investigate_log("[key_name(user)] triggered a fueltank explosion at [COORD(loc)]", INVESTIGATE_BOMB)
|
||||
boom()
|
||||
else
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/Move()
|
||||
..()
|
||||
@@ -296,3 +303,4 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
accepts_rig = 0
|
||||
tank_volume = 1000
|
||||
|
||||
Reference in New Issue
Block a user