Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -9,6 +9,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
/obj/effect/particle_effect
|
||||
name = "particle effect"
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So effects are not targeted by alien acid.
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/particle_effect/New()
|
||||
|
||||
@@ -48,11 +48,6 @@
|
||||
var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles()
|
||||
P.set_up(10, 0, location)
|
||||
P.start()
|
||||
|
||||
/datum/effect_system/explosion/smoke
|
||||
|
||||
/datum/effect_system/explosion/smoke/start()
|
||||
..()
|
||||
spawn(5)
|
||||
var/datum/effect_system/smoke_spread/S = new
|
||||
S.set_up(2, location)
|
||||
|
||||
@@ -7,13 +7,12 @@
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = WALL_OBJ_LAYER
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/amount = 3
|
||||
animate_movement = 0
|
||||
var/metal = 0
|
||||
var/lifetime = 40
|
||||
var/reagent_divisor = 7
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/metal
|
||||
@@ -40,11 +39,10 @@
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/kill_foam()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
switch(metal)
|
||||
if(1)
|
||||
new /obj/structure/foamedmetal(src.loc)
|
||||
if(2)
|
||||
new /obj/structure/foamedmetal/iron(src.loc)
|
||||
if(metal)
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
@@ -54,24 +52,18 @@
|
||||
kill_foam()
|
||||
return
|
||||
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
var/fraction = 1/initial(lifetime)
|
||||
for(var/obj/O in range(0,src))
|
||||
if(O.type == src.type)
|
||||
continue
|
||||
if(isturf(O.loc))
|
||||
var/turf/T = O.loc
|
||||
if(T.intact && O.level == 1) //hidden under the floor
|
||||
continue
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(O, VAPOR, fraction)
|
||||
reagents.reaction(O, VAPOR, fraction)
|
||||
var/hit = 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
hit += foam_mob(L)
|
||||
if(hit)
|
||||
lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate.
|
||||
var/T = get_turf(src)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(T, VAPOR, fraction)
|
||||
reagents.reaction(T, VAPOR, fraction)
|
||||
|
||||
if(--amount < 0)
|
||||
return
|
||||
@@ -82,9 +74,8 @@
|
||||
return 0
|
||||
if(!istype(L))
|
||||
return 0
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.reaction(L, VAPOR, fraction)
|
||||
var/fraction = 1/initial(lifetime)
|
||||
reagents.reaction(L, VAPOR, fraction)
|
||||
lifetime--
|
||||
return 1
|
||||
|
||||
@@ -109,7 +100,7 @@
|
||||
var/obj/effect/particle_effect/foam/F = PoolOrNew(src.type, T)
|
||||
F.amount = amount
|
||||
reagents.copy_to(F, (reagents.total_volume))
|
||||
F.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
F.color = color
|
||||
F.metal = metal
|
||||
|
||||
|
||||
@@ -148,7 +139,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null)
|
||||
if(isturf(loca))
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
@@ -168,7 +159,7 @@
|
||||
var/obj/effect/particle_effect/foam/F = PoolOrNew(effect_type, location)
|
||||
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount)
|
||||
F.add_atom_colour(foamcolor, FIXED_COLOUR_PRIORITY)
|
||||
F.color = foamcolor
|
||||
F.amount = amount
|
||||
F.metal = metal
|
||||
|
||||
@@ -181,13 +172,11 @@
|
||||
density = 1
|
||||
opacity = 1 // changed in New()
|
||||
anchored = 1
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
unacidable = 1
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
gender = PLURAL
|
||||
obj_integrity = 20
|
||||
max_integrity = 20
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
var/metal = 1 // 1=aluminium, 2=iron
|
||||
|
||||
/obj/structure/foamedmetal/New()
|
||||
..()
|
||||
@@ -199,27 +188,96 @@
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/proc/updateicon()
|
||||
if(metal == 1)
|
||||
icon_state = "metalfoam"
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/ex_act(severity, target)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/blob_act(obj/effect/blob/B)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/bullet_act()
|
||||
..()
|
||||
if(metal==1 || prob(50))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
|
||||
/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(user.environment_smash >= 1)
|
||||
user.do_attack_animation(src)
|
||||
user << "<span class='notice'>You smash apart the foam wall.</span>"
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hulk(mob/living/carbon/human/user)
|
||||
..(user, 1)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(prob(75 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the metal foam wall!</span>")
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(prob(75 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the metal foam wall!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_slime(mob/living/simple_animal/slime/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(!user.is_adult)
|
||||
attack_hand(user)
|
||||
return
|
||||
if(prob(75 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the metal foam wall!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
user.do_attack_animation(src)
|
||||
user << "<span class='warning'>You hit the metal foam but bounce off it!</span>"
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/attacked_by(obj/item/I, mob/living/user)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) //the item attack sound is muffled by the foam.
|
||||
if(prob(I.force*20 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the foamed metal with \the [I]!</span>")
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You hit the metal foam to no effect!</span>"
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
return !density
|
||||
|
||||
/obj/structure/foamedmetal/iron
|
||||
obj_integrity = 50
|
||||
max_integrity = 50
|
||||
icon_state = "ironfoam"
|
||||
|
||||
/obj/structure/foamedmetal/CanAtmosPass()
|
||||
return !density
|
||||
|
||||
@@ -53,14 +53,8 @@
|
||||
icon_state = "ion_trails"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/particle_effect/ion_trails/flight
|
||||
icon_state = "ion_trails_flight"
|
||||
|
||||
/datum/effect_system/trail_follow/ion
|
||||
effect_type = /obj/effect/particle_effect/ion_trails
|
||||
var/fadetype = "ion_fade"
|
||||
var/fade = 1
|
||||
var/nograv_required = 1
|
||||
|
||||
/datum/effect_system/trail_follow/ion/start() //Whoever is responsible for this abomination of code should become an hero
|
||||
if(!on)
|
||||
@@ -72,12 +66,11 @@
|
||||
processing = 0
|
||||
var/turf/T = get_turf(holder)
|
||||
if(T != oldposition)
|
||||
if(!T.has_gravity() || !nograv_required)
|
||||
if(!has_gravity(T))
|
||||
var/obj/effect/particle_effect/ion_trails/I = PoolOrNew(effect_type, oldposition)
|
||||
set_dir(I)
|
||||
if(fade)
|
||||
flick(fadetype, I)
|
||||
I.icon_state = ""
|
||||
I.setDir(holder.dir)
|
||||
flick("ion_fade", I)
|
||||
I.icon_state = ""
|
||||
spawn(20)
|
||||
qdel(I)
|
||||
oldposition = T
|
||||
@@ -86,18 +79,7 @@
|
||||
processing = 1
|
||||
start()
|
||||
|
||||
/datum/effect_system/trail_follow/ion/proc/set_dir(obj/effect/particle_effect/ion_trails/I)
|
||||
I.setDir(holder.dir)
|
||||
|
||||
/datum/effect_system/trail_follow/ion/flight
|
||||
effect_type = /obj/effect/particle_effect/ion_trails/flight
|
||||
fadetype = "ion_fade_flight"
|
||||
nograv_required = 0
|
||||
|
||||
/datum/effect_system/trail_follow/ion/flight/set_dir(obj/effect/particle_effect/ion_trails/I)
|
||||
if(istype(holder, /obj/item/device/flightpack))
|
||||
var/obj/item/device/flightpack/F = holder
|
||||
I.setDir(F.suit.user.dir)
|
||||
|
||||
|
||||
//Reagent-based explosion effect
|
||||
@@ -123,7 +105,7 @@
|
||||
if(explosion_message)
|
||||
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
|
||||
"<span class='italics'>You hear an explosion!</span>")
|
||||
if (amount < 1)
|
||||
if (amount <= 2)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
@@ -134,4 +116,22 @@
|
||||
M.Weaken(rand(1,5))
|
||||
return
|
||||
else
|
||||
dyn_explosion(location, amount, flashing_factor)
|
||||
var/devastation = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if (round(amount/12) > 0)
|
||||
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
|
||||
|
||||
if (round(amount/6) > 0)
|
||||
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
|
||||
|
||||
if (round(amount/3) > 0)
|
||||
light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3))
|
||||
|
||||
if (flashing && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
explosion(location, devastation, heavy, light, flash)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
opacity = 0
|
||||
layer = FLY_LAYER
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
animate_movement = 0
|
||||
@@ -26,8 +25,6 @@
|
||||
var/step = alpha / frames
|
||||
for(var/i = 0, i < frames, i++)
|
||||
alpha -= step
|
||||
if(alpha < 160)
|
||||
opacity = 0 //if we were blocking view, we aren't now because we're fading out
|
||||
stoplag()
|
||||
|
||||
/obj/effect/particle_effect/smoke/New()
|
||||
@@ -64,7 +61,7 @@
|
||||
if(C.smoke_delay)
|
||||
return 0
|
||||
C.smoke_delay++
|
||||
addtimer(src, "remove_smoke_delay", 10, TIMER_NORMAL, C)
|
||||
addtimer(src, "remove_smoke_delay", 10, FALSE, C)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
|
||||
@@ -84,7 +81,7 @@
|
||||
reagents.copy_to(S, reagents.total_volume)
|
||||
S.setDir(pick(cardinal))
|
||||
S.amount = amount-1
|
||||
S.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
S.color = color
|
||||
S.lifetime = lifetime
|
||||
if(S.amount>0)
|
||||
if(opaque)
|
||||
@@ -157,7 +154,7 @@
|
||||
var/blast = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
|
||||
if(isopenturf(A))
|
||||
if(istype(A,/turf/open))
|
||||
var/turf/open/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
@@ -227,8 +224,6 @@
|
||||
for(var/atom/movable/AM in T)
|
||||
if(AM.type == src.type)
|
||||
continue
|
||||
if(T.intact && AM.level == 1) //hidden under the floor
|
||||
continue
|
||||
reagents.reaction(AM, TOUCH, fraction)
|
||||
|
||||
reagents.reaction(T, TOUCH, fraction)
|
||||
@@ -266,7 +261,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = 0)
|
||||
if(isturf(loca))
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
@@ -289,15 +284,15 @@
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) "
|
||||
message_admins("Smoke: ([whereLink])[contained]. Key: [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
message_admins("Smoke: ([whereLink])[contained]. No associated key.", 0, 1)
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/start()
|
||||
var/mixcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location)
|
||||
@@ -305,20 +300,9 @@
|
||||
if(chemholder.reagents.total_volume > 1) // can't split 1 very well
|
||||
chemholder.reagents.copy_to(S, chemholder.reagents.total_volume)
|
||||
|
||||
if(mixcolor)
|
||||
S.add_atom_colour(mixcolor, FIXED_COLOUR_PRIORITY) // give the smoke color, if it has any to begin with
|
||||
if(color)
|
||||
S.color = color // give the smoke color, if it has any to begin with
|
||||
S.amount = amount
|
||||
if(S.amount)
|
||||
S.spread_smoke() //calling process right now so the smoke immediately attacks mobs.
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Transparent smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
//Same as the base type, but the smoke produced is not opaque
|
||||
/datum/effect_system/smoke_spread/transparent
|
||||
effect_type = /obj/effect/particle_effect/smoke/transparent
|
||||
|
||||
/obj/effect/particle_effect/smoke/transparent
|
||||
opaque = FALSE
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
..()
|
||||
flick("sparks", src) // replay the animation
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
var/turf/T = loc
|
||||
if(isturf(T))
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000,100)
|
||||
QDEL_IN(src, 20)
|
||||
|
||||
/obj/effect/particle_effect/sparks/Destroy()
|
||||
var/turf/T = loc
|
||||
if(isturf(T))
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000,100)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/sparks/Move()
|
||||
..()
|
||||
var/turf/T = loc
|
||||
var/turf/T = src.loc
|
||||
if(isturf(T))
|
||||
T.hotspot_expose(1000,100)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user