uses some cit procs. and how the fuck did i forget to componentualize this

This commit is contained in:
Letter N
2020-08-22 16:08:05 +08:00
parent 317480a3e7
commit 6ba29acd4e
4 changed files with 22 additions and 16 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
var/matrix/mtrx=new() var/matrix/mtrx=new()
return mtrx.Scale(0.65) 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)) for(var/spath in subtypesof(/datum/species))
var/datum/species/S = new spath() var/datum/species/S = new spath()
var/list/wlist = S.whitelist var/list/wlist = S.whitelist
+6 -4
View File
@@ -217,9 +217,6 @@
// already discovered mutations // already discovered mutations
stored_research = SSresearch.science_tech 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) /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 // Most of ui_interact is spent setting variables for passing to the tgui
// interface. // interface.
@@ -266,6 +263,10 @@
if(!ui) if(!ui)
ui = new(user, src, "DnaConsole") ui = new(user, src, "DnaConsole")
ui.open() 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) /obj/machinery/computer/scan_consolenew/ui_data(mob/user)
var/list/data = list() var/list/data = list()
@@ -357,7 +358,7 @@
return data return data
/obj/machinery/computer/scan_consolenew/ui_act(action, var/list/params) /obj/machinery/computer/scan_consolenew/ui_act(action, list/params)
if(..()) if(..())
return TRUE return TRUE
@@ -482,6 +483,7 @@
// Resolve mutation's BYOND path from the alias // Resolve mutation's BYOND path from the alias
var/alias = params["alias"] var/alias = params["alias"]
var/path = GET_MUTATION_TYPE_FROM_ALIAS(alias) var/path = GET_MUTATION_TYPE_FROM_ALIAS(alias)
// Make sure the occupant still has this mutation // Make sure the occupant still has this mutation
if(!(path in scanner_occupant.dna.mutation_index)) if(!(path in scanner_occupant.dna.mutation_index))
return return
+2 -2
View File
@@ -286,14 +286,14 @@
/obj/machinery/photocopier/proc/make_ass_copy() /obj/machinery/photocopier/proc/make_ass_copy()
if(!check_ass()) if(!check_ass())
return 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, "<span class='notice'>You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "[ass.p_their()]"] clothes on.</span>" ) to_chat(usr, "<span class='notice'>You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "[ass.p_their()]"] clothes on.</span>" )
return return
var/icon/temp_img var/icon/temp_img
if(isalienadult(ass) || istype(ass, /mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro. 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') 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') temp_img = icon(ass.gender == FEMALE ? 'icons/ass/assfemale.png' : 'icons/ass/assmale.png')
else if(isdrone(ass)) //Drones are hot else if(isdrone(ass)) //Drones are hot
temp_img = icon('icons/ass/assdrone.png') temp_img = icon('icons/ass/assdrone.png')
+13 -9
View File
@@ -31,6 +31,7 @@
anchored = TRUE anchored = TRUE
/obj/machinery/bsa/wrench_act(mob/living/user, obj/item/I) /obj/machinery/bsa/wrench_act(mob/living/user, obj/item/I)
..()
default_unfasten_wrench(user, I, 10) default_unfasten_wrench(user, I, 10)
return TRUE return TRUE
@@ -142,17 +143,17 @@
/obj/machinery/bsa/full/proc/get_front_turf() /obj/machinery/bsa/full/proc/get_front_turf()
switch(dir) switch(dir)
if(WEST) if(WEST)
return locate(x - 6,y,z) return locate(x - 7,y,z)
if(EAST) if(EAST)
return locate(x + 4,y,z) return locate(x + 7,y,z)
return get_turf(src) return get_turf(src)
/obj/machinery/bsa/full/proc/get_back_turf() /obj/machinery/bsa/full/proc/get_back_turf()
switch(dir) switch(dir)
if(WEST) if(WEST)
return locate(x + 4,y,z) return locate(x + 5,y,z)
if(EAST) if(EAST)
return locate(x - 6,y,z) return locate(x - 5,y,z)
return get_turf(src) return get_turf(src)
/obj/machinery/bsa/full/proc/get_target_turf() /obj/machinery/bsa/full/proc/get_target_turf()
@@ -169,11 +170,12 @@
switch(cannon_direction) switch(cannon_direction)
if(WEST) if(WEST)
setDir(WEST) setDir(WEST)
pixel_x = -192
top_layer.icon_state = "top_west" top_layer.icon_state = "top_west"
icon_state = "cannon_west" icon_state = "cannon_west"
if(EAST) if(EAST)
setDir(EAST) setDir(EAST)
pixel_x = -128
bound_x = -128
top_layer.icon_state = "top_east" top_layer.icon_state = "top_east"
icon_state = "cannon_east" icon_state = "cannon_east"
add_overlay(top_layer) 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)].") 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)].") 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() /obj/machinery/bsa/full/proc/reload()
ready = FALSE ready = FALSE
use_power(power_used_per_shot) use_power(power_used_per_shot)
@@ -293,15 +296,16 @@
/obj/machinery/computer/bsa_control/proc/get_target_name() /obj/machinery/computer/bsa_control/proc/get_target_name()
if(istype(target, /area)) if(istype(target, /area))
return get_area_name(target, TRUE) return get_area_name(target, TRUE)
else if(istype(target, /obj/item/gps)) else if(istype(target, /datum/component/gps))
var/obj/item/gps/G = target var/datum/component/gps/G = target
return G.gpstag return G.gpstag
/obj/machinery/computer/bsa_control/proc/get_impact_turf() /obj/machinery/computer/bsa_control/proc/get_impact_turf()
if(istype(target, /area)) if(istype(target, /area))
return pick(get_area_turfs(target)) return pick(get_area_turfs(target))
else if(istype(target, /obj/item/gps)) else if(istype(target, /datum/component/gps))
return get_turf(target) var/datum/component/gps/G = target
return get_turf(G.parent)
/obj/machinery/computer/bsa_control/proc/fire(mob/user) /obj/machinery/computer/bsa_control/proc/fire(mob/user)
if(cannon.stat) if(cannon.stat)