whole lotta stuff
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
/datum/emote/living/gurgle
|
||||
key = "gurgle"
|
||||
key_third_person = "gurgles"
|
||||
message = "'s belly gurgles"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/gurgle1.ogg'
|
||||
|
||||
/datum/emote/living/gurgle/get_sound()
|
||||
return get_sfx("gurgle") // Lets get any of the gurgle sounds we have set.
|
||||
|
||||
/datum/emote/living/burp
|
||||
key = "burp"
|
||||
key_third_person = "burps"
|
||||
message = "burps"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
var/reduction_min = 4
|
||||
var/reduction_max = 8
|
||||
var/noise_type = "burp"
|
||||
var/noise_pref = BURPING_NOISES
|
||||
|
||||
/datum/emote/living/burp/run_emote(mob/living/user, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
playsound_prefed(user, noise_type, noise_pref, 100, TRUE, -4)
|
||||
|
||||
user.reduce_fullness(rand(reduction_min,reduction_max))
|
||||
|
||||
/datum/emote/living/burp/fart //Butt burp.
|
||||
key = "fart"
|
||||
key_third_person = "farts"
|
||||
message = "farts"
|
||||
//god hates me for this -Metha
|
||||
noise_type = "fart"
|
||||
noise_pref = FARTING_NOISES
|
||||
|
||||
/datum/emote/living/burp/fart/run_emote(mob/living/user, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/storage/book/bible/b = locate(/obj/item/storage/book/bible) in get_turf(user) //Biblefart
|
||||
if(b)//Devine Retribution
|
||||
var/mob/living/heretic = user //Heresy.
|
||||
heretic.visible_message(
|
||||
"<span class='danger'>\The [heretic] farts on \the [b], causing a violent, otherworldly ripple to echo \
|
||||
outwards before they explode in a gorey mess of divine retribution!</span>",
|
||||
"<span class='userdanger'>You feel a deep sense of dread as you release pressure from your rear over \the [b], \
|
||||
immediately realizing your mistake as Divine Retribution rends your form into a gorey mess.</span>")
|
||||
heretic.emote("scream")
|
||||
message_admins("[ADMIN_LOOKUPFLW(heretic)] farted on a bible at [ADMIN_VERBOSEJMP(heretic)] and was gibbed.")
|
||||
log_game("[key_name(heretic)] farted on a bible at [AREACOORD(heretic)] and was gibbed")
|
||||
heretic.gib()
|
||||
return //Gassy is dead
|
||||
|
||||
/datum/emote/living/burp/belch
|
||||
key = "belch"
|
||||
key_third_person = "belches loudly"
|
||||
message = "belches"
|
||||
//god hates me for this -Metha
|
||||
noise_type = "belch"
|
||||
reduction_min = 6
|
||||
reduction_max = 12
|
||||
|
||||
/datum/emote/living/burp/fart/brap
|
||||
key = "brap"
|
||||
key_third_person = "braps"
|
||||
message = ""
|
||||
reduction_min = 6
|
||||
reduction_max = 12
|
||||
|
||||
/datum/emote/living/burp/fart/brap/select_message_type(var/mob/living/user)
|
||||
return pick("farts loudly!", "cuts a fat one!", "rips absolute ass!")
|
||||
|
||||
/datum/emote/living/burp/fart/goon // Fart but it's funny !
|
||||
key = "goonfart"
|
||||
key_third_person = "goonfarts"
|
||||
noise_type = 'goon/sound/voice/farts/fart4.ogg'
|
||||
|
||||
//Shhh... It's a secret! Don't tell or I'll steal your legs
|
||||
/datum/emote/living/burunyu
|
||||
key = "burunyu"
|
||||
key_third_person = "burunyues"
|
||||
message = "emits a strange feline sound"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/funnycat.ogg'
|
||||
|
||||
/datum/emote/living/bellyrub
|
||||
key = "bellyrub"
|
||||
key_third_person = "bellyrubs"
|
||||
message = "rubs their belly"
|
||||
emote_type = EMOTE_VISIBLE
|
||||
|
||||
/datum/emote/living/bellyrub/run_emote(mob/living/user, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
user.reduce_fullness(rand(4,16), FALSE)
|
||||
@@ -0,0 +1,4 @@
|
||||
// This is a file for emotes that have been rewritten to be more modular. Such as varying based on species or whathave you. May move this later or something.
|
||||
|
||||
|
||||
//I was going to put screams in here but I overhauled it in a different more austistic way
|
||||
@@ -0,0 +1,239 @@
|
||||
// This is an emote file for random shit we've ported. Im just copying the style recipes_ported.dm did, yell at me if im wrong later.
|
||||
// It said it was lazy but personally I think this might be a better way of organizing otherwise unique content that we're porting
|
||||
// for ourselves. -Reo
|
||||
|
||||
// I found this tacked onto the bottom of code/modules/mob/living/emote.dm. No //code add: notice or anything. Moving it here,
|
||||
// since it seems to all be ported emotes. -Reo
|
||||
/*
|
||||
//Carl wuz here
|
||||
//FUCK YOU CARL SUCK MY BALLS YOU WHORE
|
||||
/datum/emote/living/tesh_sneeze
|
||||
key = "tesh_sneeze"
|
||||
key_third_person = "sneezes"
|
||||
message = "sneezes."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/tesh_sneeze/can_run_emote(mob/living/user, status_check = TRUE)
|
||||
. = ..()
|
||||
if(. && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
return !C.silent
|
||||
|
||||
/datum/emote/living/tesh_sneeze/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(!C.mind || C.mind.miming)//no cute sneezing for you.
|
||||
return
|
||||
if(ishumanbasic(C))
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/tesh_sneeze1.ogg', 'hyperstation/sound/voice/emotes/tesh_sneeze1b.ogg'), 50, 1)
|
||||
if(is_species(user, /datum/species/avian))//This is required(related to subtypes), otherwise it doesn't play the noises. Sometimes. Always sometimes. Just how it be.
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/tesh_sneeze1.ogg', 'hyperstation/sound/voice/emotes/tesh_sneeze1b.ogg'), 50, 1)
|
||||
if(is_species(user, /datum/species/mammal))//Just because the avian subspecies doesn't have proper sprites. Some people can't use it.
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/tesh_sneeze1.ogg', 'hyperstation/sound/voice/emotes/tesh_sneeze1b.ogg'), 50, 1)
|
||||
|
||||
/datum/emote/living/racc
|
||||
key = "racc_chitter"
|
||||
key_third_person = "chitters"
|
||||
message = "chitters."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/racc/can_run_emote(mob/living/user, status_check = TRUE)
|
||||
. = ..()
|
||||
if(. && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
return !C.silent
|
||||
|
||||
/datum/emote/living/racc/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(!C.mind || C.mind.miming)
|
||||
return
|
||||
if(ishumanbasic(C))
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/racc_chitter_1.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_2.ogg',\
|
||||
'hyperstation/sound/voice/emotes/racc_chitter_3.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_4.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_5.ogg',\
|
||||
'hyperstation/sound/voice/emotes/racc_chitter_6.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_7.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_8.ogg'), 50, 1)
|
||||
if(is_species(user, /datum/species/mammal))
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/racc_chitter_1.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_2.ogg',\
|
||||
'hyperstation/sound/voice/emotes/racc_chitter_3.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_4.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_5.ogg',\
|
||||
'hyperstation/sound/voice/emotes/racc_chitter_6.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_7.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_8.ogg'), 50, 1)
|
||||
|
||||
/datum/emote/living/bat
|
||||
key = "bat_chitter"
|
||||
key_third_person = "chitters"
|
||||
message = "chitters."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/bat/can_run_emote(mob/living/user, status_check = TRUE)
|
||||
. = ..()
|
||||
if(. && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
return !C.silent
|
||||
|
||||
/datum/emote/living/bat/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(!C.mind || C.mind.miming)
|
||||
return
|
||||
if(ishumanbasic(C))
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/bat_c1.ogg', 'hyperstation/sound/voice/emotes/bat_c2.ogg', 'hyperstation/sound/voice/emotes/bat_c3.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c4.ogg', 'hyperstation/sound/voice/emotes/bat_c5.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c6.ogg', 'hyperstation/sound/voice/emotes/bat_c7.ogg', 'hyperstation/sound/voice/emotes/bat_c8.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c9.ogg'), 50, 1)
|
||||
if(is_species(user, /datum/species/mammal))
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/bat_c1.ogg', 'hyperstation/sound/voice/emotes/bat_c2.ogg', 'hyperstation/sound/voice/emotes/bat_c3.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c4.ogg', 'hyperstation/sound/voice/emotes/bat_c5.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c6.ogg', 'hyperstation/sound/voice/emotes/bat_c7.ogg', 'hyperstation/sound/voice/emotes/bat_c8.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c9.ogg'), 50, 1)
|
||||
if(is_species(user, /datum/species/avian))//this and mammal should be considered the same AAAAAAAAAAAA
|
||||
playsound(C, pick('hyperstation/sound/voice/emotes/bat_c1.ogg', 'hyperstation/sound/voice/emotes/bat_c2.ogg', 'hyperstation/sound/voice/emotes/bat_c3.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c4.ogg', 'hyperstation/sound/voice/emotes/bat_c5.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c6.ogg', 'hyperstation/sound/voice/emotes/bat_c7.ogg', 'hyperstation/sound/voice/emotes/bat_c8.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c9.ogg'), 50, 1)
|
||||
*/
|
||||
//End of the random emotes I found in mob/living
|
||||
|
||||
|
||||
//Rewrites of the above start.
|
||||
/datum/emote/living/carbon/racc
|
||||
key = "racc_chitter"
|
||||
key_third_person = "raccchitters"
|
||||
message = "chitters."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/carbon/racc/get_sound()
|
||||
return pick('hyperstation/sound/voice/emotes/racc_chitter_1.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_2.ogg',\
|
||||
'hyperstation/sound/voice/emotes/racc_chitter_3.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_4.ogg', \
|
||||
'hyperstation/sound/voice/emotes/racc_chitter_5.ogg','hyperstation/sound/voice/emotes/racc_chitter_6.ogg', \
|
||||
'hyperstation/sound/voice/emotes/racc_chitter_7.ogg', 'hyperstation/sound/voice/emotes/racc_chitter_8.ogg')
|
||||
|
||||
/datum/emote/living/carbon/bat
|
||||
key = "bat_chitter"
|
||||
key_third_person = "bat_chitters"
|
||||
message = "chitters."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/carbon/bat/get_sound()
|
||||
return pick('hyperstation/sound/voice/emotes/bat_c1.ogg', 'hyperstation/sound/voice/emotes/bat_c2.ogg', \
|
||||
'hyperstation/sound/voice/emotes/bat_c3.ogg', 'hyperstation/sound/voice/emotes/bat_c4.ogg', \
|
||||
'hyperstation/sound/voice/emotes/bat_c5.ogg','hyperstation/sound/voice/emotes/bat_c6.ogg', \
|
||||
'hyperstation/sound/voice/emotes/bat_c7.ogg', 'hyperstation/sound/voice/emotes/bat_c8.ogg',\
|
||||
'hyperstation/sound/voice/emotes/bat_c9.ogg')
|
||||
|
||||
//Rewrites of the above end.
|
||||
|
||||
//Ported from Vorestation
|
||||
/datum/emote/living/carbon/teshsqueak
|
||||
key = "teshsurprise" //Originally, It was just "surprised" but I dont think that's very telling of a teshari emote.
|
||||
key_third_person = "teshsurprised"
|
||||
message = "chirps in surprise!"
|
||||
message_param = "chirps in surprise at %t!"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/teshari/teshsqueak.ogg' // Copyright CC BY 3.0 InspectorJ (freesound.org) for the source audio.
|
||||
|
||||
/datum/emote/living/carbon/teshchirp
|
||||
key = "tchirp"
|
||||
key_third_person = "tchirps"
|
||||
message = "chirps!"
|
||||
message_param = "chirps at %t!"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/teshari/teshchirp.ogg' // Copyright Sampling+ 1.0 Incarnidine (freesound.org) for the source audio.
|
||||
|
||||
/datum/emote/living/carbon/teshtrill
|
||||
key = "trill"
|
||||
key_third_person = "trills"
|
||||
message = "trills."
|
||||
message_param = "trills at %t."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/teshari/teshtrill.ogg' // Copyright CC BY-NC 3.0 Arnaud Coutancier (freesound.org) for the source audio.
|
||||
|
||||
/datum/emote/living/sneeze/teshsneeze //Replace this with a modular species/tongue based sneeze system later. Also piggybacking on normal sneezes
|
||||
key = "teshsneeze"
|
||||
key_third_person = "teshsneezes"
|
||||
message = "sneezes."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/sneeze/teshsneeze/get_sound()
|
||||
return pick('GainStation13/sound/voice/teshari/tesharisneeze.ogg', 'GainStation13/sound/voice/teshari/tesharisneezeb.ogg')
|
||||
|
||||
/datum/emote/living/cough/teshcough //Same as above. Replace with a modular system later.
|
||||
key = "teshcough"
|
||||
key_third_person = "teshcoughs"
|
||||
message = "coughs."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/cough/teshcough/get_sound()
|
||||
return pick('GainStation13/sound/voice/teshari/tesharicougha.ogg', 'GainStation13/sound/voice/teshari/tesharicoughb.ogg')
|
||||
|
||||
/datum/emote/living/carbon/teshscream
|
||||
key = "teshscream"
|
||||
key_third_person = "teshscreams"
|
||||
message = "screams!"
|
||||
message_param = "screams at %t!"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/teshari/teshscream.ogg'
|
||||
|
||||
/datum/emote/living/prbt
|
||||
key = "prbt"
|
||||
key_third_person = "prbts"
|
||||
message = "prbts."
|
||||
message_param = "prbts at %t."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/emotes/prbt.ogg'
|
||||
|
||||
/datum/emote/living/mlem
|
||||
key = "mlem"
|
||||
key_third_person = "mlems"
|
||||
message = "mlems their tongue up over their nose. Mlem."
|
||||
|
||||
/datum/emote/living/blep
|
||||
key = "blep"
|
||||
key_third_person = "bleps"
|
||||
message = "bleps their tongue out. Blep."
|
||||
|
||||
/datum/emote/living/teppi
|
||||
key = "gyoh"
|
||||
key_third_person = "gyohs"
|
||||
message = "gyohs"
|
||||
var/bigsound = list('GainStation13/sound/voice/teppi/gyooh1.ogg', 'GainStation13/sound/voice/teppi/gyooh2.ogg', \
|
||||
'GainStation13/sound/voice/teppi/gyooh3.ogg', 'GainStation13/sound/voice/teppi/gyooh4.ogg', \
|
||||
'GainStation13/sound/voice/teppi/gyooh5.ogg', 'GainStation13/sound/voice/teppi/gyooh6.ogg')
|
||||
var/smolsound = list('GainStation13/sound/voice/teppi/whine1.ogg', 'GainStation13/sound/voice/teppi/whine2.ogg')
|
||||
|
||||
/datum/emote/living/teppi/run_emote(mob/living/user, params)
|
||||
/* //If we port teppi later, Enable this.
|
||||
if(istype(user, /mob/living/simple_mob/vore/alienanimals/teppi))
|
||||
if(istype(user, /mob/living/simple_mob/vore/alienanimals/teppi/baby))
|
||||
sound = pick(smolsound)
|
||||
else
|
||||
sound = pick(bigsound)
|
||||
return ..()
|
||||
*/
|
||||
if(user.size_multiplier >= 1.5)
|
||||
sound = pick(bigsound)
|
||||
else
|
||||
sound = pick(smolsound)
|
||||
. = ..()
|
||||
|
||||
/datum/emote/living/teppi/rumble
|
||||
key = "rumble"
|
||||
key_third_person = "rumbles"
|
||||
message = "rumbles contentedly."
|
||||
sound = 'GainStation13/sound/voice/teppi/cute_rumble.ogg'
|
||||
bigsound = list('GainStation13/sound/voice/teppi/rumble.ogg')
|
||||
smolsound = list('GainStation13/sound/voice/teppi/cute_rumble.ogg')
|
||||
|
||||
//Vorestation ports end.
|
||||
|
||||
//Ported from Chompstation
|
||||
/datum/emote/living/wawa
|
||||
key = "wawa"
|
||||
key_third_person = "wawas"
|
||||
message = "wawas."
|
||||
message_param = "wawas at %t."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
sound = 'GainStation13/sound/voice/emotes/wawa.ogg'
|
||||
|
||||
//Chompstation ports end.
|
||||
@@ -0,0 +1,16 @@
|
||||
/mob/living/proc/reduce_fullness(amount, notify = TRUE) // fullness_amount should be between 5 and 20 for balance and below 80 for functionality
|
||||
if(!ishuman(src))
|
||||
return
|
||||
|
||||
if(fullness >= FULLNESS_LEVEL_BLOATED && fullness_reducion_timer + FULLNESS_REDUCTION_COOLDOWN < world.time)
|
||||
|
||||
fullness -= amount // Remove Fullness
|
||||
|
||||
if(!notify)
|
||||
return
|
||||
|
||||
if(amount <= 5)
|
||||
to_chat(src, "You felt that make some space")
|
||||
if(amount > 5)
|
||||
to_chat(src, "You felt that make a lot of space")
|
||||
|
||||
@@ -0,0 +1,609 @@
|
||||
//nutribot
|
||||
//nutribot PATHFINDING
|
||||
//nutribot ASSEMBLY
|
||||
#define NUTRIBOT_PANIC_NONE 0
|
||||
#define NUTRIBOT_PANIC_LOW 15
|
||||
#define NUTRIBOT_PANIC_MED 35
|
||||
#define NUTRIBOT_PANIC_HIGH 55
|
||||
#define NUTRIBOT_PANIC_FUCK 70
|
||||
#define NUTRIBOT_PANIC_ENDING 90
|
||||
#define NUTRIBOT_PANIC_END 100
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot
|
||||
name = "\improper Nutribot"
|
||||
desc = "A little nutritional robot. He looks somewhat underwhelmed."
|
||||
icon = 'GainStation13/icons/mob/nutribot.dmi'
|
||||
icon_state = "nutribot0"
|
||||
density = FALSE
|
||||
anchored = FALSE
|
||||
health = 20
|
||||
maxHealth = 20
|
||||
pass_flags = PASSMOB
|
||||
|
||||
status_flags = (CANPUSH | CANSTUN)
|
||||
|
||||
radio_key = /obj/item/encryptionkey/headset_med
|
||||
radio_channel = RADIO_CHANNEL_SERVICE
|
||||
|
||||
bot_type = MED_BOT
|
||||
model = "Nutribot"
|
||||
bot_core_type = /obj/machinery/bot_core/nutribot
|
||||
window_id = "auto_nutrition"
|
||||
window_name = "Automatic Nutritional Unit v1.1"
|
||||
data_hud_type = DATA_HUD_MEDICAL_ADVANCED
|
||||
path_image_color = "#DDDDFF"
|
||||
|
||||
var/obj/item/reagent_containers/glass/reagent_glass = null //Can be set to draw from this for reagents.
|
||||
var/skin = null //Set to "tox", "ointment" or "o2" for the other two firstaid kits.
|
||||
var/mob/living/carbon/patient = null
|
||||
var/mob/living/carbon/oldpatient = null
|
||||
var/oldloc = null
|
||||
var/last_found = 0
|
||||
var/last_newpatient_speak = 0 //Don't spam the "HEY I'M COMING" messages
|
||||
var/injection_amount = 15 //How much reagent do we inject at a time?
|
||||
var/feed_threshold = 200 // The weight that people should be fed to!
|
||||
var/use_beaker = 0 //Use reagents in beaker instead of default treatment agents.
|
||||
var/declare_cooldown = 0 //Prevents spam of critical patient alerts.
|
||||
var/stationary_mode = 0 //If enabled, the Nutribot will not move automatically.
|
||||
//Setting which reagents to use to treat what by default. By id.
|
||||
var/treatment_thin = /datum/reagent/consumable/nutriment
|
||||
var/treatment_thirsty = /datum/reagent/water
|
||||
var/hunger_check = NUTRITION_LEVEL_HUNGRY
|
||||
var/shut_up = 0 //self explanatory :)
|
||||
|
||||
//How panicked we are about being tipped over (why would you do this?)
|
||||
var/tipped_status = NUTRIBOT_PANIC_NONE
|
||||
//The name we got when we were tipped
|
||||
var/tipper_name
|
||||
//The last time we were tipped/righted and said a voice line, to avoid spam
|
||||
var/last_tipping_action_voice = 0
|
||||
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/update_icon()
|
||||
cut_overlays()
|
||||
if(!on)
|
||||
icon_state = "nutribot0"
|
||||
return
|
||||
if(IsStun())
|
||||
icon_state = "nutribota"
|
||||
return
|
||||
if(mode == BOT_HEALING)
|
||||
icon_state = "nutribots[stationary_mode]"
|
||||
return
|
||||
else if(stationary_mode) //Bot has yellow light to indicate stationary mode.
|
||||
icon_state = "nutribot2"
|
||||
else
|
||||
icon_state = "nutribot1"
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/Initialize(mapload, new_skin)
|
||||
. = ..()
|
||||
var/datum/job/cook/J = new /datum/job/cook
|
||||
access_card.access += J.get_access()
|
||||
prev_access = access_card.access
|
||||
qdel(J)
|
||||
skin = new_skin
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/update_canmove()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/bot_reset()
|
||||
..()
|
||||
patient = null
|
||||
oldpatient = null
|
||||
oldloc = null
|
||||
last_found = world.time
|
||||
declare_cooldown = 0
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/proc/soft_reset() //Allows the Nutribot to still actively perform its medical duties without being completely halted as a hard reset does.
|
||||
path = list()
|
||||
patient = null
|
||||
mode = BOT_IDLE
|
||||
last_found = world.time
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/set_custom_texts()
|
||||
|
||||
text_hack = "You corrupt [name]'s reagent processor circuits."
|
||||
text_dehack = "You reset [name]'s reagent processor circuits."
|
||||
text_dehack_fail = "[name] seems damaged and does not respond to reprogramming!"
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += "<TT><B>Nutritional Unit Controls v1.1</B></TT><BR><BR>"
|
||||
dat += "Status: <A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A><BR>"
|
||||
dat += "Maintenance panel panel is [open ? "opened" : "closed"]<BR>"
|
||||
dat += "Beaker: "
|
||||
if(reagent_glass)
|
||||
dat += "<A href='?src=[REF(src)];eject=1'>Loaded \[[reagent_glass.reagents.total_volume]/[reagent_glass.reagents.maximum_volume]\]</a>"
|
||||
else
|
||||
dat += "None Loaded"
|
||||
dat += "<br>Behaviour controls are [locked ? "locked" : "unlocked"]<hr>"
|
||||
if(!locked || issilicon(user) || IsAdminGhost(user))
|
||||
|
||||
dat += "<TT>Feed Amount: "
|
||||
dat += "<a href='?src=[REF(src)];adj_inject=-5'>-</a> "
|
||||
dat += "[injection_amount] "
|
||||
dat += "<a href='?src=[REF(src)];adj_inject=5'>+</a> "
|
||||
dat += "</TT><br>"
|
||||
|
||||
dat += "Reagent Source: "
|
||||
dat += "<a href='?src=[REF(src)];use_beaker=1'>[use_beaker ? "Loaded Beaker (When available)" : "Internal Synthesizer"]</a><br>"
|
||||
|
||||
dat += "Hunger Check: "
|
||||
dat += "<a href='?src=[REF(src)];hunger_check=1'>[(hunger_check==NUTRITION_LEVEL_HUNGRY) ? "Yes" : "No"]</a><br>"
|
||||
|
||||
dat += "<TT>Maximum BFI: "
|
||||
dat += "[feed_threshold ? feed_threshold : "???"] "
|
||||
dat += "<br>"
|
||||
dat += "Disable Maximum BFI: <a href='?src=[REF(src)];feed_threshold=1'>["Disable"]</a><br> "
|
||||
dat += "<a href='?src=[REF(src)];feed_threshold=-100'>-</a> "
|
||||
dat += "<a href='?src=[REF(src)];feed_threshold=100'>+</a> "
|
||||
dat += "</TT><br>"
|
||||
|
||||
dat += "The speaker switch is [shut_up ? "off" : "on"]. <a href='?src=[REF(src)];togglevoice=[1]'>Toggle</a><br>"
|
||||
dat += "Patrol Station: <a href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "Yes" : "No"]</a><br>"
|
||||
dat += "Stationary Mode: <a href='?src=[REF(src)];stationary=1'>[stationary_mode ? "Yes" : "No"]</a><br>"
|
||||
|
||||
return dat
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
else if(href_list["adj_inject"])
|
||||
var/adjust_num = text2num(href_list["adj_inject"])
|
||||
injection_amount += adjust_num
|
||||
if(injection_amount < 5)
|
||||
injection_amount = 5
|
||||
if(injection_amount > 15)
|
||||
injection_amount = 15
|
||||
|
||||
else if(href_list["use_beaker"])
|
||||
use_beaker = !use_beaker
|
||||
|
||||
else if(href_list["eject"] && (!isnull(reagent_glass)))
|
||||
reagent_glass.forceMove(drop_location())
|
||||
reagent_glass = null
|
||||
|
||||
else if(href_list["togglevoice"])
|
||||
shut_up = !shut_up
|
||||
|
||||
else if(href_list["stationary"])
|
||||
stationary_mode = !stationary_mode
|
||||
path = list()
|
||||
update_icon()
|
||||
|
||||
else if(href_list["hunger_check"])
|
||||
hunger_check = ((hunger_check==NUTRITION_LEVEL_HUNGRY) ? NUTRITION_LEVEL_FULL : NUTRITION_LEVEL_HUNGRY)
|
||||
|
||||
else if(href_list["feed_threshold"])
|
||||
var/adjust_num = text2num(href_list["feed_threshold"])
|
||||
feed_threshold += adjust_num
|
||||
if(adjust_num == 1)
|
||||
feed_threshold = 0
|
||||
if(feed_threshold < 0)
|
||||
feed_threshold = 0
|
||||
|
||||
update_controls()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/reagent_containers/glass))
|
||||
. = 1 //no afterattack
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>You cannot insert a beaker because the panel is locked!</span>")
|
||||
return
|
||||
if(!isnull(reagent_glass))
|
||||
to_chat(user, "<span class='warning'>There is already a beaker loaded!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
|
||||
reagent_glass = W
|
||||
to_chat(user, "<span class='notice'>You insert [W].</span>")
|
||||
show_controls(user)
|
||||
|
||||
else
|
||||
var/current_health = health
|
||||
..()
|
||||
if(health < current_health) //if nutribot took some damage
|
||||
step_to(src, (get_step_away(src,user)))
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/emag_act(mob/user)
|
||||
..()
|
||||
if(emagged == 2)
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You short out [src]'s reagent synthesis circuits.</span>")
|
||||
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
|
||||
flick("nutribot_spark", src)
|
||||
playsound(src, "sparks", 75, 1)
|
||||
if(user)
|
||||
oldpatient = user
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/process_scan(mob/living/carbon/human/H)
|
||||
if(H.stat == DEAD)
|
||||
return
|
||||
|
||||
if((H == oldpatient) && (world.time < last_found + 200))
|
||||
return
|
||||
|
||||
if(assess_patient(H))
|
||||
last_found = world.time
|
||||
if((last_newpatient_speak + 300) < world.time) //Don't spam these messages!
|
||||
var/list/messagevoice = list("Hey, [H.name]! Hold on, I'm coming." = 'sound/voice/medbot/coming.ogg',"Wait [H.name]! I want to help!" = 'sound/voice/medbot/help.ogg')
|
||||
var/message = pick(messagevoice)
|
||||
if(prob(2) && ISINRANGE_EX(H.getFireLoss(), 0, 20))
|
||||
message = "Notices your minor burns*OwO what's this?"
|
||||
messagevoice[message] = 'sound/voice/medbot/owo.ogg'
|
||||
speak(message)
|
||||
playsound(loc, messagevoice[message], 50, 0)
|
||||
last_newpatient_speak = world.time
|
||||
return H
|
||||
else
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/proc/tip_over(mob/user)
|
||||
canmove = 0
|
||||
//mobility_flags &= ~MOBILITY_MOVE
|
||||
playsound(src, 'sound/machines/warning-buzzer.ogg', 50)
|
||||
user.visible_message("<span class='danger'>[user] tips over [src]!</span>", "<span class='danger'>You tip [src] over!</span>")
|
||||
mode = BOT_TIPPED
|
||||
var/matrix/mat = transform
|
||||
transform = mat.Turn(180)
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/proc/set_right(mob/user)
|
||||
canmove = 1
|
||||
//mobility_flags &= MOBILITY_MOVE
|
||||
var/list/messagevoice
|
||||
if(user)
|
||||
user.visible_message("<span class='notice'>[user] sets [src] right-side up!</span>", "<span class='green'>You set [src] right-side up!</span>")
|
||||
if(user.name == tipper_name)
|
||||
messagevoice = list("I forgive you." = 'sound/voice/medbot/forgive.ogg')
|
||||
else
|
||||
messagevoice = list("Thank you!" = 'sound/voice/medbot/thank_you.ogg', "You are a good person." = 'sound/voice/medbot/youre_good.ogg')
|
||||
else
|
||||
visible_message("<span class='notice'>[src] manages to writhe wiggle enough to right itself.</span>")
|
||||
messagevoice = list("Fuck you." = 'sound/voice/medbot/fuck_you.ogg', "Your behavior has been reported, have a nice day." = 'sound/voice/medbot/reported.ogg')
|
||||
|
||||
tipper_name = null
|
||||
if(world.time > last_tipping_action_voice + 15 SECONDS)
|
||||
last_tipping_action_voice = world.time
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
playsound(src, messagevoice[message], 70)
|
||||
tipped_status = NUTRIBOT_PANIC_NONE
|
||||
mode = BOT_IDLE
|
||||
transform = matrix()
|
||||
|
||||
// if someone tipped us over, check whether we should ask for help or just right ourselves eventually
|
||||
/mob/living/simple_animal/bot/nutribot/proc/handle_panic()
|
||||
tipped_status++
|
||||
var/list/messagevoice
|
||||
switch(tipped_status)
|
||||
if(NUTRIBOT_PANIC_LOW)
|
||||
messagevoice = list("I require assistance." = 'sound/voice/medbot/i_require_asst.ogg')
|
||||
if(NUTRIBOT_PANIC_MED)
|
||||
messagevoice = list("Please put me back." = 'sound/voice/medbot/please_put_me_back.ogg')
|
||||
if(NUTRIBOT_PANIC_HIGH)
|
||||
messagevoice = list("Please, I am scared!" = 'sound/voice/medbot/please_im_scared.ogg')
|
||||
if(NUTRIBOT_PANIC_FUCK)
|
||||
messagevoice = list("I don't like this, I need help!" = 'sound/voice/medbot/dont_like.ogg', "This hurts, my pain is real!" = 'sound/voice/medbot/pain_is_real.ogg')
|
||||
if(NUTRIBOT_PANIC_ENDING)
|
||||
messagevoice = list("Is this the end?" = 'sound/voice/medbot/is_this_the_end.ogg', "Nooo!" = 'sound/voice/medbot/nooo.ogg')
|
||||
if(NUTRIBOT_PANIC_END)
|
||||
speak("PSYCH ALERT: Crewmember [tipper_name] recorded displaying antisocial tendencies torturing bots in [get_area(src)]. Please schedule psych evaluation.", radio_channel)
|
||||
set_right() // strong independent nutribot
|
||||
|
||||
if(prob(tipped_status))
|
||||
do_jitter_animation(tipped_status * 0.1)
|
||||
|
||||
if(messagevoice)
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
playsound(src, messagevoice[message], 70)
|
||||
else if(prob(tipped_status * 0.2))
|
||||
playsound(src, 'sound/machines/warning-buzzer.ogg', 30, extrarange=-2)
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/examine(mob/user)
|
||||
. = ..()
|
||||
if(tipped_status == NUTRIBOT_PANIC_NONE)
|
||||
return
|
||||
|
||||
switch(tipped_status)
|
||||
if(NUTRIBOT_PANIC_NONE to NUTRIBOT_PANIC_LOW)
|
||||
. += "It appears to be tipped over, and is quietly waiting for someone to set it right."
|
||||
if(NUTRIBOT_PANIC_LOW to NUTRIBOT_PANIC_MED)
|
||||
. += "It is tipped over and requesting help."
|
||||
if(NUTRIBOT_PANIC_MED to NUTRIBOT_PANIC_HIGH)
|
||||
. += "They are tipped over and appear visibly distressed." // now we humanize the nutribot as a they, not an it
|
||||
if(NUTRIBOT_PANIC_HIGH to NUTRIBOT_PANIC_FUCK)
|
||||
. += "<span class='warning'>They are tipped over and visibly panicking!</span>"
|
||||
if(NUTRIBOT_PANIC_FUCK to INFINITY)
|
||||
. += "<span class='warning'><b>They are freaking out from being tipped over!</b></span>"
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/handle_automated_action()
|
||||
if(!..())
|
||||
return
|
||||
|
||||
if(mode == BOT_TIPPED)
|
||||
handle_panic()
|
||||
return
|
||||
|
||||
if(mode == BOT_HEALING)
|
||||
return
|
||||
|
||||
if(IsStun())
|
||||
oldpatient = patient
|
||||
patient = null
|
||||
mode = BOT_IDLE
|
||||
return
|
||||
|
||||
if(frustration > 8)
|
||||
oldpatient = patient
|
||||
soft_reset()
|
||||
|
||||
if(QDELETED(patient))
|
||||
if(!shut_up && prob(1))
|
||||
if(emagged && prob(30))
|
||||
var/list/i_need_scissors = list('sound/voice/medbot/fuck_you.ogg', 'sound/voice/medbot/turn_off.ogg', 'sound/voice/medbot/im_different.ogg', 'sound/voice/medbot/close.ogg', 'sound/voice/medbot/shindemashou.ogg')
|
||||
playsound(src, pick(i_need_scissors), 70)
|
||||
else
|
||||
var/list/messagevoice = list("Radar, put a mask on!" = 'sound/voice/medbot/radar.ogg',"There's always a catch, and I'm the best there is." = 'sound/voice/medbot/catch.ogg',"I knew it, I should've been a plastic surgeon." = 'sound/voice/medbot/surgeon.ogg',"What kind of medbay is this? Everyone's dropping like flies." = 'sound/voice/medbot/flies.ogg',"Delicious!" = 'sound/voice/medbot/delicious.ogg', "Why are we still here? Just to suffer?" = 'sound/voice/medbot/why.ogg')
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
playsound(src, messagevoice[message], 50)
|
||||
var/scan_range = (stationary_mode ? 1 : DEFAULT_SCAN_RANGE) //If in stationary mode, scan range is limited to adjacent patients.
|
||||
patient = scan(/mob/living/carbon/human, oldpatient, scan_range)
|
||||
oldpatient = patient
|
||||
|
||||
if(patient && (get_dist(src,patient) <= 1)) //Patient is next to us, begin treatment!
|
||||
if(mode != BOT_HEALING)
|
||||
mode = BOT_HEALING
|
||||
update_icon()
|
||||
frustration = 0
|
||||
medicate_patient(patient)
|
||||
return
|
||||
|
||||
//Patient has moved away from us!
|
||||
else if(patient && path.len && (get_dist(patient,path[path.len]) > 2))
|
||||
path = list()
|
||||
mode = BOT_IDLE
|
||||
last_found = world.time
|
||||
|
||||
else if(stationary_mode && patient) //Since we cannot move in this mode, ignore the patient and wait for another.
|
||||
soft_reset()
|
||||
return
|
||||
|
||||
if(patient && path.len == 0 && (get_dist(src,patient) > 1))
|
||||
path = get_path_to(src, get_turf(patient), /turf/proc/Distance_cardinal, 0, 30,id=access_card)
|
||||
mode = BOT_MOVING
|
||||
if(!path.len) //try to get closer if you can't reach the patient directly
|
||||
path = get_path_to(src, get_turf(patient), /turf/proc/Distance_cardinal, 0, 30,1,id=access_card)
|
||||
if(!path.len) //Do not chase a patient we cannot reach.
|
||||
soft_reset()
|
||||
|
||||
if(path.len > 0 && patient)
|
||||
if(!bot_move(path[path.len]))
|
||||
oldpatient = patient
|
||||
soft_reset()
|
||||
return
|
||||
|
||||
if(path.len > 8 && patient)
|
||||
frustration++
|
||||
|
||||
if(auto_patrol && !stationary_mode && !patient)
|
||||
if(mode == BOT_IDLE || mode == BOT_START_PATROL)
|
||||
start_patrol()
|
||||
|
||||
if(mode == BOT_PATROL)
|
||||
bot_patrol()
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/proc/assess_patient(mob/living/carbon/C)
|
||||
//Time to see if they need medical help!
|
||||
if(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_FAKEDEATH)))
|
||||
return FALSE //welp too late for them!
|
||||
|
||||
if(!(loc == C.loc) && !(isturf(C.loc) && isturf(loc)))
|
||||
return FALSE
|
||||
|
||||
if(C.suiciding)
|
||||
return FALSE //Kevorkian school of robotic medical assistants.
|
||||
|
||||
if(!C?.client?.prefs.bot_feeding)
|
||||
return FALSE
|
||||
|
||||
if(emagged == 2) //Everyone needs our medicine. (Our medicine is corn oil)
|
||||
return TRUE
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if (H.wear_suit && H.head && istype(H.wear_suit, /obj/item/clothing) && istype(H.head, /obj/item/clothing))
|
||||
var/obj/item/clothing/CS = H.wear_suit
|
||||
var/obj/item/clothing/CH = H.head
|
||||
if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL)
|
||||
return FALSE // Skip over them if they have no exposed flesh.
|
||||
|
||||
//if(declare_crit && C.health <= 0) //Critical condition! Call for help!
|
||||
//declare(C)
|
||||
|
||||
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
|
||||
if((reagent_glass) && (use_beaker) && (C.nutrition <= hunger_check) && ((C.fatness <= feed_threshold) || (feed_threshold == 0)))
|
||||
for(var/A in reagent_glass.reagents.reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if(!C.reagents.has_reagent(R.type))
|
||||
return TRUE
|
||||
|
||||
//They're injured enough for it!
|
||||
|
||||
//nutrition check
|
||||
if((C.nutrition <= hunger_check) && ((C.fatness <= feed_threshold) || (feed_threshold == 0)) && (!C.reagents.has_reagent(treatment_thin)))
|
||||
return TRUE //If they're already medicated don't bother!
|
||||
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/attack_hand(mob/living/carbon/human/H)
|
||||
if(H.a_intent == INTENT_DISARM && mode != BOT_TIPPED)
|
||||
H.visible_message("<span class='danger'>[H] begins tipping over [src].</span>", "<span class='warning'>You begin tipping over [src]...</span>")
|
||||
|
||||
if(world.time > last_tipping_action_voice + 15 SECONDS)
|
||||
last_tipping_action_voice = world.time // message for tipping happens when we start interacting, message for righting comes after finishing
|
||||
var/list/messagevoice = list("Hey, wait..." = 'sound/voice/medbot/hey_wait.ogg',"Please don't..." = 'sound/voice/medbot/please_dont.ogg',"I trusted you..." = 'sound/voice/medbot/i_trusted_you.ogg', "Nooo..." = 'sound/voice/medbot/nooo.ogg', "Oh fuck-" = 'sound/voice/medbot/oh_fuck.ogg')
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
playsound(src, messagevoice[message], 70, FALSE)
|
||||
|
||||
if(do_after(H, 3 SECONDS, target=src))
|
||||
tip_over(H)
|
||||
|
||||
else if(H.a_intent == INTENT_HELP && mode == BOT_TIPPED)
|
||||
H.visible_message("<span class='notice'>[H] begins righting [src].</span>", "<span class='notice'>You begin righting [src]...</span>")
|
||||
if(do_after(H, 3 SECONDS, target=src))
|
||||
set_right(H)
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/UnarmedAttack(atom/A)
|
||||
if(iscarbon(A))
|
||||
var/mob/living/carbon/C = A
|
||||
patient = C
|
||||
mode = BOT_HEALING
|
||||
update_icon()
|
||||
medicate_patient(C)
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/examinate(atom/A as mob|obj|turf in view())
|
||||
..()
|
||||
if(!is_blind(src))
|
||||
chemscan(src, A)
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/proc/medicate_patient(mob/living/carbon/C)
|
||||
if(!on)
|
||||
return
|
||||
|
||||
if(!istype(C))
|
||||
oldpatient = patient
|
||||
soft_reset()
|
||||
return
|
||||
|
||||
if(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_FAKEDEATH)))
|
||||
var/list/messagevoice = list("No! Stay with me!" = 'sound/voice/medbot/no.ogg',"Live, damnit! LIVE!" = 'sound/voice/medbot/live.ogg',"I...I've never lost a patient before. Not today, I mean." = 'sound/voice/medbot/lost.ogg')
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
playsound(loc, messagevoice[message], 50, 0)
|
||||
oldpatient = patient
|
||||
soft_reset()
|
||||
return
|
||||
|
||||
var/reagent_id = null
|
||||
|
||||
if(emagged == 2) //Emagged! Time to poison everybody.
|
||||
reagent_id = /datum/reagent/consumable/cornoil //evil fucking check for a string as a reagent this shit is evil. its supposed to inject corn oil AND filzulphite but ill handle that later
|
||||
|
||||
else
|
||||
|
||||
if(!reagent_id && ((feed_threshold == 0) || (C.fatness <= feed_threshold)) && (C.nutrition <= hunger_check))
|
||||
if(!C.reagents.has_reagent(treatment_thin))
|
||||
reagent_id = treatment_thin
|
||||
|
||||
//If the patient is injured but doesn't have our special reagent in them then we should give it to them first
|
||||
if(reagent_id && use_beaker && reagent_glass && reagent_glass.reagents.total_volume)
|
||||
for(var/A in reagent_glass.reagents.reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
if(!C.reagents.has_reagent(R.type))
|
||||
reagent_id = "internal_beaker"
|
||||
break
|
||||
|
||||
if(!reagent_id) //If they don't need any of that they're probably cured!
|
||||
if((C.nutrition >= hunger_check) || (C.fatness >= feed_threshold))
|
||||
to_chat(src, "<span class='notice'>[C] is full, or fat! Your programming prevents you from feeding anyone who is over the maximum weight, or doesn't need food!</span>")
|
||||
var/list/messagevoice = list("All patched up!" = 'sound/voice/medbot/patchedup.ogg',"An apple a day keeps me away." = 'sound/voice/medbot/apple.ogg',"Feel better soon!" = 'sound/voice/medbot/feelbetter.ogg')
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
playsound(loc, messagevoice[message], 50, 0)
|
||||
bot_reset()
|
||||
return
|
||||
else
|
||||
if(!emagged && check_overdose(patient,reagent_id,injection_amount))
|
||||
soft_reset()
|
||||
return
|
||||
C.visible_message("<span class='danger'>[src] is trying to feed [patient]!</span>", \
|
||||
"<span class='userdanger'>[src] is trying to feed you!</span>")
|
||||
|
||||
var/failed = FALSE
|
||||
if(do_mob(src, patient, 30)) //Is C == patient? This is so confusing
|
||||
if((get_dist(src, patient) <= 1) && (on) && assess_patient(patient))
|
||||
if(reagent_id == "internal_beaker")
|
||||
if(use_beaker && reagent_glass && reagent_glass.reagents.total_volume)
|
||||
var/fraction = min(injection_amount/reagent_glass.reagents.total_volume, 1)
|
||||
reagent_glass.reagents.reaction(patient, INJECT, fraction)
|
||||
reagent_glass.reagents.trans_to(patient,injection_amount) //Inject from beaker instead.
|
||||
else
|
||||
patient.reagents.add_reagent(reagent_id,injection_amount)
|
||||
C.visible_message("<span class='danger'>[src] feeds [patient] with its tube!</span>", \
|
||||
"<span class='userdanger'>[src] feeds you with its tube!</span>")
|
||||
else
|
||||
failed = TRUE
|
||||
else
|
||||
failed = TRUE
|
||||
|
||||
if(failed)
|
||||
visible_message("[src] retracts its tube.")
|
||||
update_icon()
|
||||
soft_reset()
|
||||
return
|
||||
|
||||
reagent_id = null
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/proc/check_overdose(mob/living/carbon/patient,reagent_id,injection_amount)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id]
|
||||
if(!R.overdose_threshold) //Some chems do not have an OD threshold
|
||||
return FALSE
|
||||
var/current_volume = patient.reagents.get_reagent_amount(reagent_id)
|
||||
if(current_volume + injection_amount > R.overdose_threshold)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/nutribot/explode()
|
||||
on = FALSE
|
||||
visible_message("<span class='boldannounce'>[src] blows apart!</span>")
|
||||
var/atom/Tsec = drop_location()
|
||||
|
||||
new /obj/item/stack/sheet/cardboard(Tsec)
|
||||
new /obj/item/assembly/prox_sensor(Tsec)
|
||||
new /obj/item/stack/sheet/mineral/calorite(Tsec)
|
||||
|
||||
if(reagent_glass)
|
||||
drop_part(reagent_glass, Tsec)
|
||||
|
||||
if(prob(50))
|
||||
drop_part(robot_arm, Tsec)
|
||||
|
||||
if(emagged && prob(25))
|
||||
playsound(loc, 'sound/voice/medbot/insult.ogg', 50, 0)
|
||||
|
||||
do_sparks(3, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot_core/nutribot
|
||||
req_one_access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_ROBOTICS)
|
||||
|
||||
#undef NUTRIBOT_PANIC_NONE
|
||||
#undef NUTRIBOT_PANIC_LOW
|
||||
#undef NUTRIBOT_PANIC_MED
|
||||
#undef NUTRIBOT_PANIC_HIGH
|
||||
#undef NUTRIBOT_PANIC_FUCK
|
||||
#undef NUTRIBOT_PANIC_ENDING
|
||||
#undef NUTRIBOT_PANIC_END
|
||||
@@ -0,0 +1,423 @@
|
||||
/datum/species/proc/handle_fatness_trait(mob/living/carbon/human/H, trait, trait_lose, trait_gain, fatness_lose, fatness_gain, chat_lose, chat_gain)
|
||||
if(H.fatness < fatness_lose)
|
||||
if (chat_lose)
|
||||
to_chat(H, chat_lose)
|
||||
if (trait)
|
||||
REMOVE_TRAIT(H, trait, OBESITY)
|
||||
if (trait_lose)
|
||||
ADD_TRAIT(H, trait_lose, OBESITY)
|
||||
update_body_size(H, -1)
|
||||
else if(H.fatness >= fatness_gain)
|
||||
if (chat_gain)
|
||||
to_chat(H, chat_gain)
|
||||
if (trait)
|
||||
REMOVE_TRAIT(H, trait, OBESITY)
|
||||
if (trait_gain)
|
||||
ADD_TRAIT(H, trait_gain, OBESITY)
|
||||
update_body_size(H, 1)
|
||||
|
||||
/datum/species/proc/handle_helplessness(mob/living/carbon/human/fatty)
|
||||
var/datum/preferences/preferences = fatty?.client?.prefs
|
||||
if(!istype(preferences))
|
||||
return FALSE
|
||||
|
||||
if(preferences.helplessness_no_movement)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_no_movement)
|
||||
to_chat(fatty, "<span class='warning'>You have become too fat to move anymore.</span>")
|
||||
ADD_TRAIT(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_no_movement)
|
||||
to_chat(fatty, "<span class='notice'>You have become thin enough to regain some of your mobility.</span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_MOVE, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_clumsy)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_clumsy)
|
||||
to_chat(fatty, "<span class='warning'>Your newfound weight has made it hard to manipulate objects.</span>")
|
||||
ADD_TRAIT(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_clumsy)
|
||||
to_chat(fatty, "<span class='notice'>You feel like you have lost enough weight to recover your dexterity.</span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_CLUMSY, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_nearsighted)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_NEARSIGHT, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_nearsighted)
|
||||
to_chat(fatty, "<span class='warning'>Your fat makes it difficult to see the world around you. </span>")
|
||||
fatty.become_nearsighted(HELPLESSNESS_TRAIT)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_nearsighted)
|
||||
to_chat(fatty, "<span class='notice'>You are thin enough to see your enviornment again. </span>")
|
||||
fatty.cure_nearsighted(HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_NEARSIGHT, HELPLESSNESS_TRAIT))
|
||||
fatty.cure_nearsighted(HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_hidden_face)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_hidden_face)
|
||||
to_chat(fatty, "<span class='warning'>You have gotten fat enough that your face is now unrecognizable. </span>")
|
||||
ADD_TRAIT(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_hidden_face)
|
||||
to_chat(fatty, "<span class='notice'>You have lost enough weight to allow people to now recognize your face.</span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_DISFIGURED, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_mute)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_mute)
|
||||
to_chat(fatty, "<span class='warning'>Your fat makes it impossible for you to speak.</span>")
|
||||
ADD_TRAIT(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_mute)
|
||||
to_chat(fatty, "<span class='notice'>You are thin enough now to be able to speak again. </span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_MUTE, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_immobile_arms)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_immobile_arms)
|
||||
to_chat(fatty, "<span class='warning'>Your arms are now engulfed in fat, making it impossible to move your arms. </span>")
|
||||
ADD_TRAIT(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT)
|
||||
ADD_TRAIT(fatty, TRAIT_PARALYSIS_R_ARM, HELPLESSNESS_TRAIT)
|
||||
fatty.update_disabled_bodyparts()
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_immobile_arms)
|
||||
to_chat(fatty, "<span class='notice'>You are able to move your arms again. </span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT)
|
||||
REMOVE_TRAIT(fatty, TRAIT_PARALYSIS_R_ARM, HELPLESSNESS_TRAIT)
|
||||
fatty.update_disabled_bodyparts()
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_PARALYSIS_L_ARM, HELPLESSNESS_TRAIT)
|
||||
REMOVE_TRAIT(fatty, TRAIT_PARALYSIS_R_ARM, HELPLESSNESS_TRAIT)
|
||||
fatty.update_disabled_bodyparts()
|
||||
|
||||
if(preferences.helplessness_clothing_jumpsuit)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_clothing_jumpsuit)
|
||||
ADD_TRAIT(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT)
|
||||
|
||||
var/obj/item/clothing/under/jumpsuit = fatty.w_uniform
|
||||
if(istype(jumpsuit) && !istype(jumpsuit, /obj/item/clothing/under/color/grey/modular))
|
||||
to_chat(fatty, "<span class='warning'>[jumpsuit] can no longer contain your weight!</span>")
|
||||
fatty.dropItemToGround(jumpsuit)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_clothing_jumpsuit)
|
||||
to_chat(fatty, "<span class='notice'>You feel thin enough to put on jumpsuits now. </span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_JUMPSUIT, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_clothing_misc)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_clothing_misc)
|
||||
ADD_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)
|
||||
|
||||
var/obj/item/clothing/suit/worn_suit = fatty.wear_suit
|
||||
if(istype(worn_suit))
|
||||
to_chat(fatty, "<span class='warning'>[worn_suit] can no longer contain your weight!</span>")
|
||||
fatty.dropItemToGround(worn_suit)
|
||||
|
||||
var/obj/item/clothing/gloves/worn_gloves = fatty.gloves
|
||||
if(istype(worn_gloves))
|
||||
to_chat(fatty, "<span class='warning'>[worn_gloves] can no longer contain your weight!</span>")
|
||||
fatty.dropItemToGround(worn_gloves)
|
||||
|
||||
var/obj/item/clothing/shoes/worn_shoes = fatty.shoes
|
||||
if(istype(worn_shoes))
|
||||
to_chat(fatty, "<span class='warning'>[worn_shoes] can no longer contain your weight!</span>")
|
||||
fatty.dropItemToGround(worn_shoes)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_clothing_misc)
|
||||
to_chat(fatty, "<span class='notice'>You feel thin enough to put on suits, shoes, and gloves now. </span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_clothing_back)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_clothing_back)
|
||||
ADD_TRAIT(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)
|
||||
var/obj/item/back_item = fatty.back
|
||||
if(istype(back_item))
|
||||
to_chat(fatty, "<span class='warning'>Your weight makes it impossible for you to carry [back_item].</span>")
|
||||
fatty.dropItemToGround(back_item)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_clothing_back)
|
||||
to_chat(fatty, "<span class='notice'>You feel thin enough to hold items on your back now. </span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
if(preferences.helplessness_no_buckle)
|
||||
if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT))
|
||||
if(fatty.fatness >= preferences.helplessness_no_buckle)
|
||||
to_chat(fatty, "<span class='warning'>You feel like you've gotten too big to fit on anything.</span>")
|
||||
ADD_TRAIT(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT)
|
||||
|
||||
else if(fatty.fatness < preferences.helplessness_no_buckle)
|
||||
to_chat(fatty, "<span class='notice'>You feel thin enough to sit on things again. </span>")
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT)
|
||||
|
||||
else
|
||||
if(HAS_TRAIT_FROM(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT))
|
||||
REMOVE_TRAIT(fatty, TRAIT_NO_BUCKLE, HELPLESSNESS_TRAIT)
|
||||
|
||||
|
||||
/datum/species/proc/handle_fatness(mob/living/carbon/human/H)
|
||||
handle_helplessness(H)
|
||||
if(HAS_TRAIT(H, TRAIT_BLOB))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_BLOB,
|
||||
TRAIT_IMMOBILE,
|
||||
null,
|
||||
FATNESS_LEVEL_BLOB,
|
||||
INFINITY,
|
||||
"<span class='notice'>You feel like you've regained some mobility!</span>",
|
||||
null)
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_IMMOBILE))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_IMMOBILE,
|
||||
TRAIT_BARELYMOBILE,
|
||||
TRAIT_BLOB,
|
||||
FATNESS_LEVEL_IMMOBILE,
|
||||
FATNESS_LEVEL_BLOB,
|
||||
"<span class='notice'>You feel less restrained by your fat!</span>",
|
||||
"<span class='danger'>You feel like you've become a mountain of fat!</span>")
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_BARELYMOBILE))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_BARELYMOBILE,
|
||||
TRAIT_EXTREMELYOBESE,
|
||||
TRAIT_IMMOBILE,
|
||||
FATNESS_LEVEL_BARELYMOBILE,
|
||||
FATNESS_LEVEL_IMMOBILE,
|
||||
"<span class='notice'>You feel less restrained by your fat!</span>",
|
||||
"<span class='danger'>You feel belly smush against the floor!</span>")
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_EXTREMELYOBESE))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_EXTREMELYOBESE,
|
||||
TRAIT_MORBIDLYOBESE,
|
||||
TRAIT_BARELYMOBILE,
|
||||
FATNESS_LEVEL_EXTREMELY_OBESE,
|
||||
FATNESS_LEVEL_BARELYMOBILE,
|
||||
"<span class='notice'>You feel less restrained by your fat!</span>",
|
||||
"<span class='danger'>You feel like you can barely move!</span>")
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_MORBIDLYOBESE))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_MORBIDLYOBESE,
|
||||
TRAIT_OBESE,
|
||||
TRAIT_EXTREMELYOBESE,
|
||||
FATNESS_LEVEL_MORBIDLY_OBESE,
|
||||
FATNESS_LEVEL_EXTREMELY_OBESE,
|
||||
"<span class='notice'>You feel a bit less fat!</span>",
|
||||
"<span class='danger'>You feel your belly rest heavily on your lap!</span>")
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_OBESE))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_OBESE,
|
||||
TRAIT_VERYFAT,
|
||||
TRAIT_MORBIDLYOBESE,
|
||||
FATNESS_LEVEL_OBESE,
|
||||
FATNESS_LEVEL_MORBIDLY_OBESE,
|
||||
"<span class='notice'>You feel like you've lost weight!</span>",
|
||||
"<span class='danger'>Your thighs begin to rub against each other.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_VERYFAT))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_VERYFAT,
|
||||
TRAIT_FATTER,
|
||||
TRAIT_OBESE,
|
||||
FATNESS_LEVEL_VERYFAT,
|
||||
FATNESS_LEVEL_OBESE,
|
||||
"<span class='notice'>You feel like you've lost weight!</span>",
|
||||
"<span class='danger'>You feel like you're starting to get really heavy.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_FATTER))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_FATTER,
|
||||
TRAIT_FAT,
|
||||
TRAIT_VERYFAT,
|
||||
FATNESS_LEVEL_FATTER,
|
||||
FATNESS_LEVEL_VERYFAT,
|
||||
"<span class='notice'>You feel like you've lost weight!</span>",
|
||||
"<span class='danger'>Your clothes creak quietly!</span>")
|
||||
return
|
||||
if(HAS_TRAIT(H, TRAIT_FAT))
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
TRAIT_FAT,
|
||||
null,
|
||||
TRAIT_FATTER,
|
||||
FATNESS_LEVEL_FAT,
|
||||
FATNESS_LEVEL_FATTER,
|
||||
"<span class='notice'>You feel fit again!</span>",
|
||||
"<span class='danger'>You feel even plumper!</span>")
|
||||
else
|
||||
handle_fatness_trait(
|
||||
H,
|
||||
null,
|
||||
null,
|
||||
TRAIT_FAT,
|
||||
0,
|
||||
FATNESS_LEVEL_FAT,
|
||||
null,
|
||||
"<span class='danger'>You suddenly feel blubbery!</span>")
|
||||
|
||||
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
|
||||
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
|
||||
return //hunger is for BABIES
|
||||
|
||||
handle_fatness(H) // GS13
|
||||
|
||||
// nutrition decrease and satiety
|
||||
if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
// THEY HUNGER
|
||||
var/hunger_rate = HUNGER_FACTOR
|
||||
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
|
||||
if(mood && mood.sanity > SANITY_DISTURBED)
|
||||
hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75
|
||||
|
||||
// Whether we cap off our satiety or move it towards 0
|
||||
if(H.satiety > MAX_SATIETY)
|
||||
H.satiety = MAX_SATIETY
|
||||
else if(H.satiety > 0)
|
||||
H.satiety--
|
||||
else if(H.satiety < -MAX_SATIETY)
|
||||
H.satiety = -MAX_SATIETY
|
||||
else if(H.satiety < 0)
|
||||
H.satiety++
|
||||
if(prob(round(-H.satiety/40)))
|
||||
H.Jitter(5)
|
||||
hunger_rate = 3 * HUNGER_FACTOR
|
||||
hunger_rate *= H.physiology.hunger_mod
|
||||
H.nutrition = max(0, H.nutrition - hunger_rate)
|
||||
|
||||
|
||||
if (H.nutrition > NUTRITION_LEVEL_FULL)
|
||||
// fatConversionRate is functionally useless. It seems under normal curcumstances, each tick only processes, at most, 1 nutrition anyway. reducing the value has no effect.
|
||||
var/fatConversionRate = 100 //GS13 what percentage of the excess nutrition should go to fat (total nutrition to transfer can't be under 1)
|
||||
var/nutritionThatBecomesFat = max((H.nutrition - NUTRITION_LEVEL_FULL)*(fatConversionRate / 100),1)
|
||||
H.nutrition -= nutritionThatBecomesFat
|
||||
H.adjust_fatness(nutritionThatBecomesFat, FATTENING_TYPE_FOOD)
|
||||
if(H.fullness > FULLNESS_LEVEL_EMPTY)//GS13 stomach-emptying routine
|
||||
var/ticksToEmptyStomach = 20 // GS13 how many ticks it takes to decrease the fullness by 1
|
||||
if(HAS_TRAIT(H, TRAIT_VORACIOUS))
|
||||
ticksToEmptyStomach = ticksToEmptyStomach * 0.5
|
||||
H.fullness -= 1/ticksToEmptyStomach
|
||||
if (H.fullness > FULLNESS_LEVEL_BLOATED) //GS13 overeating depends on fullness now
|
||||
if(H.overeatduration < 5000) //capped so people don't take forever to unfat
|
||||
H.overeatduration++
|
||||
else
|
||||
if(H.overeatduration > 1)
|
||||
H.overeatduration -= 1 //doubled the unfat rate -- GS13 Nah, put it back
|
||||
|
||||
//metabolism change
|
||||
if(H.nutrition > NUTRITION_LEVEL_FULL +100)
|
||||
H.metabolism_efficiency = 1
|
||||
else if(H.nutrition > NUTRITION_LEVEL_FED && H.satiety > 80)
|
||||
if(H.metabolism_efficiency != 1.25 && !HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
to_chat(H, "<span class='notice'>You feel vigorous.</span>")
|
||||
H.metabolism_efficiency = 1.25
|
||||
else if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
|
||||
if(H.metabolism_efficiency != 0.8)
|
||||
to_chat(H, "<span class='notice'>You feel sluggish.</span>")
|
||||
H.metabolism_efficiency = 0.8
|
||||
else
|
||||
if(H.metabolism_efficiency == 1.25)
|
||||
to_chat(H, "<span class='notice'>You no longer feel vigorous.</span>")
|
||||
H.metabolism_efficiency = 1
|
||||
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FULL)
|
||||
H.clear_alert("nutrition")
|
||||
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
|
||||
H.throw_alert("nutrition", /obj/screen/alert/hungry)
|
||||
if(0 to NUTRITION_LEVEL_STARVING)
|
||||
H.throw_alert("nutrition", /obj/screen/alert/starving)
|
||||
|
||||
switch(H.fullness)
|
||||
if(0 to FULLNESS_LEVEL_BLOATED)
|
||||
H.clear_alert("fullness")
|
||||
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG)
|
||||
H.throw_alert("fullness", /obj/screen/alert/bloated)
|
||||
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ)
|
||||
H.throw_alert("fullness", /obj/screen/alert/stuffed)
|
||||
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)
|
||||
H.throw_alert("fullness", /obj/screen/alert/beegbelly)
|
||||
|
||||
|
||||
switch(H.fatness)
|
||||
if(FATNESS_LEVEL_BLOB to INFINITY)
|
||||
H.throw_alert("fatness", /obj/screen/alert/blob)
|
||||
|
||||
if(FATNESS_LEVEL_IMMOBILE to FATNESS_LEVEL_BLOB)
|
||||
H.throw_alert("fatness", /obj/screen/alert/immobile)
|
||||
|
||||
if(FATNESS_LEVEL_BARELYMOBILE to FATNESS_LEVEL_IMMOBILE)
|
||||
H.throw_alert("fatness", /obj/screen/alert/barelymobile)
|
||||
|
||||
if(FATNESS_LEVEL_EXTREMELY_OBESE to FATNESS_LEVEL_BARELYMOBILE)
|
||||
H.throw_alert("fatness", /obj/screen/alert/extremelyobese)
|
||||
|
||||
if(FATNESS_LEVEL_MORBIDLY_OBESE to FATNESS_LEVEL_EXTREMELY_OBESE)
|
||||
H.throw_alert("fatness", /obj/screen/alert/morbidlyobese)
|
||||
|
||||
if(FATNESS_LEVEL_OBESE to FATNESS_LEVEL_MORBIDLY_OBESE)
|
||||
H.throw_alert("fatness", /obj/screen/alert/obese)
|
||||
|
||||
if(FATNESS_LEVEL_VERYFAT to FATNESS_LEVEL_OBESE)
|
||||
H.throw_alert("fatness", /obj/screen/alert/veryfat)
|
||||
|
||||
if(FATNESS_LEVEL_FATTER to FATNESS_LEVEL_VERYFAT)
|
||||
H.throw_alert("fatness", /obj/screen/alert/fatter)
|
||||
|
||||
if(FATNESS_LEVEL_FAT to FATNESS_LEVEL_FATTER)
|
||||
H.throw_alert("fatness", /obj/screen/alert/fat)
|
||||
|
||||
if(0 to FATNESS_LEVEL_FAT)
|
||||
H.clear_alert("fatness")
|
||||
@@ -0,0 +1,94 @@
|
||||
// In vorecode, they're defined at code/_helpers/global_lists_vr.dm but we dont have that path at all, and I dont think it's a very good
|
||||
// path for a global lists file when there's code/_global_vars/lists as a directory. Im just putting this here for now. -Reo
|
||||
|
||||
//Blacklist to exclude items from object ingestion. Digestion blacklist located in digest_act_vr.dm
|
||||
var/global/list/item_vore_blacklist = list(
|
||||
/obj/item/hand_tele,
|
||||
//obj/item/weapon/card/id/gold/captain/spare, //Hugbox
|
||||
/obj/item/gun,
|
||||
/obj/item/pinpointer,
|
||||
/obj/item/clothing/shoes/magboots,
|
||||
/obj/item/areaeditor/blueprints,
|
||||
/obj/item/clothing/head/helmet/space,
|
||||
/obj/item/disk/nuclear
|
||||
//obj/item/clothing/suit/storage/hooded/wintercoat/roiz //You fluff decrease
|
||||
)
|
||||
|
||||
var/global/list/edible_trash = list(
|
||||
///obj/item/broken_device, //Doesnt exist
|
||||
/obj/item/clothing/neck/petcollar,
|
||||
///obj/item/device/communicator, // Doesnt exist
|
||||
/obj/item/clothing/mask,
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/clothing/gloves,
|
||||
/obj/item/clothing/head,
|
||||
/obj/item/clothing/shoes,
|
||||
/obj/item/aicard, //Repathed from /obj/item/device/aicard
|
||||
/obj/item/flashlight,
|
||||
/obj/item/mmi/posibrain,
|
||||
/obj/item/paicard,
|
||||
/obj/item/pda,
|
||||
/obj/item/radio/headset,
|
||||
///obj/item/device/starcaster_news, //Doesnt exist
|
||||
///obj/item/inflatable/torn, //Doesnt exist
|
||||
/obj/item/organ,
|
||||
/obj/item/stack/sheet/cardboard,
|
||||
/obj/item/toy,
|
||||
/obj/item/trash,
|
||||
///obj/item/weapon/digestion_remains, // No former cuties (yet?)
|
||||
/obj/item/grown/bananapeel,
|
||||
///obj/item/weapon/bone, // Doesnt exist
|
||||
/obj/item/broken_bottle,
|
||||
/obj/item/card/emagfake,
|
||||
/obj/item/cigbutt,
|
||||
/obj/item/circuitboard,
|
||||
/obj/item/clipboard,
|
||||
/obj/item/grown/corncob,
|
||||
/obj/item/dice,
|
||||
/obj/item/match, //Repathed from /obj/item/weapon/flame
|
||||
/obj/item/lighter, //Added since they dont share a path of /flame anymore.
|
||||
/obj/item/light,
|
||||
/obj/item/lipstick,
|
||||
/obj/item/shard,
|
||||
/obj/item/newspaper,
|
||||
/obj/item/paper,
|
||||
/obj/item/paperplane,
|
||||
/obj/item/pen,
|
||||
/obj/item/photo,
|
||||
/obj/item/reagent_containers/food,
|
||||
/obj/item/reagent_containers/rag,
|
||||
/obj/item/soap,
|
||||
/obj/item/stack/spacecash,
|
||||
/obj/item/storage/box/matches,
|
||||
///obj/item/storage/box/wings, //Doesnt exist
|
||||
/obj/item/storage/fancy/candle_box,
|
||||
/obj/item/storage/fancy/cigarettes,
|
||||
/obj/item/storage/crayons,
|
||||
/obj/item/storage/fancy/egg_box,
|
||||
/obj/item/storage/wallet,
|
||||
///obj/item/weapon/storage/vore_egg, //Doesnt exist
|
||||
///obj/item/weapon/bikehorn/tinytether, //Doesnt exist
|
||||
///obj/item/capture_crystal, //Still doesnt exist.
|
||||
/obj/item/kitchen,
|
||||
/obj/item/storage/box/mre,
|
||||
///obj/item/storage/mrebag, //Doesnt exist
|
||||
///obj/item/weapon/storage/fancy/crackers, //Doesnt exist
|
||||
///obj/item/weapon/storage/fancy/heartbox, //Doesnt exist
|
||||
///obj/item/pizzavoucher, //Doesnt exist. Probably should, actually
|
||||
/obj/item/pizzabox,
|
||||
/obj/item/seeds,
|
||||
///obj/item/clothing/accessory/choker, //Doesnt exist
|
||||
/obj/item/clothing/accessory/medal,
|
||||
/obj/item/clothing/neck/tie,
|
||||
/obj/item/clothing/neck/scarf,
|
||||
///obj/item/clothing/accessory/bracelet, //Doesnt exist
|
||||
///obj/item/clothing/accessory/locket, //Doesnt exist
|
||||
/obj/item/storage/book/bible,
|
||||
/obj/item/bikehorn,
|
||||
//obj/item/inflatable/door/torn, //Doesnt exist
|
||||
/obj/item/reagent_containers/rag/towel, //Repath from /obj/item/towel
|
||||
/obj/item/folder,
|
||||
/obj/item/clipboard,
|
||||
/obj/item/coin,
|
||||
/obj/item/clothing/ears
|
||||
)
|
||||
Reference in New Issue
Block a user