diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 04fc2c6f73c..db3b3833d05 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -731,10 +731,16 @@ The _flatIcons list is a cache for generated icon files. var/icon/add // Icon of overlay being added - // Current dimensions of flattened icon - var/{flatX1=1;flatX2=flat.Width();flatY1=1;flatY2=flat.Height()} - // Dimensions of overlay being added - var/{addX1;addX2;addY1;addY2} + // Current dimensions of flattened icon + var/flatX1=1 + var/flatX2=flat.Width() + var/flatY1=1 + var/flatY2=flat.Height() + // Dimensions of overlay being added + var/addX1 + var/addX2 + var/addY1 + var/addY2 for(var/I in layers) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index d9039e8c004..c3bc18e46d7 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1297,31 +1297,6 @@ proc/atan2(x, y) if(!x && !y) return 0 return y >= 0 ? arccos(x / sqrt(x * x + y * y)) : -arccos(x / sqrt(x * x + y * y)) -proc/rotate_icon(file, state, step = 1, aa = FALSE) - var icon/base = icon(file, state) - - var w, h, w2, h2 - - if(aa) - aa++ - w = base.Width() - w2 = w * aa - h = base.Height() - h2 = h * aa - - var icon{result = icon(base); temp} - - for(var/angle in 0 to 360 step step) - if(angle == 0 ) continue - if(angle == 360) continue - temp = icon(base) - if(aa) temp.Scale(w2, h2) - temp.Turn(angle) - if(aa) temp.Scale(w, h) - result.Insert(temp, "[angle]") - - return result - /proc/format_text(text) return replacetext(replacetext(text,"\proper ",""),"\improper ","") diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index a74314a9919..c5683f366ae 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -341,7 +341,7 @@ L << sound(sound, repeat = 0, wait = 0, volume = 25, channel = CHANNEL_AMBIENCE) L.client.played = 1 spawn(600) //ewww - this is very very bad - if(L.&& L.client) + if(L && L.client) L.client.played = 0 /area/proc/gravitychange(var/gravitystate = 0, var/area/A) @@ -362,7 +362,7 @@ if(istype(get_turf(M), /turf/space)) // Can't fall onto nothing. return - if((istype(M,/mob/living/carbon/human/)) && (M.m_intent == MOVE_INTENT_RUN)). + if((istype(M,/mob/living/carbon/human/)) && (M.m_intent == MOVE_INTENT_RUN)) M.Stun(5) M.Weaken(5) diff --git a/code/game/machinery/computer/depot.dm b/code/game/machinery/computer/depot.dm index 4e6afa0c229..149e2b7ff49 100644 --- a/code/game/machinery/computer/depot.dm +++ b/code/game/machinery/computer/depot.dm @@ -283,7 +283,7 @@ return message_sent = TRUE if(user.mind && user.mind.special_role == SPECIAL_ROLE_TRAITOR) - var/input = stripped_input(user, "Please choose a message to transmit to Syndicate HQ via quantum entanglement. Transmission does not guarantee a response. This function may only be used ONCE.", "To abort, send an empty message.", "") as text|null + var/input = stripped_input(user, "Please choose a message to transmit to Syndicate HQ via quantum entanglement. Transmission does not guarantee a response. This function may only be used ONCE.", "To abort, send an empty message.", "") if(!input) message_sent = FALSE return diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index ab38ee3a0d0..5667a45ca85 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -20,9 +20,9 @@ update_pressure() /obj/mecha/working/ripley/Destroy() - while(damage_absorption.["brute"] < 0.6) + while(damage_absorption["brute"] < 0.6) new /obj/item/asteroid/goliath_hide(loc) - damage_absorption.["brute"] = damage_absorption.["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop + damage_absorption["brute"] = damage_absorption["brute"] + 0.1 //If a goliath-plated ripley gets killed, all the plates drop for(var/atom/movable/A in cargo) A.forceMove(loc) step_rand(A) @@ -31,28 +31,28 @@ /obj/mecha/working/ripley/go_out() ..() - if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3) + if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3) overlays = null overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-open") - else if(damage_absorption.["brute"] == 0.3) + else if(damage_absorption["brute"] == 0.3) overlays = null overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full-open") /obj/mecha/working/ripley/moved_inside(var/mob/living/carbon/human/H as mob) ..() - if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3) + if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3) overlays = null overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g") - else if(damage_absorption.["brute"] == 0.3) + else if(damage_absorption["brute"] == 0.3) overlays = null overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full") /obj/mecha/working/ripley/mmi_moved_inside(var/obj/item/mmi/mmi_as_oc as obj,mob/user as mob) ..() - if(damage_absorption.["brute"] < 0.6 && damage_absorption.["brute"] > 0.3) + if(damage_absorption["brute"] < 0.6 && damage_absorption["brute"] > 0.3) overlays = null overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g") - else if(damage_absorption.["brute"] == 0.3) + else if(damage_absorption["brute"] == 0.3) overlays = null overlays += image("icon" = "mecha.dmi", "icon_state" = "ripley-g-full") diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm index 1e026e90e02..cec5b6e1fc8 100644 --- a/code/game/objects/empulse.dm +++ b/code/game/objects/empulse.dm @@ -5,8 +5,8 @@ epicenter = get_turf(epicenter.loc) if(log) - message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])": ] [ADMIN_COORDJMP(epicenter)]") - log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ] [COORD(epicenter)]") + message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])": ""] [ADMIN_COORDJMP(epicenter)]") + log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [COORD(epicenter)]") if(heavy_range > 1) new/obj/effect/temp_visual/emp/pulse(epicenter) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 9c457e43b6a..f21bbb69c02 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -25,8 +25,8 @@ var/list/cached_exp_block = list() if(adminlog) - message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ] [ADMIN_COORDJMP(epicenter)] ") - log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ] [COORD(epicenter)] ") + message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [ADMIN_COORDJMP(epicenter)] ") + log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] [cause ? "(Cause: [cause])" : ""] [COORD(epicenter)] ") // Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves. // Stereo users will also hear the direction of the explosion! diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index c6e3ab2e5bd..3122633be50 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -43,7 +43,6 @@ GLOBAL_LIST_EMPTY(safes) tumbler_2_open = rand(0, 99) tumbler_1_pos = rand(0, 99) - do tumbler_1_open = rand(0, 99) while(tumbler_1_open > Wrap(tumbler_2_open +48, 0, 100) && tumbler_1_open < Wrap(tumbler_2_open + 53, 0, 100)) // prevents a combination that wont open do diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index ce76dc4e282..188a24b96fc 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -316,7 +316,7 @@ var/global/nologevent = 0 if(CHANNEL.is_admin_channel) dat+="[CHANNEL.channel_name]
" else - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ""]
" dat+={"

