diff --git a/modular_skyrat/master_files/code/_globalvars/lists/ambience.dm b/modular_skyrat/master_files/code/_globalvars/lists/ambience.dm index af4560d3879..b0af3298b5e 100644 --- a/modular_skyrat/master_files/code/_globalvars/lists/ambience.dm +++ b/modular_skyrat/master_files/code/_globalvars/lists/ambience.dm @@ -1,4 +1,4 @@ -GLOBAL_LIST_INIT(generic_ambience,list( +GLOBAL_LIST_INIT(generic_ambience, list( 'modular_skyrat/master_files/sound/ambience/ambigen1.ogg', 'modular_skyrat/master_files/sound/ambience/ambigen2.ogg', 'modular_skyrat/master_files/sound/ambience/ambigen3.ogg', 'modular_skyrat/master_files/sound/ambience/ambigen4.ogg', 'modular_skyrat/master_files/sound/ambience/ambigen5.ogg', 'modular_skyrat/master_files/sound/ambience/ambigen6.ogg', diff --git a/modular_skyrat/master_files/code/controllers/subsystem/statpanel.dm b/modular_skyrat/master_files/code/controllers/subsystem/statpanel.dm index 4757a000b33..352e9e789b9 100644 --- a/modular_skyrat/master_files/code/controllers/subsystem/statpanel.dm +++ b/modular_skyrat/master_files/code/controllers/subsystem/statpanel.dm @@ -61,29 +61,29 @@ SUBSYSTEM_DEF(statpanels) if(target.stat_tab == "Tickets") var/list/ahelp_tickets = GLOB.ahelp_tickets.stat_entry() target << output("[url_encode(json_encode(ahelp_tickets))];", "statbrowser:update_tickets") - var/datum/interview_manager/m = GLOB.interviews + var/datum/interview_manager/interview_manager = GLOB.interviews // get open interview count var/dc = 0 - for (var/ckey in m.open_interviews) - var/datum/interview/I = m.open_interviews[ckey] - if (I && !I.owner) + for (var/ckey in interview_manager.open_interviews) + var/datum/interview/current_interview = interview_manager.open_interviews[ckey] + if (current_interview && !current_interview.owner) dc++ - var/stat_string = "([m.open_interviews.len - dc] online / [dc] disconnected)" + var/stat_string = "([interview_manager.open_interviews.len - dc] online / [dc] disconnected)" // Prepare each queued interview var/list/queued = list() - for (var/datum/interview/I in m.interview_queue) + for (var/datum/interview/current_interview in interview_manager.interview_queue) queued += list(list( - "ref" = REF(I), - "status" = "\[[I.pos_in_queue]\]: [I.owner_ckey][!I.owner ? " (DC)": ""] \[INT-[I.id]\]" + "ref" = REF(current_interview), + "status" = "\[[current_interview.pos_in_queue]\]: [current_interview.owner_ckey][!current_interview.owner ? " (DC)": ""] \[INT-[current_interview.id]\]" )) var/list/data = list( "status" = list( - "Active:" = "[m.open_interviews.len] [stat_string]", - "Queued:" = "[m.interview_queue.len]", - "Closed:" = "[m.closed_interviews.len]"), + "Active:" = "[interview_manager.open_interviews.len] [stat_string]", + "Queued:" = "[interview_manager.interview_queue.len]", + "Closed:" = "[interview_manager.closed_interviews.len]"), "interviews" = queued ) @@ -96,14 +96,14 @@ SUBSYSTEM_DEF(statpanels) sdql2A[++sdql2A.len] = list("", "Access Global SDQL2 List", REF(GLOB.sdql2_vv_statobj)) var/list/sdql2B = list() for(var/i in GLOB.sdql2_queries) - var/datum/sdql2_query/Q = i - sdql2B = Q.generate_stat() + var/datum/sdql2_query/current_query = i + sdql2B = current_query.generate_stat() sdql2A += sdql2B target << output(url_encode(json_encode(sdql2A)), "statbrowser:update_sdql2") if(target.mob) - var/mob/M = target.mob - if((target.stat_tab in target.spell_tabs) || !length(target.spell_tabs) && (length(M.mob_spell_list) || length(M.mind?.spell_list))) - var/list/proc_holders = M.get_proc_holders() + var/mob/checked_mob = target.mob + if((target.stat_tab in target.spell_tabs) || !length(target.spell_tabs) && (length(checked_mob.mob_spell_list) || length(checked_mob.mind?.spell_list))) + var/list/proc_holders = checked_mob.get_proc_holders() target.spell_tabs.Cut() for(var/phl in proc_holders) var/list/proc_holder_list = phl @@ -112,12 +112,12 @@ SUBSYSTEM_DEF(statpanels) if(length(proc_holders)) proc_holders_encoded = url_encode(json_encode(proc_holders)) target << output("[url_encode(json_encode(target.spell_tabs))];[proc_holders_encoded]", "statbrowser:update_spells") - if(M?.listed_turf) - var/mob/target_mob = M + if(checked_mob?.listed_turf) + var/mob/target_mob = checked_mob if(!target_mob.TurfAdjacent(target_mob.listed_turf)) target << output("", "statbrowser:remove_listedturf") target_mob.listed_turf = null - else if(target.stat_tab == M?.listed_turf.name || !(M?.listed_turf.name in target.panel_tabs)) + else if(target.stat_tab == checked_mob?.listed_turf.name || !(checked_mob?.listed_turf.name in target.panel_tabs)) var/list/overrides = list() var/list/turfitems = list() for(var/img in target.images) @@ -125,7 +125,7 @@ SUBSYSTEM_DEF(statpanels) if(!target_image.loc || target_image.loc.loc != target_mob.listed_turf || !target_image.override) continue overrides += target_image.loc - turfitems[++turfitems.len] = list("[target_mob.listed_turf]", REF(target_mob.listed_turf), icon2html(target_mob.listed_turf, target, sourceonly=TRUE)) + turfitems[++turfitems.len] = list("[target_mob.listed_turf]", REF(target_mob.listed_turf), icon2html(target_mob.listed_turf, target, sourceonly = TRUE)) for(var/tc in target_mob.listed_turf) var/atom/movable/turf_content = tc if(turf_content.mouse_opacity == MOUSE_OPACITY_TRANSPARENT) @@ -141,9 +141,9 @@ SUBSYSTEM_DEF(statpanels) cached_images += REF(turf_content) turf_content.RegisterSignal(turf_content, COMSIG_PARENT_QDELETING, /atom/.proc/remove_from_cache) // we reset cache if anything in it gets deleted if(ismob(turf_content) || length(turf_content.overlays) > 2) - turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), costly_icon2html(turf_content, target, sourceonly=TRUE)) + turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), costly_icon2html(turf_content, target, sourceonly = TRUE)) else - turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), icon2html(turf_content, target, sourceonly=TRUE)) + turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content), icon2html(turf_content, target, sourceonly = TRUE)) else turfitems[++turfitems.len] = list("[turf_content.name]", REF(turf_content)) else @@ -161,7 +161,7 @@ SUBSYSTEM_DEF(statpanels) list("World Time:", "[world.time]"), list("Globals:", GLOB.stat_entry(), "\ref[GLOB]"), list("[config]:", config.stat_entry(), "\ref[config]"), - list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)"), + list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time / world.tick_lag]) (TickDrift:[round(Master.tickdrift, 1)]([round((Master.tickdrift / (world.time / world.tick_lag)) * 100, 0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE, 0.1)]%)"), list("Master Controller:", Master.stat_entry(), "\ref[Master]"), list("Failsafe Controller:", Failsafe.stat_entry(), "\ref[Failsafe]"), list("","") diff --git a/modular_skyrat/master_files/code/datums/components/fullauto.dm b/modular_skyrat/master_files/code/datums/components/fullauto.dm index 8617ae64c54..a1c0c3d0a02 100644 --- a/modular_skyrat/master_files/code/datums/components/fullauto.dm +++ b/modular_skyrat/master_files/code/datums/components/fullauto.dm @@ -53,11 +53,11 @@ stop_autofiring() //Let's stop shooting to avoid issues. return - var/obj/item/gun/G = parent + var/obj/item/gun/parent_gun = parent if(iscarbon(user)) var/mob/living/carbon/shooter = user - if(shooter.is_holding(parent) && G.fire_select == SELECT_FULLY_AUTOMATIC) + if(shooter.is_holding(parent) && parent_gun.fire_select == SELECT_FULLY_AUTOMATIC) autofire_on(shooter.client) else autofire_off() diff --git a/modular_skyrat/master_files/code/datums/id_trim/syndicate.dm b/modular_skyrat/master_files/code/datums/id_trim/syndicate.dm index 657451dfff7..511535dffe4 100644 --- a/modular_skyrat/master_files/code/datums/id_trim/syndicate.dm +++ b/modular_skyrat/master_files/code/datums/id_trim/syndicate.dm @@ -37,32 +37,32 @@ /datum/id_trim/syndicom/skyrat/assault/masteratarms assignment = "Master At Arms" trim_state = "trim_masteratarms" - access = list(ACCESS_SYNDICATE,ACCESS_ROBOTICS,ACCESS_SYNDICATE_LEADER) + access = list(ACCESS_SYNDICATE, ACCESS_ROBOTICS, ACCESS_SYNDICATE_LEADER) /datum/id_trim/syndicom/skyrat/assault/brigofficer assignment = "Brig Officer" trim_state = "trim_brigofficer" - access = list(ACCESS_SYNDICATE,ACCESS_ROBOTICS,ACCESS_SYNDICATE_LEADER) + access = list(ACCESS_SYNDICATE, ACCESS_ROBOTICS, ACCESS_SYNDICATE_LEADER) /datum/id_trim/syndicom/skyrat/assault/chiefmasteratarms assignment = "Chief Master At Arms" trim_state = "trim_chiefmasteratarms" - access = list(ACCESS_SYNDICATE,ACCESS_ROBOTICS,ACCESS_SYNDICATE_LEADER) + access = list(ACCESS_SYNDICATE, ACCESS_ROBOTICS, ACCESS_SYNDICATE_LEADER) /datum/id_trim/syndicom/skyrat/assault/chiefresearchofficer assignment = "Chief Research Officer" trim_state = "trim_chiefresearchofficer" - access = list(ACCESS_SYNDICATE,ACCESS_ROBOTICS,ACCESS_SYNDICATE_LEADER) + access = list(ACCESS_SYNDICATE, ACCESS_ROBOTICS, ACCESS_SYNDICATE_LEADER) /datum/id_trim/syndicom/skyrat/assault/chiefengineeringofficer assignment = "Chief Engineering Officer" trim_state = "trim_chiefengineeringofficer" - access = list(ACCESS_ENGINE_EQUIP,ACCESS_SYNDICATE,ACCESS_ROBOTICS,ACCESS_SYNDICATE_LEADER) + access = list(ACCESS_ENGINE_EQUIP, ACCESS_SYNDICATE, ACCESS_ROBOTICS, ACCESS_SYNDICATE_LEADER) /datum/id_trim/syndicom/skyrat/assault/stationadmiral assignment = "Station Admiral" trim_state = "trim_stationadmiral" - access = list(ACCESS_ENGINE_EQUIP,ACCESS_SYNDICATE,ACCESS_ROBOTICS,ACCESS_SYNDICATE_LEADER) + access = list(ACCESS_ENGINE_EQUIP, ACCESS_SYNDICATE, ACCESS_ROBOTICS, ACCESS_SYNDICATE_LEADER) ///Interdyne @@ -77,7 +77,7 @@ /datum/id_trim/syndicom/skyrat/interdyne/deckofficer assignment = "Deck Officer" trim_state = "trim_deckofficer" - access = list(ACCESS_SYNDICATE,ACCESS_ROBOTICS,ACCESS_SYNDICATE_LEADER) + access = list(ACCESS_SYNDICATE, ACCESS_ROBOTICS, ACCESS_SYNDICATE_LEADER) ///Misc diff --git a/modular_skyrat/master_files/code/datums/martial/cqcplus.dm b/modular_skyrat/master_files/code/datums/martial/cqcplus.dm index 77e2be519b8..0d3ac9e63f7 100644 --- a/modular_skyrat/master_files/code/datums/martial/cqcplus.dm +++ b/modular_skyrat/master_files/code/datums/martial/cqcplus.dm @@ -3,22 +3,22 @@ id = MARTIALART_CQC_PLUS block_chance = 85 -/datum/martial_art/cqc/plus/on_projectile_hit(mob/living/A, obj/projectile/P, def_zone) +/datum/martial_art/cqc/plus/on_projectile_hit(mob/living/hit_mob, obj/projectile/fired_projectile, def_zone) . = ..() - if(A.incapacitated(FALSE, TRUE)) //NO STUN + if(hit_mob.incapacitated(FALSE, TRUE)) //NO STUN return BULLET_ACT_HIT - if(!(A.mobility_flags & MOBILITY_USE)) //NO UNABLE TO USE + if(!(hit_mob.mobility_flags & MOBILITY_USE)) //NO UNABLE TO USE return BULLET_ACT_HIT - var/datum/dna/dna = A.has_dna() + var/datum/dna/dna = hit_mob.has_dna() if(dna?.check_mutation(HULK)) //NO HULK return BULLET_ACT_HIT - if(!isturf(A.loc)) //NO MOTHERFLIPPIN MECHS! + if(!isturf(hit_mob.loc)) //NO MOTHERFLIPPIN MECHS! return BULLET_ACT_HIT - if(A.throw_mode) - A.visible_message(span_danger("[A] effortlessly swats the projectile aside! They can block bullets with their bare hands!"), span_userdanger("You deflect the projectile!")) - playsound(get_turf(A), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE) - P.firer = A - P.set_angle(rand(0, 360))//SHING + if(hit_mob.throw_mode) + hit_mob.visible_message(span_danger("[hit_mob] effortlessly swats the projectile aside! They can block bullets with their bare hands!"), span_userdanger("You deflect the projectile!")) + playsound(get_turf(hit_mob), pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE) + fired_projectile.firer = hit_mob + fired_projectile.set_angle(rand(0, 360))//SHING return BULLET_ACT_FORCE_PIERCE return BULLET_ACT_HIT diff --git a/modular_skyrat/master_files/code/datums/mutations/chameleon.dm b/modular_skyrat/master_files/code/datums/mutations/chameleon.dm index 3c7bbbd0ac9..36435a14685 100644 --- a/modular_skyrat/master_files/code/datums/mutations/chameleon.dm +++ b/modular_skyrat/master_files/code/datums/mutations/chameleon.dm @@ -8,7 +8,7 @@ /obj/effect/proc_holder/spell/self/chameleon_skin_activate/cast(list/targets, mob/user = usr) . = ..() - if(HAS_TRAIT(user,TRAIT_CHAMELEON_SKIN)) + if(HAS_TRAIT(user, TRAIT_CHAMELEON_SKIN)) chameleon_skin_deactivate(user) return @@ -16,7 +16,7 @@ to_chat(user, "The pigmentation of your skin shifts and starts to take on the colors of your surroundings.") /obj/effect/proc_holder/spell/self/chameleon_skin_activate/proc/chameleon_skin_deactivate(mob/user = usr) - if(!HAS_TRAIT_FROM(user,TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION)) + if(!HAS_TRAIT_FROM(user, TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION)) return REMOVE_TRAIT(user, TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION) diff --git a/modular_skyrat/master_files/code/datums/traits/negative.dm b/modular_skyrat/master_files/code/datums/traits/negative.dm index 6debe9c40d4..d586bc393b6 100644 --- a/modular_skyrat/master_files/code/datums/traits/negative.dm +++ b/modular_skyrat/master_files/code/datums/traits/negative.dm @@ -70,8 +70,8 @@ name = "Mute" desc = "Due to some accident, medical condition, or simply by choice, you are completely unable to speak." value = -2 //HALP MAINTS - gain_text = "You find yourself unable to speak!" - lose_text = "You feel a growing strength in your vocal chords." + gain_text = span_danger("You find yourself unable to speak!") + lose_text = span_notice("You feel a growing strength in your vocal chords.") medical_record_text = "Functionally mute, patient is unable to use their voice in any capacity." /datum/quirk/mute/add() diff --git a/modular_skyrat/master_files/code/datums/traits/neutral.dm b/modular_skyrat/master_files/code/datums/traits/neutral.dm index 5dd050941ff..0c2b284c07a 100644 --- a/modular_skyrat/master_files/code/datums/traits/neutral.dm +++ b/modular_skyrat/master_files/code/datums/traits/neutral.dm @@ -88,7 +88,7 @@ ..() icon_state = "joker" -/obj/item/paper/joker/AltClick(mob/living/carbon/user, obj/item/I) +/obj/item/paper/joker/AltClick(mob/living/carbon/user, obj/item/card) if(flipped) info = initial(info) flipped = FALSE diff --git a/modular_skyrat/master_files/code/game/machinery/doors/firedoor.dm b/modular_skyrat/master_files/code/game/machinery/doors/firedoor.dm index 82459021947..950a854479b 100644 --- a/modular_skyrat/master_files/code/game/machinery/doors/firedoor.dm +++ b/modular_skyrat/master_files/code/game/machinery/doors/firedoor.dm @@ -20,7 +20,7 @@ return TRUE return FALSE -/obj/machinery/door/firedoor/try_to_crowbar(obj/item/I, mob/user) +/obj/machinery/door/firedoor/try_to_crowbar(obj/item/used_object, mob/user) if(welded || operating) to_chat(user, span_warning("[src] refuses to budge!")) return diff --git a/modular_skyrat/master_files/code/game/objects/items/airlock_painter.dm b/modular_skyrat/master_files/code/game/objects/items/airlock_painter.dm index 404c30b5c08..f9f03597023 100644 --- a/modular_skyrat/master_files/code/game/objects/items/airlock_painter.dm +++ b/modular_skyrat/master_files/code/game/objects/items/airlock_painter.dm @@ -7,7 +7,7 @@ worn_icon_state = "painter" w_class = WEIGHT_CLASS_SMALL - custom_materials = list(/datum/material/iron=50, /datum/material/glass=50) + custom_materials = list(/datum/material/iron = 50, /datum/material/glass = 50) flags_1 = CONDUCT_1 item_flags = NOBLUDGEON @@ -71,9 +71,9 @@ return TRUE /obj/item/airlock_painter/suicide_act(mob/user) - var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS) + var/obj/item/organ/lungs/mob_lungs = user.getorganslot(ORGAN_SLOT_LUNGS) - if(can_use(user) && L) + if(can_use(user) && mob_lungs) user.visible_message(span_suicide("[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!")) use(user) @@ -82,31 +82,31 @@ // Find out if there is an open turf in front of us, // and if not, pick the turf we are standing on. - var/turf/T = get_step(get_turf(src), user.dir) - if(!isopenturf(T)) - T = get_turf(src) + var/turf/target_turf = get_step(get_turf(src), user.dir) + if(!isopenturf(target_turf)) + target_turf = get_turf(src) // they managed to lose their lungs between then and // now. Good job. - if(!L) + if(!mob_lungs) return OXYLOSS - L.Remove(user) + mob_lungs.Remove(user) // make some colorful reagent, and apply it to the lungs - L.create_reagents(10) - L.reagents.add_reagent(/datum/reagent/colorful_reagent, 10) - L.reagents.expose(L, TOUCH, 1) + mob_lungs.create_reagents(10) + mob_lungs.reagents.add_reagent(/datum/reagent/colorful_reagent, 10) + mob_lungs.reagents.expose(mob_lungs, TOUCH, 1) // TODO maybe add some colorful vomit? - user.visible_message(span_suicide("[user] vomits out [user.p_their()] [L]!")) + user.visible_message(span_suicide("[user] vomits out [user.p_their()] [mob_lungs]!")) playsound(user.loc, 'sound/effects/splat.ogg', 50, TRUE) - L.forceMove(T) + mob_lungs.forceMove(target_turf) return (TOXLOSS|OXYLOSS) - else if(can_use(user) && !L) + else if(can_use(user) && !mob_lungs) user.visible_message(span_suicide("[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.")) user.reagents.add_reagent(/datum/reagent/colorful_reagent, 1) user.reagents.expose(user, TOUCH, 1) @@ -122,32 +122,32 @@ icon = 'icons/obj/objects.dmi' icon_state = "decal_sprayer" inhand_icon_state = "decalsprayer" - custom_materials = list(/datum/material/iron=50, /datum/material/glass=50) + custom_materials = list(/datum/material/iron = 50, /datum/material/glass = 50) var/stored_dir = 2 var/stored_color = "" var/stored_decal = "warningline" var/stored_decal_total = "warningline" - var/color_list = list("","red","white") - var/dir_list = list(1,2,4,8) - var/decal_list = list(list("Warning Line","warningline"), - list("Warning Line Corner","warninglinecorner"), - list("Caution Label","caution"), - list("Directional Arrows","arrows"), - list("Stand Clear Label","stand_clear"), - list("Box","box"), - list("Box Corner","box_corners"), - list("Delivery Marker","delivery"), - list("Warning Box","warn_full")) + var/color_list = list("", "red", "white") + var/dir_list = list(1, 2, 4, 8) + var/decal_list = list(list("Warning Line", "warningline"), + list("Warning Line Corner", "warninglinecorner"), + list("Caution Label", "caution"), + list("Directional Arrows", "arrows"), + list("Stand Clear Label", "stand_clear"), + list("Box", "box"), + list("Box Corner", "box_corners"), + list("Delivery Marker", "delivery"), + list("Warning Box", "warn_full")) cell_override = /obj/item/stock_parts/cell/upgraded/plus /obj/item/airlock_painter/decal/afterattack(atom/target, mob/user, proximity) . = ..() - var/turf/open/floor/F = target + var/turf/open/floor/target_floor = target if(!proximity) to_chat(user, span_notice("You need to get closer!")) return - if(use_paint(user) && isturf(F)) - F.AddElement(/datum/element/decal, 'icons/turf/decals.dmi', stored_decal_total, stored_dir, null, null, alpha, color, null, CLEAN_TYPE_PAINT, null) + if(use_paint(user) && isturf(target_floor)) + target_floor.AddElement(/datum/element/decal, 'icons/turf/decals.dmi', stored_decal_total, stored_dir, null, null, alpha, color, null, CLEAN_TYPE_PAINT, null) /obj/item/airlock_painter/decal/AltClick(mob/user) . = ..() @@ -190,7 +190,7 @@ )) return data -/obj/item/airlock_painter/decal/ui_act(action,list/params) +/obj/item/airlock_painter/decal/ui_act(action, list/params) . = ..() if(.) return diff --git a/modular_skyrat/master_files/code/game/objects/items/dyekit.dm b/modular_skyrat/master_files/code/game/objects/items/dyekit.dm index cfc1b0de066..27b4d3e9dbc 100644 --- a/modular_skyrat/master_files/code/game/objects/items/dyekit.dm +++ b/modular_skyrat/master_files/code/game/objects/items/dyekit.dm @@ -18,19 +18,19 @@ var/mob/living/carbon/human/human_target = target var/static/list/dye_options = list(DYE_OPTION_HAIR_COLOR, DYE_OPTION_GRADIENT) - var/gradient_or_hair = tgui_alert(user, "What would you like to do?", "Hair Dye Spray", dye_options, autofocus=TRUE) + var/gradient_or_hair = tgui_alert(user, "What would you like to do?", "Hair Dye Spray", dye_options, autofocus = TRUE) if(!gradient_or_hair || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE)) return var/dying_themselves = target == user if(gradient_or_hair == DYE_OPTION_HAIR_COLOR) - var/new_color = input(usr, "Choose a hair color:", "Character Preference","#"+human_target.hair_color) as color|null + var/new_color = input(usr, "Choose a hair color:", "Character Preference", "#" + human_target.hair_color) as color|null if(!new_color || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE)) return - human_target.visible_message(span_notice("[user] starts applying hair dye to [dying_themselves ? "their own" : "[human_target]'s"] hair..."), span_notice("[dying_themselves ? "You start" : "[user] starts"] applying hair dye to [dying_themselves ? "your own" : "your"] hair..."), ignored_mobs=user) + human_target.visible_message(span_notice("[user] starts applying hair dye to [dying_themselves ? "their own" : "[human_target]'s"] hair..."), span_notice("[dying_themselves ? "You start" : "[user] starts"] applying hair dye to [dying_themselves ? "your own" : "your"] hair..."), ignored_mobs = user) if(!dying_themselves) to_chat(user, "You start applying hair dye to [human_target]'s hair...") if(!do_after(usr, 3 SECONDS, target)) @@ -51,7 +51,7 @@ if(!new_grad_color || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERITY, FALSE)) return - human_target.visible_message(span_notice("[user] starts applying hair dye to [dying_themselves ? "their own" : "[human_target]'s"] hair..."), span_notice("[dying_themselves ? "You start" : "[user] starts"] applying hair dye to [dying_themselves ? "your own" : "your"] hair..."), ignored_mobs=user) + human_target.visible_message(span_notice("[user] starts applying hair dye to [dying_themselves ? "their own" : "[human_target]'s"] hair..."), span_notice("[dying_themselves ? "You start" : "[user] starts"] applying hair dye to [dying_themselves ? "your own" : "your"] hair..."), ignored_mobs = user) if(!dying_themselves) to_chat(user, "You start applying hair dye to [human_target]'s hair...") if(!do_after(usr, 3 SECONDS, target)) @@ -62,7 +62,7 @@ human_target.grad_style[gradient_key] = new_grad_style human_target.grad_color[gradient_key] = sanitize_hexcolor(new_grad_color) playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 5) - human_target.visible_message(span_notice("[user] finishes applying hair dye to [dying_themselves ? "their own" : "[human_target]'s"] hair, changing its color!"), span_notice("[dying_themselves ? "You finish" : "[user] finishes"] applying hair dye to [dying_themselves ? "your own" : "your"] hair, changing its color!"), ignored_mobs=user) + human_target.visible_message(span_notice("[user] finishes applying hair dye to [dying_themselves ? "their own" : "[human_target]'s"] hair, changing its color!"), span_notice("[dying_themselves ? "You finish" : "[user] finishes"] applying hair dye to [dying_themselves ? "your own" : "your"] hair, changing its color!"), ignored_mobs = user) if(!dying_themselves) to_chat(user, "You finish applying hair dye to [human_target]'s hair, changing its color!") human_target.update_hair() diff --git a/modular_skyrat/master_files/code/game/objects/items/hhmirror.dm b/modular_skyrat/master_files/code/game/objects/items/hhmirror.dm index b1e99eff414..a4ec8862df0 100644 --- a/modular_skyrat/master_files/code/game/objects/items/hhmirror.dm +++ b/modular_skyrat/master_files/code/game/objects/items/hhmirror.dm @@ -21,9 +21,9 @@ /obj/item/hhmirror/fullmagic/New() if(!choosable_races.len) for(var/speciestype in subtypesof(/datum/species)) - var/datum/species/S = new speciestype() - if(!(S.id in races_blacklist)) - choosable_races += S.id + var/datum/species/iterated_species = new speciestype() + if(!(iterated_species.id in races_blacklist)) + choosable_races += iterated_species.id ..() /obj/item/hhmirror/fullmagic/attack_self(mob/user) @@ -32,111 +32,111 @@ return if(!ishuman(user)) return - var/mob/living/carbon/human/H = user + var/mob/living/carbon/human/human_user = user var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes") switch(choice) if("name") - var/newname = reject_bad_name(stripped_input(H, "Who are we again?", "Name change", H.name, MAX_NAME_LEN)) + var/newname = reject_bad_name(stripped_input(human_user, "Who are we again?", "Name change", human_user.name, MAX_NAME_LEN)) if(!newname) return if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - H.real_name = newname - H.name = newname - if(H.dna) - H.dna.real_name = newname - if(H.mind) - H.mind.name = newname + human_user.real_name = newname + human_user.name = newname + if(human_user.dna) + human_user.dna.real_name = newname + if(human_user.mind) + human_user.mind.name = newname if("race") var/newrace - var/racechoice = input(H, "What are we again?", "Race change") as null|anything in choosable_races + var/racechoice = input(human_user, "What are we again?", "Race change") as null|anything in choosable_races newrace = GLOB.species_list[racechoice] if(!newrace) return if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - H.set_species(newrace, icon_update=0) + human_user.set_species(newrace, icon_update = 0) - if(H.dna.species.use_skintones) + if(human_user.dna.species.use_skintones) var/new_s_tone = input(user, "Choose your skin tone:", "Race change") as null|anything in GLOB.skin_tones if(new_s_tone) - H.skin_tone = new_s_tone - H.dna.update_ui_block(DNA_SKIN_TONE_BLOCK) + human_user.skin_tone = new_s_tone + human_user.dna.update_ui_block(DNA_SKIN_TONE_BLOCK) - if(MUTCOLORS in H.dna.species.species_traits) - var/new_mutantcolor = input(user, "Choose your skin color:", "Race change",H.dna.features["mcolor"]) as color|null + if(MUTCOLORS in human_user.dna.species.species_traits) + var/new_mutantcolor = input(user, "Choose your skin color:", "Race change", human_user.dna.features["mcolor"]) as color|null if(new_mutantcolor) var/temp_hsv = RGBtoHSV(new_mutantcolor) if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright - H.dna.features["mcolor"] = sanitize_hexcolor(new_mutantcolor) + human_user.dna.features["mcolor"] = sanitize_hexcolor(new_mutantcolor) else - to_chat(H, span_notice("Invalid color. Your color is not bright enough.")) + to_chat(human_user, span_notice("Invalid color. Your color is not bright enough.")) - H.update_body() - H.update_hair() - H.update_body_parts() - H.update_mutations_overlay() // no hulk lizard + human_user.update_body() + human_user.update_hair() + human_user.update_body_parts() + human_user.update_mutations_overlay() // no hulk lizard if("gender") - if(!(H.gender in list("male", "female"))) //blame the patriarchy + if(!(human_user.gender in list("male", "female"))) //blame the patriarchy return if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - if(H.gender == "male") - if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes") - H.gender = "female" - to_chat(H, span_notice("Man, you feel like a woman!")) + if(human_user.gender == "male") + if(alert(human_user, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes") + human_user.gender = "female" + to_chat(human_user, span_notice("Man, you feel like a woman!")) else return else - if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes") - H.gender = "male" - to_chat(H, span_notice("Whoa man, you feel like a man!")) + if(alert(human_user, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes") + human_user.gender = "male" + to_chat(human_user, span_notice("Whoa man, you feel like a man!")) else return - H.dna.update_ui_block(DNA_GENDER_BLOCK) - H.update_body() - H.update_mutations_overlay() //(hulk male/female) + human_user.dna.update_ui_block(DNA_GENDER_BLOCK) + human_user.update_body() + human_user.update_mutations_overlay() //(hulk male/female) if("hair") - var/hairchoice = tgui_alert(H, "Hair style or hair color?", "Change Hair", list("Style", "Color")) + var/hairchoice = tgui_alert(human_user, "Hair style or hair color?", "Change Hair", list("Style", "Color")) if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(hairchoice == "Style") //So you just want to use a mirror then? ..() else - var/new_hair_color = input(H, "Choose your hair color", "Hair Color",H.hair_color) as color|null + var/new_hair_color = input(human_user, "Choose your hair color", "Hair Color", human_user.hair_color) as color|null if(new_hair_color) - H.hair_color = sanitize_hexcolor(new_hair_color) - H.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK) - if(H.gender == "male") - var/new_face_color = input(H, "Choose your facial hair color", "Hair Color",H.facial_hair_color) as color|null + human_user.hair_color = sanitize_hexcolor(new_hair_color) + human_user.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK) + if(human_user.gender == "male") + var/new_face_color = input(human_user, "Choose your facial hair color", "Hair Color", human_user.facial_hair_color) as color|null if(new_face_color) - H.facial_hair_color = sanitize_hexcolor(new_face_color) - H.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK) - H.update_hair() + human_user.facial_hair_color = sanitize_hexcolor(new_face_color) + human_user.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK) + human_user.update_hair() if(BODY_ZONE_PRECISE_EYES) - var/new_eye_color = input(H, "Choose your eye color", "Eye Color",H.eye_color) as color|null + var/new_eye_color = input(human_user, "Choose your eye color", "Eye Color", human_user.eye_color) as color|null if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(new_eye_color) var/n_color = sanitize_hexcolor(new_eye_color) - var/obj/item/organ/eyes/eyes = H.getorganslot(ORGAN_SLOT_EYES) + var/obj/item/organ/eyes/eyes = human_user.getorganslot(ORGAN_SLOT_EYES) if(eyes) eyes.eye_color = n_color - H.eye_color = n_color - H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) - H.dna.species.handle_body() + human_user.eye_color = n_color + human_user.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) + human_user.dna.species.handle_body() /obj/item/hhmirror/wracemagic name = "Raceless Handheld Magic Mirror" @@ -152,77 +152,77 @@ if(!ishuman(user)) return if(!charges == 0) // Later, should also have a lock - var/mob/living/carbon/human/H = user + var/mob/living/carbon/human/human_user = user var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "gender", "hair", "eyes") switch(choice) if("name") - var/newname = reject_bad_name(stripped_input(H, "Who are we again?", "Name change", H.name, MAX_NAME_LEN)) + var/newname = reject_bad_name(stripped_input(human_user, "Who are we again?", "Name change", human_user.name, MAX_NAME_LEN)) if(!newname) return if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - H.real_name = newname - H.name = newname - if(H.dna) - H.dna.real_name = newname - if(H.mind) - H.mind.name = newname + human_user.real_name = newname + human_user.name = newname + if(human_user.dna) + human_user.dna.real_name = newname + if(human_user.mind) + human_user.mind.name = newname if("gender") - if(!(H.gender in list("male", "female"))) //blame the patriarchy + if(!(human_user.gender in list("male", "female"))) //blame the patriarchy return if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - if(H.gender == "male") - if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes") - H.gender = "female" - to_chat(H, span_notice("Man, you feel like a woman!")) + if(human_user.gender == "male") + if(alert(human_user, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes") + human_user.gender = "female" + to_chat(human_user, span_notice("Man, you feel like a woman!")) else return else - if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes") - H.gender = "male" - to_chat(H, span_notice("Whoa man, you feel like a man!")) + if(alert(human_user, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes") + human_user.gender = "male" + to_chat(human_user, span_notice("Whoa man, you feel like a man!")) else return - H.dna.update_ui_block(DNA_GENDER_BLOCK) - H.update_body() - H.update_mutations_overlay() //(hulk male/female) + human_user.dna.update_ui_block(DNA_GENDER_BLOCK) + human_user.update_body() + human_user.update_mutations_overlay() //(hulk male/female) if("hair") - var/hairchoice = tgui_alert(H, "Hair style or hair color?", "Change Hair", list("Style", "Color")) + var/hairchoice = tgui_alert(human_user, "Hair style or hair color?", "Change Hair", list("Style", "Color")) if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(hairchoice == "Style") //So you just want to use a mirror then? ..() else - var/new_hair_color = input(H, "Choose your hair color", "Hair Color",H.hair_color) as color|null + var/new_hair_color = input(human_user, "Choose your hair color", "Hair Color", human_user.hair_color) as color|null if(new_hair_color) - H.hair_color = sanitize_hexcolor(new_hair_color) - H.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK) - if(H.gender == "male") - var/new_face_color = input(H, "Choose your facial hair color", "Hair Color",H.facial_hair_color) as color|null + human_user.hair_color = sanitize_hexcolor(new_hair_color) + human_user.dna.update_ui_block(DNA_HAIR_COLOR_BLOCK) + if(human_user.gender == "male") + var/new_face_color = input(human_user, "Choose your facial hair color", "Hair Color", human_user.facial_hair_color) as color|null if(new_face_color) - H.facial_hair_color = sanitize_hexcolor(new_face_color) - H.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK) - H.update_hair() + human_user.facial_hair_color = sanitize_hexcolor(new_face_color) + human_user.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK) + human_user.update_hair() if(BODY_ZONE_PRECISE_EYES) - var/new_eye_color = input(H, "Choose your eye color", "Eye Color",H.eye_color) as color|null + var/new_eye_color = input(human_user, "Choose your eye color", "Eye Color", human_user.eye_color) as color|null if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(new_eye_color) var/n_color = sanitize_hexcolor(new_eye_color) - var/obj/item/organ/eyes/eyes = H.getorganslot(ORGAN_SLOT_EYES) + var/obj/item/organ/eyes/eyes = human_user.getorganslot(ORGAN_SLOT_EYES) if(eyes) eyes.eye_color = n_color - H.eye_color = n_color - H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) - H.dna.species.handle_body() + human_user.eye_color = n_color + human_user.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) + human_user.dna.species.handle_body() charges-- if(charges == 0) qdel(src) diff --git a/modular_skyrat/master_files/code/game/objects/items/holy_weapons.dm b/modular_skyrat/master_files/code/game/objects/items/holy_weapons.dm index 8a285eb772b..592f2afa6b0 100644 --- a/modular_skyrat/master_files/code/game/objects/items/holy_weapons.dm +++ b/modular_skyrat/master_files/code/game/objects/items/holy_weapons.dm @@ -145,7 +145,7 @@ if(GLOB.deity) deity_name = GLOB.deity -/obj/item/nullrod/rosary/attack(mob/living/M, mob/living/user, params) +/obj/item/nullrod/rosary/attack(mob/living/target, mob/living/user, params) if(!user.mind || user.mind.assigned_role != "Chaplain") to_chat(user, span_notice("You are not close enough with [deity_name] to use [src].")) return @@ -155,17 +155,17 @@ to_chat(user, span_notice("You are already using [src].")) return - user.visible_message(span_info("[user] kneels[M == user ? null : " next to [M]"] and begins to utter a prayer to [deity_name]."), \ - span_info("You kneel[M == user ? null : " next to [M]"] and begin a prayer to [deity_name].")) + user.visible_message(span_info("[user] kneels[target == user ? null : " next to [target]"] and begins to utter a prayer to [deity_name]."), \ + span_info("You kneel[target == user ? null : " next to [target]"] and begin a prayer to [deity_name].")) praying = TRUE - if(do_after(user, 20, target = M)) - M.reagents?.add_reagent(/datum/reagent/water/holywater, 5) - to_chat(M, span_notice("[user]'s prayer to [deity_name] has eased your pain!")) - M.adjustToxLoss(-5, TRUE, TRUE) - M.adjustOxyLoss(-5) - M.adjustBruteLoss(-5) - M.adjustFireLoss(-5) + if(do_after(user, 20, target = target)) + target.reagents?.add_reagent(/datum/reagent/water/holywater, 5) + to_chat(target, span_notice("[user]'s prayer to [deity_name] has eased your pain!")) + target.adjustToxLoss(-5, TRUE, TRUE) + target.adjustOxyLoss(-5) + target.adjustBruteLoss(-5) + target.adjustFireLoss(-5) praying = FALSE else to_chat(user, span_notice("Your prayer to [deity_name] was interrupted.")) diff --git a/modular_skyrat/master_files/code/game/objects/structures/sauna_oven.dm b/modular_skyrat/master_files/code/game/objects/structures/sauna_oven.dm index e653da407b1..eab3f6dfdc1 100644 --- a/modular_skyrat/master_files/code/game/objects/structures/sauna_oven.dm +++ b/modular_skyrat/master_files/code/game/objects/structures/sauna_oven.dm @@ -49,16 +49,16 @@ ..() icon_state = "[lit ? "sauna_oven_on" : initial(icon_state)]" -/obj/structure/sauna_oven/attackby(obj/item/T, mob/user) - if(T.tool_behaviour == TOOL_WRENCH) +/obj/structure/sauna_oven/attackby(obj/item/used_item, mob/user) + if(used_item.tool_behaviour == TOOL_WRENCH) to_chat(user, span_notice("You begin to deconstruct [src].")) - if(T.use_tool(src, user, 60, volume=50)) + if(used_item.use_tool(src, user, 60, volume = 50)) to_chat(user, span_notice("You successfully deconstructed [src].")) new /obj/item/stack/sheet/mineral/wood(get_turf(src), 30) qdel(src) - else if(istype(T, /obj/item/reagent_containers)) - var/obj/item/reagent_containers/reagent_container = T + else if(istype(used_item, /obj/item/reagent_containers)) + var/obj/item/reagent_containers/reagent_container = used_item if(!reagent_container.is_open_container()) return ..() if(reagent_container.reagents.has_reagent(/datum/reagent/water)) @@ -70,29 +70,29 @@ else to_chat(user, span_warning("There's no water in [reagent_container]")) - else if(istype(T, /obj/item/stack/sheet/mineral/wood)) - var/obj/item/stack/sheet/mineral/wood/wood = T + else if(istype(used_item, /obj/item/stack/sheet/mineral/wood)) + var/obj/item/stack/sheet/mineral/wood/wood = used_item if(fuel_amount > SAUNA_MAXIMUM_FUEL) - to_chat(user, span_warning("You can't fit any more of [T] in [src]!")) + to_chat(user, span_warning("You can't fit any more of [used_item] in [src]!")) return fuel_amount += SAUNA_LOG_FUEL * wood.amount wood.use(wood.amount) user.visible_message(span_notice("[user] tosses some \ wood into [src]."), span_notice("You add \ some fuel to [src].")) - else if(istype(T, /obj/item/paper_bin)) - var/obj/item/paper_bin/paper_bin = T - user.visible_message(span_notice("[user] throws [T] into \ - [src]."), span_notice("You add [T] to [src].\ + else if(istype(used_item, /obj/item/paper_bin)) + var/obj/item/paper_bin/paper_bin = used_item + user.visible_message(span_notice("[user] throws [used_item] into \ + [src]."), span_notice("You add [used_item] to [src].\ ")) fuel_amount += SAUNA_PAPER_FUEL * paper_bin.total_paper qdel(paper_bin) - else if(istype(T, /obj/item/paper)) - user.visible_message(span_notice("[user] throws [T] into \ - [src]."), span_notice("You throw [T] into [src].\ + else if(istype(used_item, /obj/item/paper)) + user.visible_message(span_notice("[user] throws [used_item] into \ + [src]."), span_notice("You throw [used_item] into [src].\ ")) fuel_amount += SAUNA_PAPER_FUEL - qdel(T) + qdel(used_item) return ..() /obj/structure/sauna_oven/process() diff --git a/modular_skyrat/master_files/code/game/objects/structures/trash_pile.dm b/modular_skyrat/master_files/code/game/objects/structures/trash_pile.dm index d2a285a5d55..eca4265bc1e 100644 --- a/modular_skyrat/master_files/code/game/objects/structures/trash_pile.dm +++ b/modular_skyrat/master_files/code/game/objects/structures/trash_pile.dm @@ -35,32 +35,32 @@ /obj/structure/trash_pile/proc/do_search(mob/user) if(contents.len) //There's something hidden - var/atom/A = contents[contents.len] //Get the most recent hidden thing - if(istype(A, /mob/living)) - var/mob/living/M = A - to_chat(user,span_notice("You found someone in the trash!")) - eject_mob(M) - else if (istype(A, /obj/item)) - var/obj/item/I = A - to_chat(user,span_notice("You found something!")) - I.forceMove(src.loc) + var/atom/hidden_atom = contents[contents.len] //Get the most recent hidden thing + if(istype(hidden_atom, /mob/living)) + var/mob/living/hidden_mob = hidden_atom + to_chat(user, span_notice("You found someone in the trash!")) + eject_mob(hidden_mob) + else if (istype(hidden_atom, /obj/item)) + var/obj/item/hidden_item = hidden_atom + to_chat(user, span_notice("You found something!")) + hidden_item.forceMove(src.loc) else //You already searched this one bruh if(user.ckey in searchedby) - to_chat(user,span_warning("There's nothing else for you in \the [src]!")) + to_chat(user, span_warning("There's nothing else for you in \the [src]!")) //You found an item! else produce_alpha_item() - to_chat(user,span_notice("You found something!")) + to_chat(user, span_notice("You found something!")) searchedby += user.ckey /obj/structure/trash_pile/attack_hand(mob/user) //Human mob if(ishuman(user)) - var/mob/living/carbon/human/H = user - H.visible_message("[user] searches through \the [src].",span_notice("You search through \the [src].")) + var/mob/living/carbon/human/human_user = user + human_user.visible_message("[user] searches through \the [src].", span_notice("You search through \the [src].")) //Do the searching - if(do_after(user,rand(4 SECONDS,6 SECONDS),target=src)) + if(do_after(user, rand(4 SECONDS, 6 SECONDS), target = src)) if(src.loc) //Let's check if the pile still exists do_search(user) else @@ -71,28 +71,28 @@ var/lootspawn = pick_weight(GLOB.maintenance_loot) while(islist(lootspawn)) lootspawn = pick_weight(lootspawn) - var/obj/item/I = new lootspawn(get_turf(src)) - return I + var/obj/item/hidden_item = new lootspawn(get_turf(src)) + return hidden_item -/obj/structure/trash_pile/MouseDrop_T(atom/movable/O, mob/user) - if(user == O && iscarbon(O)) - var/mob/living/L = O - if(L.mobility_flags & MOBILITY_MOVE) +/obj/structure/trash_pile/MouseDrop_T(atom/movable/dropped_atom, mob/user) + if(user == dropped_atom && iscarbon(dropped_atom)) + var/mob/living/dropped_mob = dropped_atom + if(dropped_mob.mobility_flags & MOBILITY_MOVE) dive_in_pile(user) return . = ..() -/obj/structure/trash_pile/proc/eject_mob(var/mob/living/M) - M.forceMove(src.loc) - to_chat(M,span_warning("You've been found!")) - playsound(M.loc, 'sound/machines/chime.ogg', 50, FALSE, -5) - M.do_alert_animation(M) +/obj/structure/trash_pile/proc/eject_mob(var/mob/living/hidden_mob) + hidden_mob.forceMove(src.loc) + to_chat(hidden_mob, span_warning("You've been found!")) + playsound(hidden_mob.loc, 'sound/machines/chime.ogg', 50, FALSE, -5) + hidden_mob.do_alert_animation(hidden_mob) /obj/structure/trash_pile/proc/do_dive(mob/user) if(contents.len) - for(var/mob/M in contents) - to_chat(user,span_warning("There's someone in the trash already!")) - eject_mob(M) + for(var/mob/hidden_mob in contents) + to_chat(user, span_warning("There's someone in the trash already!")) + eject_mob(hidden_mob) return FALSE return TRUE @@ -106,33 +106,33 @@ if(do_mob(user, user, adjusted_dive_time)) if(src.loc) //Checking if structure has been destroyed if(do_dive(user)) - to_chat(user,span_notice("You hide in the trashpile.")) + to_chat(user, span_notice("You hide in the trashpile.")) user.forceMove(src) -/obj/structure/trash_pile/proc/can_hide_item(obj/item/I) +/obj/structure/trash_pile/proc/can_hide_item(obj/item/hidden_item) if(contents.len > 10) return FALSE return TRUE -/obj/structure/trash_pile/attackby(obj/item/I, mob/living/user, params) +/obj/structure/trash_pile/attackby(obj/item/hidden_item, mob/living/user, params) if(!user.combat_mode) - if(can_hide_item(I)) - to_chat(user,span_notice("You begin to stealthily hide [I] in the [src].")) + if(can_hide_item(hidden_item)) + to_chat(user, span_notice("You begin to stealthily hide [hidden_item] in the [src].")) if(do_mob(user, user, hide_item_time)) if(src.loc) - if(user.transferItemToLoc(I, src)) - to_chat(user,span_notice("You hide [I] in the trash.")) + if(user.transferItemToLoc(hidden_item, src)) + to_chat(user, span_notice("You hide [hidden_item] in the trash.")) else - to_chat(user, span_warning("\The [I] is stuck to your hand, you cannot put it in the trash!")) + to_chat(user, span_warning("\The [hidden_item] is stuck to your hand, you cannot put it in the trash!")) else - to_chat(user,span_warning("The [src] is way too full to fit [I].")) + to_chat(user, span_warning("The [src] is way too full to fit [hidden_item].")) return . = ..() /obj/structure/trash_pile/Destroy() - for(var/atom/movable/AM in src) - AM.forceMove(src.loc) + for(var/atom/movable/pile_contents in src) + pile_contents.forceMove(src.loc) return ..() /obj/structure/trash_pile/container_resist_act(mob/user) diff --git a/modular_skyrat/master_files/code/modules/admin/admin.dm b/modular_skyrat/master_files/code/modules/admin/admin.dm index c7995311b9d..8048b6def03 100644 --- a/modular_skyrat/master_files/code/modules/admin/admin.dm +++ b/modular_skyrat/master_files/code/modules/admin/admin.dm @@ -2,8 +2,8 @@ GLOBAL_VAR_INIT(dchat_allowed, TRUE) /datum/admins/proc/toggledchat() set category = "Server" - set desc="Toggle dis bitch" - set name="Toggle Dead Chat" + set desc = "Toggle dis bitch" + set name = "Toggle Dead Chat" toggle_dchat() log_admin("[key_name(usr)] toggled dead chat.") message_admins("[key_name_admin(usr)] toggled dead chat.") diff --git a/modular_skyrat/master_files/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/modular_skyrat/master_files/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index bc3415eb109..0fa615ace08 100644 --- a/modular_skyrat/master_files/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/modular_skyrat/master_files/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -1,9 +1,9 @@ /proc/KillEveryoneOnZLevel(level) if(!level) return - for(var/mob/living/M in GLOB.mob_living_list) - if(M.loc.z == level) - M.flash_act(100, TRUE, TRUE) - to_chat(M, span_userdanger("You feel your skin prickle with heat as you're ripped atom from atom in the raging inferno of a nuclear blast. Your last thought is 'Oh fuck.'")) - M.emote("scream") - M.gib() + for(var/mob/living/iterated_mob in GLOB.mob_living_list) + if(iterated_mob.loc.z == level) + iterated_mob.flash_act(100, TRUE, TRUE) + to_chat(iterated_mob, span_userdanger("You feel your skin prickle with heat as you're ripped atom from atom in the raging inferno of a nuclear blast. Your last thought is 'Oh fuck.'")) + iterated_mob.emote("scream") + iterated_mob.gib() diff --git a/modular_skyrat/master_files/code/modules/awaymission/mission_code/black_mesa.dm b/modular_skyrat/master_files/code/modules/awaymission/mission_code/black_mesa.dm index c3422d36da3..665593d3d75 100644 --- a/modular_skyrat/master_files/code/modules/awaymission/mission_code/black_mesa.dm +++ b/modular_skyrat/master_files/code/modules/awaymission/mission_code/black_mesa.dm @@ -184,13 +184,13 @@ playsound(src, 'modular_skyrat/master_files/sound/blackmesa/headcrab/headbite.ogg', 100) human_to_dunk.death(FALSE) -/mob/living/simple_animal/hostile/blackmesa/xen/headcrab/proc/zombify(mob/living/carbon/human/H) +/mob/living/simple_animal/hostile/blackmesa/xen/headcrab/proc/zombify(mob/living/carbon/human/zombified_human) if(is_zombie) return FALSE is_zombie = TRUE - if(H.wear_suit) - var/obj/item/clothing/suit/armor/A = H.wear_suit - maxHealth += A.armor.melee //That zombie's got armor, I want armor! + if(zombified_human.wear_suit) + var/obj/item/clothing/suit/armor/zombie_suit = zombified_human.wear_suit + maxHealth += zombie_suit.armor.melee //That zombie's got armor, I want armor! maxHealth += 40 health = maxHealth name = "zombie" @@ -202,12 +202,12 @@ environment_smash = ENVIRONMENT_SMASH_STRUCTURES movement_type = GROUND icon_state = "" - H.hairstyle = null - H.update_hair() - H.forceMove(src) - oldguy = H + zombified_human.hairstyle = null + zombified_human.update_hair() + zombified_human.forceMove(src) + oldguy = zombified_human update_appearance() - visible_message(span_warning("The corpse of [H.name] suddenly rises!")) + visible_message(span_warning("The corpse of [zombified_human.name] suddenly rises!")) charger = FALSE return TRUE @@ -534,9 +534,9 @@ id = /obj/item/card/id id_trim = /datum/id_trim/science_team -/datum/outfit/science_team/post_equip(mob/living/carbon/human/H, visualsOnly) +/datum/outfit/science_team/post_equip(mob/living/carbon/human/equipped_human, visualsOnly) . = ..() - H.faction |= FACTION_BLACKMESA + equipped_human.faction |= FACTION_BLACKMESA /datum/id_trim/science_team assignment = "Science Team Scientist" @@ -564,9 +564,9 @@ id = /obj/item/card/id id_trim = /datum/id_trim/security_guard -/datum/outfit/security_guard/post_equip(mob/living/carbon/human/H, visualsOnly) +/datum/outfit/security_guard/post_equip(mob/living/carbon/human/equipped_human, visualsOnly) . = ..() - H.faction |= FACTION_BLACKMESA + equipped_human.faction |= FACTION_BLACKMESA /datum/id_trim/security_guard assignment = "Security Guard" @@ -599,14 +599,14 @@ id = /obj/item/card/id id_trim = /datum/id_trim/hecu -/datum/outfit/hecu/post_equip(mob/living/carbon/human/H, visualsOnly) +/datum/outfit/hecu/post_equip(mob/living/carbon/human/equipped_human, visualsOnly) . = ..() - H.faction |= FACTION_XEN - H.hairstyle = "Crewcut" - H.hair_color = COLOR_ALMOST_BLACK - H.facial_hairstyle = "Shaved" - H.facial_hair_color = COLOR_ALMOST_BLACK - H.update_hair() + equipped_human.faction |= FACTION_XEN + equipped_human.hairstyle = "Crewcut" + equipped_human.hair_color = COLOR_ALMOST_BLACK + equipped_human.facial_hairstyle = "Shaved" + equipped_human.facial_hair_color = COLOR_ALMOST_BLACK + equipped_human.update_hair() /datum/id_trim/hecu assignment = "HECU Soldier" diff --git a/modular_skyrat/master_files/code/modules/buildmode/submodes/offercontrol.dm b/modular_skyrat/master_files/code/modules/buildmode/submodes/offercontrol.dm index 8daac846b6b..62c5d743519 100644 --- a/modular_skyrat/master_files/code/modules/buildmode/submodes/offercontrol.dm +++ b/modular_skyrat/master_files/code/modules/buildmode/submodes/offercontrol.dm @@ -1,19 +1,19 @@ /datum/buildmode_mode/offercontrol key = "offercontrol" -/datum/buildmode_mode/offercontrol/show_help(client/c) - to_chat(c, span_notice("***********************************************************\n\ +/datum/buildmode_mode/offercontrol/show_help(client/target_client) + to_chat(target_client, span_notice("***********************************************************\n\ Left Mouse Button on mob/living = Offer control to ghosts.\n\ ***********************************************************")) -/datum/buildmode_mode/offercontrol/handle_click(client/c, params, object) +/datum/buildmode_mode/offercontrol/handle_click(client/target_client, params, object) if(!ismob(object)) return var/mob/living/mob_to_offer = object if(mob_to_offer.key) - var/response = tgui_alert(c, "This mob already has a ckey attached, continue?", "Mob already posessed!", list("Continue", "Cancel")) + var/response = tgui_alert(target_client, "This mob already has a ckey attached, continue?", "Mob already posessed!", list("Continue", "Cancel")) if(response != "Continue") return diff --git a/modular_skyrat/master_files/code/modules/client/preferences.dm b/modular_skyrat/master_files/code/modules/client/preferences.dm index 2d056e3d5a2..f237f1c5238 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences.dm @@ -170,7 +170,7 @@ var/leverage = 0 if(current_aug) leverage += current_aug.cost - if((quirk_points+leverage)>= target_aug.cost) + if((quirk_points + leverage)>= target_aug.cost) return TRUE else return FALSE diff --git a/modular_skyrat/master_files/code/modules/client/preferences/middleware/languages.dm b/modular_skyrat/master_files/code/modules/client/preferences/middleware/languages.dm index 8ca32a54001..9aa09f28777 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/middleware/languages.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/middleware/languages.dm @@ -6,8 +6,8 @@ var/list/to_insert = list() if(!GLOB.all_languages.len) - for(var/L in subtypesof(/datum/language)) - var/datum/language/language = L + for(var/iterated_language in subtypesof(/datum/language)) + var/datum/language/language = iterated_language if(!initial(language.key)) continue @@ -19,7 +19,7 @@ for (var/language_name in GLOB.all_languages) var/datum/language/language = GLOB.language_datum_instances[language_name] - var/icon/language_icon = icon(language.icon, icon_state=language.icon_state) + var/icon/language_icon = icon(language.icon, icon_state = language.icon_state) to_insert[sanitize_css_class_name(language.name)] = language_icon for (var/spritesheet_key in to_insert) diff --git a/modular_skyrat/master_files/code/modules/client/preferences/species_features/generate_side_shots.dm b/modular_skyrat/master_files/code/modules/client/preferences/species_features/generate_side_shots.dm index 91d1331880c..24c351dcf87 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/species_features/generate_side_shots.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/species_features/generate_side_shots.dm @@ -16,7 +16,7 @@ layer = "ADJ" else layer = "BEHIND" - final_icon = icon(sprite_accessory.icon,"m_[key]_[sprite_accessory.icon_state]_[layer]", direction) + final_icon = icon(sprite_accessory.icon, "m_[key]_[sprite_accessory.icon_state]_[layer]", direction) else final_icon = icon('icons/mob/human_parts_greyscale.dmi', "lizard_chest_m", direction) diff --git a/modular_skyrat/master_files/code/modules/clothing/chameleon.dm b/modular_skyrat/master_files/code/modules/clothing/chameleon.dm index 8a9ae522bf4..40cd76947f2 100644 --- a/modular_skyrat/master_files/code/modules/clothing/chameleon.dm +++ b/modular_skyrat/master_files/code/modules/clothing/chameleon.dm @@ -8,9 +8,9 @@ savedslowdown = slowdown /datum/action/chameleon_slowdown/Trigger() - var/obj/item/clothing/T = target - var/slow = T.slowdown - T.slowdown = savedslowdown + var/obj/item/clothing/target_clothing = target + var/slow = target_clothing.slowdown + target_clothing.slowdown = savedslowdown savedslowdown = slow owner.update_equipment_speed_mods() @@ -25,35 +25,35 @@ /datum/action/item_action/chameleon/change/update_item(obj/item/picked_item) . = ..() if(istype(target, /obj/item/clothing/)) - var/obj/item/clothing/T = target - var/obj/item/clothing/P = picked_item - T.mutant_variants = initial(P.mutant_variants) - T.worn_icon_digi = initial(P.worn_icon_digi) - T.worn_icon_taur_snake = initial(P.worn_icon_taur_snake) - T.worn_icon_taur_paw = initial(P.worn_icon_taur_paw) - T.worn_icon_taur_hoof = initial(P.worn_icon_taur_hoof) - T.worn_icon_muzzled = initial(P.worn_icon_muzzled) - T.flags_inv = initial(P.flags_inv) - T.visor_flags_cover = initial(P.visor_flags_cover) - T.dynamic_hair_suffix = initial(P.dynamic_hair_suffix) - T.dynamic_fhair_suffix = initial(P.dynamic_fhair_suffix) - T.slowdown = 0 - // var/slow = initial(P.slowdown) /// DISABLED UNTIL YOU CAN MAKE THIS WORK WITH THE BROKEN CHAMELEON CLOTHES!!! + var/obj/item/clothing/target_clothing = target + var/obj/item/clothing/picked_clothing = picked_item + target_clothing.mutant_variants = initial(picked_clothing.mutant_variants) + target_clothing.worn_icon_digi = initial(picked_clothing.worn_icon_digi) + target_clothing.worn_icon_taur_snake = initial(picked_clothing.worn_icon_taur_snake) + target_clothing.worn_icon_taur_paw = initial(picked_clothing.worn_icon_taur_paw) + target_clothing.worn_icon_taur_hoof = initial(picked_clothing.worn_icon_taur_hoof) + target_clothing.worn_icon_muzzled = initial(picked_clothing.worn_icon_muzzled) + target_clothing.flags_inv = initial(picked_clothing.flags_inv) + target_clothing.visor_flags_cover = initial(picked_clothing.visor_flags_cover) + target_clothing.dynamic_hair_suffix = initial(picked_clothing.dynamic_hair_suffix) + target_clothing.dynamic_fhair_suffix = initial(picked_clothing.dynamic_fhair_suffix) + target_clothing.slowdown = 0 + // var/slow = initial(picked_clothing.slowdown) /// DISABLED UNTIL YOU CAN MAKE THIS WORK WITH THE BROKEN CHAMELEON CLOTHES!!! // if(slow) - // slowtoggle = new(T, slow) + // slowtoggle = new(target_clothing, slow) // slowtoggle.Grant(owner) - // slowtoggle.target = T + // slowtoggle.target = target_clothing // else if(slowtoggle) // qdel(slowtoggle) -/datum/action/item_action/chameleon/change/Grant(mob/M) +/datum/action/item_action/chameleon/change/Grant(mob/target_mob) . = ..() - if(M && (M == owner)) + if(target_mob && (target_mob == owner)) if(slowtoggle) - slowtoggle?.Grant(M) + slowtoggle?.Grant(target_mob) -/datum/action/item_action/chameleon/change/Remove(mob/M) +/datum/action/item_action/chameleon/change/Remove(mob/target_mob) . = ..() - if(M && (M == owner)) + if(target_mob && (target_mob == owner)) if(slowtoggle) - slowtoggle?.Remove(M) + slowtoggle?.Remove(target_mob) diff --git a/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm b/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm index f4a5c46bf1a..1dbba38625f 100644 --- a/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm +++ b/modular_skyrat/master_files/code/modules/clothing/head/monkey_magnification_helmet.dm @@ -4,14 +4,14 @@ icon_state = "monkeymind" inhand_icon_state = "monkeymind" strip_delay = 100 - armor = list(MELEE = 5, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 25, BIO = 0, FIRE = 50, ACID = 50, WOUND = 0) + armor = list(MELEE = 5, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 0, FIRE = 50, ACID = 50, WOUND = 0) var/mob/living/carbon/human/magnification = null ///if the helmet is on a valid target (just works like a normal helmet if not (cargo please stop)) var/polling = FALSE///if the helmet is currently polling for targets (special code for removal) var/light_colors = 1 ///which icon state color this is (red, blue, yellow) /obj/item/clothing/head/helmet/monkey_sentience/Initialize() . = ..() - light_colors = rand(1,3) + light_colors = rand(1, 3) update_appearance() /obj/item/clothing/head/helmet/monkey_sentience/examine(mob/user) @@ -36,7 +36,7 @@ if(!ismonkey(user) || user.ckey) var/mob/living/something = user to_chat(something, span_boldnotice("You feel a stabbing pain in the back of your head for a moment.")) - something.apply_damage(5,BRUTE,BODY_ZONE_HEAD,FALSE,FALSE,FALSE) //notably: no damage resist (it's in your helmet), no damage spread (it's in your helmet) + something.apply_damage(5, BRUTE, BODY_ZONE_HEAD, FALSE, FALSE, FALSE) //notably: no damage resist (it's in your helmet), no damage spread (it's in your helmet) playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE) return if(!(GLOB.ghost_role_flags & GHOSTROLE_STATION_SENTIENCE)) @@ -89,11 +89,11 @@ to_chat(magnification, span_userdanger("You feel your flicker of sentience ripped away from you, as everything becomes dim...")) magnification.ghostize(FALSE) if(prob(10)) - switch(rand(1,4)) + switch(rand(1, 4)) if(1) //blood rage magnification.ai_controller.blackboard[BB_MONKEY_AGGRESSIVE] = TRUE if(2) //brain death - magnification.apply_damage(500,BRAIN,BODY_ZONE_HEAD,FALSE,FALSE,FALSE) + magnification.apply_damage(500, BRAIN, BODY_ZONE_HEAD, FALSE, FALSE, FALSE) if(3) //primal gene (gorilla) magnification.gorillize() if(4) //genetic mass susceptibility (gib) diff --git a/modular_skyrat/master_files/code/modules/clothing/outfits/ert.dm b/modular_skyrat/master_files/code/modules/clothing/outfits/ert.dm index e5c990b6fcd..46b6612d7d9 100644 --- a/modular_skyrat/master_files/code/modules/clothing/outfits/ert.dm +++ b/modular_skyrat/master_files/code/modules/clothing/outfits/ert.dm @@ -22,10 +22,10 @@ skillchips = list(/obj/item/skillchip/disk_verifier) - backpack_contents = list(/obj/item/storage/box/survival/engineer=1,\ - /obj/item/storage/firstaid/regular=1,\ - /obj/item/flashlight=1,\ - /obj/item/storage/box/handcuffs=1) + backpack_contents = list(/obj/item/storage/box/survival/engineer = 1,\ + /obj/item/storage/firstaid/regular = 1,\ + /obj/item/flashlight = 1,\ + /obj/item/storage/box/handcuffs = 1) /datum/outfit/centcom/asset_protection/post_equip(mob/living/carbon/human/person, visualsOnly = FALSE) if(visualsOnly) diff --git a/modular_skyrat/master_files/code/modules/events/spacevine.dm b/modular_skyrat/master_files/code/modules/events/spacevine.dm index 815a0df2dea..84b3f8da5a2 100644 --- a/modular_skyrat/master_files/code/modules/events/spacevine.dm +++ b/modular_skyrat/master_files/code/modules/events/spacevine.dm @@ -22,7 +22,7 @@ if(turfs.len) //Pick a turf to spawn at if we can var/turf/spawning_turf = pick(turfs) - new /datum/spacevine_controller(spawning_turf, list(pick(subtypesof(/datum/spacevine_mutation))), rand(10,100), rand(1,6), src) //spawn a controller at turf with randomized stats and a single random mutation + new /datum/spacevine_controller(spawning_turf, list(pick(subtypesof(/datum/spacevine_mutation))), rand(10, 100), rand(1, 6), src) //spawn a controller at turf with randomized stats and a single random mutation new /mob/living/simple_animal/hostile/venus_human_trap(spawning_turf) new /mob/living/simple_animal/hostile/venus_human_trap(spawning_turf) @@ -55,13 +55,13 @@ /datum/spacevine_mutation/proc/on_death(obj/structure/spacevine/vine_object) return -/datum/spacevine_mutation/proc/on_hit(obj/structure/spacevine/vine_object, mob/hitter, obj/item/I, expected_damage) +/datum/spacevine_mutation/proc/on_hit(obj/structure/spacevine/vine_object, mob/hitter, obj/item/item_used, expected_damage) . = expected_damage /datum/spacevine_mutation/proc/on_cross(obj/structure/spacevine/vine_object, mob/crosser) return -/datum/spacevine_mutation/proc/on_chem(obj/structure/spacevine/vine_object, datum/reagent/R) +/datum/spacevine_mutation/proc/on_chem(obj/structure/spacevine/vine_object, datum/reagent/reagent_applied) return /datum/spacevine_mutation/proc/on_eat(obj/structure/spacevine/vine_object, mob/living/eater) @@ -76,7 +76,7 @@ /datum/spacevine_mutation/proc/on_explosion(severity, target, obj/structure/spacevine/vine_object) return -/datum/spacevine_mutation/aggressive_spread/proc/aggrospread_act(obj/structure/spacevine/S, mob/living/M) +/datum/spacevine_mutation/aggressive_spread/proc/aggrospread_act(obj/structure/spacevine/spreading_vine, mob/living/buckled_mob) return // Creates light @@ -124,7 +124,7 @@ . = 1 QDEL_IN(vine_object, 5) -/datum/spacevine_mutation/explosive/on_death(obj/structure/spacevine/vine_object, mob/hitter, obj/item/I) +/datum/spacevine_mutation/explosive/on_death(obj/structure/spacevine/vine_object, mob/hitter, obj/item/hitting_item) explosion(vine_object, light_impact_range = severity, adminlog = FALSE) @@ -188,20 +188,20 @@ var/armor = hit_carbon.run_armor_check(limb, MELEE, null, null) //armor = the armor value of that randomly chosen bodypart. Nulls to not print a message, because it would still print on pierce. var/datum/spacevine_mutation/thorns/has_thorns = locate() in attacking_vine.mutations //Searches for the thorns mutation in the "mutations"-list inside obj/structure/spacevine, and defines T if it finds it. if(has_thorns && (prob(40))) //If we found the thorns mutation there is now a chance to get stung instead of lashed or smashed. - hit_carbon.apply_damage(50, BRUTE, def_zone = limb, wound_bonus = rand(-20,10), sharpness = SHARP_POINTY) //This one gets a bit lower damage because it ignores armor. + hit_carbon.apply_damage(50, BRUTE, def_zone = limb, wound_bonus = rand(-20, 10), sharpness = SHARP_POINTY) //This one gets a bit lower damage because it ignores armor. hit_carbon.Stun(1 SECONDS) //Stopped in place for a moment. playsound(hit_mob, 'sound/weapons/pierce.ogg', 50, TRUE, -1) hit_mob.visible_message(span_danger("[hit_mob] is nailed by a sharp thorn!"), span_userdanger("You are nailed by a sharp thorn!")) log_combat(attacking_vine, hit_mob, "aggressively pierced") //"Aggressively" for easy ctrl+F'ing in the attack logs. else if(prob(80)) - hit_carbon.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20,10), sharpness = SHARP_EDGED) + hit_carbon.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20, 10), sharpness = SHARP_EDGED) hit_carbon.Knockdown(2 SECONDS) playsound(hit_mob, 'sound/weapons/whip.ogg', 50, TRUE, -1) hit_mob.visible_message(span_danger("[hit_mob] is lacerated by an outburst of vines!"), span_userdanger("You are lacerated by an outburst of vines!")) log_combat(attacking_vine, hit_mob, "aggressively lacerated") else - hit_carbon.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20,10), sharpness = NONE) + hit_carbon.apply_damage(60, BRUTE, def_zone = limb, blocked = armor, wound_bonus = rand(-20, 10), sharpness = NONE) hit_carbon.Knockdown(3 SECONDS) var/atom/throw_target = get_edge_target_turf(hit_carbon, get_dir(attacking_vine, get_step_away(hit_carbon, attacking_vine))) hit_carbon.throw_at(throw_target, 3, 6) @@ -306,7 +306,7 @@ living_crosser.adjustBruteLoss(5) to_chat(living_crosser, span_alert("You cut yourself on the thorny vines.")) -/datum/spacevine_mutation/thorns/on_hit(obj/structure/spacevine/vine_object, mob/living/hitter, obj/item/I, expected_damage) +/datum/spacevine_mutation/thorns/on_hit(obj/structure/spacevine/vine_object, mob/living/hitter, obj/item/hitting_item, expected_damage) if(prob(severity) && istype(hitter) && !isvineimmune(hitter)) var/mob/living/attacking_mob = hitter attacking_mob.adjustBruteLoss(5) @@ -340,7 +340,7 @@ severity = 10 /datum/spacevine_mutation/flowering/on_grow(obj/structure/spacevine/vine_object) - if(vine_object.energy == 2 && prob(severity) && !locate(/obj/structure/alien/resin/flower_bud) in range(5,vine_object)) + if(vine_object.energy == 2 && prob(severity) && !locate(/obj/structure/alien/resin/flower_bud) in range(5, vine_object)) new/obj/structure/alien/resin/flower_bud(get_turf(vine_object)) /datum/spacevine_mutation/flowering/on_cross(obj/structure/spacevine/vine_object, mob/living/crosser) @@ -371,7 +371,7 @@ severity = 2 quality = NEGATIVE -/datum/spacevine_mutation/meleereflecting/on_hit(obj/structure/spacevine/vine_object, mob/hitter, obj/item/I, expected_damage) +/datum/spacevine_mutation/meleereflecting/on_hit(obj/structure/spacevine/vine_object, mob/hitter, obj/item/hitting_item, expected_damage) if(isliving(hitter)) var/mob/living/attacking_mob = hitter if(isvineimmune(attacking_mob)) @@ -420,7 +420,7 @@ severity = 3 quality = NEGATIVE -/datum/spacevine_mutation/electrify/on_hit(obj/structure/spacevine/vine_object, mob/hitter, obj/item/I, expected_damage) +/datum/spacevine_mutation/electrify/on_hit(obj/structure/spacevine/vine_object, mob/hitter, obj/item/hitting_item, expected_damage) if(isliving(hitter)) var/mob/living/living_hitter = hitter if(isvineimmune(living_hitter)) @@ -612,7 +612,7 @@ mutations = list() set_opacity(0) if(has_buckled_mobs()) - unbuckle_all_mobs(force=1) + unbuckle_all_mobs(force = 1) return ..() @@ -681,7 +681,7 @@ /obj/structure/spacevine/attack_paw(mob/living/user, list/modifiers) for(var/datum/spacevine_mutation/vine_mutation in mutations) vine_mutation.on_hit(src, user) - user_unbuckle_mob(user,user) + user_unbuckle_mob(user, user) /obj/structure/spacevine/attack_alien(mob/living/user, list/modifiers) eat(user) @@ -828,7 +828,7 @@ /// Finds a target tile to spread to. If checks pass it will spread to it and also proc on_spread on target. /obj/structure/spacevine/proc/spread() var/direction = pick(GLOB.cardinals) - var/turf/stepturf = get_step(src,direction) + var/turf/stepturf = get_step(src, direction) var/datum/spacevine_mutation/domesticated/domesticated = locate() in mutations if(!domesticated) for(var/obj/machinery/door/target_door in stepturf.contents) @@ -856,7 +856,7 @@ return for(var/datum/spacevine_mutation/vine_mutation in mutations) vine_mutation.on_spread(src, target_turf) //Only do the on_spread proc if it actually spreads. - target_turf = get_step(src,target_dir) //in case turf changes, to make sure no runtimes happen + target_turf = get_step(src, target_dir) //in case turf changes, to make sure no runtimes happen master.spawn_spacevine_piece(target_turf, src) /obj/structure/spacevine/ex_act(severity, target) diff --git a/modular_skyrat/master_files/code/modules/mob/dead/new_player/preferences_setup.dm b/modular_skyrat/master_files/code/modules/mob/dead/new_player/preferences_setup.dm index f0013cba651..75066ec35ba 100644 --- a/modular_skyrat/master_files/code/modules/mob/dead/new_player/preferences_setup.dm +++ b/modular_skyrat/master_files/code/modules/mob/dead/new_player/preferences_setup.dm @@ -10,9 +10,9 @@ mannequin.underwear_visibility = NONE if(preview_job) //SKYRAT EDIT CHANGE // Silicons only need a very basic preview since there is no customization for them. - if (istype(preview_job,/datum/job/ai)) + if (istype(preview_job, /datum/job/ai)) return image('icons/mob/ai.dmi', icon_state = resolve_ai_icon(read_preference(/datum/preference/choiced/ai_core_display)), dir = SOUTH) - if (istype(preview_job,/datum/job/cyborg)) + if (istype(preview_job, /datum/job/cyborg)) return image('icons/mob/robots.dmi', icon_state = "robot", dir = SOUTH) mannequin.job = preview_job.title mannequin.equip_outfit_and_loadout(preview_job.outfit, src, TRUE) diff --git a/modular_skyrat/master_files/code/modules/mob/living/carbon/human.dm b/modular_skyrat/master_files/code/modules/mob/living/carbon/human.dm index cd45a090dff..484e0c46dbb 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/carbon/human.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/carbon/human.dm @@ -1,4 +1,4 @@ -/mob/living/carbon/human/ZImpactDamage(turf/T, levels) +/mob/living/carbon/human/ZImpactDamage(turf/target_turf, levels) if(stat != CONSCIOUS) // you're not The One return ..() // Cat-people always land on their feet @@ -10,13 +10,13 @@ Stun(0.5 SECONDS) // You can't move and you can't use items //Nailed it! visible_message(span_notice("[src] lands elegantly on [p_their()] feet!"), - span_warning("You fall [levels > 1 ? "[levels] levels" : "one level"] into [T], perfecting the landing!")) + span_warning("You fall [levels > 1 ? "[levels] levels" : "one level"] into [target_turf], perfecting the landing!")) return - + var/obj/item/organ/external/wings/gliders = getorgan(/obj/item/organ/external/wings) if((HAS_TRAIT(src, TRAIT_FREERUNNING) && levels < 2) || gliders?.can_soften_fall()) // the power of parkour or wings allows falling short distances unscathed - visible_message(span_danger("[src] makes a hard landing on [T] but remains unharmed from the fall."), \ - span_userdanger("You brace for the fall. You make a hard landing on [T] but remain unharmed.")) + visible_message(span_danger("[src] makes a hard landing on [target_turf] but remains unharmed from the fall."), \ + span_userdanger("You brace for the fall. You make a hard landing on [target_turf] but remain unharmed.")) Knockdown(levels * 40) return return ..() diff --git a/modular_skyrat/master_files/code/modules/mob/living/emote_popup.dm b/modular_skyrat/master_files/code/modules/mob/living/emote_popup.dm index d0070a29588..2e470aa8ba9 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/emote_popup.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/emote_popup.dm @@ -7,13 +7,13 @@ mouse_opacity = 0 /mob/living/proc/flick_emote_popup_on_mob(state, time) - var/obj/effect/overlay/emote_popup/I = new - I.icon_state = state - vis_contents += I - animate(I, alpha = 255, time = 5, easing = BOUNCE_EASING, pixel_y = 10) - addtimer(CALLBACK(src, .proc/remove_emote_popup_on_mob, I), time) + var/obj/effect/overlay/emote_popup/emote_overlay = new + emote_overlay.icon_state = state + vis_contents += emote_overlay + animate(emote_overlay, alpha = 255, time = 5, easing = BOUNCE_EASING, pixel_y = 10) + addtimer(CALLBACK(src, .proc/remove_emote_popup_on_mob, emote_overlay), time) -/mob/living/proc/remove_emote_popup_on_mob(obj/effect/overlay/emote_popup/I) - vis_contents -= I - qdel(I) +/mob/living/proc/remove_emote_popup_on_mob(obj/effect/overlay/emote_popup/emote_overlay) + vis_contents -= emote_overlay + qdel(emote_overlay) return diff --git a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm index 8cd1189039d..1a90a724394 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/dogs.dm @@ -71,8 +71,8 @@ EN.blackboard[BB_DOG_HARASS_TARGET] = WEAKREF(target) EN.current_behaviors += GET_AI_BEHAVIOR(/datum/ai_behavior/harass) -/mob/living/simple_animal/pet/dog/corgi/borgi/proc/on_attackby(datum/source, obj/item/I, mob/living/target) - if(I.force && I.damtype != STAMINA && health > 0) +/mob/living/simple_animal/pet/dog/corgi/borgi/proc/on_attackby(datum/source, obj/item/used_item, mob/living/target) + if(used_item.force && used_item.damtype != STAMINA && health > 0) shootAt(target) var/datum/ai_controller/dog/EN = ai_controller if(health <= 30 && !(WEAKREF(target) in EN.blackboard[BB_DOG_FRIENDS])) @@ -82,9 +82,9 @@ /mob/living/simple_animal/pet/dog/corgi/borgi/proc/on_hitby(datum/source, atom/movable/AM) if(istype(AM, /obj/item)) - var/obj/item/I = AM - var/mob/thrown_by = I.thrownby?.resolve() - if(I.throwforce >= 5 && ishuman(thrown_by) && health > 0) + var/obj/item/used_item = AM + var/mob/thrown_by = used_item.thrownby?.resolve() + if(used_item.throwforce >= 5 && ishuman(thrown_by) && health > 0) var/mob/living/carbon/human/target = thrown_by var/datum/ai_controller/dog/EN = ai_controller if(!(WEAKREF(target) in EN.blackboard[BB_DOG_FRIENDS])) @@ -111,32 +111,32 @@ return BULLET_ACT_HIT /mob/living/simple_animal/pet/dog/corgi/borgi/proc/shootAt(atom/movable/target) - var/turf/T = get_turf(src) - var/turf/U = get_turf(target) - if(!T || !U) + var/turf/source_turf = get_turf(src) + var/turf/target_turf = get_turf(target) + if(!source_turf || !target_turf) return var/obj/projectile/beam/laser = new /obj/projectile/beam(loc) laser.icon = 'icons/effects/genetics.dmi' laser.icon_state = "eyelasers" playsound(loc, 'sound/weapons/taser.ogg', 75, 1) - laser.preparePixelProjectile(target, T) + laser.preparePixelProjectile(target, source_turf) laser.firer = src laser.fired_from = src laser.fire() /mob/living/simple_animal/pet/dog/corgi/borgi/proc/shootToyAt(atom/movable/target) - var/turf/T = get_turf(src) - var/turf/U = get_turf(target) - if(!T || !U) + var/turf/source_turf = get_turf(src) + var/turf/target_turf = get_turf(target) + if(!source_turf || !target_turf) return - var/obj/projectile/bullet/reusable/foam_dart/FD = new /obj/projectile/bullet/reusable/foam_dart(loc) - FD.icon = 'icons/obj/guns/toy.dmi' - FD.icon_state = "foamdart_proj" + var/obj/projectile/bullet/reusable/foam_dart/fired_dart = new /obj/projectile/bullet/reusable/foam_dart(loc) + fired_dart.icon = 'icons/obj/guns/toy.dmi' + fired_dart.icon_state = "foamdart_proj" playsound(loc, 'sound/items/syringeproj.ogg', 75, 1) - FD.preparePixelProjectile(target, T) - FD.firer = src - FD.fired_from = src - FD.fire() + fired_dart.preparePixelProjectile(target, source_turf) + fired_dart.firer = src + fired_dart.fired_from = src + fired_dart.fire() /mob/living/simple_animal/pet/dog/corgi/borgi/Life(seconds, times_fired) ..() diff --git a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/poppy.dm b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/poppy.dm index ba9124f9341..9819d72f527 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/poppy.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/friendly/poppy.dm @@ -7,7 +7,7 @@ icon_dead = "poppypossum_dead" maxHealth = 30 health = 30 - speak = list("Hiss!","HISS!","Hissss?") + speak = list("Hiss!", "HISS!", "Hissss?") speak_emote = list("hisses") emote_hear = list("hisses.") emote_see = list("runs in a circle.", "shakes.") diff --git a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm index 45c6a0670ed..f63a1104ab2 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/grabbagmob.dm @@ -80,7 +80,7 @@ loot = list(/obj/effect/gibspawner/human) atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) unsuitable_atmos_damage = 7.5 - faction = list("hostile","cultist") + faction = list("hostile", "cultist") status_flags = CANPUSH del_on_death = 1 rapid_melee = 2 @@ -197,7 +197,7 @@ turns_per_move = 5 mob_biotypes = MOB_ORGANIC|MOB_HUMANOID sentience_type = SENTIENCE_HUMANOID - faction = list("hostile","cultist") + faction = list("hostile", "cultist") footstep_type = FOOTSTEP_MOB_SHOE weather_immunities = list(TRAIT_LAVA_IMMUNE, TRAIT_ASHSTORM_IMMUNE) minbodytemp = 0 @@ -591,7 +591,7 @@ atmos_requirements = list("min_oxy" = 10, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 maxbodytemp = 1500 - faction = list("hostile","vines","plants") + faction = list("hostile", "vines", "plants") pressure_resistance = 200 gold_core_spawnable = HOSTILE_SPAWN diff --git a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/zombie.dm b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/zombie.dm index bbdffb435ed..586e14e734d 100644 --- a/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/zombie.dm +++ b/modular_skyrat/master_files/code/modules/mob/living/simple_animal/hostile/zombie.dm @@ -23,22 +23,13 @@ /mob/living/simple_animal/hostile/zombie/proc/setup_visuals() var/picked_job = pick(possible_jobs) - var/datum/job/J = SSjob.GetJob(picked_job) - var/datum/outfit/O - if(J.outfit) - O = new J.outfit + var/datum/job/zombie_job = SSjob.GetJob(picked_job) + var/datum/outfit/zombie_outfit + if(zombie_job.outfit) + zombie_outfit = new zombie_job.outfit //They have claws now. - O.r_hand = null - O.l_hand = null -/* - var/icon/P = get_flat_human_icon_skyrat("zombie_[picked_job]", J, /datum/species/zombie/infectious, SPECIES_ZOMBIE_HALLOWEEN, outfit_override = O) - icon = P - if(!no_corpse) - corpse = new(src) - corpse.outfit = O - corpse.mob_species = /datum/species/zombie - corpse.mob_name = name -*/ + zombie_outfit.r_hand = null + zombie_outfit.l_hand = null /mob/living/simple_animal/hostile/zombie/cheesezombie name = "Cheese Zombie" diff --git a/modular_skyrat/master_files/code/modules/projectiles/guns/ballistic/automatic.dm b/modular_skyrat/master_files/code/modules/projectiles/guns/ballistic/automatic.dm index b47b0135a53..b895f889f78 100644 --- a/modular_skyrat/master_files/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/modular_skyrat/master_files/code/modules/projectiles/guns/ballistic/automatic.dm @@ -133,11 +133,11 @@ underbarrel.afterattack(target, user, flag, params) return SECONDARY_ATTACK_CONTINUE_CHAIN -/obj/item/gun/ballistic/automatic/m90/attackby(obj/item/A, mob/user, params) - if(istype(A, /obj/item/ammo_casing)) - if(istype(A, underbarrel.magazine.ammo_type)) +/obj/item/gun/ballistic/automatic/m90/attackby(obj/item/attacking_item, mob/user, params) + if(istype(attacking_item, /obj/item/ammo_casing)) + if(istype(attacking_item, underbarrel.magazine.ammo_type)) underbarrel.attack_self(user) - underbarrel.attackby(A, user, params) + underbarrel.attackby(attacking_item, user, params) else ..() @@ -250,8 +250,8 @@ return ..() -/obj/item/gun/ballistic/automatic/l6_saw/attackby(obj/item/A, mob/user, params) - if(!cover_open && istype(A, mag_type)) +/obj/item/gun/ballistic/automatic/l6_saw/attackby(obj/item/attacking_item, mob/user, params) + if(!cover_open && istype(attacking_item, mag_type)) to_chat(user, span_warning("[src]'s dust cover prevents a magazine from being fit.")) return ..() diff --git a/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm b/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm index 3d58f67700c..4c1de170dd4 100644 --- a/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm +++ b/modular_skyrat/master_files/code/modules/projectiles/guns/gun.dm @@ -11,7 +11,7 @@ worn_icon_state = "gun" flags_1 = CONDUCT_1 slot_flags = ITEM_SLOT_BELT - custom_materials = list(/datum/material/iron=2000) + custom_materials = list(/datum/material/iron = 2000) w_class = WEIGHT_CLASS_NORMAL throwforce = 5 throw_speed = 3 @@ -158,17 +158,17 @@ QDEL_NULL(firemode_action) . = ..() -/obj/item/gun/handle_atom_del(atom/A) - if(A == pin) +/obj/item/gun/handle_atom_del(atom/gun_atom) + if(gun_atom == pin) pin = null - if(A == chambered) + if(gun_atom == chambered) chambered = null update_appearance() - if(A == bayonet) + if(gun_atom == bayonet) clear_bayonet() - if(A == gun_light) + if(gun_atom == gun_light) clear_gunlight() - if(A == suppressed) + if(gun_atom == suppressed) clear_suppressor() . = ..() @@ -292,15 +292,15 @@ /obj/item/gun/emp_act(severity) . = ..() if(!(. & EMP_PROTECT_CONTENTS)) - for(var/obj/O in contents) - O.emp_act(severity) + for(var/obj/iterated_object in contents) + iterated_object.emp_act(severity) /obj/item/gun/attack_secondary(mob/living/victim, mob/living/user, params) if(user.GetComponent(/datum/component/gunpoint)) to_chat(user, span_warning("You are already holding someone up!")) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN if(user == victim) - to_chat(user,span_warning("You can't hold yourself up!")) + to_chat(user, span_warning("You can't hold yourself up!")) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN user.AddComponent(/datum/component/gunpoint, victim, src) @@ -323,15 +323,15 @@ if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected) return if(iscarbon(target)) - var/mob/living/carbon/C = target - for(var/i in C.all_wounds) - var/datum/wound/W = i - if(W.try_treating(src, user)) + var/mob/living/carbon/carbon_target = target + for(var/i in carbon_target.all_wounds) + var/datum/wound/target_wound = i + if(target_wound.try_treating(src, user)) return // another coward cured! if(istype(user))//Check if the user can use the gun, if the user isn't alive(turrets) assume it can. - var/mob/living/L = user - if(!can_trigger_gun(L)) + var/mob/living/living_user = user + if(!can_trigger_gun(living_user)) return if(flag) if(user.zone_selected == BODY_ZONE_PRECISE_MOUTH) @@ -353,14 +353,14 @@ var/bonus_spread = 0 var/loop_counter = 0 if(ishuman(user) && user.combat_mode) - var/mob/living/carbon/human/H = user - for(var/obj/item/gun/G in H.held_items) - if(G == src || G.weapon_weight >= WEAPON_MEDIUM) + var/mob/living/carbon/human/human_user = user + for(var/obj/item/gun/held_gun in human_user.held_items) + if(held_gun == src || held_gun.weapon_weight >= WEAPON_MEDIUM) continue - else if(G.can_trigger_gun(user)) + else if(held_gun.can_trigger_gun(user)) bonus_spread += dual_wield_spread loop_counter++ - addtimer(CALLBACK(G, /obj/item/gun.proc/process_fire, target, user, TRUE, params, null, bonus_spread), loop_counter) + addtimer(CALLBACK(held_gun, /obj/item/gun.proc/process_fire, target, user, TRUE, params, null, bonus_spread), loop_counter) return process_fire(target, user, TRUE, params, null, bonus_spread) @@ -416,7 +416,7 @@ /obj/item/gun/proc/recharge_newshot() return -/obj/item/gun/proc/process_burst(mob/living/user, atom/target, message = TRUE, params=null, zone_override = "", sprd = 0, randomized_gun_spread = 0, randomized_bonus_spread = 0, rand_spr = 0, iteration = 0) +/obj/item/gun/proc/process_burst(mob/living/user, atom/target, message = TRUE, params = null, zone_override = "", sprd = 0, randomized_gun_spread = 0, randomized_bonus_spread = 0, rand_spr = 0, iteration = 0) if(!user || !firing_burst) firing_burst = FALSE return FALSE @@ -433,8 +433,8 @@ sprd = round((rand(0, 1) - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread)) else //Smart spread sprd = round((((rand_spr/burst_size) * iteration) - (0.5 + (rand_spr * 0.25))) * (randomized_gun_spread + randomized_bonus_spread)) - before_firing(target,user) - if(!chambered.fire_casing(target, user, params, ,suppressed, zone_override, sprd, src)) + before_firing(target, user) + if(!chambered.fire_casing(target, user, params, , suppressed, zone_override, sprd, src)) shoot_with_empty_chamber(user) firing_burst = FALSE return FALSE @@ -475,7 +475,7 @@ base_bonus_spread += 10 if(spread) - randomized_gun_spread = rand(0,spread) + randomized_gun_spread = rand(0, spread) var/randomized_bonus_spread = rand(base_bonus_spread, bonus_spread) if(burst_size > 1) @@ -489,7 +489,7 @@ to_chat(user, span_warning("[src] is lethally chambered! You don't want to risk harming anyone...")) return sprd = round((rand(0, 1) - 0.5) * DUALWIELD_PENALTY_EXTRA_MULTIPLIER * (randomized_gun_spread + randomized_bonus_spread)) - before_firing(target,user) + before_firing(target, user) if(!chambered.fire_casing(target, user, params, , suppressed, zone_override, sprd, src)) shoot_with_empty_chamber(user) return @@ -517,52 +517,52 @@ /obj/item/gun/proc/reset_semicd() semicd = FALSE -/obj/item/gun/attack(mob/M, mob/living/user) +/obj/item/gun/attack(mob/target, mob/living/user) if(user.combat_mode) //Flogging if(bayonet) - M.attackby(bayonet, user) + target.attackby(bayonet, user) return else return ..() return -/obj/item/gun/attack_atom(obj/O, mob/living/user, params) +/obj/item/gun/attack_atom(obj/target, mob/living/user, params) if(user.combat_mode) if(bayonet) - O.attackby(bayonet, user) + target.attackby(bayonet, user) return return ..() -/obj/item/gun/attackby(obj/item/I, mob/living/user, params) +/obj/item/gun/attackby(obj/item/attacking_item, mob/living/user, params) if(user.combat_mode) return ..() - else if(istype(I, /obj/item/flashlight/seclite)) + else if(istype(attacking_item, /obj/item/flashlight/seclite)) if(!can_flashlight) return ..() - var/obj/item/flashlight/seclite/S = I + var/obj/item/flashlight/seclite/attaching_seclite = attacking_item if(!gun_light) - if(!user.transferItemToLoc(I, src)) + if(!user.transferItemToLoc(attacking_item, src)) return - to_chat(user, span_notice("You click [S] into place on [src].")) - set_gun_light(S) + to_chat(user, span_notice("You click [attaching_seclite] into place on [src].")) + set_gun_light(attaching_seclite) update_gunlight() alight = new(src) if(loc == user) alight.Grant(user) - else if(istype(I, /obj/item/knife)) - var/obj/item/knife/K = I - if(!can_bayonet || !K.bayonet || bayonet) //ensure the gun has an attachment point available, and that the knife is compatible with it. + else if(istype(attacking_item, /obj/item/knife)) + var/obj/item/knife/attaching_knife = attacking_item + if(!can_bayonet || !attaching_knife.bayonet || bayonet) //ensure the gun has an attachment point available, and that the knife is compatible with it. return ..() - if(!user.transferItemToLoc(I, src)) + if(!user.transferItemToLoc(attacking_item, src)) return - to_chat(user, span_notice("You attach [K] to [src]'s bayonet lug.")) - bayonet = K + to_chat(user, span_notice("You attach [attaching_knife] to [src]'s bayonet lug.")) + bayonet = attaching_knife update_appearance() else return ..() -/obj/item/gun/screwdriver_act(mob/living/user, obj/item/I) +/obj/item/gun/screwdriver_act(mob/living/user, obj/item/tool) . = ..() if(.) return @@ -573,56 +573,56 @@ var/obj/item/item_to_remove = input(user, "Select an attachment to remove", "Attachment Removal") as null|obj in sort_names(possible_items) if(!item_to_remove || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return - return remove_gun_attachment(user, I, item_to_remove) + return remove_gun_attachment(user, tool, item_to_remove) else if(gun_light && can_flashlight) //if it has a gun_light and can_flashlight is false, the flashlight is permanently attached. - return remove_gun_attachment(user, I, gun_light, "unscrewed") + return remove_gun_attachment(user, tool, gun_light, "unscrewed") else if(bayonet && can_bayonet) //if it has a bayonet, and the bayonet can be removed - return remove_gun_attachment(user, I, bayonet, "unfix") + return remove_gun_attachment(user, tool, bayonet, "unfix") else if(pin && user.is_holding(src)) - user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [I]."), + user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [tool]."), span_notice("You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)"), null, 3) - if(I.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, volume = 50)) + if(tool.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, volume = 50)) if(!pin) //check to see if the pin is still there, or we can spam messages by clicking multiple times during the tool delay return user.visible_message(span_notice("[pin] is pried out of [src] by [user], destroying the pin in the process."), - span_warning("You pry [pin] out with [I], destroying the pin in the process."), null, 3) + span_warning("You pry [pin] out with [tool], destroying the pin in the process."), null, 3) QDEL_NULL(pin) return TRUE -/obj/item/gun/welder_act(mob/living/user, obj/item/I) +/obj/item/gun/welder_act(mob/living/user, obj/item/tool) . = ..() if(.) return if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(pin && user.is_holding(src)) - user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [I]."), + user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [tool]."), span_notice("You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)"), null, 3) - if(I.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, 5, volume = 50)) + if(tool.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, 5, volume = 50)) if(!pin) //check to see if the pin is still there, or we can spam messages by clicking multiple times during the tool delay return user.visible_message(span_notice("[pin] is spliced out of [src] by [user], melting part of the pin in the process."), - span_warning("You splice [pin] out of [src] with [I], melting part of the pin in the process."), null, 3) + span_warning("You splice [pin] out of [src] with [tool], melting part of the pin in the process."), null, 3) QDEL_NULL(pin) return TRUE -/obj/item/gun/wirecutter_act(mob/living/user, obj/item/I) +/obj/item/gun/wirecutter_act(mob/living/user, obj/item/tool) . = ..() if(.) return if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return if(pin && user.is_holding(src)) - user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [I]."), + user.visible_message(span_warning("[user] attempts to remove [pin] from [src] with [tool]."), span_notice("You attempt to remove [pin] from [src]. (It will take [DisplayTimeText(FIRING_PIN_REMOVAL_DELAY)].)"), null, 3) - if(I.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, volume = 50)) + if(tool.use_tool(src, user, FIRING_PIN_REMOVAL_DELAY, volume = 50)) if(!pin) //check to see if the pin is still there, or we can spam messages by clicking multiple times during the tool delay return user.visible_message(span_notice("[pin] is ripped out of [src] by [user], mangling the pin in the process."), - span_warning("You rip [pin] out of [src] with [I], mangling the pin in the process."), null, 3) + span_warning("You rip [pin] out of [src] with [tool], mangling the pin in the process."), null, 3) QDEL_NULL(pin) return TRUE @@ -792,7 +792,7 @@ pin = new /obj/item/firing_pin //Happens before the actual projectile creation -/obj/item/gun/proc/before_firing(atom/target,mob/user) +/obj/item/gun/proc/before_firing(atom/target, mob/user) return ///////////// @@ -819,8 +819,8 @@ if(!. && gun) gun.zoom(owner, owner.dir, FALSE) -/datum/action/toggle_scope_zoom/Remove(mob/living/L) - gun.zoom(L, L.dir, FALSE) +/datum/action/toggle_scope_zoom/Remove(mob/living/user) + gun.zoom(user, user.dir, FALSE) ..() /obj/item/gun/proc/rotate(atom/thing, old_dir, new_dir) @@ -828,7 +828,7 @@ if(ismob(thing)) var/mob/lad = thing - lad.client.view_size.zoomOut(zoom_out_amt, zoom_amt, new_dir) + lad.client?.view_size.zoomOut(zoom_out_amt, zoom_amt, new_dir) /obj/item/gun/proc/zoom(mob/living/user, direc, forced_zoom) if(!user || !user.client) @@ -841,10 +841,10 @@ if(zoomed) RegisterSignal(user, COMSIG_ATOM_DIR_CHANGE, .proc/rotate) - user.client.view_size.zoomOut(zoom_out_amt, zoom_amt, direc) + user.client?.view_size.zoomOut(zoom_out_amt, zoom_amt, direc) else UnregisterSignal(user, COMSIG_ATOM_DIR_CHANGE) - user.client.view_size.zoomIn() + user.client?.view_size.zoomIn() return zoomed //Proc, so that gun accessories/scopes/etc. can easily add zooming. diff --git a/modular_skyrat/master_files/code/modules/reagents/withdrawal/generic_addictions.dm b/modular_skyrat/master_files/code/modules/reagents/withdrawal/generic_addictions.dm index 4d64cf26e28..f62f2eec2e1 100644 --- a/modular_skyrat/master_files/code/modules/reagents/withdrawal/generic_addictions.dm +++ b/modular_skyrat/master_files/code/modules/reagents/withdrawal/generic_addictions.dm @@ -7,22 +7,22 @@ severe_withdrawal_moodlet = /datum/mood_event/nicotine_withdrawal_severe /datum/addiction/nicotine/proc/trigger_random_side_effect(mob/living/carbon/affected_carbon, delta_time, strength) - switch(rand(1,10)) + switch(rand(1, 10)) if(1 to 3) if(!HAS_TRAIT(affected_carbon, TRAIT_NOHUNGER)) - affected_carbon.adjust_nutrition(-delta_time*10*strength) + affected_carbon.adjust_nutrition(-delta_time * 10 * strength) if(3 to 5) affected_carbon.emote("cough") if(5 to 7) to_chat(affected_carbon, span_warning("Your head hurts.")) - affected_carbon.adjustStaminaLoss(4*strength) + affected_carbon.adjustStaminaLoss(4 * strength) if(8) - if(strength>=2) + if(strength >= 2) to_chat(affected_carbon, span_warning("You feel a little dizzy.")) - affected_carbon.Dizzy(3*strength) + affected_carbon.Dizzy(3 * strength) if(8 to 10) to_chat(affected_carbon, span_warning("You feel tired.")) - affected_carbon.adjustStaminaLoss(6*strength) + affected_carbon.adjustStaminaLoss(6 * strength) /datum/addiction/nicotine/withdrawal_enters_stage_1(mob/living/carbon/affected_carbon, delta_time) . = ..() @@ -39,9 +39,9 @@ /datum/addiction/nicotine/withdrawal_stage_2_process(mob/living/carbon/affected_carbon, delta_time) . = ..() if(DT_PROB(3, delta_time)) - trigger_random_side_effect(affected_carbon,delta_time,1) + trigger_random_side_effect(affected_carbon, delta_time, 1) /datum/addiction/nicotine/withdrawal_stage_3_process(mob/living/carbon/affected_carbon, delta_time) . = ..() if(DT_PROB(5, delta_time)) - trigger_random_side_effect(affected_carbon,delta_time,2) + trigger_random_side_effect(affected_carbon, delta_time, 2) diff --git a/modular_skyrat/master_files/code/modules/research/designs/biogenerator_designs.dm b/modular_skyrat/master_files/code/modules/research/designs/biogenerator_designs.dm index 11cf9de2e02..c983b4ce970 100644 --- a/modular_skyrat/master_files/code/modules/research/designs/biogenerator_designs.dm +++ b/modular_skyrat/master_files/code/modules/research/designs/biogenerator_designs.dm @@ -4,7 +4,7 @@ build_type = BIOGENERATOR materials = list(/datum/material/biomass = 600) build_path = /obj/item/storage/belt/medbandolier - category = list("initial","Organic Materials") + category = list("initial", "Organic Materials") /datum/design/biomeat name = "Meat Product" @@ -12,4 +12,4 @@ build_type = BIOGENERATOR materials = list(/datum/material/biomass= 125) //Monkey Cube is more efficient, but this is easier on the chef. build_path = /obj/item/food/meat/slab/meatproduct - category = list("initial","Food") + category = list("initial", "Food") diff --git a/modular_skyrat/master_files/code/modules/shuttle/shuttle.dm b/modular_skyrat/master_files/code/modules/shuttle/shuttle.dm index ddd88b36fce..dd24445c881 100644 --- a/modular_skyrat/master_files/code/modules/shuttle/shuttle.dm +++ b/modular_skyrat/master_files/code/modules/shuttle/shuttle.dm @@ -9,39 +9,39 @@ var/sound_range = 20 -//call the shuttle to destination S -/obj/docking_port/mobile/proc/request(obj/docking_port/stationary/S, forced = FALSE) - if(!check_dock(S) && !forced) +//call the shuttle to destination target_dock +/obj/docking_port/mobile/proc/request(obj/docking_port/stationary/target_dock, forced = FALSE) + if(!check_dock(target_dock) && !forced) testing("check_dock failed on request for [src]") return if(forced) admin_forced = TRUE - if(mode == SHUTTLE_IGNITING && destination == S) + if(mode == SHUTTLE_IGNITING && destination == target_dock) return switch(mode) if(SHUTTLE_CALL) if(!can_be_called_in_transit) //SKYRAT EDIT ADDITION return - if(S == destination) + if(target_dock == destination) if(timeLeft(1) < callTime * engine_coeff) setTimer(callTime * engine_coeff) else - destination = S + destination = target_dock setTimer(callTime * engine_coeff) if(SHUTTLE_RECALL) if(!can_be_called_in_transit) //SKYRAT EDIT ADDITION return - if(S == destination) + if(target_dock == destination) setTimer(callTime * engine_coeff - timeLeft(1)) else - destination = S + destination = target_dock setTimer(callTime * engine_coeff) mode = SHUTTLE_CALL if(SHUTTLE_IDLE, SHUTTLE_IGNITING) - destination = S + destination = target_dock mode = SHUTTLE_IGNITING bolt_all_doors() play_engine_sound(src, TRUE) //SKYRAT EDIT ADDITION @@ -50,8 +50,8 @@ /obj/docking_port/mobile/proc/bolt_all_doors() //Expensive procs :( var/list/turfs = return_ordered_turfs(x, y, z, dir) for(var/i in 1 to turfs.len) - var/turf/T = turfs[i] - for(var/obj/machinery/door/airlock/airlock_door in T) + var/turf/checked_turf = turfs[i] + for(var/obj/machinery/door/airlock/airlock_door in checked_turf) if(airlock_door.external) airlock_door.close(force_crush = TRUE) airlock_door.bolt() @@ -59,20 +59,20 @@ /obj/docking_port/mobile/proc/unbolt_all_doors() var/list/turfs = return_ordered_turfs(x, y, z, dir) for(var/i in 1 to turfs.len) - var/turf/T = turfs[i] - for(var/obj/machinery/door/airlock/airlock_door in T) + var/turf/checked_turf = turfs[i] + for(var/obj/machinery/door/airlock/airlock_door in checked_turf) if(airlock_door.external) airlock_door.unbolt() /obj/docking_port/mobile/proc/play_engine_sound(atom/distant_source, takeoff) if(distant_source) - for(var/mob/M in range(sound_range, distant_source)) - if(M && M.client) - var/dist = get_dist(M.loc, distant_source.loc) - var/vol = clamp(50-((dist-7)*5), 10, 50) //Every tile decreases sound volume by 5 + for(var/mob/hearing_mob in range(sound_range, distant_source)) + if(hearing_mob?.client) + var/dist = get_dist(hearing_mob.loc, distant_source.loc) + var/vol = clamp(50 - ((dist - 7) * 5), 10, 50) //Every tile decreases sound volume by 5 if(takeoff) - if(M.client.prefs.toggles & SOUND_SHIP_AMBIENCE) - M.playsound_local(distant_source, takeoff_sound, vol) + if(hearing_mob.client?.prefs?.toggles & SOUND_SHIP_AMBIENCE) + hearing_mob.playsound_local(distant_source, takeoff_sound, vol) else - if(M.client.prefs.toggles & SOUND_SHIP_AMBIENCE) - M.playsound_local(distant_source, landing_sound, vol) + if(hearing_mob.client?.prefs?.toggles & SOUND_SHIP_AMBIENCE) + hearing_mob.playsound_local(distant_source, landing_sound, vol) diff --git a/modular_skyrat/master_files/code/modules/uplink/uplink_items.dm b/modular_skyrat/master_files/code/modules/uplink/uplink_items.dm index 28b3b2831eb..434c4827a44 100644 --- a/modular_skyrat/master_files/code/modules/uplink/uplink_items.dm +++ b/modular_skyrat/master_files/code/modules/uplink/uplink_items.dm @@ -318,7 +318,7 @@ /datum/uplink_item/loadout_skyrat category = "Loadout" surplus = 0 - cant_discount = TRUE //I honestly don't think discount is worth it for those things, sorry. + cant_discount = TRUE // I honestly don't think discount is worth it for those things, sorry. /datum/uplink_item/loadout_skyrat/recon name = "Reconnaisance bundle" diff --git a/modular_skyrat/master_files/code/modules/vehicles/snowmobile.dm b/modular_skyrat/master_files/code/modules/vehicles/snowmobile.dm index 08a749a50fe..c44c35deb7f 100644 --- a/modular_skyrat/master_files/code/modules/vehicles/snowmobile.dm +++ b/modular_skyrat/master_files/code/modules/vehicles/snowmobile.dm @@ -9,11 +9,11 @@ . = ..() if (QDELETED(src)) return - var/datum/component/riding/E = LoadComponent(/datum/component/riding) + var/datum/component/riding/riding_component = LoadComponent(/datum/component/riding) if(snow_typecache[loc.type]) - E.vehicle_move_delay = 1 + riding_component.vehicle_move_delay = 1 else - E.vehicle_move_delay = 2 + riding_component.vehicle_move_delay = 2 /obj/vehicle/ridden/atv/snowmobile/snowcurity name = "security snowmobile"