mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +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.
29 lines
911 B
Plaintext
29 lines
911 B
Plaintext
/datum/component
|
|
var/datum/component_container/container
|
|
|
|
// Enables or disables the components
|
|
var/enabled=1
|
|
|
|
/datum/component/New(var/datum/component_container/CC)
|
|
container=CC
|
|
|
|
// Override to receive signals.
|
|
/datum/component/proc/RecieveSignal(var/sigtype, var/list/args)
|
|
return
|
|
|
|
// Send a signal to all other components in the container.
|
|
/datum/component/proc/SendSignal(var/sigtype, var/list/args)
|
|
container.SendSignal(sigtype, args)
|
|
|
|
// Return first /datum/component that is subtype of c_type.
|
|
/datum/component/proc/GetComponent(var/c_type)
|
|
return container.GetComponent(c_type)
|
|
|
|
// Returns ALL /datum/components in parent container that are subtypes of c_type.
|
|
/datum/component/proc/GetComponents(var/c_type)
|
|
return container.GetComponents(c_type)
|
|
|
|
// Returns a value depending on what the signal and args were.
|
|
/datum/component/proc/RecieveAndReturnSignal(var/sigtype, var/list/args)
|
|
return 0
|