diff --git a/aurorastation.dme b/aurorastation.dme index 8dfe3b76cb4..82f6b3ebbe6 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -2616,6 +2616,7 @@ #include "code\modules\mob\living\autohiss.dm" #include "code\modules\mob\living\damage_procs.dm" #include "code\modules\mob\living\default_language.dm" +#include "code\modules\mob\living\init_signals.dm" #include "code\modules\mob\living\life.dm" #include "code\modules\mob\living\living.dm" #include "code\modules\mob\living\living_defense.dm" diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 62330585f20..e375ba4b261 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -204,3 +204,15 @@ #define TRAIT_DOUBLE_SEATS "double_seats" /// Apply this to make a mob passable by other mobs. #define TRAIT_UNDENSE "undense" + +/// Trait comes from leaning on a wall. +#define TRAIT_SOURCE_WALL_LEANING "wall_leaning" + +/// Phoron worm burrow. +#define TRAIT_SOURCE_WORM_BURROW "worm_burrow" + +/// Trait given on mob death. +#define TRAIT_SOURCE_MOB_DEATH "mob_death" + +/// Trait given when the mob lies down. +#define TRAIT_SOURCE_LYING_DOWN "lying_down" diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 751bde071b8..9f4149e39c2 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -46,6 +46,7 @@ /proc/get_turfs_in_cone(atom/source, middle_angle, distance, angle_spread) SHOULD_NOT_SLEEP(TRUE) SHOULD_BE_PURE(TRUE) + RETURN_TYPE(/list/turf) if(!source) crash_with("Source not specified") @@ -60,7 +61,6 @@ crash_with("angle_spread cannot be negative") var/list/turf/turfs_in_cone = list() - RETURN_TYPE(turfs_in_cone) var/angle_left = (middle_angle - angle_spread + 360) % 360 var/angle_right = (middle_angle + angle_spread) % 360 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index de1193ec7fb..9ff666ced86 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -643,3 +643,12 @@ /atom/proc/clear_bulletholes() for(var/obj/effect/overlay/bmark/bullet_mark in src) qdel(bullet_mark) + +// TODO make all atoms use set_density, do not rely on it at present +///Setter for the `density` variable to append behavior related to its changing. +/atom/proc/set_density(new_value) + SHOULD_CALL_PARENT(TRUE) + if(density == new_value) + return + . = density + density = new_value diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 4f6c919a204..5dcd6d9a5d9 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -193,8 +193,9 @@ * [`COMSIG_ATOM_EXIT`]. */ /atom/movable/Uncross() - . = TRUE SHOULD_NOT_OVERRIDE(TRUE) + + . = TRUE CRASH("Uncross() should not be being called, please read the doc-comment for it for why.") /** diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index 9c710bce6bc..59556c90078 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -715,7 +715,7 @@ EMAG/ILLEGAL sleep(delay) var/obj/made_container - for(var/i = 1,i <= count; i++) + for(var/i = 1; i <= count; i++) updateUsrDialog() if(totake > points) processing = FALSE diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index c5af9c27b7e..0e06a1ef98a 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -391,7 +391,7 @@ /atom/proc/auto_turn() //Automatically turns based on nearby walls. var/turf/simulated/wall/T = null - for(var/i = 1, i <= 8; i += i) + for(var/i = 1; i <= 8; i += i) T = get_ranged_target_turf(src, i, 1) if(istype(T)) //If someone knows a better way to do this, let me know. -Giacom diff --git a/code/game/machinery/gumball.dm b/code/game/machinery/gumball.dm index 4a1ac4eafeb..636db622e98 100644 --- a/code/game/machinery/gumball.dm +++ b/code/game/machinery/gumball.dm @@ -99,7 +99,7 @@ playsound(get_turf(src), /singleton/sound_category/glass_break_sound, 75, 1) if(amountleft) var/amountleftinside = amountleft - for(var/i = 1;i<=amountleftinside,i++) + for(var/i = 1; i<=amountleftinside; i++) new vendingtype(src.loc) src.visible_message("\The [src] shatters and [typeofcandy] fall out on the floor.", "You hear glass shatter!") stat |= BROKEN diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 1e2cea16f14..69991007d45 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -43,6 +43,10 @@ Contains: var/mob/living/carbon/human/H = target_mob var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) + if((affecting.status & ORGAN_ASSISTED) || (affecting.status & ORGAN_ROBOT)) + to_chat(user, SPAN_WARNING("This isn't useful at all on a robotic limb.")) + return 1 + if(affecting.name == BP_HEAD) if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space)) to_chat(user, SPAN_WARNING("You can't apply [src] through [H.head]!")) @@ -69,10 +73,6 @@ Contains: use(1) return 1 - if(affecting.status & ORGAN_ASSISTED) - to_chat(user, SPAN_WARNING("This isn't useful at all on a robotic limb.")) - return 1 - H.UpdateDamageIcon() else diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 036f0441d68..086868c7265 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -1351,7 +1351,7 @@ illustration = null icon_state = "sharpsbox" use_sound = 'sound/items/storage/briefcase.ogg' - max_storage_space = DEFAULT_LARGEBOX_STORAGE + max_storage_space = DEFAULT_BOX_STORAGE chewable = FALSE foldable = null diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 64d07dd42a6..b87f837e3d6 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -170,10 +170,10 @@ * * detail_insertions - A boolean, if `TRUE`, `can_be_inserted()` will be told to give feedbacks */ /obj/item/storage/proc/pickup_items_from_loc(mob/user, turf/location, detail_insertions = TRUE) + RETURN_TYPE(/list) //In the format of list(SUCCESS, FAILURE) var/list/return_status = list(FALSE, FALSE) - RETURN_TYPE(return_status) var/list/rejections = list() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index b2a51ac78b9..38a5f706e08 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -373,6 +373,7 @@ if(direction == NORTH) hiding_human.add_filter("cutout", 1, alpha_mask_filter(icon = icon('icons/effects/effects.dmi', "cutout"))) hiding_human.density = FALSE + ADD_TRAIT(hiding_human, TRAIT_UNDENSE, TRAIT_SOURCE_WALL_LEANING) RegisterSignals(hiding_human, list(COMSIG_MOVABLE_MOVED, COMSIG_MOB_RESISTED), PROC_REF(unhide_human), hiding_human) ..() @@ -388,4 +389,5 @@ LAZYREMOVE(hiding_humans, to_unhide) UnregisterSignal(to_unhide, list(COMSIG_MOVABLE_MOVED, COMSIG_MOB_RESISTED)) to_chat(to_unhide, SPAN_NOTICE("You stop leaning on the wall.")) + REMOVE_TRAIT(to_unhide, TRAIT_UNDENSE, TRAIT_SOURCE_WALL_LEANING) to_unhide.remove_filter("cutout") diff --git a/code/modules/client/preference_setup/global/01_ui.dm b/code/modules/client/preference_setup/global/01_ui.dm index 5de55749c4f..8bb41cc3706 100644 --- a/code/modules/client/preference_setup/global/01_ui.dm +++ b/code/modules/client/preference_setup/global/01_ui.dm @@ -71,6 +71,7 @@ "tgui_inputs", "tgui_buttons_large", "tgui_inputs_swapped", + "tgui_say_light_mode", "ui_scale", "ckey" = 1 ) @@ -90,6 +91,7 @@ "tgui_inputs" = pref.tgui_inputs, "tgui_buttons_large" = pref.tgui_buttons_large, "tgui_inputs_swapped" = pref.tgui_inputs_swapped, + "tgui_say_light_mode" = pref.tgui_say_light_mode, "ui_scale" = pref.ui_scale ) @@ -103,6 +105,7 @@ pref.tgui_inputs = sanitize_bool(pref.tgui_inputs, TRUE) pref.tgui_buttons_large = sanitize_bool(pref.tgui_buttons_large, FALSE) pref.tgui_inputs_swapped = sanitize_bool(pref.tgui_inputs_swapped, FALSE) + pref.tgui_say_light_mode = sanitize_bool(pref.tgui_say_light_mode, FALSE) pref.ooccolor = sanitize_hexcolor(pref.ooccolor, initial(pref.ooccolor)) /datum/category_item/player_setup_item/player_global/ui/content(mob/user) diff --git a/code/modules/cooking/plasticbag.dm b/code/modules/cooking/plasticbag.dm index 3aaeb4299fb..abe308c7894 100644 --- a/code/modules/cooking/plasticbag.dm +++ b/code/modules/cooking/plasticbag.dm @@ -28,5 +28,5 @@ /obj/item/storage/box/plasticbag/fill() ..() - for(var/i=0;i < storage_slots, i++) + for(var/i=0; i < storage_slots; i++) new /obj/item/evidencebag/plasticbag(src) diff --git a/code/modules/detectivework/tools/storage.dm b/code/modules/detectivework/tools/storage.dm index 83b2bdae218..69ac1801065 100644 --- a/code/modules/detectivework/tools/storage.dm +++ b/code/modules/detectivework/tools/storage.dm @@ -7,7 +7,7 @@ /obj/item/storage/box/swabs/fill() ..() - for(var/i=0;i 15) for(var/mob/living/M in orange(1,src)) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f96f1678c50..6270a705e82 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -772,7 +772,7 @@ /mob/living/simple_animal/death(gibbed, deathmessage = "dies!") GLOB.move_manager.stop_looping(src) movement_target = null - density = FALSE + ADD_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_MOB_DEATH) if (isopenturf(loc)) ADD_FALLING_ATOM(src) . = ..(gibbed, deathmessage) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index df37bd9bc5a..d9687a602d7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -912,12 +912,12 @@ canmove = !MOB_IS_INCAPACITATED(INCAPACITATION_KNOCKOUT) && !weakened if(lying) - density = 0 + ADD_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_LYING_DOWN) if(!lying_is_intentional) if(l_hand) unEquip(l_hand) if(r_hand) unEquip(r_hand) else - density = initial(density) + REMOVE_TRAIT(src, TRAIT_UNDENSE, TRAIT_SOURCE_LYING_DOWN) for(var/obj/item/grab/G in grabbed_by) if(G.wielded) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index e2ae2d0df7f..f1208af42b9 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -1,5 +1,5 @@ /mob - density = 1 + density = TRUE layer = MOB_LAYER animate_movement = 2 movable_flags = MOVABLE_FLAG_PROXMOVE diff --git a/code/modules/modular_computers/file_system/programs/security/camera.dm b/code/modules/modular_computers/file_system/programs/security/camera.dm index 6036754d643..ee97ae4a312 100644 --- a/code/modules/modular_computers/file_system/programs/security/camera.dm +++ b/code/modules/modular_computers/file_system/programs/security/camera.dm @@ -150,7 +150,7 @@ return FALSE set_current(C) - user.machine = ui_host() + user.set_machine(ui_host()) user.reset_view(current_camera) check_eye(user) diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index ff0dcac7dc9..c28c1145f3e 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -804,10 +804,10 @@ /atom/movable/z_observer/proc/follow() /atom/movable/z_observer/z_up/follow() - forceMove(get_step(target_turf, UP)) + forceMove(get_step(owner, UP)) if(isturf(src.loc)) var/turf/T = src.loc - if((T && TURF_IS_MIMICING(T)) && (get_turf(owner) == get_step(src, DOWN))) + if(T && TURF_IS_MIMICING(T)) return owner.reset_view(null) owner.z_eye = null @@ -818,7 +818,7 @@ /// If we move down more than 1 step, don't move down again. if((GET_Z(owner) - down_step.z) < 2) forceMove(down_step) - if(owner.Adjacent(target_turf) && (owner.dir == get_dir(owner, target_turf))) + if(owner.Adjacent(target_turf) && (get_dir(owner, target_turf) & owner.dir)) return owner.reset_view(null) owner.z_eye = null diff --git a/code/modules/spell_system/spells/spell_list/targeted_spells.dm b/code/modules/spell_system/spells/spell_list/targeted_spells.dm index 29c846f7a19..3b52560ea5b 100644 --- a/code/modules/spell_system/spells/spell_list/targeted_spells.dm +++ b/code/modules/spell_system/spells/spell_list/targeted_spells.dm @@ -91,7 +91,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp possible_targets += target if(spell_flags & SELECTABLE) - for(var/i = 1; i <= max_targets, i++) + for(var/i = 1; i <= max_targets; i++) if(!length(possible_targets)) to_chat(user, SPAN_WARNING("There are no targets in range!")) break diff --git a/html/changelogs/mattatlas-miscfixxes.yml b/html/changelogs/mattatlas-miscfixxes.yml new file mode 100644 index 00000000000..5ce7783e523 --- /dev/null +++ b/html/changelogs/mattatlas-miscfixxes.yml @@ -0,0 +1,61 @@ +################################ +# 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 +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: MattAtlas + +# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Wall leaning now properly updates mob density, meaning that you can walk through tiles where there are people leaning on walls." + - bugfix: "Medical items like bandages and ATKs can no longer be used on robotic limbs." + - bugfix: "Look Up will now follow the user around until they go under a solid tile." + - bugfix: "TGUI Say Light Mode preference will now actually save."