diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 104fbf1cdb..09911abf2c 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -49,9 +49,12 @@ rcd light flash thingy on matter drain set category = "Malfunction" set name = "Upgrade Turrets" usr.verbs -= /client/proc/upgrade_turrets - for(var/obj/machinery/turret/turret in player_list) - turret.health += 30 - turret.shot_delay = 20 + for(var/obj/machinery/porta_turret/turret in machines) + var/turf/T = get_turf(turret) + if(T.z in config.station_levels) + // Increase health by 37.5% of original max, decrease delays between shots to 66% + turret.health += initial(turret.health) * 3 / 8 + turret.shot_delay = initial(turret.shot_delay) * 2 / 3 /datum/AI_Module/large/disable_rcd module_name = "RCD disable" diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index dc74f0272c..1e9405cbeb 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -20,26 +20,14 @@ throw_speed = 4 throw_range = 20 -/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says") +/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg, var/verb="says", datum/language/speaking=null) if(recording) - //var/ending = copytext(msg, length(msg)) - timestamp+= timerecorded - /* - if(M.stuttering) - storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\"" - return - if(M.getBrainLoss() >= 60) - storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\"" - return - if(ending == "?") - storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\"" - return - else if(ending == "!") - storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\"" - return - */ - storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] [verb], \"[msg]\"" - return + timestamp += timerecorded + + if(speaking) + storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] [speaking.format_message_plain(msg, verb)]" + else + storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [M.name] [verb], \"[msg]\"" /obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 51a2306082..c51ffbff82 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -186,12 +186,13 @@ var/global/floorIsLava = 0 var/f = 1 for(var/k in all_languages) var/datum/language/L = all_languages[k] - if(!f) body += " | " - else f = 0 - if(L in M.languages) - body += "[k]" - else - body += "[k]" + if(!(L.flags & INNATE)) + if(!f) body += " | " + else f = 0 + if(L in M.languages) + body += "[k]" + else + body += "[k]" body += {"
diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index ee2746cccd..a3bb5a3e35 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -3,7 +3,7 @@ //They can be healed with plastic or metal sheeting. /datum/breach - var/class = 0 // Size. Lower is smaller. + var/class = 0 // Size. Lower is smaller. Uses floating point values! var/descriptor // 'gaping hole' etc. var/damtype = BURN // Punctured or melted var/obj/item/clothing/suit/space/holder // Suit containing the list of breaches holding this instance. @@ -12,8 +12,8 @@ var/can_breach = 1 // Set to 0 to disregard all breaching. var/list/breaches = list() // Breach datum container. - var/resilience = 0.2 // Multiplier that turns damage into breach class. 1 is 100% of damage to breach, 0.1 is 10%. - var/breach_threshold = 3 // Min damage before a breach is possible. + var/resilience = 0.2 // Multiplier that turns damage into breach class. 1 is 100% of damage to breach, 0.1 is 10%. 0.2 -> 50 brute/burn damage to cause 10 breach damage + var/breach_threshold = 3 // Min damage before a breach is possible. Damage is subtracted by this amount, it determines the "hardness" of the suit. var/damage = 0 // Current total damage var/brute_damage = 0 // Specifically brute damage. var/burn_damage = 0 // Specifically burn damage. @@ -44,7 +44,7 @@ var/global/list/breach_burn_descriptors = list( /datum/breach/proc/update_descriptor() //Sanity... - class = max(1,min(class,5)) + class = between(1, round(class), 5) //Apply the correct descriptor. if(damtype == BURN) descriptor = breach_burn_descriptors[class] @@ -86,7 +86,10 @@ var/global/list/breach_burn_descriptors = list( /obj/item/clothing/suit/space/proc/create_breaches(var/damtype, var/amount) - if(!can_breach || !amount) + amount -= src.breach_threshold + amount *= src.resilience + + if(!can_breach || amount <= 0) return if(!breaches) @@ -98,14 +101,14 @@ var/global/list/breach_burn_descriptors = list( var/turf/T = get_turf(src) if(!T) return - amount = amount * src.resilience - //Increase existing breaches. for(var/datum/breach/existing in breaches) if(existing.damtype != damtype) continue + //keep in mind that 10 breach damage == full pressure loss. + //a breach can have at most 5 breach damage if (existing.class < 5) var/needs = 5 - existing.class if(amount < needs) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index c66f2a986c..cc6776865a 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -686,11 +686,12 @@ /obj/item/weapon/rig/proc/malfunction() return 0 -/obj/item/weapon/rig/emp_act(severity) - malfunctioning += severity*10 +/obj/item/weapon/rig/emp_act(severity_class) + //class 1 severity is the most severe, not least. + malfunctioning += round(30/severity_class) if(malfunction_delay <= 0) malfunction_delay = 20 - take_hit(severity*10,"electrical pulse") + take_hit(round(30/severity_class),"electrical pulse") /obj/item/weapon/rig/proc/shock(mob/user) if (electrocute_mob(user, cell, src)) @@ -699,12 +700,14 @@ return 0 /obj/item/weapon/rig/proc/take_hit(damage,source) - if(!installed_modules.len) return - if(!prob(max(0,(damage-(chest ? chest.breach_threshold : 0))))) - return + //given that module damage is spread out across all modules, even this is probably not enough for emp to affect rigs much. + if(source != "electrical pulse") + var/protection = chest? chest.breach_threshold : 0 + if(!prob(max(0, damage - protection))) + return var/list/valid_modules = list() for(var/obj/item/rig_module/module in installed_modules) diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index fd802ecb63..2de6b34a84 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -39,7 +39,9 @@ flags_inv = HIDEJUMPSUIT|HIDETAIL flags = STOPPRESSUREDAMAGE | THICKMATERIAL | AIRTIGHT slowdown = 0 - breach_threshold = 35 + //With 0.2 resiliance, will reach 10 breach damage after 9 laser carbine blasts. Completely immune to smg hits. + breach_threshold = 28 + resilience = 0.1 can_breach = 1 sprite_sheets = list("Tajara" = 'icons/mob/species/tajaran/suit.dmi',"Unathi" = 'icons/mob/species/unathi/suit.dmi') supporting_limbs = list() diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 1cab4a659c..68a619ba28 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -48,6 +48,7 @@ ) //Breach thresholds, should ideally be inherited by most (if not all) voidsuits. + //With 0.2 resiliance, will reach 10 breach damage after 3 laser carbine blasts or 8 smg hits. breach_threshold = 18 can_breach = 1 diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 26583eca50..6e89f26e1e 100755 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -88,6 +88,9 @@ /datum/language/proc/format_message(message, verb) return "[verb], \"[capitalize(message)]\"" +/datum/language/proc/format_message_plain(message, verb) + return "[verb], \"[capitalize(message)]\"" + /datum/language/proc/format_message_radio(message, verb) return "[verb], \"[capitalize(message)]\"" @@ -121,11 +124,14 @@ name = "Noise" desc = "Noises" key = "" - flags = RESTRICTED|NONGLOBAL|INNATE|NO_TALK_MSG + flags = RESTRICTED|NONGLOBAL|INNATE|NO_TALK_MSG|NO_STUTTER /datum/language/noise/format_message(message, verb) return "[message]" +/datum/language/noise/format_message_plain(message, verb) + return message + /datum/language/noise/format_message_radio(message, verb) return "[message]" @@ -517,4 +523,4 @@ "ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin", "his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi") -#undef SCRAMBLE_CACHE_LEN \ No newline at end of file +#undef SCRAMBLE_CACHE_LEN diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index cf49b82364..20c5183d72 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -37,6 +37,8 @@ else message = copytext(message,3) + message = trim_left(message) + //parse the language code and consume it var/datum/language/speaking = parse_language(message) if(speaking) @@ -62,10 +64,11 @@ message = trim(message) if(speech_problem_flag) - var/list/handle_r = handle_speech_problems(message) - message = handle_r[1] - verb = handle_r[2] - speech_problem_flag = handle_r[3] + if(!speaking || !(speaking.flags & NO_STUTTER)) + var/list/handle_r = handle_speech_problems(message) + message = handle_r[1] + verb = handle_r[2] + speech_problem_flag = handle_r[3] if(!message || message == "") return diff --git a/code/modules/overmap/_defines.dm b/code/modules/overmap/_defines.dm index c81cbb1ae6..23b6e58845 100644 --- a/code/modules/overmap/_defines.dm +++ b/code/modules/overmap/_defines.dm @@ -22,17 +22,18 @@ proc/toggle_move_stars(zlevel, direction) if (moving_levels["zlevel"] != gen_dir) moving_levels["zlevel"] = gen_dir - for(var/turf/space/S in world) - if(S.z == zlevel) + for(var/x = 1 to world.maxx) + for(var/y = 1 to world.maxy) spawn(0) - var/turf/T = S - if(!gen_dir) - T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]" - else - T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]" - for(var/atom/movable/AM in T) - if (!AM.anchored) - AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1) + var/turf/space/T = locate(x,y,zlevel) + if (T) + if(!gen_dir) + T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]" + else + T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]" + for(var/atom/movable/AM in T) + if (!AM.anchored) + AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1) //list used to cache empty zlevels to avoid nedless map bloat diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm index 3397fe9a76..1dd7a17e46 100644 --- a/code/modules/overmap/ships/ship.dm +++ b/code/modules/overmap/ships/ship.dm @@ -76,9 +76,9 @@ /obj/effect/map/ship/proc/decelerate() if(!is_still() && can_burn()) if (speed[1]) - adjust_speed(-SIGN(speed[1]) * min(get_acceleration(),speed[1]), 0) + adjust_speed(-SIGN(speed[1]) * min(get_acceleration(),abs(speed[1])), 0) if (speed[2]) - adjust_speed(0, -SIGN(speed[2]) * min(get_acceleration(),speed[2])) + adjust_speed(0, -SIGN(speed[2]) * min(get_acceleration(),abs(speed[2]))) last_burn = world.time /obj/effect/map/ship/proc/accelerate(direction) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 90b5500ac7..0e98e462b2 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1148,44 +1148,9 @@ // Set channels depending on how much charge we have left - - // Allow the APC to operate as normal if the cell can charge - if(charging && longtermpower < 10) - longtermpower += 1 - else if(longtermpower > -10) - longtermpower -= 2 - - if((cell.percent() > 30) || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101 - if(autoflag != 3) - equipment = autoset(equipment, 1) - lighting = autoset(lighting, 1) - environ = autoset(environ, 1) - autoflag = 3 - power_alarm.clearAlarm(loc, src) - else if((cell.percent() <= 30) && (cell.percent() > 15) && longtermpower < 0) // <30%, turn off equipment - if(autoflag != 2) - equipment = autoset(equipment, 2) - lighting = autoset(lighting, 1) - environ = autoset(environ, 1) - power_alarm.triggerAlarm(loc, src) - autoflag = 2 - else if(cell.percent() <= 15) // <15%, turn off lighting & equipment - if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0)) - equipment = autoset(equipment, 2) - lighting = autoset(lighting, 2) - environ = autoset(environ, 1) - power_alarm.triggerAlarm(loc, src) - autoflag = 1 - else // zero charge, turn all off - if(autoflag != 0) - equipment = autoset(equipment, 0) - lighting = autoset(lighting, 0) - environ = autoset(environ, 0) - power_alarm.triggerAlarm(loc, src) - autoflag = 0 + update_channels() // now trickle-charge the cell - lastused_charging = 0 // Clear the variable for new use. if(src.attempt_charging()) if(excess > 0) // check to make sure we have enough to charge @@ -1222,7 +1187,6 @@ chargecount = 0 else // no cell, switch everything off - charging = 0 chargecount = 0 equipment = autoset(equipment, 0) @@ -1232,13 +1196,48 @@ autoflag = 0 // update icon & area power if anything changed - if(last_lt != lighting || last_eq != equipment || last_en != environ) queue_icon_update() update() else if (last_ch != charging) queue_icon_update() +/obj/machinery/power/apc/proc/update_channels() + // Allow the APC to operate as normal if the cell can charge + if(charging && longtermpower < 10) + longtermpower += 1 + else if(longtermpower > -10) + longtermpower -= 2 + + if((cell.percent() > 30) || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101 + if(autoflag != 3) + equipment = autoset(equipment, 1) + lighting = autoset(lighting, 1) + environ = autoset(environ, 1) + autoflag = 3 + power_alarm.clearAlarm(loc, src) + else if((cell.percent() <= 30) && (cell.percent() > 15) && longtermpower < 0) // <30%, turn off equipment + if(autoflag != 2) + equipment = autoset(equipment, 2) + lighting = autoset(lighting, 1) + environ = autoset(environ, 1) + power_alarm.triggerAlarm(loc, src) + autoflag = 2 + else if(cell.percent() <= 15) // <15%, turn off lighting & equipment + if((autoflag > 1 && longtermpower < 0) || (autoflag > 1 && longtermpower >= 0)) + equipment = autoset(equipment, 2) + lighting = autoset(lighting, 2) + environ = autoset(environ, 1) + power_alarm.triggerAlarm(loc, src) + autoflag = 1 + else // zero charge, turn all off + if(autoflag != 0) + equipment = autoset(equipment, 0) + lighting = autoset(lighting, 0) + environ = autoset(environ, 0) + power_alarm.triggerAlarm(loc, src) + autoflag = 0 + // val 0=off, 1=off(auto) 2=on 3=on(auto) // on 0=off, 1=on, 2=autooff @@ -1266,12 +1265,15 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) cell.emp_act(severity) if(occupier) occupier.emp_act(severity) + lighting = 0 equipment = 0 environ = 0 + update() + spawn(600) - equipment = 3 - environ = 3 + update_channels() + update() ..() /obj/machinery/power/apc/ex_act(severity) diff --git a/code/setup.dm b/code/setup.dm index 4fda4f2876..f47566d1eb 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -631,6 +631,7 @@ var/list/be_special_flags = list( #define NONGLOBAL 32 // Do not add to general languages list. #define INNATE 64 // All mobs can be assumed to speak and understand this language. (audible emotes) #define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message +#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems //Flags for zone sleeping #define ZONE_ACTIVE 1