From 6ba29acd4e22cabde9e5dd205db8342fd700f922 Mon Sep 17 00:00:00 2001 From: Letter N <24603524+LetterN@users.noreply.github.com> Date: Sat, 22 Aug 2020 16:08:05 +0800 Subject: [PATCH] uses some cit procs. and how the fuck did i forget to componentualize this --- code/__HELPERS/_cit_helpers.dm | 2 +- code/game/machinery/computer/dna_console.dm | 10 ++++++---- code/modules/paperwork/photocopier.dm | 4 ++-- code/modules/station_goals/bsa.dm | 22 ++++++++++++--------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/code/__HELPERS/_cit_helpers.dm b/code/__HELPERS/_cit_helpers.dm index 5e57dd5328..a5ffda36f9 100644 --- a/code/__HELPERS/_cit_helpers.dm +++ b/code/__HELPERS/_cit_helpers.dm @@ -17,7 +17,7 @@ var/matrix/mtrx=new() return mtrx.Scale(0.65) -proc/get_racelist(var/mob/user)//This proc returns a list of species that 'user' has available to them. It searches the list of ckeys attached to the 'whitelist' var for a species and also checks if they're an admin. +/proc/get_racelist(mob/user)//This proc returns a list of species that 'user' has available to them. It searches the list of ckeys attached to the 'whitelist' var for a species and also checks if they're an admin. for(var/spath in subtypesof(/datum/species)) var/datum/species/S = new spath() var/list/wlist = S.whitelist diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 286c106788..3d212ec0cb 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -217,9 +217,6 @@ // already discovered mutations stored_research = SSresearch.science_tech -/obj/machinery/computer/scan_consolenew/examine(mob/user) - . = ..() - /obj/machinery/computer/scan_consolenew/ui_interact(mob/user, datum/tgui/ui) // Most of ui_interact is spent setting variables for passing to the tgui // interface. @@ -266,6 +263,10 @@ if(!ui) ui = new(user, src, "DnaConsole") ui.open() + +/obj/machinery/computer/scan_consolenew/ui_assets() + . = ..() || list() + . += get_asset_datum(/datum/asset/simple/genetics) /obj/machinery/computer/scan_consolenew/ui_data(mob/user) var/list/data = list() @@ -357,7 +358,7 @@ return data -/obj/machinery/computer/scan_consolenew/ui_act(action, var/list/params) +/obj/machinery/computer/scan_consolenew/ui_act(action, list/params) if(..()) return TRUE @@ -482,6 +483,7 @@ // Resolve mutation's BYOND path from the alias var/alias = params["alias"] var/path = GET_MUTATION_TYPE_FROM_ALIAS(alias) + // Make sure the occupant still has this mutation if(!(path in scanner_occupant.dna.mutation_index)) return diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 115a5b944d..5425f0bc4a 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -286,14 +286,14 @@ /obj/machinery/photocopier/proc/make_ass_copy() if(!check_ass()) return - if(ishuman(ass) && (ass.get_item_by_slot(ITEM_SLOT_ICLOTHING) || ass.get_item_by_slot(ITEM_SLOT_OCLOTHING))) + if(ishuman(ass) && ass.is_groin_exposed()) //(ass.get_item_by_slot(ITEM_SLOT_ICLOTHING) || ass.get_item_by_slot(ITEM_SLOT_OCLOTHING))) to_chat(usr, "You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "[ass.p_their()]"] clothes on." ) return var/icon/temp_img if(isalienadult(ass) || istype(ass, /mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro. temp_img = icon('icons/ass/assalien.png') - else if(ishuman(ass)) //Suit checks are in check_ass + else if(ishuman(ass)) //Suit checks are after check_ass temp_img = icon(ass.gender == FEMALE ? 'icons/ass/assfemale.png' : 'icons/ass/assmale.png') else if(isdrone(ass)) //Drones are hot temp_img = icon('icons/ass/assdrone.png') diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index 472734b74b..9ebcfe91d6 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -31,6 +31,7 @@ anchored = TRUE /obj/machinery/bsa/wrench_act(mob/living/user, obj/item/I) + ..() default_unfasten_wrench(user, I, 10) return TRUE @@ -142,17 +143,17 @@ /obj/machinery/bsa/full/proc/get_front_turf() switch(dir) if(WEST) - return locate(x - 6,y,z) + return locate(x - 7,y,z) if(EAST) - return locate(x + 4,y,z) + return locate(x + 7,y,z) return get_turf(src) /obj/machinery/bsa/full/proc/get_back_turf() switch(dir) if(WEST) - return locate(x + 4,y,z) + return locate(x + 5,y,z) if(EAST) - return locate(x - 6,y,z) + return locate(x - 5,y,z) return get_turf(src) /obj/machinery/bsa/full/proc/get_target_turf() @@ -169,11 +170,12 @@ switch(cannon_direction) if(WEST) setDir(WEST) - pixel_x = -192 top_layer.icon_state = "top_west" icon_state = "cannon_west" if(EAST) setDir(EAST) + pixel_x = -128 + bound_x = -128 top_layer.icon_state = "top_east" icon_state = "cannon_east" add_overlay(top_layer) @@ -211,6 +213,7 @@ message_admins("[ADMIN_LOOKUPFLW(user)] has launched an artillery strike targeting [ADMIN_VERBOSEJMP(bullseye)] but it was blocked by [blocker] at [ADMIN_VERBOSEJMP(target)].") log_game("[key_name(user)] has launched an artillery strike targeting [AREACOORD(bullseye)] but it was blocked by [blocker] at [AREACOORD(target)].") + /obj/machinery/bsa/full/proc/reload() ready = FALSE use_power(power_used_per_shot) @@ -293,15 +296,16 @@ /obj/machinery/computer/bsa_control/proc/get_target_name() if(istype(target, /area)) return get_area_name(target, TRUE) - else if(istype(target, /obj/item/gps)) - var/obj/item/gps/G = target + else if(istype(target, /datum/component/gps)) + var/datum/component/gps/G = target return G.gpstag /obj/machinery/computer/bsa_control/proc/get_impact_turf() if(istype(target, /area)) return pick(get_area_turfs(target)) - else if(istype(target, /obj/item/gps)) - return get_turf(target) + else if(istype(target, /datum/component/gps)) + var/datum/component/gps/G = target + return get_turf(G.parent) /obj/machinery/computer/bsa_control/proc/fire(mob/user) if(cannon.stat)