* Fixes compile issues with vore code * Update voreconstants.dm * Update resize_vr.dm * Update tgstation.dme * Update parrot.dm * Update pet.dm * Update fox.dm * Update mouse.dm * Update farm_animals.dm * Update dog.dm * Update cat.dm * Update monkey.dm * Update alien.dm * Update vore_vr.dm * Update vorepanel_vr.dm * Update bellymodes_vr.dm * Update belly_vr.dm * Update living_vr.dm * Update voreconstants.dm * Update fox.dm
126 lines
3.6 KiB
Plaintext
126 lines
3.6 KiB
Plaintext
|
|
/*
|
|
VVVVVVVV VVVVVVVV OOOOOOOOO RRRRRRRRRRRRRRRRR EEEEEEEEEEEEEEEEEEEEEE
|
|
V::::::V V::::::V OO:::::::::OO R::::::::::::::::R E::::::::::::::::::::E
|
|
V::::::V V::::::V OO:::::::::::::OO R::::::RRRRRR:::::R E::::::::::::::::::::E
|
|
V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEEEEE::::E
|
|
V:::::V V:::::V O::::::O O::::::O R::::R R:::::R E:::::E EEEEEE
|
|
V:::::V V:::::V O:::::O O:::::O R::::R R:::::R E:::::E
|
|
V:::::V V:::::V O:::::O O:::::O R::::RRRRRR:::::R E::::::EEEEEEEEEE
|
|
V:::::V V:::::V O:::::O O:::::O R:::::::::::::RR E:::::::::::::::E
|
|
V:::::V V:::::V O:::::O O:::::O R::::RRRRRR:::::R E:::::::::::::::E
|
|
V:::::V V:::::V O:::::O O:::::O R::::R R:::::R E::::::EEEEEEEEEE
|
|
V:::::V:::::V O:::::O O:::::O R::::R R:::::R E:::::E
|
|
V:::::::::V O::::::O O::::::O R::::R R:::::R E:::::E EEEEEE
|
|
V:::::::V O:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEEEE:::::E
|
|
V:::::V OO:::::::::::::OO R::::::R R:::::RE::::::::::::::::::::E
|
|
V:::V OO:::::::::OO R::::::R R:::::RE::::::::::::::::::::E
|
|
VVV OOOOOOOOO RRRRRRRR RRRRRRREEEEEEEEEEEEEEEEEEEEEE
|
|
|
|
-Aro <3 */
|
|
|
|
//
|
|
// Overrides/additions to stock defines go here, as well as hooks. Sort them by
|
|
// the object they are overriding. So all /mob/living together, etc.
|
|
//
|
|
//
|
|
// The datum type bolted onto normal preferences datums for storing Vore stuff
|
|
//
|
|
/client
|
|
var/datum/vore_preferences/prefs_vr
|
|
|
|
/hook/client_new/proc/add_prefs_vr(client/C)
|
|
C.prefs_vr = new/datum/vore_preferences(C)
|
|
if(C.prefs_vr)
|
|
return TRUE
|
|
|
|
return FALSE
|
|
|
|
/datum/vore_preferences
|
|
//Actual preferences
|
|
var/digestable = TRUE
|
|
var/devourable = FALSE
|
|
var/list/belly_prefs = list()
|
|
|
|
//Mechanically required
|
|
var/path
|
|
var/slot
|
|
var/client/client
|
|
var/client_ckey
|
|
var/client/parent
|
|
|
|
/datum/vore_preferences/New(client/C)
|
|
if(istype(C))
|
|
client = C
|
|
client_ckey = C.ckey
|
|
load_vore(C)
|
|
|
|
//
|
|
// Check if an object is capable of eating things, based on vore_organs
|
|
//
|
|
/proc/is_vore_predator(var/mob/living/O)
|
|
if(istype(O,/mob/living))
|
|
if(O.vore_organs.len > 0)
|
|
return TRUE
|
|
|
|
return FALSE
|
|
|
|
//
|
|
// Belly searching for simplifying other procs
|
|
//
|
|
/proc/check_belly(atom/movable/A)
|
|
if(istype(A.loc,/mob/living))
|
|
var/mob/living/M = A.loc
|
|
for(var/I in M.vore_organs)
|
|
var/datum/belly/B = M.vore_organs[I]
|
|
if(A in B.internal_contents)
|
|
return(B)
|
|
|
|
return FALSE
|
|
|
|
//
|
|
// Save/Load Vore Preferences
|
|
//
|
|
/datum/vore_preferences/proc/load_vore()
|
|
if(!client || !client_ckey) return FALSE //No client, how can we save?
|
|
|
|
slot = client.prefs.default_slot
|
|
|
|
path = client.prefs.path
|
|
|
|
if(!path) return FALSE //Path couldn't be set?
|
|
if(!fexists(path)) //Never saved before
|
|
save_vore() //Make the file first
|
|
return TRUE
|
|
|
|
var/savefile/S = new /savefile(path)
|
|
if(!S) return FALSE //Savefile object couldn't be created?
|
|
|
|
S.cd = "/character[slot]"
|
|
|
|
S["digestable"] >> digestable
|
|
S["devourable"] >> devourable
|
|
S["belly_prefs"] >> belly_prefs
|
|
|
|
if(isnull(digestable))
|
|
digestable = TRUE
|
|
if(isnull(devourable))
|
|
devourable = FALSE
|
|
if(isnull(belly_prefs))
|
|
belly_prefs = list()
|
|
|
|
return TRUE
|
|
|
|
/datum/vore_preferences/proc/save_vore()
|
|
if(!path) return FALSE
|
|
if(!slot) return FALSE
|
|
var/savefile/S = new /savefile(path)
|
|
if(!S) return FALSE
|
|
S.cd = "/character[slot]"
|
|
|
|
S["digestable"] << digestable
|
|
S["devourable"] << devourable
|
|
S["belly_prefs"] << belly_prefs
|
|
|
|
return TRUE
|