Refresh
Back "} @@ -400,7 +400,7 @@ var/global/nologevent = 0 dat+="No feed channels found active...
" else for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ""]
" dat+="
Cancel" if(11) dat+={" @@ -413,7 +413,7 @@ var/global/nologevent = 0 dat+="No feed channels found active...
" else for(var/datum/feed_channel/CHANNEL in news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ""]
" dat+="
Back" if(12) diff --git a/code/modules/buildmode/submodes/link.dm b/code/modules/buildmode/submodes/link.dm index 608bea17833..136ffad6433 100644 --- a/code/modules/buildmode/submodes/link.dm +++ b/code/modules/buildmode/submodes/link.dm @@ -46,17 +46,17 @@ if(!M.id || M.id == "") M.id = input(user, "Please select an ID for the button", "Buildmode", "") if(!M.id || M.id == "") - goto(line_jump) + goto line_jump if(P.id_tag == M.id && P.id_tag && P.id_tag != "") P.id_tag = null to_chat(user, "[P] unlinked.") - goto(line_jump) + goto line_jump if(!M.normaldoorcontrol) if(link_lines.len && alert(user, "Warning: This will disable links to connected pod doors. Continue?", "Buildmode", "Yes", "No") == "No") - goto(line_jump) + goto line_jump M.normaldoorcontrol = 1 if(P.id_tag && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No") - goto(line_jump) + goto line_jump P.id_tag = M.id if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/poddoor)) var/obj/machinery/door_control/M = link_obj @@ -64,21 +64,21 @@ if(!M.id || M.id == "") M.id = input(user, "Please select an ID for the button", "Buildmode", "") if(!M.id || M.id == "") - goto(line_jump) + goto line_jump if(P.id_tag == M.id && P.id_tag && P.id_tag != "") P.id_tag = null to_chat(user, "[P] unlinked.") - goto(line_jump) + goto line_jump if(M.normaldoorcontrol) if(link_lines.len && alert(user, "Warning: This will disable links to connected airlocks. Continue?", "Buildmode", "Yes", "No") == "No") - goto(line_jump) + goto line_jump M.normaldoorcontrol = 0 if(!M.id || M.id == "") M.id = input(user, "Please select an ID for the button", "Buildmode", "") if(!M.id || M.id == "") - goto(line_jump) + goto line_jump if(P.id_tag && P.id_tag != 1 && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No") - goto(line_jump) + goto line_jump P.id_tag = M.id line_jump // For the goto diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index 0956877d202..f39cb562ec8 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -60,12 +60,3 @@ stat(null,"[description_holders["fluff"]]") //Yellow, fluff-related text. if(description_holders["antag"]) stat(null,"[description_holders["antag"]]") //Red, malicious antag-related text - -//override examinate verb to update description holders when things are examined -/mob/examinate(atom/A as mob|obj|turf in view()) - if(..()) - return 1 - - var/is_antag = (isAntag(src) || isobserver(src)) //ghosts don't have minds - if(client) - client.update_description_holders(A, is_antag) diff --git a/code/modules/flufftext/TextFilters.dm b/code/modules/flufftext/TextFilters.dm index 7ff5a2fd0a5..02a02a6f5b2 100644 --- a/code/modules/flufftext/TextFilters.dm +++ b/code/modules/flufftext/TextFilters.dm @@ -64,9 +64,8 @@ proc/Ellipsis(original_msg, chance = 50) if(chance <= 0) return "..." if(chance >= 100) return original_msg - var/list - words = splittext(original_msg," ") - new_words = list() + var/list/words = splittext(original_msg," ") + var/list/new_words = list() var/new_msg = "" diff --git a/code/modules/mob/living/carbon/brain/robotic_brain.dm b/code/modules/mob/living/carbon/brain/robotic_brain.dm index c294a11c999..6528d9c252e 100644 --- a/code/modules/mob/living/carbon/brain/robotic_brain.dm +++ b/code/modules/mob/living/carbon/brain/robotic_brain.dm @@ -161,7 +161,7 @@ if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) to_chat(O, "You are job banned from this role.") return - to_chat(O., "You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.") + to_chat(O, "You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.") ghost_volunteers.Add(O) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 0f37482b3e2..81b384f56b7 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -238,8 +238,8 @@ if(istype(target, /obj/item/clothing/suit/space/hardsuit/mining) || istype(target, /obj/item/clothing/head/helmet/space/hardsuit/mining) || istype(target, /obj/item/clothing/suit/space/eva/plasmaman/miner) || istype(target, /obj/item/clothing/head/helmet/space/eva/plasmaman/miner)) var/obj/item/clothing/C = target var/current_armor = C.armor - if(current_armor.["melee"] < 60) - current_armor.["melee"] = min(current_armor.["melee"] + 10, 60) + if(current_armor["melee"] < 60) + current_armor["melee"] = min(current_armor["melee"] + 10, 60) to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") qdel(src) else @@ -260,7 +260,7 @@ qdel(src) D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open") D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." - if(damage_absorption.["brute"] == 0.3) + if(damage_absorption["brute"] == 0.3) D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open") D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter." else diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e0d20f01a48..ee04e624f02 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -580,6 +580,10 @@ var/list/slot_equipment_priority = list( \ to_chat(src, "Something is there but you can't see it.") return 1 + var/is_antag = (isAntag(src) || isobserver(src)) //ghosts don't have minds + if(client) + client.update_description_holders(A, is_antag) + face_atom(A) A.examine(src) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index da241a9c007..01974ad3694 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -131,7 +131,7 @@ usr << browse(dat + "[P.name]" \ + "" \ + "

Written on the back:
[P.scribble]" : ]"\ + + "[P.scribble ? "

Written on the back:
[P.scribble]" : ""]"\ + "", "window=[name]") /obj/item/paper_bundle/attack_self(mob/user as mob)