Merge pull request #8331 from uraniummeltdown/effectfiles

Splits effect_system.dm into multiple files and cleans it up, OOP particle effects and effect systems
This commit is contained in:
tigercat2000
2017-11-26 12:35:01 -08:00
committed by GitHub
133 changed files with 1223 additions and 1623 deletions
+6 -6
View File
@@ -9,8 +9,8 @@
var/atom/movable/teleatom //atom to teleport
var/atom/destination //destination to teleport to
var/precision = 0 //teleport precision
var/datum/effect/system/effectin //effect to show right before teleportation
var/datum/effect/system/effectout //effect to show right after teleportation
var/datum/effect_system/effectin //effect to show right before teleportation
var/datum/effect_system/effectout //effect to show right after teleportation
var/soundin //soundfile to play before teleportation
var/soundout //soundfile to play after teleportation
var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation)
@@ -59,7 +59,7 @@
//custom effects must be properly set up first for instant-type teleports
//optional
/datum/teleport/proc/setEffects(datum/effect/system/aeffectin=null,datum/effect/system/aeffectout=null)
/datum/teleport/proc/setEffects(datum/effect_system/aeffectin=null,datum/effect_system/aeffectout=null)
effectin = istype(aeffectin) ? aeffectin : null
effectout = istype(aeffectout) ? aeffectout : null
return 1
@@ -79,7 +79,7 @@
/datum/teleport/proc/teleportChecks()
return 1
/datum/teleport/proc/playSpecials(atom/location,datum/effect/system/effect,sound)
/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound)
if(location)
if(effect)
spawn(-1)
@@ -146,9 +146,9 @@
/datum/teleport/instant/science
/datum/teleport/instant/science/setEffects(datum/effect/system/aeffectin,datum/effect/system/aeffectout)
/datum/teleport/instant/science/setEffects(datum/effect_system/aeffectin,datum/effect_system/aeffectout)
if(aeffectin==null || aeffectout==null)
var/datum/effect/system/spark_spread/aeffect = new
var/datum/effect_system/spark_spread/aeffect = new
aeffect.set_up(5, 1, teleatom)
effectin = effectin || aeffect
effectout = effectout || aeffect
+4 -4
View File
@@ -258,20 +258,20 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(istype(target,/mob/living) && message)
to_chat(target, text("[message]"))
if(sparks_spread)
var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread()
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread()
sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is
sparks.start()
if(smoke_spread)
if(smoke_spread == 1)
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is
smoke.start()
else if(smoke_spread == 2)
var/datum/effect/system/bad_smoke_spread/smoke = new /datum/effect/system/bad_smoke_spread()
var/datum/effect_system/smoke_spread/bad/smoke = new
smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is
smoke.start()
else if(smoke_spread == 3)
var/datum/effect/system/sleep_smoke_spread/smoke = new /datum/effect/system/sleep_smoke_spread()
var/datum/effect_system/smoke_spread/sleeping/smoke = new
smoke.set_up(smoke_amt, 0, location) // same here
smoke.start()
+1 -1
View File
@@ -69,7 +69,7 @@
flick("liquify",animation)
target.loc = holder
target.client.eye = holder
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread()
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
steam.set_up(10, 0, mobloc)
steam.start()
sleep(jaunt_duration)
+1 -1
View File
@@ -14,7 +14,7 @@
/obj/effect/proc_holder/spell/targeted/rathens/cast(list/targets, mob/user = usr)
playsound(get_turf(user), 'sound/goonstation/effects/superfart.ogg', 25, 1)
for(var/mob/living/carbon/human/H in targets)
var/datum/effect/system/harmless_smoke_spread/s = new /datum/effect/system/harmless_smoke_spread
var/datum/effect_system/smoke_spread/s = new
s.set_up(5, 0, H)
s.start()
var/obj/item/organ/internal/appendix/A = H.get_int_organ(/obj/item/organ/internal/appendix)