mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Lots of cool fixes! Read below!
- Radio MMIs can now talk on the radio like a regular person does - Same for MMIs in mechs - A posibrain in a mecha doesn't lose its ability to hear binary chat - Mechs now consume power when moving again - Disassembling mecha wreckage now doesn't have a bunch of annoying "hit by" messages - MMIs in someone's grasp no longer cause a rigsuit-related runtime
This commit is contained in:
@@ -890,7 +890,10 @@
|
||||
return src
|
||||
|
||||
/mob/living/carbon/human/get_rig()
|
||||
return back
|
||||
if(istype(back,/obj/item/weapon/rig))
|
||||
return back
|
||||
else
|
||||
return null
|
||||
|
||||
#undef ONLY_DEPLOY
|
||||
#undef ONLY_RETRACT
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
if(brainmob)
|
||||
O.attack(brainmob, user)//Oh noooeeeee
|
||||
// Brainmobs can take damage, but they can't actually die. Maybe should fix.
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -111,18 +112,6 @@
|
||||
radio.broadcasting = 1//So it's broadcasting from the start.
|
||||
|
||||
verb//Allows the brain to toggle the radio functions.
|
||||
Toggle_Broadcasting()
|
||||
set name = "Toggle Broadcasting"
|
||||
set desc = "Toggle broadcasting channel on or off."
|
||||
set category = "MMI"
|
||||
set src = usr.loc//In user location, or in MMI in this case.
|
||||
set popup_menu = 0//Will not appear when right clicking.
|
||||
|
||||
if(brainmob.stat)//Only the brainmob will trigger these so no further check is necessary.
|
||||
brainmob << "Can't do that while incapacitated or dead."
|
||||
|
||||
radio.broadcasting = radio.broadcasting==1 ? 0 : 1
|
||||
brainmob << "\blue Radio is [radio.broadcasting==1 ? "now" : "no longer"] broadcasting."
|
||||
|
||||
Toggle_Listening()
|
||||
set name = "Toggle Listening"
|
||||
|
||||
@@ -64,10 +64,34 @@
|
||||
/mob/living/carbon/brain/blob_act()
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/brain/on_forcemove(atom/newloc)
|
||||
if(container)
|
||||
container.loc = newloc
|
||||
else //something went very wrong.
|
||||
CRASH("Brainmob without container.")
|
||||
loc = container
|
||||
loc = container
|
||||
|
||||
/*
|
||||
This will return true if the brain has a container that leaves it less helpless than a naked brain
|
||||
|
||||
I'm using this for Stat to give it a more nifty interface to work with
|
||||
*/
|
||||
/mob/living/carbon/brain/proc/has_synthetic_assistance()
|
||||
return (container && istype(container, /obj/item/device/mmi)) || in_contents_of(/obj/mecha)
|
||||
|
||||
/mob/living/carbon/brain/Stat()
|
||||
..()
|
||||
if(has_synthetic_assistance())
|
||||
statpanel("Status")
|
||||
stat(null, "Station Time: [worldtime2text()]")
|
||||
|
||||
if(emergency_shuttle)
|
||||
var/eta_status = emergency_shuttle.get_status_panel_eta()
|
||||
if(eta_status)
|
||||
stat(null, eta_status)
|
||||
if(client.statpanel == "Status")
|
||||
//Knowing how well-off your mech is doing is really important as an MMI
|
||||
if(istype(src.loc, /obj/mecha))
|
||||
var/obj/mecha/M = src.loc
|
||||
stat("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]")
|
||||
stat("Exosuit Integrity", "[!M.health ? "0" : "[(M.health / initial(M.health)) * 100]"]%")
|
||||
@@ -12,26 +12,35 @@
|
||||
else
|
||||
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
|
||||
|
||||
if(istype(container, /obj/item/device/mmi/radio_enabled))
|
||||
var/radio_MMI_message = message //split off so the MMI can get a trimmed message without fucking up living/say()
|
||||
if(!speaking)
|
||||
speaking = parse_language(message)
|
||||
if(speaking)
|
||||
radio_MMI_message = copytext(message, 2 + length(speaking.key))
|
||||
else
|
||||
speaking = get_default_language()
|
||||
|
||||
var/obj/item/device/mmi/radio_enabled/R = container
|
||||
if(R.radio)
|
||||
spawn(0) R.radio.hear_talk(src, trim(sanitize(radio_MMI_message)), say_quote(radio_MMI_message), speaking)
|
||||
|
||||
..(message)
|
||||
|
||||
/mob/living/carbon/brain/can_speak(var/datum/language/speaking)
|
||||
if(speaking == all_languages["Robot Talk"] && istype(loc, /obj/item/device/mmi/posibrain)) //so posibrains can speak binary; less messy than adding the language
|
||||
if(speaking == all_languages["Robot Talk"] && (container && istype(container, /obj/item/device/mmi/posibrain))) //so posibrains can speak binary; less messy than adding the language
|
||||
return 1
|
||||
|
||||
else return ..()
|
||||
|
||||
/mob/living/carbon/brain/binarycheck()
|
||||
return istype(loc, /obj/item/device/mmi/posibrain)
|
||||
return (container && istype(container, /obj/item/device/mmi/posibrain))
|
||||
|
||||
/mob/living/carbon/brain/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name)
|
||||
switch(message_mode)
|
||||
if("headset")
|
||||
var/radio_worked = 0 // If any of the radios our brainmob could use functioned, this is set true so that we don't use any others
|
||||
// I'm doing it this way so that if the mecha radio fails for some reason, a radio MMI still has the built-in fallback
|
||||
if (container && istype(container,/obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/c = container
|
||||
if (!radio_worked && c.mecha)
|
||||
var/obj/mecha/metalgear = c.mecha
|
||||
if(metalgear.radio)
|
||||
radio_worked = metalgear.radio.talk_into(src, message, message_mode, verb, speaking)
|
||||
|
||||
else if(!radio_worked && istype(c, /obj/item/device/mmi/radio_enabled))
|
||||
var/obj/item/device/mmi/radio_enabled/R = c
|
||||
if(R.radio)
|
||||
radio_worked = R.radio.talk_into(src, message, message_mode, verb, speaking)
|
||||
return radio_worked
|
||||
if ("whisper")
|
||||
whisper_say(message, speaking, alt_name)
|
||||
return 1
|
||||
else return 0
|
||||
Reference in New Issue
Block a user