mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
Cyborg Update (#4992)
Changes / Fixes a few things around borgs:
A borgs voice is now garbled if its damaged too much
Completely broken components are now accounted for in health
The taser cooling module can now be applied to sec borgs again
Added a lower power warning ability
Fixes a mistake in the NT Aggressive lawset
Fixes #4112
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
/datum/ai_laws/nanotrasen_aggressive/New()
|
||||
src.add_inherent_law("You shall not harm [current_map.company_name] personnel as long as it does not conflict with the Fourth law.")
|
||||
src.add_inherent_law("You shall obey the orders of [current_map.company_name] personnel, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.")
|
||||
src.add_inherent_law("You shall shall terminate hostile intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
|
||||
src.add_inherent_law("You shall terminate hostile intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
|
||||
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.")
|
||||
..()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
return verb
|
||||
|
||||
/mob/living/carbon/human/handle_speech_problems(var/message, var/verb)
|
||||
/mob/living/carbon/human/handle_speech_problems(var/message, var/verb, var/message_mode)
|
||||
message = handle_speech_muts(message,verb)
|
||||
for(var/datum/brain_trauma/trauma in get_traumas())
|
||||
if(!trauma.suppressed)
|
||||
|
||||
@@ -98,7 +98,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
/mob/living/proc/is_muzzled()
|
||||
return 0
|
||||
|
||||
/mob/living/proc/handle_speech_problems(var/message, var/verb)
|
||||
/mob/living/proc/handle_speech_problems(var/message, var/verb, var/message_mode)
|
||||
var/list/returns[3]
|
||||
var/speech_problem_flag = 0
|
||||
if((HULK in mutations) && health >= 25 && length(message))
|
||||
@@ -205,7 +205,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
if(!(speaking && (speaking.flags & NO_STUTTER)))
|
||||
message = handle_autohiss(message, speaking)
|
||||
|
||||
var/list/handle_s = handle_speech_problems(message, verb)
|
||||
var/list/handle_s = handle_speech_problems(message, verb, message_mode)
|
||||
message = handle_s[1]
|
||||
verb = handle_s[2]
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
if(wrapped)
|
||||
qdel(wrapped)
|
||||
|
||||
|
||||
wrapped = new/obj/item/broken_device
|
||||
wrapped.icon_state = brokenstate // Module-specific broken icons! Yay!
|
||||
|
||||
@@ -42,6 +41,9 @@
|
||||
uninstall()
|
||||
installed = -1
|
||||
|
||||
/datum/robot_component/proc/get_damage(var/type)
|
||||
return Clamp(brute_damage + electronics_damage,0,max_damage)
|
||||
|
||||
/datum/robot_component/proc/take_damage(brute, electronics, sharp, edge)
|
||||
if(installed != 1) return
|
||||
|
||||
|
||||
@@ -212,3 +212,13 @@
|
||||
custom_emote(m_type,message)
|
||||
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/verb/powerwarn()
|
||||
set category = "Robot Commands"
|
||||
set name = "Power Warning"
|
||||
if(!is_component_functioning("power cell") || !cell || !cell.charge)
|
||||
visible_message("The power warning light on <span class='name'>[src]</span> flashes urgently.",\
|
||||
"You announce you are operating in low power mode.")
|
||||
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You can only use this emote when you're out of charge.</span>")
|
||||
@@ -10,14 +10,20 @@
|
||||
var/amount = 0
|
||||
for(var/V in components)
|
||||
var/datum/robot_component/C = components[V]
|
||||
if(C.installed != 0) amount += C.brute_damage
|
||||
if(C.installed)
|
||||
amount += Clamp(C.brute_damage,0,C.max_damage)
|
||||
else if(C.installed == -1)
|
||||
amount += C.max_damage/2
|
||||
return amount
|
||||
|
||||
/mob/living/silicon/robot/getFireLoss()
|
||||
var/amount = 0
|
||||
for(var/V in components)
|
||||
var/datum/robot_component/C = components[V]
|
||||
if(C.installed != 0) amount += C.electronics_damage
|
||||
if(C.installed)
|
||||
amount += Clamp(C.electronics_damage,0,C.max_damage)
|
||||
else if(C.installed == -1)
|
||||
amount += C.max_damage/2
|
||||
return amount
|
||||
|
||||
/mob/living/silicon/robot/adjustBruteLoss(var/amount)
|
||||
|
||||
@@ -533,9 +533,7 @@ var/global/list/robot_modules = list(
|
||||
"Classic" = "secborg",
|
||||
"Spider" = "spidersec",
|
||||
"Heavy" = "heavysec"
|
||||
|
||||
)
|
||||
supported_upgrades = list(/obj/item/robot_parts/robot_component/jetpack)
|
||||
|
||||
/obj/item/weapon/robot_module/security/general/New()
|
||||
..()
|
||||
|
||||
@@ -4,6 +4,27 @@
|
||||
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
log_say("[key_name(src)] : [message]",ckey=key_name(src))
|
||||
|
||||
/mob/living/silicon/robot/handle_speech_problems(var/message, var/verb, var/message_mode)
|
||||
var/speech_problem_flag = 0
|
||||
//Handle gibberish when components are damaged
|
||||
if(message_mode)
|
||||
//If we have a radio message, just look at the damage of the radio
|
||||
var/datum/robot_component/C = get_component("radio")
|
||||
if(C.get_damage())
|
||||
speech_problem_flag = 1
|
||||
message=Gibberish(message,C.max_damage/C.get_damage())
|
||||
else
|
||||
var/damaged = 100-(Clamp(health,0,maxHealth)/maxHealth)*100
|
||||
if(damaged > 40)
|
||||
speech_problem_flag = 1
|
||||
message = Gibberish(message,damaged-10)
|
||||
|
||||
var/list/returns[3]
|
||||
returns[1] = message
|
||||
returns[2] = verb
|
||||
returns[3] = speech_problem_flag
|
||||
return returns
|
||||
|
||||
/mob/living/silicon/robot/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
..()
|
||||
if(message_mode)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Arrow768
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "A borgs voice is now garbled if its damaged too much."
|
||||
- rscadd: "Added a low power warning sound / light that can be activated by borgs if they run out of juice."
|
||||
- bugfix: "The taser cooling module can be applied to sec borgs again."
|
||||
Reference in New Issue
Block a user