mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
* moves the brain component to living-level. Makes some tweaks to NPC AI so they know they're being attacked by something * that took a lot more than I expected to fix the melee * adds the weapon throw attack. Fixes where you could only ever have one attack type for your NPC. Fixes a bad usr argument in throw. * /*DOES NOT WORK*/ Changes mob function so it uses a movement component, rather than it being under the mob component. Adds the Astar mob movement component. Adds Receive and Return signal handling. moves get def zone to this system. * movement through astar now works. * cleanup of debug * Damians requested changes * That doesn't work.
27 lines
831 B
Plaintext
27 lines
831 B
Plaintext
/datum/component/controller/mob
|
|
var/walk_delay=4
|
|
|
|
/datum/component/controller/mob/RecieveSignal(var/message_type, var/list/args)
|
|
if(isliving(container.holder))
|
|
var/mob/living/M=container.holder
|
|
//testing("Got command: \[[message_type]\]: [json_encode(args)]")
|
|
switch(message_type)
|
|
if(COMSIG_CLICKON)
|
|
var/atom/A = args["target"]
|
|
var/params
|
|
if(args["def_zone"])
|
|
var/list/L = list("def_zone" = args["def_zone"])
|
|
params = list2params(L)
|
|
M.ClickOn(A, params)
|
|
if(COMSIG_STEP)
|
|
step(M, args["dir"], walk_delay)
|
|
|
|
if(COMSIG_ADJUST_BODYTEMP) // list("temp"=TEMP_IN_KELVIN)
|
|
M.bodytemperature += args["temp"]
|
|
|
|
if(COMSIG_SET_BODYTEMP) // list("temp"=TEMP_IN_KELVIN)
|
|
M.bodytemperature = args["temp"]
|
|
|
|
if(COMSIG_STATE) // list("state"=HOSTILE_STANCE_ATTACK)
|
|
setState(args["state"])
|