mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
* More accurately, it automates updating your character setup. None of this code does anything you could not already do manually on the Character Setup screen, it simply does it automatically for you. * Specifically a few things are saved either at round end or when you cryo: * Your late-join spawn location is determined by which cryo/elevator/etc you used to leave last time. Departing thru the elevators will set your spawn location to elevators etc. * Your weight is saved (also any extra or deficient nutrition is resolved into weight gain/loss) * Your limbs settings are updated based on your status at end of round (whether limbs are normal, missing, robotic, etc) * Your markings are saved so they will be the same as when they were at end of round. * ALL of these changes are optional, toggled on the VORE tab of character setup. * Replaced hard coded numbers for weight gain with constant defines.
40 lines
587 B
Plaintext
40 lines
587 B
Plaintext
//The base hooks themselves
|
|
|
|
//New() hooks
|
|
/hook/client_new
|
|
|
|
/hook/mob_new
|
|
|
|
/hook/living_new
|
|
|
|
/hook/carbon_new
|
|
|
|
/hook/human_new
|
|
|
|
/hook/simple_animal_new
|
|
|
|
//Hooks for interactions
|
|
/hook/living_attackby
|
|
|
|
// Hook for when a mob de-spawns!
|
|
/hook/despawn
|
|
|
|
//
|
|
//Hook helpers to expand hooks to others
|
|
//
|
|
/hook/mob_new/proc/chain_hooks(mob/M)
|
|
var/result = 1
|
|
if(isliving(M))
|
|
if(!hook_vr("living_new",args))
|
|
result = 0
|
|
|
|
if(iscarbon(M))
|
|
if(!hook_vr("carbon_new",args))
|
|
result = 0
|
|
|
|
if(ishuman(M))
|
|
if(!hook_vr("human_new",args))
|
|
result = 0
|
|
|
|
//Return 1 to superhook
|
|
return result |