Files
kiwistation/code/modules/ninja/suit/suit_process.dm
T
Mike Long 0c79d3ff8e Ninja Refactor (#27316)
* Begins converting Ninjas into the new antagonist datum system.  Does not compile.  Work in progress.

* More work towards datumizing ninjas. Still not finished. Now compiles.

* Adds ninja to traitor panel.

* Add objectives now takes an arg for number of objectives.

* Event now actually ninjas the ninja.

* Ninja suit initialization now works.

* Cleans up the suit initialization code some.

* Suit initialization is now action rather than verb based.

* Now properly adds objectives and memories to the mind upon gaining datum.

* Starts to replace ninja verbs with actions.

* Hooks ninja abilities up to action buttons.

* Whoops, missed a verb.  Gloves are next.

* Adds toggle ineraction type action button.

* Changes icons as per ChanglingRain's suggestions.

* Second round of changes for ChanglingRain

* Replaces sleeps with addtimers.  It's ugly, but more CPU efficient.

* Fixes compile errors.

* Fixes compile error, again.
2017-05-18 10:21:26 -06:00

23 lines
654 B
Plaintext

/obj/item/clothing/suit/space/space_ninja/proc/ntick(mob/living/carbon/human/U = affecting)
set background = BACKGROUND_ENABLED
//Runs in the background while the suit is initialized.
//Requires charge or stealth to process.
spawn while(s_initialized)
if(!affecting)
terminate()//Kills the suit and attached objects.
else if(cell.charge > 0)
if(s_coold)
s_coold--//Checks for ability s_cooldown first.
cell.charge -= s_cost//s_cost is the default energy cost each ntick, usually 5.
if(s_active)//If stealth is active.
cell.charge -= s_acost
else
cell.charge = 0
cancel_stealth()
sleep(10)//Checks every second.