lapsang-boys / Crimson-Chronicles

A self-proclaimed paradigm shifting tower defense map in Warcraft 3
4 stars 0 forks source link

Replace one-shot timers with `doAfter(() -> begin ... end)` #58

Closed karlek closed 6 years ago

karlek commented 6 years ago

Investigate the following places:

$ ag "\.start"
wurst/objects/abilities/towers/BaseClasses/TrapBase.wurst
162:        t.start(this.cooldown, () -> begin

wurst/objects/abilities/towers/FullmoonTribe/SnareTrap.wurst
136:    t.start(ENSNARE_DURATION, () -> begin

wurst/objects/abilities/towers/FullmoonTribe/MoonFlare.wurst
118:    mfi.t.startPeriodic(ANIMATION_TIME, function flare)

wurst/objects/abilities/towers/FullmoonTribe/Assassination.wurst
83:        this.t.start(stealthTime, function stealth)
115:    as1.t.start(as1.stealthTime, function stealth)
127:            t.start(0.4, () -> begin

wurst/src/init/InitGame.wurst
13:    fog.start()
34:    t.start(0.1, () -> begin

wurst/src/system/MobMissile.wurst
53:        t.start(ITERATION_TIME, function moveMissile)
125:    t.start(ITERATION_TIME, function moveMissile)

wurst/src/system/mobtypes/PeriodicSpawnerMob.wurst
50:    t.startPeriodic(spawnInterval, func)

wurst/objects/abilities/towers/FullmoonTribe/DreamworldAttack.wurst
146:    t.start(ANIMATION_TIME, () -> begin

wurst/src/system/mobtypes/BeastMasterMob.wurst
42:        this.t.start(this.holdTime, function bindToMaster)
73:        t.start(this.holdTime, () -> begin
102:            bm.t.startPeriodic(0.05, function upDateLightning)

wurst/src/system/mobtypes/AgileMob.wurst
40:    t.start(agileDuration, () -> begin

wurst/src/system/mobtypes/CyclicHealerMob.wurst
30:        t.startPeriodic(this.period, function switchState)

wurst/src/system/mobtypes/CrowMorpherMob.wurst
28:        t.startPeriodic(0.25, function healthCheck)
50:    t.start(1.65, function moveBird)

wurst/src/system/mobtypes/FaithMob.wurst
32:    t.start(faithDuration, function goNormal)

wurst/src/system/mobtypes/BenderMob.wurst
65:    t.start(bendAnimationDuration, function bend)

wurst/src/system/mobtypes/PowerFaithMob.wurst
40:        this.t.start(duration, function periodicHeal)
55:        t.start(pf.duration, function periodicHeal)

wurst/src/system/levelhandling/Spawn.wurst
46: t.start(0.1, function summonMobs)
91: t.start(duration, function summonMobs)

wurst/libraries/TimedEffect.wurst
19:    t.start(duration, () -> begin
31:    t.start(duration, () -> begin
godbit commented 6 years ago

Since this does not support timerData it is not possible to use this for most of our cases. But it is good to have this in mind for simpler stuff. Closing.

karlek commented 6 years ago

PR #60