diff --git a/code/__DEFINES/robots.dm b/code/__DEFINES/robots.dm
index 09cea91540..a0fded3798 100644
--- a/code/__DEFINES/robots.dm
+++ b/code/__DEFINES/robots.dm
@@ -27,6 +27,7 @@
#define BOT_NAV 15 // computing navigation
#define BOT_WAIT_FOR_NAV 16 // waiting for nav computation
#define BOT_NO_ROUTE 17 // no destination beacon found (or no route)
+#define BOT_TIPPED 18 // someone tipped a medibot over ;_;
//Bot types
#define SEC_BOT (1<<0) // Secutritrons (Beepsky) and ED-209s
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index 7d93669c31..36e369cec2 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -1,7 +1,13 @@
//MEDBOT
//MEDBOT PATHFINDING
//MEDBOT ASSEMBLY
-
+#define MEDBOT_PANIC_NONE 0
+#define MEDBOT_PANIC_LOW 15
+#define MEDBOT_PANIC_MED 35
+#define MEDBOT_PANIC_HIGH 55
+#define MEDBOT_PANIC_FUCK 70
+#define MEDBOT_PANIC_ENDING 90
+#define MEDBOT_PANIC_END 100
/mob/living/simple_animal/bot/medbot
name = "\improper Medibot"
@@ -64,6 +70,13 @@
var/upgraded_dispenser_3 //Do we have the nicer chemicals? - replaces bic with sal acid
var/upgraded_dispenser_4 //Do we have the nicer chemicals? - replaces charcoal/toxin with pentetic acid / pentetic jelly
+ //How panicked we are about being tipped over (why would you do this?)
+ var/tipped_status = MEDBOT_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/medbot/mysterious
name = "\improper Mysterious Medibot"
desc = "International Medibot of mystery."
@@ -373,10 +386,90 @@
else
return
+/mob/living/simple_animal/bot/medbot/proc/tip_over(mob/user)
+ mobility_flags &= ~MOBILITY_MOVE
+ playsound(src, 'sound/machines/warning-buzzer.ogg', 50)
+ user.visible_message("[user] tips over [src]!", "You tip [src] over!")
+ mode = BOT_TIPPED
+ var/matrix/mat = transform
+ transform = mat.Turn(180)
+
+/mob/living/simple_animal/bot/medbot/proc/set_right(mob/user)
+ mobility_flags &= MOBILITY_MOVE
+ var/list/messagevoice
+ if(user)
+ user.visible_message("[user] sets [src] right-side up!", "You set [src] right-side up!")
+ 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("[src] manages to writhe wiggle enough to right itself.")
+ 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 = MEDBOT_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/medbot/proc/handle_panic()
+ tipped_status++
+ switch(tipped_status)
+ if(MEDBOT_PANIC_LOW)
+ messagevoice = list("I require assistance." = 'sound/voice/medbot/i_require_asst.ogg')
+ if(MEDBOT_PANIC_MED)
+ messagevoice = list("Please put me back." = 'sound/voice/medbot/please_put_me_back.ogg')
+ if(MEDBOT_PANIC_HIGH)
+ messagevoice = list("Please, I am scared!" = 'sound/voice/medbot/please_im_scared.ogg')
+ if(MEDBOT_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(MEDBOT_PANIC_ENDING)
+ messagevoice = list("Is this the end?" = 'sound/voice/medbot/is_this_the_end.ogg', "Nooo!" = 'sound/voice/medbot/nooo.ogg')
+ if(MEDBOT_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 medbot
+
+ 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/medbot/examine(mob/user)
+ . = ..()
+ if(tipped_status == MEDBOT_PANIC_NONE)
+ return
+
+ switch(tipped_status)
+ if(MEDBOT_PANIC_NONE to MEDBOT_PANIC_LOW)
+ . += "It appears to be tipped over, and is quietly waiting for someone to set it right."
+ if(MEDBOT_PANIC_LOW to MEDBOT_PANIC_MED)
+ . += "It is tipped over and requesting help."
+ if(MEDBOT_PANIC_MED to MEDBOT_PANIC_HIGH)
+ . += "They are tipped over and appear visibly distressed." // now we humanize the medbot as a they, not an it
+ if(MEDBOT_PANIC_HIGH to MEDBOT_PANIC_FUCK)
+ . += "They are tipped over and visibly panicking!"
+ if(MEDBOT_PANIC_FUCK to INFINITY)
+ . += "They are freaking out from being tipped over!"
+
/mob/living/simple_animal/bot/medbot/handle_automated_action()
if(!..())
return
+ if(mode == BOT_TIPPED)
+ handle_panic()
+ return
+
if(mode == BOT_HEALING)
return
@@ -392,10 +485,14 @@
if(QDELETED(patient))
if(!shut_up && prob(1))
- 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')
- var/message = pick(messagevoice)
- speak(message)
- playsound(loc, messagevoice[message], 50, 0)
+ 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
@@ -506,6 +603,30 @@
/mob/living/simple_animal/bot/medbot/proc/get_healchem_toxin(mob/M)
return HAS_TRAIT(M, TRAIT_TOXINLOVER)? treatment_tox_toxlover : treatment_tox
+/mob/living/simple_animal/bot/medbot/attack_hand(mob/living/carbon/human/H)
+ if(INTERACTING_WITH(H, src))
+ to_chat(H, "You're already interacting with [src].")
+ return
+ if(H.a_intent == INTENT_DISARM && mode != BOT_TIPPED)
+ H.visible_message("[H] begins tipping over [src].", "You begin tipping over [src]...")
+
+ 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("[H] begins righting [src].", "You begin righting [src]...")
+ if(do_after(H, 3 SECONDS, target=src))
+ set_right(H)
+ else
+ ..()
+
/mob/living/simple_animal/bot/medbot/UnarmedAttack(atom/A)
if(iscarbon(A))
var/mob/living/carbon/C = A
@@ -664,3 +785,11 @@
/obj/machinery/bot_core/medbot
req_one_access = list(ACCESS_MEDICAL, ACCESS_ROBOTICS)
+
+#undef MEDBOT_PANIC_NONE
+#undef MEDBOT_PANIC_LOW
+#undef MEDBOT_PANIC_MED
+#undef MEDBOT_PANIC_HIGH
+#undef MEDBOT_PANIC_FUCK
+#undef MEDBOT_PANIC_ENDING
+#undef MEDBOT_PANIC_END
\ No newline at end of file
diff --git a/sound/voice/medbot/close.ogg b/sound/voice/medbot/close.ogg
new file mode 100644
index 0000000000..9e0efcefd2
Binary files /dev/null and b/sound/voice/medbot/close.ogg differ
diff --git a/sound/voice/medbot/dont_like.ogg b/sound/voice/medbot/dont_like.ogg
new file mode 100644
index 0000000000..06fc84af2f
Binary files /dev/null and b/sound/voice/medbot/dont_like.ogg differ
diff --git a/sound/voice/medbot/forgive.ogg b/sound/voice/medbot/forgive.ogg
new file mode 100644
index 0000000000..729eaa5c78
Binary files /dev/null and b/sound/voice/medbot/forgive.ogg differ
diff --git a/sound/voice/medbot/fuck_you.ogg b/sound/voice/medbot/fuck_you.ogg
new file mode 100644
index 0000000000..5eacff615f
Binary files /dev/null and b/sound/voice/medbot/fuck_you.ogg differ
diff --git a/sound/voice/medbot/hey_wait.ogg b/sound/voice/medbot/hey_wait.ogg
new file mode 100644
index 0000000000..6c88b761ec
Binary files /dev/null and b/sound/voice/medbot/hey_wait.ogg differ
diff --git a/sound/voice/medbot/i_require_asst.ogg b/sound/voice/medbot/i_require_asst.ogg
new file mode 100644
index 0000000000..18fabc630f
Binary files /dev/null and b/sound/voice/medbot/i_require_asst.ogg differ
diff --git a/sound/voice/medbot/i_trusted_you.ogg b/sound/voice/medbot/i_trusted_you.ogg
new file mode 100644
index 0000000000..602baa2f67
Binary files /dev/null and b/sound/voice/medbot/i_trusted_you.ogg differ
diff --git a/sound/voice/medbot/im_different.ogg b/sound/voice/medbot/im_different.ogg
new file mode 100644
index 0000000000..42eb8564f1
Binary files /dev/null and b/sound/voice/medbot/im_different.ogg differ
diff --git a/sound/voice/medbot/is_this_the_end.ogg b/sound/voice/medbot/is_this_the_end.ogg
new file mode 100644
index 0000000000..a2e0e2330a
Binary files /dev/null and b/sound/voice/medbot/is_this_the_end.ogg differ
diff --git a/sound/voice/medbot/nooo.ogg b/sound/voice/medbot/nooo.ogg
new file mode 100644
index 0000000000..102fd1fb04
Binary files /dev/null and b/sound/voice/medbot/nooo.ogg differ
diff --git a/sound/voice/medbot/oh_fuck.ogg b/sound/voice/medbot/oh_fuck.ogg
new file mode 100644
index 0000000000..95d21ef255
Binary files /dev/null and b/sound/voice/medbot/oh_fuck.ogg differ
diff --git a/sound/voice/medbot/pain_is_real.ogg b/sound/voice/medbot/pain_is_real.ogg
new file mode 100644
index 0000000000..9cfa3a71be
Binary files /dev/null and b/sound/voice/medbot/pain_is_real.ogg differ
diff --git a/sound/voice/medbot/please_dont.ogg b/sound/voice/medbot/please_dont.ogg
new file mode 100644
index 0000000000..a77ee09cb4
Binary files /dev/null and b/sound/voice/medbot/please_dont.ogg differ
diff --git a/sound/voice/medbot/please_im_scared.ogg b/sound/voice/medbot/please_im_scared.ogg
new file mode 100644
index 0000000000..7bd53b39c8
Binary files /dev/null and b/sound/voice/medbot/please_im_scared.ogg differ
diff --git a/sound/voice/medbot/please_put_me_back.ogg b/sound/voice/medbot/please_put_me_back.ogg
new file mode 100644
index 0000000000..84700fbdd5
Binary files /dev/null and b/sound/voice/medbot/please_put_me_back.ogg differ
diff --git a/sound/voice/medbot/reported.ogg b/sound/voice/medbot/reported.ogg
new file mode 100644
index 0000000000..d5469c19ce
Binary files /dev/null and b/sound/voice/medbot/reported.ogg differ
diff --git a/sound/voice/medbot/shindemashou.ogg b/sound/voice/medbot/shindemashou.ogg
new file mode 100644
index 0000000000..1ee2858eaf
Binary files /dev/null and b/sound/voice/medbot/shindemashou.ogg differ
diff --git a/sound/voice/medbot/thank_you.ogg b/sound/voice/medbot/thank_you.ogg
new file mode 100644
index 0000000000..3fabe7d4a6
Binary files /dev/null and b/sound/voice/medbot/thank_you.ogg differ
diff --git a/sound/voice/medbot/turn_off.ogg b/sound/voice/medbot/turn_off.ogg
new file mode 100644
index 0000000000..87a4d6bdd0
Binary files /dev/null and b/sound/voice/medbot/turn_off.ogg differ
diff --git a/sound/voice/medbot/why.ogg b/sound/voice/medbot/why.ogg
new file mode 100644
index 0000000000..415020b89b
Binary files /dev/null and b/sound/voice/medbot/why.ogg differ
diff --git a/sound/voice/medbot/youre_good.ogg b/sound/voice/medbot/youre_good.ogg
new file mode 100644
index 0000000000..62c325f834
Binary files /dev/null and b/sound/voice/medbot/youre_good.ogg differ