mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Refactors effect_system (#94999)
## About The Pull Request This PR refactors ``effect_system``s to be a bit easier to use by getting rid of ``set_up``, allowing ``attach()`` to be chained into ``start()`` and refactoring most direct system usages in our code to use helper procs. ``set_up`` was unnecessary and only existed to allow ``New``'s behavior to be fully overriden, which is not required if we split sparks/lightning/steam into a new ``/datum/effect_system/basic`` subtype which houses the effect spreading behavior. This allows us to roll all logic from ``set_up`` into ``New`` and cut down on code complexity. Chaining setup as ``system.attach(src).start()`` also helps a bit in case no helper method exists I've added ``do_chem_smoke`` and ``do_foam`` helpers, which respectively allow chemical smoke or foam to be spawned easily without having to manually create effect datums and reagent holders. Also turns out we've had some nonfunctional effect systems which either never set themselves up, or never started, so I fixed those while I was at it (mostly by moving them to aforementioned helper procs) ## Why It's Good For The Game Cleaner code, makes it significantly easier for users to work with. Also most of our effect system usage was copypasta which was passing booleans as numbers, while perfectly fine helper procs existed in our code. ## Changelog 🆑 refactor: Refactored sparks, foam, smoke, and other miscellaneous effect systems. refactor: Vapes now have consistent rigging with cigs using the new system. fix: Fixed some effects never working. /🆑
This commit is contained in:
@@ -86,8 +86,7 @@
|
||||
/datum/reagents/proc/create_foam(foamtype, foam_volume, result_type = null, notification = null, log = FALSE)
|
||||
var/location = get_turf(my_atom)
|
||||
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new foamtype()
|
||||
foam.set_up(amount = foam_volume, holder = my_atom, location = location, carry = src, result_type = result_type)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new foamtype(location, null, foam_volume, my_atom, carry = src, result_type)
|
||||
foam.start(log = log)
|
||||
|
||||
clear_reagents()
|
||||
|
||||
@@ -383,13 +383,11 @@ ADMIN_VERB(check_bomb_impacts, R_DEBUG, "Check Bomb Impact", "See what the effec
|
||||
shake_the_room(epicenter, orig_max_distance, far_dist, devastation_range, heavy_impact_range)
|
||||
|
||||
if(heavy_impact_range > 1)
|
||||
var/datum/effect_system/explosion/E
|
||||
if(smoke)
|
||||
E = new /datum/effect_system/explosion/smoke
|
||||
else
|
||||
E = new
|
||||
E.set_up(epicenter)
|
||||
E.start()
|
||||
var/effect_type = /datum/effect_system/explosion
|
||||
if (smoke)
|
||||
effect_type = /datum/effect_system/explosion/smoke
|
||||
var/datum/effect_system/explosion/system = new effect_type(epicenter)
|
||||
system.start()
|
||||
|
||||
//flash mobs
|
||||
if(flash_range)
|
||||
|
||||
@@ -116,10 +116,7 @@ SUBSYSTEM_DEF(market)
|
||||
return
|
||||
var/atom/movable/thing = purchase.entry.spawn_item(target, purchase)
|
||||
purchase.post_purchase_effects(thing)
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(5, 1, target)
|
||||
sparks.attach(thing)
|
||||
sparks.start()
|
||||
do_sparks(5, TRUE, target)
|
||||
qdel(purchase)
|
||||
|
||||
/// Used to add /datum/market_purchase to queued_purchases var. Returns TRUE when queued.
|
||||
|
||||
@@ -94,9 +94,8 @@
|
||||
/datum/component/jetpack/proc/setup_trail(mob/user)
|
||||
if(trail)
|
||||
QDEL_NULL(trail)
|
||||
trail = new effect_type
|
||||
trail = new effect_type(user)
|
||||
trail.auto_process = FALSE
|
||||
trail.set_up(user)
|
||||
trail.start()
|
||||
|
||||
/datum/component/jetpack/proc/activate(datum/source, mob/new_user)
|
||||
|
||||
@@ -97,8 +97,7 @@
|
||||
///called to remove the element in a flavorful way, either from delivery or from emagging/breaking open the crate
|
||||
/datum/element/deliver_first/proc/remove_lock(obj/structure/closet/target)
|
||||
target.visible_message(span_notice("[target]'s delivery lock self destructs, spewing sparks from the mechanism!"))
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(4, 0, target.loc)
|
||||
var/datum/effect_system/basic/spark_spread/spark_system = new(target.loc, 4, 0)
|
||||
spark_system.start()
|
||||
playsound(src, SFX_SPARKS, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
target.RemoveElement(/datum/element/deliver_first, goal_area_type, payment)
|
||||
|
||||
@@ -46,8 +46,7 @@
|
||||
|
||||
// if effects are not specified and not explicitly disabled, sparks
|
||||
if((!effectin || !effectout) && !no_effects)
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(5, 1, teleatom)
|
||||
var/datum/effect_system/basic/spark_spread/sparks = new(teleatom, 5, TRUE)
|
||||
if (!effectin)
|
||||
effectin = sparks
|
||||
if (!effectout)
|
||||
@@ -55,8 +54,7 @@
|
||||
if(TELEPORT_CHANNEL_QUANTUM)
|
||||
// if effects are not specified and not explicitly disabled, rainbow sparks
|
||||
if ((!effectin || !effectout) && !no_effects)
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new
|
||||
sparks.set_up(5, 1, teleatom)
|
||||
var/datum/effect_system/basic/spark_spread/quantum/sparks = new(teleatom, 5, TRUE)
|
||||
if (!effectin)
|
||||
effectin = sparks
|
||||
if (!effectout)
|
||||
@@ -127,8 +125,7 @@
|
||||
if(sound)
|
||||
playsound(location, sound, 60, TRUE)
|
||||
if(effect)
|
||||
effect.attach(location)
|
||||
effect.start()
|
||||
effect.attach(location).start()
|
||||
|
||||
/**
|
||||
* Attempts to find a "safe" floor turf within some given z-levels
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
if(!COOLDOWN_FINISHED(src, foam_cooldown))
|
||||
to_chat(user, span_warning("[src] cannot be activated for <b>[DisplayTimeText(COOLDOWN_TIMELEFT(src, foam_cooldown))]</b>!"))
|
||||
return
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(4, holder = src, location = loc)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new(loc, 4, holder = src)
|
||||
foam.start()
|
||||
uses--
|
||||
to_chat(user, span_notice("You activate [src]. It now has <b>[uses]</b> uses of foam remaining."))
|
||||
|
||||
@@ -518,9 +518,7 @@
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
do_sparks(5, TRUE, src)
|
||||
return electrocute_mob(user, get_area(src), src, 0.7, TRUE)
|
||||
|
||||
/**
|
||||
|
||||
@@ -155,9 +155,7 @@
|
||||
var/turf/T = get_turf(drone)
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] detonated [key_name_admin(drone)] at [ADMIN_VERBOSEJMP(T)]!")
|
||||
log_silicon("[key_name(usr)] detonated [key_name(drone)]!")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, TRUE, drone)
|
||||
s.start()
|
||||
do_sparks(3, TRUE< drone)
|
||||
drone.visible_message(span_danger("\the [drone] self-destructs!"))
|
||||
drone.investigate_log("has been gibbed by a robotics console.", INVESTIGATE_DEATHS)
|
||||
drone.gib()
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
var/safe = TRUE
|
||||
///whether the door is bolted or not.
|
||||
var/locked = FALSE
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
///ignore this, just use explosion_block
|
||||
var/real_explosion_block
|
||||
///if TRUE, this door will always open on red alert
|
||||
@@ -120,8 +120,7 @@
|
||||
GLOB.elevator_doors += src
|
||||
else
|
||||
stack_trace("Elevator door [src] ([x],[y],[z]) has no linked elevator ID!")
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(2, 1, src)
|
||||
spark_system = new(src, 2, TRUE)
|
||||
if(density)
|
||||
flags_1 |= PREVENT_CLICK_UNDER_1
|
||||
else
|
||||
@@ -178,9 +177,7 @@
|
||||
/obj/machinery/door/Destroy()
|
||||
if(elevator_mode)
|
||||
GLOB.elevator_doors -= src
|
||||
if(spark_system)
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
QDEL_NULL(spark_system)
|
||||
QDEL_NULL(filler)
|
||||
air_update_turf(TRUE, FALSE)
|
||||
return ..()
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
var/id = null
|
||||
var/disable = 0
|
||||
var/last_spark = 0
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
|
||||
MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/sparker, 26)
|
||||
|
||||
@@ -160,8 +160,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/sparker, 26)
|
||||
|
||||
/obj/machinery/sparker/Initialize(mapload)
|
||||
. = ..()
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(2, 1, src)
|
||||
spark_system = new(2, TRUE, src)
|
||||
spark_system.attach(src)
|
||||
register_context()
|
||||
if(mapload)
|
||||
|
||||
@@ -184,9 +184,7 @@
|
||||
|
||||
if(!hidden)
|
||||
playsound(target, 'sound/items/weapons/flash.ogg', 25, TRUE)
|
||||
var/datum/effect_system/spark_spread/quantum/spark_system = new /datum/effect_system/spark_spread/quantum()
|
||||
spark_system.set_up(5, TRUE, target)
|
||||
spark_system.start()
|
||||
do_sparks(5, TRUE, target, spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
|
||||
sleep(teleport_speed)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ DEFINE_BITFIELD(turret_flags, list(
|
||||
/// Determines if our projectiles hit our faction
|
||||
var/ignore_faction = FALSE
|
||||
/// The spark system, used for generating... sparks?
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
/// The turret will try to shoot from a turf in that direction when in a wall
|
||||
var/wall_turret_direction
|
||||
/// If the turret is manually controlled
|
||||
@@ -124,11 +124,9 @@ DEFINE_BITFIELD(turret_flags, list(
|
||||
if(!base)
|
||||
base = src
|
||||
update_appearance()
|
||||
//Sets up a spark system
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
// Sets up a spark system
|
||||
spark_system = new(src, 5, FALSE)
|
||||
spark_system.attach(src)
|
||||
|
||||
tracker = new(src, scan_range)
|
||||
tracker.recalculate_field(full_recalc = TRUE) // manually call this so that our tracker var is set before we set anything up
|
||||
setup()
|
||||
|
||||
@@ -116,9 +116,7 @@
|
||||
doteleport(user, target_pad)
|
||||
|
||||
/obj/machinery/quantumpad/proc/sparks()
|
||||
var/datum/effect_system/spark_spread/quantum/s = new /datum/effect_system/spark_spread/quantum
|
||||
s.set_up(5, 1, get_turf(src))
|
||||
s.start()
|
||||
do_sparks(5, TRUE, src, spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
|
||||
/obj/machinery/quantumpad/attack_ghost(mob/dead/observer/ghost)
|
||||
. = ..()
|
||||
|
||||
@@ -149,8 +149,7 @@
|
||||
if(obj_flags & EMAGGED)
|
||||
return FALSE
|
||||
obj_flags |= EMAGGED
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(4, 0, src.loc)
|
||||
var/datum/effect_system/basic/spark_spread/spark_system = new(src.loc, 4, 0)
|
||||
spark_system.start()
|
||||
playsound(src, SFX_SPARKS, 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
balloon_alert(user, "machine rigged")
|
||||
|
||||
@@ -507,9 +507,7 @@
|
||||
if(uv_super)
|
||||
visible_message(span_warning("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber."))
|
||||
playsound(src, 'sound/machines/airlock/airlock_alien_prying.ogg', 50, TRUE)
|
||||
var/datum/effect_system/fluid_spread/smoke/bad/black/smoke = new
|
||||
smoke.set_up(0, holder = src, location = src)
|
||||
smoke.start()
|
||||
do_smoke(0, src, src, smoke_type = /datum/effect_system/fluid_spread/smoke/bad/black)
|
||||
QDEL_NULL(helmet)
|
||||
QDEL_NULL(suit)
|
||||
QDEL_NULL(mask)
|
||||
@@ -568,12 +566,11 @@
|
||||
charge_cell(charge_per_item, cell, grid_only = TRUE)
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/shock(mob/user, prb)
|
||||
if(!prob(prb))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if(electrocute_mob(user, src, src, 1, TRUE))
|
||||
return 1
|
||||
if(prob(prb))
|
||||
return
|
||||
do_sparks(5, TRUE, src)
|
||||
if(electrocute_mob(user, src, src, 1, TRUE))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/suit_storage_unit/relaymove(mob/living/user, direction)
|
||||
if(locked)
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
/// Server linked to.
|
||||
var/obj/machinery/telecomms/message_server/linked_server = null
|
||||
/// Sparks effect - For emag
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
/// Computer properties.
|
||||
/// 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message
|
||||
var/screen = MSG_MON_SCREEN_MAIN
|
||||
@@ -34,7 +32,6 @@
|
||||
|
||||
/obj/machinery/computer/message_monitor/Initialize(mapload)
|
||||
..()
|
||||
spark_system = new
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/computer/message_monitor/post_machine_initialize()
|
||||
@@ -69,22 +66,21 @@
|
||||
/obj/machinery/computer/message_monitor/emag_act(mob/user, obj/item/card/emag/emag_card)
|
||||
if(obj_flags & EMAGGED)
|
||||
return FALSE
|
||||
if(!isnull(linked_server))
|
||||
obj_flags |= EMAGGED
|
||||
screen = MSG_MON_SCREEN_HACKED
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.start()
|
||||
var/obj/item/paper/monitorkey/monitor_key_paper = new(loc, linked_server)
|
||||
// Will help make emagging the console not so easy to get away with.
|
||||
monitor_key_paper.add_raw_text("<br><br><font color='red'>£%@%(*$%&(£&?*(%&£/{}</font>")
|
||||
var/time = 100 * length(linked_server.decryptkey)
|
||||
addtimer(CALLBACK(src, PROC_REF(unemag_console)), time)
|
||||
error_message = "%$&(£: Critical %$$@ Error // !RestArting! <lOadiNg backUp iNput ouTput> - ?pLeaSe wAit!"
|
||||
linked_server.toggled = FALSE
|
||||
return TRUE
|
||||
else
|
||||
if(isnull(linked_server))
|
||||
to_chat(user, span_notice("A no server error appears on the screen."))
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
obj_flags |= EMAGGED
|
||||
screen = MSG_MON_SCREEN_HACKED
|
||||
do_sparks(5, FALSE, src)
|
||||
var/obj/item/paper/monitorkey/monitor_key_paper = new(loc, linked_server)
|
||||
// Will help make emagging the console not so easy to get away with.
|
||||
monitor_key_paper.add_raw_text("<br><br><font color='red'>£%@%(*$%&(£&?*(%&£/{}</font>")
|
||||
var/time = 100 * length(linked_server.decryptkey)
|
||||
addtimer(CALLBACK(src, PROC_REF(unemag_console)), time)
|
||||
error_message = "%$&(£: Critical %$$@ Error // !RestArting! <lOadiNg backUp iNput ouTput> - ?pLeaSe wAit!"
|
||||
linked_server.toggled = FALSE
|
||||
return TRUE
|
||||
|
||||
/// Remove the emag effect from the console
|
||||
/obj/machinery/computer/message_monitor/proc/unemag_console()
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
if (prob(40))
|
||||
new /obj/effect/decal/cleanable/blood/splatter(loc, null, GET_ATOM_BLOOD_DNA(src))
|
||||
else if (prob(10))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
do_sparks(3, TRUE, src)
|
||||
|
||||
// Doesn't have overlay support as of now
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot_debris/update_blood_color()
|
||||
|
||||
@@ -49,11 +49,7 @@
|
||||
///Releases a cloud of smoke based on the randomly generated reagent in Initialize().
|
||||
/obj/effect/decal/remains/human/smokey/proc/release_smoke(mob/living/smoke_releaser)
|
||||
visible_message(span_warning("[smoke_releaser] disturbs [src], which releases a huge cloud of gas!"))
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/cigarette_puff = new()
|
||||
cigarette_puff.chemholder.add_reagent(that_shit_that_killed_saddam, 15)
|
||||
cigarette_puff.attach(get_turf(src))
|
||||
cigarette_puff.set_up(range = 2, amount = DIAMOND_AREA(2), holder = src, location = get_turf(src), silent = TRUE)
|
||||
cigarette_puff.start()
|
||||
do_chem_smoke(2, src, get_turf(src), that_shit_that_killed_saddam, 15)
|
||||
|
||||
///Subtype of smokey remains used for rare maintenance spawns.
|
||||
/obj/effect/decal/remains/human/smokey/maintenance
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/* This is an attempt to make some easily reusable "particle" type effect, to stop the code
|
||||
constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one
|
||||
defined, then set up when it is created with New(). Then this same system can just be reused each time
|
||||
it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam
|
||||
would spawn and follow the beaker, even if it is carried or thrown.
|
||||
/*
|
||||
* This is an attempt to make some easily reusable "particle" type effect, to stop the code
|
||||
* constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one
|
||||
* defined, then set up when it is created with New(). Then this same system can just be reused each time
|
||||
* it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam
|
||||
* would spawn and follow the beaker, even if it is carried or thrown.
|
||||
*/
|
||||
|
||||
#define PER_SYSTEM_PARTICLE_CAP 20
|
||||
|
||||
/obj/effect/particle_effect
|
||||
name = "particle effect"
|
||||
@@ -17,36 +19,61 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
return TRUE
|
||||
|
||||
/datum/effect_system
|
||||
var/number = 3
|
||||
var/cardinals_only = FALSE
|
||||
var/turf/location
|
||||
var/atom/holder
|
||||
var/effect_type
|
||||
var/total_effects = 0
|
||||
var/autocleanup = FALSE //will delete itself after use
|
||||
// Does not contain any behaviors and should not be used by itself
|
||||
abstract_type = /datum/effect_system
|
||||
/// Turf on which to spawn the effects
|
||||
var/turf/location = null
|
||||
/// Atom that is spawning the particles whose location we're following
|
||||
var/atom/holder = null
|
||||
|
||||
/datum/effect_system/New(turf/location)
|
||||
. = ..()
|
||||
src.location = get_turf(location)
|
||||
|
||||
/datum/effect_system/Destroy()
|
||||
holder = null
|
||||
location = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/proc/set_up(number = 3, cardinals_only = FALSE, location)
|
||||
src.number = min(number, 10)
|
||||
src.cardinals_only = cardinals_only
|
||||
src.location = get_turf(location)
|
||||
|
||||
/datum/effect_system/proc/attach(atom/atom)
|
||||
holder = atom
|
||||
/// Instruct the effect system to start following an atom. Can be chained into .start()
|
||||
/datum/effect_system/proc/attach(atom/new_holder)
|
||||
RETURN_TYPE(/datum/effect_system)
|
||||
holder = new_holder
|
||||
return src
|
||||
|
||||
/// Start the effect system
|
||||
/datum/effect_system/proc/start()
|
||||
return
|
||||
|
||||
/// Basic effect system which spawns a certain number of moving effects
|
||||
/datum/effect_system/basic
|
||||
/// Total number of particles to spawn
|
||||
var/amount = 3
|
||||
/// Should we pick among cardinals or all directions when deciding where the particle should move
|
||||
var/cardinals_only = FALSE
|
||||
/// Typepath of the effect to spawn
|
||||
var/effect_type = null
|
||||
/// Total amount of effects we currently have active
|
||||
var/total_effects = 0
|
||||
/// Should the system delete itself after finishing?
|
||||
var/autocleanup = FALSE
|
||||
|
||||
/datum/effect_system/basic/New(turf/location, amount = null, cardinals_only = null)
|
||||
. = ..()
|
||||
if (!isnull(amount))
|
||||
src.amount = amount
|
||||
if (!isnull(cardinals_only))
|
||||
src.cardinals_only = cardinals_only
|
||||
|
||||
/datum/effect_system/basic/start()
|
||||
if(QDELETED(src))
|
||||
return
|
||||
for(var/i in 1 to number)
|
||||
if(total_effects > 20)
|
||||
for(var/i in 1 to amount)
|
||||
if(total_effects > PER_SYSTEM_PARTICLE_CAP)
|
||||
return
|
||||
generate_effect()
|
||||
|
||||
/datum/effect_system/proc/generate_effect()
|
||||
/datum/effect_system/basic/proc/generate_effect()
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/effect = new effect_type(location)
|
||||
@@ -56,15 +83,17 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
direction = pick(GLOB.cardinals)
|
||||
else
|
||||
direction = pick(GLOB.alldirs)
|
||||
var/step_amt = pick(1,2,3)
|
||||
|
||||
var/step_amt = rand(1, 3)
|
||||
var/step_delay = 5
|
||||
|
||||
var/datum/move_loop/loop = GLOB.move_manager.move(effect, direction, step_delay, timeout = step_delay * step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(decrement_total_effect))
|
||||
if (autocleanup)
|
||||
RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(decrement_total_effect))
|
||||
|
||||
/datum/effect_system/proc/decrement_total_effect(datum/source)
|
||||
/datum/effect_system/basic/proc/decrement_total_effect(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
total_effects--
|
||||
if(!autocleanup || total_effects > 0)
|
||||
return
|
||||
QDEL_IN(src, 2 SECONDS)
|
||||
if(total_effects == 0)
|
||||
QDEL_IN(src, 2 SECONDS)
|
||||
|
||||
#undef PER_SYSTEM_PARTICLE_CAP
|
||||
|
||||
@@ -9,23 +9,20 @@
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/particle_effect/expl_particles/LateInitialize()
|
||||
var/step_amt = pick(25;1,50;2,100;3,200;4)
|
||||
|
||||
var/step_amt = pick(25;1, 50;2, 100;3, 200;4)
|
||||
var/datum/move_loop/loop = GLOB.move_manager.move(src, pick(GLOB.alldirs), 1, timeout = step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
||||
RegisterSignal(loop, COMSIG_QDELETING, PROC_REF(end_particle))
|
||||
|
||||
/obj/effect/particle_effect/expl_particles/proc/end_particle(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
if(QDELETED(src))
|
||||
return
|
||||
qdel(src)
|
||||
if (!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/datum/effect_system/expl_particles
|
||||
number = 10
|
||||
/datum/effect_system/basic/expl_particles
|
||||
amount = 10
|
||||
|
||||
/datum/effect_system/expl_particles/start()
|
||||
for(var/i in 1 to number)
|
||||
new /obj/effect/particle_effect/expl_particles(location)
|
||||
/datum/effect_system/basic/expl_particles/generate_effect()
|
||||
new /obj/effect/particle_effect/expl_particles(location)
|
||||
|
||||
/obj/effect/explosion
|
||||
name = "fire"
|
||||
@@ -45,21 +42,16 @@
|
||||
|
||||
/datum/effect_system/explosion
|
||||
|
||||
/datum/effect_system/explosion/set_up(location)
|
||||
src.location = get_turf(location)
|
||||
|
||||
/datum/effect_system/explosion/start()
|
||||
new/obj/effect/explosion( location )
|
||||
var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles()
|
||||
P.set_up(10, 0, location)
|
||||
P.start()
|
||||
new /obj/effect/explosion(location)
|
||||
var/datum/effect_system/basic/expl_particles/boom_particles = new(location)
|
||||
boom_particles.start()
|
||||
|
||||
/datum/effect_system/explosion/smoke
|
||||
|
||||
/datum/effect_system/explosion/smoke/proc/create_smoke()
|
||||
var/datum/effect_system/fluid_spread/smoke/S = new
|
||||
S.set_up(2, holder = holder, location = location)
|
||||
S.start()
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke_system = new(location, range = 2)
|
||||
smoke_system.attach(holder).start()
|
||||
|
||||
/datum/effect_system/explosion/smoke/start()
|
||||
..()
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//////// Attach a trail to any object, that spawns when it moves (like for the jetpack)
|
||||
/// just pass in the object to attach it to in set_up
|
||||
/// Then do start() to start it and stop() to stop it, obviously
|
||||
/// and don't call start() in a loop that will be repeated otherwise it'll get spammed!
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/datum/effect_system/trail_follow
|
||||
var/turf/oldposition
|
||||
var/active = FALSE
|
||||
var/allow_overlap = FALSE
|
||||
var/auto_process = TRUE
|
||||
var/qdel_in_time = 10
|
||||
var/fadetype = "ion_fade"
|
||||
var/fade = TRUE
|
||||
var/nograv_required = FALSE
|
||||
|
||||
/datum/effect_system/trail_follow/set_up(atom/atom)
|
||||
attach(atom)
|
||||
oldposition = get_turf(atom)
|
||||
|
||||
/datum/effect_system/trail_follow/Destroy()
|
||||
oldposition = null
|
||||
stop()
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/trail_follow/proc/stop()
|
||||
oldposition = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
active = FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/effect_system/trail_follow/start()
|
||||
oldposition = get_turf(holder)
|
||||
if(!check_conditions())
|
||||
return FALSE
|
||||
if(auto_process)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
active = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/effect_system/trail_follow/process()
|
||||
generate_effect()
|
||||
|
||||
/datum/effect_system/trail_follow/generate_effect()
|
||||
if(!check_conditions())
|
||||
return stop()
|
||||
if(oldposition && !(oldposition == get_turf(holder)))
|
||||
if(!oldposition.has_gravity() || !nograv_required)
|
||||
var/obj/effect/E = new effect_type(oldposition)
|
||||
set_dir(E)
|
||||
if(fade)
|
||||
flick(fadetype, E)
|
||||
E.icon_state = ""
|
||||
if(qdel_in_time)
|
||||
QDEL_IN(E, qdel_in_time)
|
||||
oldposition = get_turf(holder)
|
||||
|
||||
/datum/effect_system/trail_follow/proc/check_conditions()
|
||||
if(!get_turf(holder))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/effect_system/trail_follow/steam
|
||||
effect_type = /obj/effect/particle_effect/steam
|
||||
|
||||
/obj/effect/particle_effect/ion_trails
|
||||
name = "ion trails"
|
||||
icon_state = "ion_trails"
|
||||
anchored = TRUE
|
||||
|
||||
/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
|
||||
nograv_required = TRUE
|
||||
qdel_in_time = 20
|
||||
|
||||
/datum/effect_system/trail_follow/proc/set_dir(obj/effect/particle_effect/ion_trails/I)
|
||||
I.setDir(holder.dir)
|
||||
|
||||
/datum/effect_system/trail_follow/ion/grav_allowed
|
||||
nograv_required = FALSE
|
||||
|
||||
//Reagent-based explosion effect
|
||||
|
||||
/datum/effect_system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing_factor = null // factor of how powerful the flash effect relatively to the explosion
|
||||
var/flaming_factor = null // factor of how powerful the flame effect is relatively to explosion
|
||||
var/explosion_message = 1 //whether we show a message to mobs.
|
||||
|
||||
/datum/effect_system/reagents_explosion/set_up(amt, loca, flash_fact = null, flame_fact = null, message = TRUE)
|
||||
amount = amt
|
||||
explosion_message = message
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
flashing_factor = flash_fact
|
||||
flaming_factor = flame_fact
|
||||
|
||||
/// Starts the explosion. The explosion_source is as part of logging and identifying the source of the explosion for logs.
|
||||
/datum/effect_system/reagents_explosion/start(atom/explosion_source = null)
|
||||
if(!explosion_source)
|
||||
stack_trace("Reagent explosion triggered without a source atom. This explosion may have incomplete logging.")
|
||||
|
||||
if(explosion_message)
|
||||
location.visible_message(span_danger("The solution violently explodes!"), span_hear("You hear an explosion!"))
|
||||
|
||||
dyn_explosion(location, amount, flash_range = flashing_factor, flame_range = flaming_factor, explosion_cause = explosion_source)
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
//Reagent-based explosion effect
|
||||
|
||||
/datum/effect_system/reagents_explosion
|
||||
/// Explosive power
|
||||
var/amount
|
||||
/// Factor of how powerful the flash effect relatively to the explosion
|
||||
var/flashing_factor = null
|
||||
/// Factor of how powerful the flame effect is relatively to explosion
|
||||
var/flaming_factor = null
|
||||
/// Whether we show a message to mobs.
|
||||
var/explosion_message = 1
|
||||
|
||||
/datum/effect_system/reagents_explosion/New(turf/location, amount, flash_fact = null, flame_fact = null, message = TRUE)
|
||||
. = ..()
|
||||
src.amount = amount
|
||||
explosion_message = message
|
||||
if (!isturf(location))
|
||||
location = get_turf(location)
|
||||
flashing_factor = flash_fact
|
||||
flaming_factor = flame_fact
|
||||
|
||||
/// Starts the explosion. The explosion_source is as part of logging and identifying the source of the explosion for logs.
|
||||
/datum/effect_system/reagents_explosion/start(atom/explosion_source = null)
|
||||
if(!explosion_source)
|
||||
stack_trace("Reagent explosion triggered without a source atom. This explosion may have incomplete logging.")
|
||||
if(explosion_message)
|
||||
location.visible_message(span_danger("The solution violently explodes!"), span_hear("You hear an explosion!"))
|
||||
dyn_explosion(location, amount, flash_range = flashing_factor, flame_range = flaming_factor, explosion_cause = explosion_source)
|
||||
@@ -5,13 +5,13 @@
|
||||
// will always spawn at the items location.
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/proc/do_sparks(number, cardinal_only, datum/source)
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(number, cardinal_only, source)
|
||||
/proc/do_sparks(number, cardinal_only, atom/source, atom/holder = null, spark_type = /datum/effect_system/basic/spark_spread)
|
||||
var/datum/effect_system/basic/spark_spread/sparks = new spark_type(get_turf(source), number, cardinal_only)
|
||||
if (holder)
|
||||
sparks.attach(holder)
|
||||
sparks.autocleanup = TRUE
|
||||
sparks.start()
|
||||
|
||||
|
||||
/obj/effect/particle_effect/sparks
|
||||
name = "sparks"
|
||||
icon_state = "sparks"
|
||||
@@ -32,7 +32,7 @@
|
||||
var/turf/location = loc
|
||||
if(isturf(location))
|
||||
affect_location(location, just_initialized = TRUE)
|
||||
QDEL_IN(src, 20)
|
||||
QDEL_IN(src, 2 SECONDS)
|
||||
|
||||
/obj/effect/particle_effect/sparks/Destroy()
|
||||
var/turf/location = loc
|
||||
@@ -41,11 +41,15 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/sparks/Move()
|
||||
..()
|
||||
. = ..()
|
||||
var/turf/location = loc
|
||||
if(isturf(location))
|
||||
affect_location(location)
|
||||
|
||||
/obj/effect/particle_effect/sparks/quantum
|
||||
name = "quantum sparks"
|
||||
icon_state = "quantum_sparks"
|
||||
|
||||
/*
|
||||
* Apply the effects of this spark to its location.
|
||||
*
|
||||
@@ -56,7 +60,7 @@
|
||||
* just_initialized - If the spark is just being created, and we need to manually affect everything in the location
|
||||
*/
|
||||
/obj/effect/particle_effect/sparks/proc/affect_location(turf/location, just_initialized = FALSE)
|
||||
location.hotspot_expose(1000,100)
|
||||
location.hotspot_expose(1000, 100)
|
||||
SEND_SIGNAL(location, COMSIG_ATOM_TOUCHED_SPARKS, src) // for plasma floors; other floor types only have to worry about the mysterious HAZARDOUS sparks
|
||||
if(just_initialized)
|
||||
for(var/atom/movable/singed in location)
|
||||
@@ -79,27 +83,23 @@
|
||||
if(reagents && !(reagents.flags & SEALED_CONTAINER))
|
||||
reagents.expose_temperature(1000) // we set this at 1000 because that's the max reagent temp for a chem heater, higher temps require more than sparks
|
||||
return
|
||||
|
||||
if(ishuman(singed))
|
||||
var/mob/living/carbon/human/singed_human = singed
|
||||
for(var/obj/item/anything in singed_human.get_visible_items())
|
||||
sparks_touched(src, anything)
|
||||
|
||||
/datum/effect_system/spark_spread
|
||||
/datum/effect_system/basic/spark_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks
|
||||
|
||||
/datum/effect_system/spark_spread/quantum
|
||||
/datum/effect_system/basic/spark_spread/quantum
|
||||
effect_type = /obj/effect/particle_effect/sparks/quantum
|
||||
|
||||
|
||||
//electricity
|
||||
|
||||
/obj/effect/particle_effect/sparks/electricity
|
||||
name = "lightning"
|
||||
icon_state = "electricity"
|
||||
|
||||
/obj/effect/particle_effect/sparks/quantum
|
||||
name = "quantum sparks"
|
||||
icon_state = "quantum_sparks"
|
||||
|
||||
/datum/effect_system/lightning_spread
|
||||
/datum/effect_system/basic/lightning_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks/electricity
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//////// Attach a trail to any object, that spawns when it moves (like for the jetpack)
|
||||
/// just pass in the object to attach it to in set_up
|
||||
/// Then do start() to start it and stop() to stop it, obviously
|
||||
/// and don't call start() in a loop that will be repeated otherwise it'll get spammed!
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/datum/effect_system/trail_follow
|
||||
/// Previous position of the atom we're tracking
|
||||
var/turf/oldposition
|
||||
/// Are we currently spawning particles?
|
||||
var/active = FALSE
|
||||
/// Can the particles be spawned ontop of eachother?
|
||||
var/allow_overlap = FALSE
|
||||
/// Should we automatically start processing ourselves?
|
||||
var/auto_process = TRUE
|
||||
/// Delay before we delete the particles
|
||||
var/qdel_in_time = 1 SECONDS
|
||||
/// Typepath we should spawn
|
||||
var/effect_type = null
|
||||
/// Should we flick an icon state and blank out the particles afterwards?
|
||||
var/fade = TRUE
|
||||
/// icon_state to flick on our particles
|
||||
var/fadetype = "ion_fade"
|
||||
/// Are we restricted to zero-g only?
|
||||
var/nograv_required = FALSE
|
||||
|
||||
/datum/effect_system/trail_follow/New(turf/location)
|
||||
. = ..()
|
||||
attach(location)
|
||||
oldposition = location
|
||||
|
||||
/datum/effect_system/trail_follow/Destroy()
|
||||
oldposition = null
|
||||
stop()
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/trail_follow/proc/stop()
|
||||
oldposition = null
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
active = FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/effect_system/trail_follow/start()
|
||||
oldposition = get_turf(holder)
|
||||
if(!check_conditions())
|
||||
return FALSE
|
||||
if(auto_process)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
active = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/effect_system/trail_follow/process()
|
||||
generate_effect()
|
||||
|
||||
/datum/effect_system/trail_follow/proc/generate_effect()
|
||||
if(!check_conditions())
|
||||
return stop()
|
||||
|
||||
if(!oldposition || oldposition == get_turf(holder))
|
||||
oldposition = get_turf(holder)
|
||||
return
|
||||
|
||||
if(nograv_required && oldposition.has_gravity())
|
||||
oldposition = get_turf(holder)
|
||||
return
|
||||
|
||||
var/obj/effect/particle = new effect_type(oldposition)
|
||||
set_dir(particle)
|
||||
if(fade)
|
||||
flick(fadetype, particle)
|
||||
particle.icon_state = ""
|
||||
|
||||
if(qdel_in_time)
|
||||
QDEL_IN(particle, qdel_in_time)
|
||||
|
||||
/datum/effect_system/trail_follow/proc/check_conditions()
|
||||
if(!get_turf(holder))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/effect_system/trail_follow/proc/set_dir(obj/effect/effect)
|
||||
effect.setDir(holder.dir)
|
||||
|
||||
/datum/effect_system/trail_follow/steam
|
||||
effect_type = /obj/effect/particle_effect/steam
|
||||
|
||||
/obj/effect/particle_effect/ion_trails
|
||||
name = "ion trails"
|
||||
icon_state = "ion_trails"
|
||||
anchored = TRUE
|
||||
|
||||
/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
|
||||
nograv_required = TRUE
|
||||
qdel_in_time = 2 SECONDS
|
||||
|
||||
/datum/effect_system/trail_follow/ion/grav_allowed
|
||||
nograv_required = FALSE
|
||||
@@ -4,15 +4,17 @@
|
||||
name = "water"
|
||||
icon_state = "extinguish"
|
||||
pass_flags = PASSTABLE | PASSMACHINE | PASSSTRUCTURE | PASSGRILLE | PASSBLOB | PASSVEHICLE
|
||||
var/life = 15
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
/// Amount of turfs we pass before deleting ourselves
|
||||
var/life = 15
|
||||
|
||||
/obj/effect/particle_effect/water/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_IN(src, 70)
|
||||
QDEL_IN(src, 7 SECONDS)
|
||||
|
||||
/obj/effect/particle_effect/water/Move(turf/newloc)
|
||||
if (--src.life < 1)
|
||||
life -= 1
|
||||
if (life <= 0)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -20,8 +22,7 @@
|
||||
/obj/effect/particle_effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.expose(A)
|
||||
if(A.reagents)
|
||||
A.reagents.expose_temperature(-25)
|
||||
A.reagents?.expose_temperature(reagents.chem_temp)
|
||||
return ..()
|
||||
|
||||
///Extinguisher snowflake
|
||||
@@ -71,17 +72,11 @@
|
||||
/////////////////////////////////////////////
|
||||
// GENERIC STEAM SPREAD SYSTEM
|
||||
|
||||
//Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location)
|
||||
// Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location)
|
||||
// The attach(atom/atom) proc is optional, and can be called to attach the effect
|
||||
// to something, like a smoking beaker, so then you can just call start() and the steam
|
||||
// will always spawn at the items location, even if it's moved.
|
||||
|
||||
/* Example:
|
||||
*var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread() -- creates new system
|
||||
*steam.set_up(5, 0, mob.loc) -- sets up variables
|
||||
*OPTIONAL: steam.attach(mob)
|
||||
*steam.start() -- spawns the effect
|
||||
*/
|
||||
/////////////////////////////////////////////
|
||||
/obj/effect/particle_effect/steam
|
||||
name = "steam"
|
||||
@@ -90,11 +85,7 @@
|
||||
|
||||
/obj/effect/particle_effect/steam/Initialize(mapload)
|
||||
. = ..()
|
||||
QDEL_IN(src, 20)
|
||||
QDEL_IN(src, 2 SECONDS)
|
||||
|
||||
/datum/effect_system/steam_spread
|
||||
/datum/effect_system/basic/steam_spread
|
||||
effect_type = /obj/effect/particle_effect/steam
|
||||
|
||||
/obj/effect/particle_effect/water/Bump(atom/A)
|
||||
if(A.reagents && reagents)
|
||||
A.reagents.expose_temperature(reagents.chem_temp)
|
||||
|
||||
@@ -115,13 +115,16 @@
|
||||
* A factory which produces fluid groups.
|
||||
*/
|
||||
/datum/effect_system/fluid_spread
|
||||
effect_type = /obj/effect/particle_effect/fluid
|
||||
/// The amount of smoke to produce.
|
||||
/// The amount of fluid to produce.
|
||||
var/amount = 10
|
||||
/// Type of the effect we're spawning
|
||||
var/effect_type = /obj/effect/particle_effect/fluid
|
||||
|
||||
/datum/effect_system/fluid_spread/set_up(range = 1, amount = DIAMOND_AREA(range), atom/holder, atom/location, ...)
|
||||
src.holder = holder
|
||||
src.location = location
|
||||
/datum/effect_system/fluid_spread/New(turf/location, range = 1, amount = null, atom/holder = null)
|
||||
. = ..()
|
||||
attach(holder)
|
||||
if (isnull(amount))
|
||||
amount = DIAMOND_AREA(range)
|
||||
src.amount = amount
|
||||
|
||||
/datum/effect_system/fluid_spread/start(log = FALSE)
|
||||
@@ -144,7 +147,6 @@
|
||||
var/blame_msg
|
||||
if (holder)
|
||||
holder.transfer_fingerprints_to(flood) // This is important. If this doesn't exist thermobarics are annoying to adjudicate.
|
||||
|
||||
source_msg = "from inside of [ismob(holder) ? ADMIN_LOOKUPFLW(holder) : ADMIN_VERBOSEJMP(holder)]"
|
||||
var/lastkey = holder.fingerprintslast
|
||||
if (lastkey)
|
||||
|
||||
@@ -178,31 +178,59 @@
|
||||
if(prob(max(0, exposed_temperature - 475))) //foam dissolves when heated
|
||||
kill_foam()
|
||||
|
||||
/// Proc to quickly spawn foam
|
||||
/// reagent_type can accept a list of reagents, optionally as a key-value pair with values overriding reagent_volume if not null
|
||||
/proc/do_foam(range = 1, atom/holder = null, turf/location = null, datum/reagent/reagent_type = null, reagent_volume = 10, datum/reagents/carry = null, amount = null, log = FALSE, datum/effect_system/fluid_spread/foam/foam_type = /datum/effect_system/fluid_spread/foam, result_type = null, stop_reactions = FALSE, reagent_scale = FOAM_REAGENT_SCALE)
|
||||
if (carry || isnull(reagent_type))
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new foam_type(location, range, amount, holder || location, carry, result_type, stop_reactions, reagent_scale)
|
||||
foam.start(log = log)
|
||||
return
|
||||
|
||||
if (ispath(reagent_type, /datum/reagent))
|
||||
var/datum/reagents/foam_reagents = new /datum/reagents(reagent_volume)
|
||||
foam_reagents.add_reagent(reagent_type, reagent_volume)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new foam_type(location, range, amount, holder || location, foam_reagents, result_type, stop_reactions, reagent_scale)
|
||||
foam.start(log = log)
|
||||
return
|
||||
|
||||
|
||||
if (!islist(reagent_type))
|
||||
CRASH("do_foam passed a non-reagent path, non-list reagent_type [reagent_type]!")
|
||||
|
||||
var/list/reagent_list = reagent_type
|
||||
var/chem_volume = 0
|
||||
for (var/chem_type in reagent_list)
|
||||
chem_volume += reagent_list[chem_type] || reagent_volume
|
||||
|
||||
var/datum/reagents/foam_reagents = new /datum/reagents(chem_volume)
|
||||
for (var/chem_type in reagent_list)
|
||||
foam_reagents.add_reagent(chem_type, reagent_list[chem_type] || reagent_volume)
|
||||
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new foam_type(location, range, amount, holder || location, foam_reagents, result_type, stop_reactions, reagent_scale)
|
||||
foam.start(log = log)
|
||||
|
||||
/// A factory for foam fluid floods.
|
||||
/datum/effect_system/fluid_spread/foam
|
||||
effect_type = /obj/effect/particle_effect/fluid/foam
|
||||
/// A container for all of the chemicals we distribute through the foam.
|
||||
var/datum/reagents/chemholder
|
||||
/// The amount that
|
||||
var/datum/reagents/chemholder = null
|
||||
/// The amount that we multiply the payload by
|
||||
var/reagent_scale = FOAM_REAGENT_SCALE
|
||||
/// What type of thing the foam should leave behind when it dissipates.
|
||||
var/atom/movable/result_type = null
|
||||
|
||||
|
||||
/datum/effect_system/fluid_spread/foam/New()
|
||||
..()
|
||||
/datum/effect_system/fluid_spread/foam/New(turf/location, range = 1, amount = null, atom/holder = null, datum/reagents/carry = null, result_type = null, stop_reactions = FALSE, reagent_scale = FOAM_REAGENT_SCALE)
|
||||
. = ..()
|
||||
chemholder = new(1000, NO_REACT)
|
||||
carry?.trans_to(chemholder, carry.total_volume, no_react = stop_reactions, copy_only = TRUE)
|
||||
if(!isnull(result_type))
|
||||
src.result_type = result_type
|
||||
src.reagent_scale = reagent_scale
|
||||
|
||||
/datum/effect_system/fluid_spread/foam/Destroy()
|
||||
QDEL_NULL(chemholder)
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/fluid_spread/foam/set_up(range = 1, amount = DIAMOND_AREA(range), atom/holder, atom/location = null, datum/reagents/carry = null, result_type = null, stop_reactions = FALSE)
|
||||
. = ..()
|
||||
carry?.trans_to(chemholder, carry.total_volume, no_react = stop_reactions, copy_only = TRUE)
|
||||
if(!isnull(result_type))
|
||||
src.result_type = result_type
|
||||
|
||||
/datum/effect_system/fluid_spread/foam/start(log = FALSE)
|
||||
var/obj/effect/particle_effect/fluid/foam/foam = new effect_type(location, new /datum/fluid_group(amount))
|
||||
var/foamcolor = mix_color_from_reagents(chemholder.reagent_list)
|
||||
@@ -235,7 +263,6 @@
|
||||
effect_type = /obj/effect/particle_effect/fluid/foam/long_life
|
||||
reagent_scale = FOAM_REAGENT_SCALE * (30 / 8)
|
||||
|
||||
|
||||
// Firefighting foam
|
||||
/// A variant of foam which absorbs plasma in the air if there is a fire.
|
||||
/obj/effect/particle_effect/fluid/foam/firefighting
|
||||
@@ -468,9 +495,7 @@
|
||||
|
||||
/obj/effect/spawner/foam_starter/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new foam_type()
|
||||
foam.set_up(foam_size, holder = src, location = loc)
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new foam_type(loc, foam_size, holder = src)
|
||||
foam.start()
|
||||
|
||||
/obj/effect/spawner/foam_starter/small
|
||||
|
||||
@@ -165,12 +165,13 @@
|
||||
* - range: The amount of smoke to produce as number of steps from origin covered.
|
||||
* - amount: The amount of smoke to produce as the total desired coverage area. Autofilled from the range arg if not set.
|
||||
* - location: Where to produce the smoke cloud.
|
||||
* - smoke_type: The smoke typepath to spawn.
|
||||
* - smoke_type - Typepath for the effect system to use
|
||||
* - effect_type: The smoke typepath to spawn.
|
||||
* - log: Should the system log the smoke spawned?
|
||||
*/
|
||||
/proc/do_smoke(range = 0, amount = DIAMOND_AREA(range), atom/holder = null, location = null, smoke_type = /obj/effect/particle_effect/fluid/smoke, log = FALSE)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.effect_type = smoke_type
|
||||
smoke.set_up(amount = amount, holder = holder, location = location)
|
||||
/proc/do_smoke(range = 0, atom/holder = null, location = null, amount = null, smoke_type = /datum/effect_system/fluid_spread/smoke, effect_type = /obj/effect/particle_effect/fluid/smoke, log = FALSE)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new smoke_type(location, range, amount, holder)
|
||||
smoke.effect_type = effect_type
|
||||
smoke.start(log = log)
|
||||
|
||||
/////////////////////////////////////////////
|
||||
@@ -205,7 +206,6 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
|
||||
smoker.drop_all_held_items()
|
||||
smoker.adjust_oxy_loss(1)
|
||||
smoker.emote("cough")
|
||||
@@ -275,6 +275,10 @@
|
||||
/// Whether to make sure each affected turf is actually within range before cooling it.
|
||||
var/distcheck = TRUE
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/freezing/New(turf/location, range = 1, amount = null, atom/holder = null, blast_radius = 0)
|
||||
. = ..()
|
||||
blast = blast_radius
|
||||
|
||||
/**
|
||||
* Chills an open turf.
|
||||
*
|
||||
@@ -286,7 +290,7 @@
|
||||
* Arguments:
|
||||
* - [chilly][/turf/open]: The open turf to chill
|
||||
*/
|
||||
/datum/effect_system/fluid_spread/smoke/freezing/proc/Chilled(turf/open/chilly)
|
||||
/datum/effect_system/fluid_spread/smoke/freezing/proc/chill_turf(turf/open/chilly)
|
||||
if(!istype(chilly))
|
||||
return
|
||||
|
||||
@@ -319,14 +323,10 @@
|
||||
for(var/obj/item/potential_tinder in chilly)
|
||||
potential_tinder.extinguish()
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/freezing/set_up(range = 5, amount = DIAMOND_AREA(range), atom/holder, atom/location, blast_radius = 0)
|
||||
. = ..()
|
||||
blast = blast_radius
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/freezing/start(log = FALSE)
|
||||
if(blast)
|
||||
for(var/turf/T in RANGE_TURFS(blast, location))
|
||||
Chilled(T)
|
||||
chill_turf(T)
|
||||
return ..()
|
||||
|
||||
/// A variant of the base freezing smoke formerly used by the vent decontamination event.
|
||||
@@ -398,13 +398,33 @@
|
||||
return TRUE
|
||||
|
||||
/// Helper to quickly create a cloud of reagent smoke
|
||||
/proc/do_chem_smoke(range = 0, amount = DIAMOND_AREA(range), atom/holder = null, location = null, reagent_type = /datum/reagent/water, reagent_volume = 10, log = FALSE, datum/effect_system/fluid_spread/smoke/chem/smoke_type = /datum/effect_system/fluid_spread/smoke/chem)
|
||||
var/datum/reagents/smoke_reagents = new/datum/reagents(reagent_volume)
|
||||
smoke_reagents.add_reagent(reagent_type, reagent_volume)
|
||||
/// reagent_type can accept a list of reagents, optionally as a key-value pair with values overriding reagent_volume if not null
|
||||
/proc/do_chem_smoke(range = 0, atom/holder = null, location = null, reagent_type = /datum/reagent/water, reagent_volume = 10, datum/reagents/carry = null, carry_limit = null, log = FALSE, amount = null, datum/effect_system/fluid_spread/smoke/chem/smoke_type = /datum/effect_system/fluid_spread/smoke/chem, silent = TRUE)
|
||||
if (carry)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new smoke_type(location, range, amount, holder || location, carry, carry_limit, silent)
|
||||
smoke.start(log = log)
|
||||
return
|
||||
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new smoke_type
|
||||
smoke.attach(location)
|
||||
smoke.set_up(amount = amount, holder = holder, location = location, carry = smoke_reagents, silent = TRUE)
|
||||
if (ispath(reagent_type, /datum/reagent))
|
||||
var/datum/reagents/smoke_reagents = new /datum/reagents(reagent_volume)
|
||||
smoke_reagents.add_reagent(reagent_type, reagent_volume)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new smoke_type(location, range, amount, holder || location, smoke_reagents, carry_limit, silent)
|
||||
smoke.start(log = log)
|
||||
return
|
||||
|
||||
if (!islist(reagent_type))
|
||||
CRASH("do_chem_smoke passed a non-reagent path, non-list reagent_type [reagent_type]!")
|
||||
|
||||
var/list/reagent_list = reagent_type
|
||||
var/chem_volume = 0
|
||||
for (var/chem_type in reagent_list)
|
||||
chem_volume += reagent_list[chem_type] || reagent_volume
|
||||
|
||||
var/datum/reagents/smoke_reagents = new /datum/reagents(chem_volume)
|
||||
for (var/chem_type in reagent_list)
|
||||
smoke_reagents.add_reagent(chem_type, reagent_list[chem_type] || reagent_volume)
|
||||
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new smoke_type(location, range, amount, holder || location, smoke_reagents, carry_limit, silent)
|
||||
smoke.start(log = log)
|
||||
|
||||
/// A factory which produces clouds of chemical bearing smoke.
|
||||
@@ -413,18 +433,10 @@
|
||||
var/datum/reagents/chemholder
|
||||
effect_type = /obj/effect/particle_effect/fluid/smoke/chem
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/chem/New()
|
||||
..()
|
||||
chemholder = new(1000, NO_REACT)
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/chem/Destroy()
|
||||
QDEL_NULL(chemholder)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/chem/set_up(range = 1, amount = DIAMOND_AREA(range), atom/holder, atom/location = null, datum/reagents/carry = null, silent = FALSE)
|
||||
/datum/effect_system/fluid_spread/smoke/chem/New(turf/location, range = 1, amount = null, atom/holder = null, datum/reagents/carry = null, carry_limit = null, silent = FALSE)
|
||||
. = ..()
|
||||
carry?.trans_to(chemholder, carry.total_volume, copy_only = TRUE)
|
||||
chemholder = new(1000, NO_REACT)
|
||||
carry?.trans_to(chemholder, isnull(carry_limit) ? carry.total_volume : carry_limit, copy_only = TRUE)
|
||||
|
||||
if(silent)
|
||||
return
|
||||
@@ -436,18 +448,22 @@
|
||||
var/where = "[AREACOORD(location)]"
|
||||
var/contained = length(contained_reagents) ? "\[[contained_reagents.Join(", ")]\] @ [chemholder.chem_temp]K" : null
|
||||
var/area/fluid_area = get_area(location)
|
||||
if(carry.my_atom?.fingerprintslast) //Some reagents don't have a my_atom in some cases
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "[ADMIN_LOOKUPFLW(M)] "
|
||||
if(!istype(carry.my_atom, /obj/machinery/plumbing) && !(fluid_area.area_flags & QUIET_LOGS)) // I like to be able to see my logs thank you
|
||||
message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. Key: [more ? more : carry.my_atom.fingerprintslast].")
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
if(!istype(carry.my_atom, /obj/machinery/plumbing) && !(fluid_area.area_flags & QUIET_LOGS)) // Deathmatch has way too much smoke to log
|
||||
// Some reagents don't have a my_atom in some cases
|
||||
if(!carry.my_atom?.fingerprintslast)
|
||||
// Deathmatch has way too much smoke to log
|
||||
if(!istype(carry.my_atom, /obj/machinery/plumbing) && !(fluid_area.area_flags & QUIET_LOGS))
|
||||
message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. No associated key.")
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
return
|
||||
|
||||
var/mob/bomber = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
if(!istype(carry.my_atom, /obj/machinery/plumbing) && !(fluid_area.area_flags & QUIET_LOGS)) // I like to be able to see my logs thank you
|
||||
message_admins("Smoke: ([ADMIN_VERBOSEJMP(location)])[contained]. Key: [bomber ? "[ADMIN_LOOKUPFLW(bomber)] " : carry.my_atom.fingerprintslast].")
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].")
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/chem/Destroy()
|
||||
QDEL_NULL(chemholder)
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/fluid_spread/smoke/chem/start(log = FALSE)
|
||||
var/start_loc = holder ? get_turf(holder) : src.location
|
||||
|
||||
@@ -138,9 +138,7 @@
|
||||
else
|
||||
visible_message(span_danger("[icon2html(src, viewers(src))] [src] detonates!"))
|
||||
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
do_sparks(3, TRUE, src)
|
||||
mineEffect(triggerer)
|
||||
triggered = TRUE
|
||||
SEND_SIGNAL(src, COMSIG_MINE_TRIGGERED, triggerer)
|
||||
|
||||
+3
-2
@@ -5,17 +5,18 @@
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
flags_1 = PREVENT_CLICK_UNDER_1
|
||||
anchored = TRUE
|
||||
/// Our turf's previous heat capacity
|
||||
var/old_heat_capacity
|
||||
|
||||
/obj/effect/shield/Initialize(mapload)
|
||||
. = ..()
|
||||
var/turf/location = get_turf(src)
|
||||
old_heat_capacity=location.heat_capacity
|
||||
old_heat_capacity = location.heat_capacity
|
||||
location.heat_capacity = INFINITY
|
||||
|
||||
/obj/effect/shield/Destroy()
|
||||
var/turf/location = get_turf(src)
|
||||
location.heat_capacity=old_heat_capacity
|
||||
location.heat_capacity = old_heat_capacity
|
||||
return ..()
|
||||
|
||||
/obj/effect/shield/singularity_act()
|
||||
@@ -129,6 +129,4 @@
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST), list(SOUTH, SOUTHEAST, SOUTHWEST), list(WEST, NORTHWEST, SOUTHWEST), list(EAST, NORTHEAST, SOUTHEAST), GLOB.alldirs, GLOB.alldirs)
|
||||
gibtypes[/obj/effect/decal/cleanable/blood/gibs/robot_debris/limb] = pick(0, 1, 2)
|
||||
. = ..()
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(2, 1, drop_location())
|
||||
sparks.start()
|
||||
do_sparks(2, TRUE, drop_location())
|
||||
|
||||
@@ -174,22 +174,16 @@
|
||||
M.Move(dest)
|
||||
|
||||
if(entersparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, src)
|
||||
s.start()
|
||||
do_sparks(4, TRUE, src)
|
||||
|
||||
if(exitsparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, dest)
|
||||
s.start()
|
||||
do_sparks(4, TRUE, dest)
|
||||
|
||||
if(entersmoke)
|
||||
var/datum/effect_system/fluid_spread/smoke/s = new
|
||||
s.set_up(4, holder = src, location = src)
|
||||
s.start()
|
||||
do_smoke(4, src, src)
|
||||
|
||||
if(exitsmoke)
|
||||
var/datum/effect_system/fluid_spread/smoke/s = new
|
||||
s.set_up(4, holder = src, location = dest)
|
||||
s.start()
|
||||
do_smoke(4, dest, dest)
|
||||
|
||||
uses--
|
||||
if(uses == 0)
|
||||
|
||||
@@ -1122,9 +1122,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
balloon_alert(user, "voltage maximized")
|
||||
icon_state = "vapeopen_high"
|
||||
set_greyscale(new_config = /datum/greyscale_config/vape/open_high)
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect
|
||||
sp.set_up(5, 1, src)
|
||||
sp.start()
|
||||
do_sparks(5, TRUE, src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/vape/attack_self(mob/user)
|
||||
@@ -1170,11 +1168,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
vaper.adjust_fire_stacks(2)
|
||||
vaper.ignite_mob()
|
||||
|
||||
if(reagents.get_reagent_amount(/datum/reagent/toxin/plasma)) // the plasma explodes when exposed to fire
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount(/datum/reagent/toxin/plasma) / 2.5, 1), get_turf(src), 0)
|
||||
e.start(src)
|
||||
// Preserve old welding fuel behavior
|
||||
if(reagents.spark_act(0, TRUE, banned_reagents = /datum/reagent/fuel) & SPARK_ACT_DESTRUCTIVE)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!reagents.trans_to(vaper, REAGENTS_METABOLISM, methods = INHALE, ignore_stomach = TRUE))
|
||||
reagents.remove_all(REAGENTS_METABOLISM)
|
||||
@@ -1198,23 +1195,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
//Time to start puffing those fat vapes, yo.
|
||||
COOLDOWN_START(src, drag_cooldown, dragtime)
|
||||
if(obj_flags & EMAGGED)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke_machine/puff = new
|
||||
puff.set_up(4, holder = src, location = loc, carry = reagents, efficiency = 24)
|
||||
puff.start()
|
||||
var/smoke_amount = DIAMOND_AREA(4)
|
||||
do_chem_smoke(amount = smoke_amount, holder = src, location = loc, carry = reagents, carry_limit = 20, smoke_type = /datum/effect_system/fluid_spread/smoke/chem/smoke_machine)
|
||||
reagents.remove_all(smoke_amount / 24)
|
||||
if(prob(5)) //small chance for the vape to break and deal damage if it's emagged
|
||||
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, FALSE)
|
||||
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
|
||||
M.Paralyze(300)
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
|
||||
sp.set_up(5, 1, src)
|
||||
sp.start()
|
||||
do_sparks(5, TRUE, src)
|
||||
to_chat(M, span_userdanger("[src] suddenly explodes in your mouth!"))
|
||||
qdel(src)
|
||||
return
|
||||
else if(super)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke_machine/puff = new
|
||||
puff.set_up(1, holder = src, location = loc, carry = reagents, efficiency = 24)
|
||||
puff.start()
|
||||
var/smoke_amount = DIAMOND_AREA(1)
|
||||
do_chem_smoke(amount = smoke_amount, holder = src, location = loc, carry = reagents, carry_limit = 20, smoke_type = /datum/effect_system/fluid_spread/smoke/chem/smoke_machine)
|
||||
reagents.remove_all(smoke_amount / 24)
|
||||
|
||||
handle_reagents()
|
||||
|
||||
|
||||
@@ -141,9 +141,7 @@
|
||||
/obj/item/soap/suicide_act(mob/living/user)
|
||||
user.say(";FFFFFFFFFFFFFFFFUUUUUUUDGE!!", forced="soap suicide")
|
||||
user.visible_message(span_suicide("[user] lifts [src] to [user.p_their()] mouth and gnaws on it furiously, producing a thick froth! [user.p_They()]'ll never get that BB gun now!"))
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(1, holder = src, location = get_turf(user))
|
||||
foam.start()
|
||||
do_foam(1, src, get_turf(user))
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/soap/proc/should_clean(datum/cleaning_source, atom/atom_to_clean, mob/living/cleaner)
|
||||
|
||||
@@ -101,10 +101,7 @@
|
||||
if(active_dummy)
|
||||
for(var/mob/M in active_dummy)
|
||||
to_chat(M, span_danger("Your chameleon projector deactivates."))
|
||||
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
do_sparks(5, FALSE, src, src)
|
||||
eject_all()
|
||||
if(delete_dummy)
|
||||
qdel(active_dummy)
|
||||
|
||||
@@ -72,10 +72,7 @@
|
||||
step(L, pick(GLOB.cardinals))
|
||||
|
||||
to_chat(L, span_danger("You feel a sharp shock!"))
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, L)
|
||||
s.start()
|
||||
|
||||
do_sparks(3, TRUE, L)
|
||||
L.Paralyze(100)
|
||||
|
||||
if(master)
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
//Cookie
|
||||
selected_turf.visible_message(span_userdanger("A cookie appears out of thin air!"))
|
||||
var/obj/item/food/cookie/ooh_a_cookie = new(drop_location())
|
||||
do_smoke(0, holder = src, location = drop_location())
|
||||
do_smoke(0, src, drop_location())
|
||||
ooh_a_cookie.name = "Cookie of Fate"
|
||||
if(12)
|
||||
//Healing
|
||||
@@ -410,12 +410,12 @@
|
||||
if(14)
|
||||
//Free Gun
|
||||
selected_turf.visible_message(span_userdanger("An impressive gun appears!"))
|
||||
do_smoke(0, holder = src, location = drop_location())
|
||||
do_smoke(0, src, drop_location())
|
||||
new /obj/item/gun/ballistic/revolver/mateba(drop_location())
|
||||
if(15)
|
||||
//Random One-use spellbook
|
||||
selected_turf.visible_message(span_userdanger("A magical looking book drops to the floor!"))
|
||||
do_smoke(0, holder = src, location = drop_location())
|
||||
do_smoke(0, src, drop_location())
|
||||
new /obj/item/book/granter/action/spell/random(drop_location())
|
||||
if(16)
|
||||
//Servant & Servant Summon
|
||||
@@ -426,12 +426,12 @@
|
||||
//Tator Kit
|
||||
selected_turf.visible_message(span_userdanger("A suspicious box appears!"))
|
||||
new /obj/item/storage/box/syndicate/bundle_a(drop_location())
|
||||
do_smoke(0, holder = src, location = drop_location())
|
||||
do_smoke(0, src, drop_location())
|
||||
if(18)
|
||||
//Captain ID
|
||||
selected_turf.visible_message(span_userdanger("A golden identification card appears!"))
|
||||
new /obj/item/card/id/advanced/gold/captains_spare(drop_location())
|
||||
do_smoke(0, holder = src, location = drop_location())
|
||||
do_smoke(0, src, drop_location())
|
||||
if(19)
|
||||
//Instrinct Resistance
|
||||
selected_turf.visible_message(span_userdanger("[user] looks very robust!"))
|
||||
|
||||
@@ -697,9 +697,7 @@
|
||||
|
||||
/obj/item/food/burger/crazy/process(seconds_per_tick) // DIT EES HORRIBLE
|
||||
if(SPT_PROB(2.5, seconds_per_tick))
|
||||
var/datum/effect_system/fluid_spread/smoke/bad/green/smoke = new
|
||||
smoke.set_up(0, holder = src, location = src)
|
||||
smoke.start()
|
||||
do_smoke(0, src, loc, smoke_type = /datum/effect_system/fluid_spread/smoke/bad/green)
|
||||
|
||||
// empty burger you can customize
|
||||
/obj/item/food/burger/empty
|
||||
|
||||
@@ -43,10 +43,7 @@
|
||||
|
||||
update_mob()
|
||||
playsound(src, 'sound/effects/smoke.ogg', 50, TRUE, -3)
|
||||
var/datum/effect_system/fluid_spread/smoke/bad/smoke = new
|
||||
smoke.set_up(4, holder = src, location = src)
|
||||
smoke.start()
|
||||
qdel(smoke) //And deleted again. Sad really.
|
||||
do_smoke(4, src, loc, smoke_type = /datum/effect_system/fluid_spread/smoke/bad)
|
||||
for(var/obj/structure/blob/blob in view(8, src))
|
||||
var/damage = round(30/(get_dist(blob, src) + 1))
|
||||
blob.take_damage(damage, BURN, MELEE, 0)
|
||||
|
||||
@@ -56,9 +56,7 @@
|
||||
/obj/item/implant/smoke/activate()
|
||||
. = ..()
|
||||
uses--
|
||||
var/datum/effect_system/fluid_spread/smoke/bad/smoke = new
|
||||
smoke.set_up(6, holder = imp_in, location = imp_in)
|
||||
smoke.start()
|
||||
do_smoke(6, imp_in, imp_in.loc, smoke_type = /datum/effect_system/fluid_spread/smoke/bad)
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -40,9 +40,7 @@
|
||||
to_chat(teleportee, span_holoparasite("You feel yourself teleporting, but are suddenly flung back to where you just were!"))
|
||||
|
||||
teleportee.apply_status_effect(/datum/status_effect/incapacitating/paralyzed, 5 SECONDS)
|
||||
var/datum/effect_system/spark_spread/quantum/spark_system = new()
|
||||
spark_system.set_up(5, TRUE, teleportee)
|
||||
spark_system.start()
|
||||
do_sparks(5, TRUE, teleportee, spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
return TRUE
|
||||
|
||||
/// Signal for COMSIG_MOB_PRE_JAUNT that prevents a user from entering a jaunt.
|
||||
@@ -52,9 +50,7 @@
|
||||
to_chat(jaunter, span_holoparasite("As you attempt to jaunt, you slam directly into the barrier between realities and are sent crashing back into corporeality!"))
|
||||
|
||||
jaunter.apply_status_effect(/datum/status_effect/incapacitating/paralyzed, 5 SECONDS)
|
||||
var/datum/effect_system/spark_spread/quantum/spark_system = new()
|
||||
spark_system.set_up(5, TRUE, jaunter)
|
||||
spark_system.start()
|
||||
do_sparks(5, TRUE, jaunter, spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
return COMPONENT_BLOCK_JAUNT
|
||||
|
||||
/obj/item/implantcase/teleport_blocker
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
armor_type = /datum/armor/item_construction
|
||||
resistance_flags = FIRE_PROOF
|
||||
/// the spark system which sparks whever the ui options are dited
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
/// current local matter inside the device, not used when silo link is on
|
||||
var/matter = 0
|
||||
/// maximum local matter this device can hold, not used when silo link is on
|
||||
@@ -47,8 +47,7 @@
|
||||
|
||||
/obj/item/construction/Initialize(mapload)
|
||||
. = ..()
|
||||
spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system = new(5, FALSE, src)
|
||||
spark_system.attach(src)
|
||||
if(construction_upgrades & RCD_UPGRADE_SILO_LINK)
|
||||
silo_mats = new (src, mapload, FALSE)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
pickup_sound = 'sound/items/handling/tools/rpd_pickup.ogg'
|
||||
sound_vary = TRUE
|
||||
///Sparks system used when changing device in the UI
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
///Direction of the device we are going to spawn, set up in the UI
|
||||
var/p_dir = NORTH
|
||||
///Initial direction of the smart pipe we are going to spawn, set up in the UI
|
||||
@@ -80,8 +80,7 @@
|
||||
|
||||
/obj/item/pipe_dispenser/Initialize(mapload)
|
||||
. = ..()
|
||||
spark_system = new
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system = new(src, 5, FALSE)
|
||||
spark_system.attach(src)
|
||||
if(!first_atmos)
|
||||
first_atmos = GLOB.atmos_pipe_recipes[GLOB.atmos_pipe_recipes[1]][1]
|
||||
|
||||
@@ -605,9 +605,7 @@
|
||||
var/prev_lockcharge = borg.lockcharge
|
||||
borg.SetLockdown(TRUE)
|
||||
borg.set_anchored(TRUE)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(1, holder = borg, location = borg.loc)
|
||||
smoke.start()
|
||||
do_smoke(1, borg, borg.loc)
|
||||
sleep(0.2 SECONDS)
|
||||
for(var/i in 1 to 4)
|
||||
playsound(borg, pick(
|
||||
|
||||
@@ -358,9 +358,7 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/resin_container/proc/Smoke()
|
||||
var/datum/effect_system/fluid_spread/foam/metal/resin/foaming = new
|
||||
foaming.set_up(4, holder = src, location = loc)
|
||||
foaming.start()
|
||||
do_foam(4, src, loc, foam_type = /datum/effect_system/fluid_spread/foam/metal/resin)
|
||||
playsound(src,'sound/effects/bamf.ogg',100,TRUE)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -829,10 +829,8 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/ash_type = /obj/effect/decal/cleanable/ash
|
||||
|
||||
/obj/item/toy/snappop/proc/pop_burst(n=3, c=1)
|
||||
var/datum/effect_system/spark_spread/s = new()
|
||||
s.set_up(n, c, src)
|
||||
s.start()
|
||||
/obj/item/toy/snappop/proc/pop_burst(n = 3, c = TRUE)
|
||||
do_sparks(n, c, src)
|
||||
new ash_type(loc)
|
||||
visible_message(span_warning("[src] explodes!"),
|
||||
span_hear("You hear a snap!"))
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
heat = 3500
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
/// Our linked spark system that emits from our sword.
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
var/list/alt_continuous = list("stabs", "pierces", "impales")
|
||||
var/list/alt_simple = list("stab", "pierce", "impale")
|
||||
|
||||
@@ -368,8 +368,7 @@
|
||||
alt_continuous = string_list(alt_continuous)
|
||||
alt_simple = string_list(alt_simple)
|
||||
AddComponent(/datum/component/alternative_sharpness, SHARP_POINTY, alt_continuous, alt_simple, -10)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system = new(5, FALSE, src)
|
||||
spark_system.attach(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
ADD_TRAIT(src, TRAIT_TRANSFORM_ACTIVE, INNATE_TRAIT) // Functions as an extended esword
|
||||
|
||||
@@ -343,10 +343,7 @@
|
||||
return FALSE
|
||||
if(prob(50)) // Shocking hurts the grille (to weaken monkey powersinks)
|
||||
take_damage(1, BURN, FIRE, sound_effect = FALSE)
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(3, 1, src)
|
||||
sparks.start()
|
||||
|
||||
do_sparks(3, TRUE, src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/grille/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
|
||||
/obj/structure/hivebot_beacon/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(2, holder = src, location = loc)
|
||||
smoke.start()
|
||||
do_smoke(2, src, loc)
|
||||
visible_message(span_bolddanger("[src] warps in!"))
|
||||
playsound(src.loc, 'sound/effects/empulse.ogg', 25, TRUE)
|
||||
addtimer(CALLBACK(src, PROC_REF(warpbots)), rand(1 SECONDS, 1 MINUTES))
|
||||
|
||||
@@ -325,9 +325,7 @@ at the cost of risking a vicious bite.**/
|
||||
return
|
||||
if(!ismob(leaving))
|
||||
return
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(range = 1, amount = 1, location = src)
|
||||
smoke.start()
|
||||
do_smoke(1, src, loc)
|
||||
playsound(src, 'sound/machines/steam_hiss.ogg', 75, TRUE, -2)
|
||||
COOLDOWN_START(src, steam_vent_interact, steam_speed)
|
||||
|
||||
|
||||
@@ -833,10 +833,7 @@
|
||||
if(!electrocute_mob(user, cable_node, src, 1, TRUE))
|
||||
return FALSE
|
||||
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(3, TRUE, src)
|
||||
sparks.start()
|
||||
|
||||
do_sparks(3, TRUE, src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/table/bronze
|
||||
|
||||
@@ -56,9 +56,10 @@
|
||||
user.balloon_alert(user, "[item.name] is blocking the pipes!")
|
||||
continue
|
||||
playsound(src, 'sound/items/modsuit/flamethrower.ogg', 50)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke_machine/puff = new
|
||||
puff.set_up(smokeradius, holder = src, location = user, carry = item.reagents, efficiency = 20)
|
||||
puff.start()
|
||||
|
||||
var/smoke_amount = DIAMOND_AREA(smokeradius)
|
||||
do_chem_smoke(amount = smoke_amount, holder = src, location = loc, carry = reagents, carry_limit = 20, smoke_type = /datum/effect_system/fluid_spread/smoke/chem/smoke_machine)
|
||||
reagents.remove_all(smoke_amount / 20)
|
||||
if (prob(5) && !(obj_flags & EMAGGED))
|
||||
if(user.get_liked_foodtypes() & GORE)
|
||||
user.balloon_alert(user, "a hidden treat!")
|
||||
|
||||
@@ -16,14 +16,12 @@
|
||||
var/list/mob/immune_minds = list()
|
||||
|
||||
var/sparks = TRUE
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
|
||||
/obj/structure/trap/Initialize(mapload)
|
||||
. = ..()
|
||||
flare_message = span_warning("[src] flares brightly!")
|
||||
spark_system = new
|
||||
spark_system.set_up(4,1,src)
|
||||
spark_system.attach(src)
|
||||
spark_system = new(src, 4, TRUE)
|
||||
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_ATOM_ENTERED = PROC_REF(on_entered)
|
||||
@@ -37,9 +35,8 @@
|
||||
))
|
||||
|
||||
/obj/structure/trap/Destroy()
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
. = ..()
|
||||
QDEL_NULL(spark_system)
|
||||
return ..()
|
||||
|
||||
/obj/structure/trap/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -147,7 +144,7 @@
|
||||
icon_state = "bounty_trap_off"
|
||||
var/obj/structure/trap/stun/hunter/stored_trap
|
||||
var/obj/item/radio/radio
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
|
||||
/obj/item/bountytrap/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -155,8 +152,7 @@
|
||||
radio.subspace_transmission = TRUE
|
||||
radio.canhear_range = 0
|
||||
radio.recalculateChannels()
|
||||
spark_system = new
|
||||
spark_system.set_up(4,1,src)
|
||||
spark_system = new(src, 4, TRUE)
|
||||
spark_system.attach(src)
|
||||
name = "[name] #[rand(1, 999)]"
|
||||
stored_trap = new(src)
|
||||
|
||||
@@ -484,9 +484,7 @@ Return to step 11 of normal process."}
|
||||
/obj/item/restraints/handcuffs/energy/on_uncuffed(datum/source, mob/living/wearer)
|
||||
. = ..()
|
||||
wearer.visible_message(span_danger("[wearer]'s [name] breaks in a discharge of energy!"), span_userdanger("[wearer]'s [name] breaks in a discharge of energy!"))
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(4,0,wearer.loc)
|
||||
sparks.start()
|
||||
do_sparks(4, FALSE, wearer.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/melee/baton/abductor/examine(mob/user)
|
||||
|
||||
@@ -58,9 +58,7 @@
|
||||
|
||||
/obj/effect/temp_visual/teleport_abductor/Initialize(mapload)
|
||||
. = ..()
|
||||
var/datum/effect_system/spark_spread/S = new
|
||||
S.set_up(10,0,loc)
|
||||
S.start()
|
||||
do_sparks(10, FALSE, loc)
|
||||
|
||||
/obj/effect/temp_visual/teleport_golem
|
||||
name = "bluespace silhouette"
|
||||
|
||||
@@ -106,9 +106,7 @@
|
||||
color = "#d6ad8b"
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/psykerboost/cooldown_activation(mob/living/carbon/human/owner)
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
do_sparks(1, TRUE, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/psykerboost/reactive_activation(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
|
||||
@@ -147,8 +147,7 @@
|
||||
else
|
||||
human_user.gib(DROP_ALL_REMAINS)
|
||||
human_user.investigate_log("has died from using telekinesis on a heretic influence.", INVESTIGATE_DEATHS)
|
||||
var/datum/effect_system/reagents_explosion/explosion = new()
|
||||
explosion.set_up(1, get_turf(human_user), 1)
|
||||
var/datum/effect_system/reagents_explosion/explosion = new(get_turf(human_user), 1, 1, 1)
|
||||
explosion.start(src)
|
||||
|
||||
/obj/effect/visible_heretic_influence/examine(mob/living/user)
|
||||
|
||||
@@ -303,8 +303,7 @@
|
||||
var/obj/item/bodypart/head/head = locate() in carbon_view.bodyparts
|
||||
if(!head?.dismember())
|
||||
carbon_view.gib(DROP_ALL_REMAINS)
|
||||
var/datum/effect_system/reagents_explosion/explosion = new()
|
||||
explosion.set_up(1, get_turf(carbon_view), 1)
|
||||
var/datum/effect_system/reagents_explosion/explosion = new(get_turf(carbon_view), 1, 1, 1)
|
||||
explosion.start(src)
|
||||
else
|
||||
attempt_conversion(carbon_view, source)
|
||||
|
||||
@@ -57,13 +57,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/nuclearbomb/beer/proc/local_foam()
|
||||
var/datum/reagents/tmp_holder = new/datum/reagents(1000)
|
||||
tmp_holder.my_atom = src
|
||||
tmp_holder.add_reagent(flood_reagent, 100)
|
||||
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(200, holder = src, location = get_turf(src), carry = tmp_holder)
|
||||
foam.start()
|
||||
do_foam(200, src, get_turf(src), flood_reagent, 100)
|
||||
disarm_nuke()
|
||||
|
||||
/obj/machinery/nuclearbomb/beer/really_actually_explode(detonation_status)
|
||||
|
||||
@@ -36,14 +36,13 @@
|
||||
max_integrity = 200
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
item_flags = NEEDS_PERMIT
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/spark_system
|
||||
var/datum/action/innate/dash/ninja/jaunt
|
||||
|
||||
/obj/item/energy_katana/Initialize(mapload)
|
||||
. = ..()
|
||||
jaunt = new(src)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system = new(src, 5, FALSE)
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/energy_katana/ranged_interact_with_atom_secondary(atom/interacting_with, mob/living/user, list/modifiers)
|
||||
|
||||
@@ -105,9 +105,8 @@
|
||||
/obj/item/mjollnir/proc/shock(mob/living/target)
|
||||
target.Stun(1.5 SECONDS)
|
||||
target.Knockdown(10 SECONDS)
|
||||
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
|
||||
s.set_up(5, 1, target.loc)
|
||||
s.start()
|
||||
var/datum/effect_system/basic/lightning_spread/lightning = new(target.loc, 5, TRUE)
|
||||
lightning.start()
|
||||
target.visible_message(span_danger("[target.name] is shocked by [src]!"), \
|
||||
span_userdanger("You feel a powerful shock course through your body sending you flying!"), \
|
||||
span_hear("You hear a heavy electrical crack!"))
|
||||
|
||||
@@ -247,9 +247,7 @@
|
||||
/datum/grand_side_effect/smoke/trigger(potency, turf/ritual_location, mob/invoker)
|
||||
playsound(src, 'sound/effects/magic/smoke.ogg', 50, TRUE)
|
||||
var/range = LERP(2, 4, potency/GRAND_RITUAL_FINALE_COUNT)
|
||||
var/datum/effect_system/fluid_spread/smoke/colourful/smoke = new
|
||||
smoke.set_up(range, holder = ritual_location, location = ritual_location)
|
||||
smoke.start()
|
||||
do_smoke(round(range), ritual_location, ritual_location, smoke_type = /datum/effect_system/fluid_spread/smoke/colourful)
|
||||
|
||||
/// Spawns randomly coloured smoke
|
||||
/datum/effect_system/fluid_spread/smoke/colourful
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
desc = "A small electronic device able to ignite combustible substances."
|
||||
icon_state = "igniter"
|
||||
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*5, /datum/material/glass=SMALL_MATERIAL_AMOUNT*0.5)
|
||||
var/datum/effect_system/spark_spread/sparks
|
||||
var/datum/effect_system/basic/spark_spread/sparks
|
||||
heat = 1000
|
||||
drop_sound = 'sound/items/handling/component_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
||||
@@ -21,15 +21,12 @@
|
||||
|
||||
/obj/item/assembly/igniter/Initialize(mapload)
|
||||
. = ..()
|
||||
sparks = new
|
||||
sparks.set_up(2, 0, src)
|
||||
sparks = new(src, 2, FALSE)
|
||||
sparks.attach(src)
|
||||
|
||||
/obj/item/assembly/igniter/Destroy()
|
||||
if(sparks)
|
||||
qdel(sparks)
|
||||
sparks = null
|
||||
. = ..()
|
||||
QDEL_NULL(sparks)
|
||||
return ..()
|
||||
|
||||
/obj/item/assembly/igniter/activate()
|
||||
if(!..())
|
||||
|
||||
@@ -887,9 +887,7 @@
|
||||
var/obj/effect/particle_effect/fluid/foam/foam = locate() in location
|
||||
var/obj/structure/foamedmetal/resin = locate() in location
|
||||
if(heat_efficiency > HALON_COMBUSTION_MINIMUM_RESIN_MOLES && isopenturf(location) && !foam && !resin) // Don't resin if there is aleady resin or we are not in an open turf.
|
||||
var/datum/effect_system/fluid_spread/foam/metal/resin/halon/foaming = new
|
||||
foaming.set_up(amount = HALON_COMBUSTION_RESIN_VOLUME, holder = holder, location = location)
|
||||
foaming.start()
|
||||
do_foam(amount = HALON_COMBUSTION_RESIN_VOLUME, holder = holder, location = location, foam_type = /datum/effect_system/fluid_spread/foam/metal/resin/halon)
|
||||
. |= VOLATILE_REACTION
|
||||
|
||||
. |= REACTING
|
||||
|
||||
@@ -167,13 +167,10 @@
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE //you lucked out, no shock for you
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start() //sparks always.
|
||||
do_sparks(5, TRUE, src)
|
||||
if (electrocute_mob(user, get_area(src), src, 1, TRUE))
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/item/electronics/airalarm
|
||||
name = "air alarm electronics"
|
||||
|
||||
+1
-8
@@ -48,12 +48,5 @@
|
||||
|
||||
/obj/item/nitrium_crystal/attack_self(mob/user)
|
||||
. = ..()
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new
|
||||
var/turf/location = get_turf(src)
|
||||
create_reagents(5)
|
||||
reagents.add_reagent(/datum/reagent/nitrium_low_metabolization, 3)
|
||||
reagents.add_reagent(/datum/reagent/nitrium_high_metabolization, 2)
|
||||
smoke.attach(location)
|
||||
smoke.set_up(cloud_size, holder = src, location = location, carry = reagents, silent = TRUE)
|
||||
smoke.start()
|
||||
do_chem_smoke(cloud_size, src, get_turf(src), list(/datum/reagent/nitrium_low_metabolization = 3, /datum/reagent/nitrium_high_metabolization = 2))
|
||||
qdel(src)
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
SpeakPeace(list("Welcome to the error handling room.","Something's goofed up bad to send you here.","You should probably tell an admin what you were doing, or make a bug report."))
|
||||
for(var/obj/structure/signpost/salvation/sign in orange(7))
|
||||
sign.SetInvisibility(INVISIBILITY_NONE)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(1, holder = src, location = sign.loc)
|
||||
smoke.start()
|
||||
do_smoke(1, src, sign.loc)
|
||||
break
|
||||
if(1)
|
||||
SpeakPeace(list("Take that ladder up.","It'll send you back to the station.","Hopefully you'll never need to see this place again."))
|
||||
|
||||
@@ -32,9 +32,5 @@
|
||||
var/turf/tile = parent
|
||||
var/obj/structure/closet/crate/secure/bitrunning/encrypted/crate = new()
|
||||
crate.forceMove(tile) // Triggers any on-move effects on that turf
|
||||
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new(tile)
|
||||
sparks.set_up(number = 5, location = tile)
|
||||
sparks.start()
|
||||
|
||||
do_sparks(5, FALSE, tile, spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
qdel(src)
|
||||
|
||||
@@ -60,10 +60,7 @@
|
||||
/obj/machinery/byteforge/proc/flash(atom/movable/thing)
|
||||
playsound(src, 'sound/effects/magic/blink.ogg', 50, TRUE)
|
||||
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new()
|
||||
sparks.set_up(5, 1, loc)
|
||||
sparks.start()
|
||||
|
||||
do_sparks(5, TRUE, loc, spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
set_light(l_on = FALSE)
|
||||
|
||||
/// Forge begins to process
|
||||
|
||||
@@ -135,9 +135,7 @@
|
||||
/// Do some magic teleport sparks
|
||||
/obj/machinery/quantum_server/proc/spark_at_location(obj/cache)
|
||||
playsound(cache, 'sound/effects/magic/blink.ogg', 50, vary = TRUE)
|
||||
var/datum/effect_system/spark_spread/quantum/sparks = new()
|
||||
sparks.set_up(5, location = get_turf(cache))
|
||||
sparks.start()
|
||||
do_sparks(5, FALSE, get_turf(cache), spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
|
||||
|
||||
/// Starts building a new avatar for the player.
|
||||
|
||||
@@ -366,11 +366,7 @@
|
||||
receiving.post_purchase_effects(receiving.item)
|
||||
|
||||
use_energy(energy_usage_per_teleport / power_efficiency)
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(5, 1, get_turf(src))
|
||||
sparks.attach(receiving.item)
|
||||
sparks.start()
|
||||
|
||||
do_sparks(5, TRUE, src, receiving.item)
|
||||
transmitting = receiving
|
||||
receiving = null
|
||||
|
||||
|
||||
@@ -164,17 +164,6 @@
|
||||
var/stagger_duration = 3 SECONDS
|
||||
/// The amount of hallucination to apply
|
||||
var/hallucination_duration = 25 SECONDS
|
||||
/// Spark system
|
||||
var/datum/effect_system/spark_spread/quantum/spark_sys
|
||||
|
||||
/datum/action/cooldown/spell/pointed/percept_hallucination/New(Target)
|
||||
. = ..()
|
||||
|
||||
spark_sys = new /datum/effect_system/spark_spread/quantum
|
||||
|
||||
/datum/action/cooldown/spell/pointed/percept_hallucination/Destroy()
|
||||
QDEL_NULL(spark_sys)
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/spell/pointed/percept_hallucination/is_valid_target(atom/cast_on)
|
||||
. = ..()
|
||||
@@ -216,11 +205,8 @@
|
||||
|
||||
/datum/action/cooldown/spell/pointed/percept_hallucination/proc/cast_fx(atom/cast_on)
|
||||
owner.Beam(cast_on, icon_state = "greyscale_lightning", beam_color = COLOR_FADED_PINK, time = 0.5 SECONDS)
|
||||
|
||||
spark_sys.set_up(2, 1, get_turf(owner))
|
||||
spark_sys.start()
|
||||
spark_sys.set_up(4, 1, get_turf(cast_on))
|
||||
spark_sys.start()
|
||||
do_sparks(2, TRUE, get_turf(owner), spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
do_sparks(4, TRUE, get_turf(owner), spark_type = /datum/effect_system/basic/spark_spread/quantum)
|
||||
|
||||
/datum/action/cooldown/spell/pointed/percept_hallucination/cast(mob/living/carbon/human/cast_on)
|
||||
. = ..()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
COOLDOWN_START(src, rabbit_cooldown, RABBIT_CD_TIME)
|
||||
playsound(get_turf(src), 'sound/items/weapons/emitter.ogg', 70)
|
||||
do_smoke(amount = DIAMOND_AREA(1), holder = src, location = src, smoke_type=/obj/effect/particle_effect/fluid/smoke/quick)
|
||||
do_smoke(1, src, src, effect_type = /obj/effect/particle_effect/fluid/smoke/quick)
|
||||
|
||||
if(prob(10))
|
||||
magician.visible_message(span_danger("[magician] taps [src] with [hitby_wand], then reaches in and pulls out a bu- wait, those are bees!"), span_danger("You tap [src] with your [hitby_wand.name] and pull out... <b>BEES!</b>"))
|
||||
|
||||
@@ -240,9 +240,7 @@
|
||||
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/tesla/cooldown_activation(mob/living/carbon/human/owner)
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/tesla/reactive_activation(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
@@ -337,9 +335,7 @@
|
||||
clothing_traits = list(TRAIT_MADNESS_IMMUNE)
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/hallucinating/cooldown_activation(mob/living/carbon/human/owner)
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
do_sparks(1, TRUE, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/hallucinating/reactive_activation(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
@@ -392,9 +388,7 @@
|
||||
r_legs = typesof(/obj/item/bodypart/leg/right)
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/bioscrambling/cooldown_activation(mob/living/carbon/human/owner)
|
||||
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
||||
sparks.set_up(1, 1, src)
|
||||
sparks.start()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/bioscrambling/reactive_activation(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
@@ -508,8 +502,7 @@
|
||||
owner.visible_message(span_danger("The reactive armor alters the weather around [owner], shielding [owner.p_them()] from [attack_text]!"))
|
||||
playsound(src, 'sound/effects/magic/lightningshock.ogg', 33, TRUE, extrarange = SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
|
||||
var/datum/effect_system/steam_spread/steam = new()
|
||||
steam.set_up(10, FALSE, owner.loc)
|
||||
var/datum/effect_system/basic/steam_spread/steam = new(owner.loc, 10, FALSE)
|
||||
steam.start()
|
||||
|
||||
var/list/affected_turfs = list()
|
||||
@@ -531,8 +524,7 @@
|
||||
owner.visible_message(span_danger("The reactive armor malfunctions, calling down a storm upon [owner.p_them()]!"))
|
||||
playsound(src, 'sound/effects/magic/lightningshock.ogg', 33, TRUE, extrarange = SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
|
||||
var/datum/effect_system/steam_spread/steam = new()
|
||||
steam.set_up(2, FALSE, owner.loc)
|
||||
var/datum/effect_system/basic/steam_spread/steam = new(owner.loc, 2, FALSE)
|
||||
steam.start()
|
||||
|
||||
owner.adjust_wet_stacks(10)
|
||||
|
||||
@@ -176,8 +176,4 @@
|
||||
addtimer(CALLBACK(src, PROC_REF(check_fire_state)), extinguish_cooldown)
|
||||
owner.visible_message(span_warning("[owner]'s suit spews space lube everywhere!"), span_warning("Your suit spews space lube everywhere!"))
|
||||
owner.extinguish_mob()
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
var/datum/reagents/foamreagent = new /datum/reagents(15)
|
||||
foamreagent.add_reagent(/datum/reagent/lube, 15)
|
||||
foam.set_up(4, holder = src, location = get_turf(owner), carry = foamreagent)
|
||||
foam.start() //Truly terrifying.
|
||||
do_foam(4, src, get_turf(owner), /datum/reagent/lube, 15)
|
||||
|
||||
@@ -164,9 +164,7 @@
|
||||
// they ALSO collapse into a singulo.
|
||||
if(istype(clong, /obj/effect/immovablerod))
|
||||
visible_message(span_danger("[src] collides with [clong]! This cannot end well."))
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(2, holder = src, location = get_turf(src))
|
||||
smoke.start()
|
||||
do_smoke(2, src, get_turf(src))
|
||||
var/obj/singularity/bad_luck = new(get_turf(src))
|
||||
bad_luck.energy = 800
|
||||
qdel(clong)
|
||||
|
||||
@@ -135,13 +135,9 @@
|
||||
|
||||
/// Helper to shoot some smoke into the air around the passed atom
|
||||
/datum/round_event/radiation_leak/proc/puff_some_smoke(atom/where)
|
||||
// Causes radioation and mutations
|
||||
var/turf/below_where = get_turf(where)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/gross_smoke = new()
|
||||
gross_smoke.chemholder.add_reagent(/datum/reagent/toxin/polonium, 10) // Polonium (it causes radiation)
|
||||
gross_smoke.chemholder.add_reagent(/datum/reagent/toxin/mutagen, 10) // Mutagen (it causes mutations. Also it's green... Primarily because it's green.)
|
||||
gross_smoke.attach(below_where)
|
||||
gross_smoke.set_up(2, holder = where, location = below_where, silent = TRUE)
|
||||
gross_smoke.start()
|
||||
do_chem_smoke(2, where, below_where, list(/datum/reagent/toxin/polonium = 10, /datum/reagent/toxin/mutagen = 10))
|
||||
playsound(below_where, 'sound/effects/smoke.ogg', 50, vary = TRUE)
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
else
|
||||
targetloc = get_safe_random_station_turf()
|
||||
var/mob/living/basic/cow/wisdom/wise = new(targetloc, selected_wisdom, selected_experience, forced_reagent_type)
|
||||
do_smoke(1, holder = wise, location = targetloc)
|
||||
do_smoke(1, wise, targetloc)
|
||||
announce_to_ghosts(wise)
|
||||
|
||||
/datum/event_admin_setup/set_location/wisdom_cow
|
||||
|
||||
@@ -83,9 +83,7 @@
|
||||
victims += target
|
||||
|
||||
for(var/mob/living/carbon/human/victim as anything in victims)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(0, holder = victim, location = victim.loc)
|
||||
smoke.start()
|
||||
do_smoke(0, victim, victim.loc)
|
||||
|
||||
#undef BIG_FAT_DOOBIE
|
||||
#undef BOXING
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
moblocs.len -= 1
|
||||
|
||||
for(var/mob/living/carbon/human/victim in GLOB.alive_mob_list)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(0, holder = victim, location = victim.loc)
|
||||
smoke.start()
|
||||
do_smoke(0, victim, victim.loc)
|
||||
|
||||
//---//
|
||||
|
||||
@@ -69,9 +67,7 @@
|
||||
mobnames.len -= 1
|
||||
|
||||
for(var/mob/living/carbon/human/victim in GLOB.alive_mob_list)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(0, holder = victim, location = victim.loc)
|
||||
smoke.start()
|
||||
do_smoke(0, victim, victim.loc)
|
||||
|
||||
//---//
|
||||
|
||||
@@ -107,6 +103,4 @@
|
||||
qdel(swapper)
|
||||
|
||||
for(var/mob/living/carbon/human/alive_human in GLOB.alive_mob_list)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new()
|
||||
smoke.set_up(0, holder = alive_human, location = alive_human.loc)
|
||||
smoke.start()
|
||||
do_smoke(0, alive_human, alive_human.loc)
|
||||
|
||||
@@ -437,7 +437,7 @@ GLOBAL_LIST_EMPTY(exodrone_launchers)
|
||||
*/
|
||||
/obj/machinery/exodrone_launcher/proc/launch_effect()
|
||||
playsound(src,'sound/effects/podwoosh.ogg',50, FALSE)
|
||||
do_smoke(1, holder = src, location = get_turf(src))
|
||||
do_smoke(1, src, get_turf(src))
|
||||
|
||||
/obj/machinery/exodrone_launcher/Exited(atom/movable/gone, direction)
|
||||
. = ..()
|
||||
|
||||
@@ -43,9 +43,7 @@
|
||||
new /obj/item/stack/rods(loc, 5)
|
||||
|
||||
if(grill_fuel > 0)
|
||||
var/datum/effect_system/fluid_spread/smoke/bad/smoke = new
|
||||
smoke.set_up(1, holder = src, location = loc)
|
||||
smoke.start()
|
||||
do_smoke(1, src, loc, smoke_type = /datum/effect_system/fluid_spread/smoke/bad)
|
||||
|
||||
/obj/machinery/grill/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
||||
. = NONE
|
||||
@@ -273,9 +271,7 @@
|
||||
//use fuel, create smoke puffs for immersion
|
||||
grill_fuel -= fuel_usage
|
||||
if(SPT_PROB(0.5, seconds_per_tick))
|
||||
var/datum/effect_system/fluid_spread/smoke/bad/smoke = new
|
||||
smoke.set_up(1, holder = src, location = loc)
|
||||
smoke.start()
|
||||
do_smoke(1, src, loc, smoke_type = /datum/effect_system/fluid_spread/smoke/bad)
|
||||
|
||||
fuel_usage = GRILL_FUELUSAGE_ACTIVE * seconds_per_tick
|
||||
if(!QDELETED(grilled_item))
|
||||
|
||||
@@ -643,9 +643,7 @@
|
||||
|
||||
/obj/machinery/microwave/proc/spark()
|
||||
visible_message(span_warning("Sparks fly around [src]!"))
|
||||
var/datum/effect_system/spark_spread/sparks = new
|
||||
sparks.set_up(2, 1, src)
|
||||
sparks.start()
|
||||
do_sparks(2, TRUE, src)
|
||||
|
||||
/**
|
||||
* The start of the cook loop
|
||||
|
||||
@@ -205,10 +205,7 @@
|
||||
if(holder.total_volume >= holder.maximum_volume * 0.95)
|
||||
below_pot.visible_message(span_warning("[pot] starts to boil over!"))
|
||||
// Create a spread of dirty foam
|
||||
var/datum/effect_system/fluid_spread/foam/dirty/soup_mess = new()
|
||||
soup_mess.reagent_scale = 0.1 // (Just a little)
|
||||
soup_mess.set_up(range = 1, holder = pot, location = below_pot, carry = holder, stop_reactions = TRUE)
|
||||
soup_mess.start()
|
||||
do_foam(1, pot, below_pot, carry = holder, foam_type = /datum/effect_system/fluid_spread/foam/dirty, stop_reactions = TRUE, reagent_scale = 0.1)
|
||||
// Loses a bit from the foam
|
||||
for(var/datum/reagent/reagent as anything in holder.reagent_list)
|
||||
reagent.volume *= 0.5
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
/obj/effect/holodeck_effect/sparks/activate(obj/machinery/computer/holodeck/HC)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(3, 1, T)
|
||||
s.start()
|
||||
do_sparks(3, TRUE, T)
|
||||
T.temperature = 5000 //Why? not quite sure to be honest with you
|
||||
T.hotspot_expose(50000,50000,1)
|
||||
|
||||
|
||||
@@ -50,12 +50,8 @@
|
||||
AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/onion_slice/red, 2, 15, screentip_verb = "Cut")
|
||||
|
||||
/obj/item/food/grown/onion/UsedforProcessing(mob/living/user, obj/item/I, list/chosen_option, list/created_atoms)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/cry_about_it = new //Since the onion is destroyed when it's sliced,
|
||||
var/splat_location = get_turf(src) //we need to set up the smoke beforehand
|
||||
cry_about_it.attach(splat_location)
|
||||
cry_about_it.set_up(0, holder = src, location = splat_location, carry = reagents, silent = FALSE)
|
||||
cry_about_it.start()
|
||||
qdel(cry_about_it)
|
||||
do_chem_smoke(0, src, splat_location, carry = reagents, silent = FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/item/food/onion_slice
|
||||
|
||||
@@ -691,13 +691,10 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
our_plant.investigate_log("made smoke at [AREACOORD(target)]. Last touched by: [our_plant.fingerprintslast].", INVESTIGATE_BOTANY)
|
||||
var/datum/effect_system/fluid_spread/smoke/chem/smoke = new ()
|
||||
var/obj/item/seeds/our_seed = our_plant.get_plant_seed()
|
||||
var/splat_location = get_turf(target)
|
||||
var/range = sqrt(our_seed.potency * 0.1)
|
||||
smoke.attach(splat_location)
|
||||
smoke.set_up(round(range), holder = our_plant, location = splat_location, carry = our_plant.reagents, silent = FALSE)
|
||||
smoke.start(log = TRUE)
|
||||
do_chem_smoke(round(range), our_plant, splat_location, carry = our_plant.reagents, silent = FALSE, log = TRUE)
|
||||
our_plant.reagents.clear_reagents()
|
||||
|
||||
/// Makes the plant and its seeds fireproof. From lavaland plants.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
max_integrity = 100
|
||||
/// list of emotes whose cd is overridden by this skillchip. can be edited in mapping or ingame
|
||||
var/list/affected_emotes = list("spin", "flip", "backflip")
|
||||
var/datum/effect_system/spark_spread/sparks
|
||||
var/datum/effect_system/basic/spark_spread/sparks
|
||||
/// you can use this without lowering integrity! let's be honest. nobody's doing that
|
||||
var/allowed_usage = 5
|
||||
/// How many seconds does it take for it to recover one allowed usage
|
||||
@@ -49,7 +49,8 @@
|
||||
take_damage(1, sound_effect = FALSE)
|
||||
|
||||
if(!sparks)
|
||||
sparks = new(src)
|
||||
sparks = new(src, 5, FALSE)
|
||||
sparks.attach(src)
|
||||
|
||||
// minimum roll is by default capped at 50, with the min value lowering as integrity is reduced.
|
||||
var/mintegrity = clamp(50 - (100 - get_integrity()), 1, 100)
|
||||
@@ -84,8 +85,7 @@
|
||||
|
||||
// does not necessarily kill you directly. instead it causes cranial fissure + something to drop from your head. could be eyes, tongue, ears, brain, even implants
|
||||
new /obj/effect/gibspawner/generic(get_turf(bozo), bozo)
|
||||
|
||||
sparks.set_up(15, cardinals_only = FALSE, location = get_turf(src))
|
||||
sparks.amount = 15
|
||||
sparks.start()
|
||||
|
||||
qdel(src)
|
||||
@@ -101,8 +101,7 @@
|
||||
bozo.set_eye_blur_if_lower(10 SECONDS)
|
||||
// but the rest of the effects will happen either way
|
||||
bozo.adjust_organ_loss(ORGAN_SLOT_BRAIN, 20 - get_integrity())
|
||||
|
||||
sparks.set_up(5, cardinals_only = FALSE, location = get_turf(src))
|
||||
sparks.amount = 5
|
||||
sparks.start()
|
||||
|
||||
// brain Smoking. you should probably stop now
|
||||
@@ -142,8 +141,7 @@
|
||||
particle_effect.set_particle_position(-2, 12, 0)
|
||||
bozo.apply_status_effect(/datum/status_effect/temperature_over_time/chip_overheat, 15 SECONDS)
|
||||
QDEL_IN(particle_effect, 15 SECONDS)
|
||||
|
||||
sparks.set_up(10, cardinals_only = FALSE, location = get_turf(src))
|
||||
sparks.amount = 10
|
||||
sparks.start()
|
||||
|
||||
// hey, something isn't right...
|
||||
@@ -152,7 +150,7 @@
|
||||
span_warning("[bozo]'s head sparks."),
|
||||
)
|
||||
|
||||
sparks.set_up(rand(1,2), cardinals_only = TRUE, location = get_turf(src))
|
||||
sparks.amount = rand(1, 2)
|
||||
sparks.start()
|
||||
|
||||
return COMPONENT_EMOTE_COOLDOWN_BYPASS
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/// distortion to really give you that sense of oh shit
|
||||
var/atom/movable/warp_effect/warp
|
||||
/// and another oh shit in the form of quantum sparks
|
||||
var/datum/effect_system/spark_spread/quantum/spark_system
|
||||
var/datum/effect_system/basic/spark_spread/quantum/spark_system
|
||||
/// in case we miss, we can go back to the previous security level
|
||||
var/previous_security_level
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
SSsecurity_level.set_level(SEC_LEVEL_RED)
|
||||
warp = new(src)
|
||||
vis_contents += warp
|
||||
spark_system = new /datum/effect_system/spark_spread/quantum()
|
||||
spark_system.set_up(4, TRUE, src)
|
||||
spark_system = new /datum/effect_system/basic/spark_spread/quantum(src, 4, TRUE)
|
||||
spark_system.attach(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/// Make a cloud which applies brimdust to everyone nearby
|
||||
/obj/item/organ/monster_core/brimdust_sac/on_triggered_internal()
|
||||
var/turf/origin_turf = get_turf(owner)
|
||||
do_smoke(range = 2, holder = owner, location = origin_turf, smoke_type = /obj/effect/particle_effect/fluid/smoke/bad/brimdust)
|
||||
do_smoke(2, owner, origin_turf, effect_type = /obj/effect/particle_effect/fluid/smoke/bad/brimdust)
|
||||
|
||||
/// Smoke which applies brimdust to you, and is also bad for your lungs
|
||||
/obj/effect/particle_effect/fluid/smoke/bad/brimdust
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
/datum/action/cooldown/mob_cooldown/bot/foam/Activate(mob/living/firer, atom/target)
|
||||
owner.visible_message(span_danger("[owner] whirs and bubbles violently, before releasing a plume of froth!"))
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(foam_range, holder = owner, location = owner.loc)
|
||||
foam.start()
|
||||
do_foam(foam_range, owner, owner.loc)
|
||||
StartCooldown()
|
||||
return TRUE
|
||||
|
||||
@@ -134,9 +134,7 @@
|
||||
/mob/living/basic/bot/firebot/atmos_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
if(!COOLDOWN_FINISHED(src, foam_cooldown))
|
||||
return
|
||||
var/datum/effect_system/fluid_spread/foam/firefighting/foam = new
|
||||
foam.set_up(3, holder = src, location = loc)
|
||||
foam.start()
|
||||
do_foam(3, src, loc, foam_type = /datum/effect_system/fluid_spread/foam/firefighting)
|
||||
COOLDOWN_START(src, foam_cooldown, FOAM_INTERVAL)
|
||||
|
||||
/mob/living/basic/bot/firebot/proc/spray_water(atom/attacked_atom, list/modifiers)
|
||||
|
||||
@@ -68,9 +68,7 @@
|
||||
RegisterSignal(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, PROC_REF(on_attack))
|
||||
|
||||
/mob/living/basic/bot/hygienebot/explode()
|
||||
var/datum/effect_system/fluid_spread/foam/foam = new
|
||||
foam.set_up(2, holder = src, location = loc)
|
||||
foam.start()
|
||||
do_foam(2, src, loc)
|
||||
return ..()
|
||||
|
||||
/mob/living/basic/bot/hygienebot/generate_speak_list()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(!stat && !user.combat_mode)
|
||||
to_chat(user, span_nicegreen("[src] whispers you some intense wisdoms and then disappears!"))
|
||||
user.mind?.adjust_experience(granted_wisdom, granted_experience)
|
||||
do_smoke(1, holder = src, location = get_turf(src))
|
||||
do_smoke(1, src, get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -153,9 +153,7 @@
|
||||
|
||||
/obj/effect/temp_visual/falling_rocket/proc/create_explosion()
|
||||
playsound(src, 'sound/items/weapons/minebot_rocket.ogg', 100, FALSE)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(1, holder = src)
|
||||
smoke.start()
|
||||
do_smoke(1, src, loc)
|
||||
for(var/mob/living/living_target in oview(explosion_radius, src))
|
||||
if(living_target.incorporeal_move)
|
||||
continue
|
||||
@@ -171,9 +169,7 @@
|
||||
/obj/effect/mine/minebot/mineEffect(mob/living/victim)
|
||||
if(!istype(victim))
|
||||
return
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
smoke.set_up(0, holder = src)
|
||||
smoke.start()
|
||||
do_smoke(0, src, loc)
|
||||
playsound(src, 'sound/effects/explosion/explosion3.ogg', 100)
|
||||
victim.apply_damage(damage_to_apply)
|
||||
|
||||
|
||||
@@ -119,9 +119,7 @@
|
||||
continue
|
||||
|
||||
light.visible_message(span_boldwarning("[light] suddenly flares brightly and begins to spark!"))
|
||||
var/datum/effect_system/spark_spread/light_sparks = new /datum/effect_system/spark_spread()
|
||||
light_sparks.set_up(4, 0, light)
|
||||
light_sparks.start()
|
||||
do_sparks(4, FALSE, light)
|
||||
new /obj/effect/temp_visual/revenant(get_turf(light))
|
||||
addtimer(CALLBACK(src, PROC_REF(overload_shock), light, caster), 2 SECONDS)
|
||||
|
||||
|
||||
@@ -57,8 +57,7 @@
|
||||
|
||||
INVOKE_ASYNC(src, PROC_REF(set_core_display_icon), null, client)
|
||||
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system = new /datum/effect_system/basic/spark_spread(src, 5, FALSE)
|
||||
spark_system.attach(src)
|
||||
|
||||
add_verb(src, /mob/living/silicon/ai/proc/show_laws_verb)
|
||||
|
||||
@@ -172,4 +172,4 @@
|
||||
/// Used as a fake multitool in tcomms machinery
|
||||
VAR_FINAL/obj/item/multitool/aiMulti
|
||||
/// Helper effect that creates sparks when the AI is damaged
|
||||
VAR_FINAL/datum/effect_system/spark_spread/spark_system
|
||||
VAR_FINAL/datum/effect_system/basic/spark_spread/spark_system
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/mob/living/silicon/robot/Initialize(mapload)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system = new /datum/effect_system/basic/spark_spread(src, 5, FALSE)
|
||||
spark_system.attach(src)
|
||||
|
||||
add_traits(list(TRAIT_CAN_STRIP, TRAIT_FORCED_STANDING, TRAIT_KNOW_ENGI_WIRES, TRAIT_IGNORE_SURGERY_MODIFIERS), INNATE_TRAIT)
|
||||
@@ -250,8 +249,7 @@
|
||||
return
|
||||
|
||||
if(!ion_trail)
|
||||
ion_trail = new
|
||||
ion_trail.set_up(src)
|
||||
ion_trail = new(src)
|
||||
|
||||
ionpulse_on = !ionpulse_on
|
||||
to_chat(src, span_notice("You [ionpulse_on ? null :"de"]activate your ion thrusters."))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user