Files
GS13NG/code/modules/mob/living/carbon/monkey/punpun.dm
T
PoojawaandGitHub 7e9b96a00f April sync (#360)
* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
2017-04-13 23:37:00 -05:00

74 lines
2.3 KiB
Plaintext

/mob/living/carbon/monkey/punpun //except for a few special persistence features, pun pun is just a normal monkey
name = "Pun Pun" //C A N O N
unique_name = 0
var/ancestor_name
var/ancestor_chain = 1
var/relic_hat //Note: these two are paths
var/relic_mask
var/memory_saved = 0
var/list/pet_monkey_names = list("Pun Pun", "Bubbles", "Mojo", "George", "Darwin", "Aldo", "Caeser", "Kanzi", "Kong", "Terk", "Grodd", "Mala", "Bojangles", "Coco", "Able", "Baker", "Scatter", "Norbit", "Travis")
var/list/rare_pet_monkey_names = list("Professor Bobo", "Deempisi's Revenge", "Furious George", "King Louie", "Dr. Zaius", "Jimmy Rustles", "Dinner", "Lanky")
/mob/living/carbon/monkey/punpun/Initialize()
Read_Memory()
if(ancestor_name)
name = ancestor_name
if(ancestor_chain > 1)
name += " \Roman[ancestor_chain]"
else
if(prob(5))
name = pick(rare_pet_monkey_names)
else
name = pick(pet_monkey_names)
gender = pick(MALE, FEMALE)
..()
//These have to be after the parent new to ensure that the monkey
//bodyparts are actually created before we try to equip things to
//those slots
if(relic_hat)
equip_to_slot_or_del(new relic_hat, slot_head)
if(relic_mask)
equip_to_slot_or_del(new relic_mask, slot_wear_mask)
/mob/living/carbon/monkey/punpun/Life()
if(SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory(0)
..()
/mob/living/carbon/monkey/punpun/death(gibbed)
if(!memory_saved || gibbed)
Write_Memory(1,gibbed)
..()
/mob/living/carbon/monkey/punpun/proc/Read_Memory()
var/savefile/S = new /savefile("data/npc_saves/Punpun.sav")
S["ancestor_name"] >> ancestor_name
S["ancestor_chain"] >> ancestor_chain
S["relic_hat"] >> relic_hat
S["relic_mask"] >> relic_mask
/mob/living/carbon/monkey/punpun/proc/Write_Memory(dead, gibbed)
var/savefile/S = new /savefile("data/npc_saves/Punpun.sav")
if(gibbed)
S["ancestor_name"] << null
S["ancestor_chain"] << 1
S["relic_hat"] << null
S["relic_mask"] << null
return
if(dead)
S["ancestor_name"] << ancestor_name
S["ancestor_chain"] << ancestor_chain + 1
if(!ancestor_name) //new monkey name this round
S["ancestor_name"] << name
if(head)
S["relic_hat"] << head.type
else
S["relic_hat"] << null
if(wear_mask)
S["relic_mask"] << wear_mask.type
else
S["relic_mask"] << null
if(!dead)
memory_saved = 1