mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Smoke spells readability (#19387)
* read the smoke * oops * contra * contra * more tidying * last one * Update code/modules/projectiles/projectile/magic.dm Co-authored-by: Farie82 <farie82@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
@@ -34,15 +34,10 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
location = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/proc/set_up(n = 3, c = 0, loca)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
/datum/effect_system/proc/set_up(amount = 3, only_cardinals = FALSE, source)
|
||||
number = clamp(amount, amount, 10)
|
||||
cardinals = only_cardinals
|
||||
location = get_turf(source)
|
||||
|
||||
/datum/effect_system/proc/attach(atom/atom)
|
||||
holder = atom
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
/datum/effect_system/explosion/smoke/proc/create_smoke()
|
||||
var/datum/effect_system/smoke_spread/S = new
|
||||
S.set_up(5,0,location,null)
|
||||
S.set_up(5, FALSE, location, null)
|
||||
S.start()
|
||||
|
||||
/datum/effect_system/explosion/smoke/start()
|
||||
|
||||
@@ -78,17 +78,12 @@
|
||||
effect_type = /obj/effect/particle_effect/smoke
|
||||
var/direction
|
||||
|
||||
/datum/effect_system/smoke_spread/set_up(n = 5, c = 0, loca, direct)
|
||||
if(n > 20)
|
||||
n = 20
|
||||
number = n
|
||||
cardinals = c
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
if(direct)
|
||||
direction = direct
|
||||
/datum/effect_system/smoke_spread/set_up(amount = 5, only_cardinals = FALSE, source, desired_direction)
|
||||
number = clamp(amount, amount, 20)
|
||||
cardinals = only_cardinals
|
||||
location = get_turf(source)
|
||||
if(desired_direction)
|
||||
direction = desired_direction
|
||||
|
||||
/datum/effect_system/smoke_spread/start()
|
||||
for(var/i=0, i<number, i++)
|
||||
@@ -176,7 +171,7 @@
|
||||
for(var/obj/item/Item in T)
|
||||
Item.extinguish()
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/set_up(n = 5, c = 0, loca, direct, blasting = 0)
|
||||
/datum/effect_system/smoke_spread/freezing/set_up(amount = 5, only_cardinals = FALSE, source, desired_direction, blasting = 0)
|
||||
..()
|
||||
blast = blasting
|
||||
|
||||
|
||||
@@ -146,11 +146,11 @@
|
||||
|
||||
if(entersmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, src, 0)
|
||||
s.set_up(4, TRUE, src, 0)
|
||||
s.start()
|
||||
if(exitsmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, dest, 0)
|
||||
s.set_up(4, TRUE, dest, 0)
|
||||
s.start()
|
||||
|
||||
uses--
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
return
|
||||
reagents.remove_reagent(25,"water")
|
||||
var/datum/effect_system/smoke_spread/bad/smoke = new
|
||||
smoke.set_up(5, 0, user.loc)
|
||||
smoke.set_up(5, FALSE, user)
|
||||
smoke.start()
|
||||
playsound(user.loc, 'sound/effects/bamf.ogg', 50, 2)
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
/obj/item/dice/d20/fate/proc/create_smoke(amount)
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(amount, 0, drop_location())
|
||||
smoke.set_up(amount, FALSE, drop_location())
|
||||
smoke.start()
|
||||
|
||||
/obj/item/dice/d20/fate/proc/effect(mob/living/carbon/human/user, roll)
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
location = get_turf(src)
|
||||
if(location)
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(8,0, location, aim_dir)
|
||||
smoke.set_up(8, FALSE, location, aim_dir)
|
||||
if(target && target.density)
|
||||
var/turf/T = get_step(location, aim_dir)
|
||||
for(var/turf/simulated/wall/W in range(1, location))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/item/grenade/smokebomb/prime()
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
smoke.set_up(10, 0)
|
||||
smoke.set_up(10, FALSE)
|
||||
spawn(0)
|
||||
src.smoke.start()
|
||||
sleep(10)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
return
|
||||
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(5, 0, get_turf(user))
|
||||
smoke.set_up(5, FALSE, get_turf(user))
|
||||
smoke.attach(user)
|
||||
smoke.start()
|
||||
var/list/L = list()
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
/obj/effect/nanofrost_container/proc/Smoke()
|
||||
var/datum/effect_system/smoke_spread/freezing/S = new
|
||||
S.set_up(6, 0, loc, null, 1)
|
||||
S.set_up(6, FALSE, loc, null, 1)
|
||||
S.start()
|
||||
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
|
||||
F.color = "#B2FFFF"
|
||||
|
||||
Reference in New Issue
Block a user