diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 4511f8bd5a7..865490aef28 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -381,6 +381,8 @@ if(!welded) if(open) for(var/obj/item/W in src) + if(istype(W, /obj/item/pipe)) + continue W.forceMove(get_turf(src)) diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm index da61e4829c2..1df551e53e7 100644 --- a/code/__DEFINES/admin.dm +++ b/code/__DEFINES/admin.dm @@ -45,19 +45,19 @@ #define R_HOST 65535 -#define ADMIN_QUE(user) "(?)" -#define ADMIN_FLW(user) "(FLW)" -#define ADMIN_PP(user) "(PP)" -#define ADMIN_VV(atom) "(VV)" -#define ADMIN_SM(user) "(SM)" -#define ADMIN_TP(user) "(TP)" -#define ADMIN_BSA(user) "(BSA)" -#define ADMIN_CENTCOM_REPLY(user) "(RPLY)" -#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)" -#define ADMIN_SC(user) "(SC)" -#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]" -#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]" -#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]" +#define ADMIN_QUE(user,display) "[display]" +#define ADMIN_FLW(user,display) "[display]" +#define ADMIN_PP(user,display) "[display]" +#define ADMIN_VV(atom,display) "[display]" +#define ADMIN_SM(user,display) "[display]" +#define ADMIN_TP(user,display) "[display]" +#define ADMIN_BSA(user,display) "[display]" +#define ADMIN_CENTCOM_REPLY(user,display) "[display]" +#define ADMIN_SYNDICATE_REPLY(user,display) "[display]" +#define ADMIN_SC(user,display) "[display]" +#define ADMIN_LOOKUP(user) "[key_name_admin(user)]([ADMIN_QUE(user,"?")])" +#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")])" +#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] ([ADMIN_QUE(user,"?")]) ([ADMIN_PP(user,"PP")]) ([ADMIN_VV(user,"VV")]) ([ADMIN_SM(user,"SM")]) ([ADMIN_FLW(user,"FLW")]) ([ADMIN_TP(user,"TP")])" #define ADMIN_JMP(src) "(JMP)" #define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" #define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] [COORD(src)]" : "nonexistent location" ]" diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 6f14b75b2ec..967749a55a7 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -17,7 +17,8 @@ // /datum signals #define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (/datum/component) #define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (/datum/component) -#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: () +#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation +#define COMSIG_PARENT_QDELETED "parent_qdeleted" //after a datum's Destroy() is called: (force, qdel_hint), at this point none of the other components chose to interrupt qdel and Destroy has been called // /atom signals #define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params) diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm index 8d504edaf41..6adb876da8d 100644 --- a/code/__DEFINES/qdel.dm +++ b/code/__DEFINES/qdel.dm @@ -11,14 +11,12 @@ #define QDEL_HINT_IFFAIL_FINDREFERENCE 6 //Above but only if gc fails. //defines for the gc_destroyed var -#define GC_QUEUE_PREQUEUE 1 -#define GC_QUEUE_CHECK 2 -#define GC_QUEUE_HARDDELETE 3 -#define GC_QUEUE_COUNT 3 //increase this when adding more steps. +#define GC_QUEUE_CHECK 1 +#define GC_QUEUE_HARDDELETE 2 +#define GC_QUEUE_COUNT 2 //increase this when adding more steps. #define GC_QUEUED_FOR_QUEUING -1 -#define GC_QUEUED_FOR_HARD_DEL -2 -#define GC_CURRENTLY_BEING_QDELETED -3 +#define GC_CURRENTLY_BEING_QDELETED -2 #define QDELING(X) (X.gc_destroyed) #define QDELETED(X) (!X || QDELING(X)) diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index b85677ff777..5ade3b0baef 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -18,8 +18,6 @@ //In most cases you want a subsystem instead #define TIMER_LOOP 32 -#define TIMER_NO_INVOKE_WARNING 600 //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something - #define TIMER_ID_NULL -1 //For servers that can't do with any additional lag, set this to none in flightpacks.dm in subsystem/processing. diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 27ec6e7202f..2db8621195d 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -108,11 +108,19 @@ return adjacencies +//do not use, use queue_smooth(atom) /proc/smooth_icon(atom/A) + if(!A || !A.smooth || !A.z) + return if(QDELETED(A)) return - if(A && (A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE)) + if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE)) var/adjacencies = calculate_adjacencies(A) + + if(A.smooth & SMOOTH_DIAGONAL) + A.diagonal_smooth(adjacencies) + else + cardinal_smooth(A, adjacencies) if(A.smooth & SMOOTH_DIAGONAL) A.diagonal_smooth(adjacencies) else @@ -149,12 +157,12 @@ /turf/simulated/wall/diagonal_smooth(adjacencies) adjacencies = reverse_ndir(..()) if(adjacencies) - underlays.Cut() + var/list/U = list() if(fixed_underlay) if(fixed_underlay["space"]) - underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) + U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) else - underlays += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER) + U += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER) else var/turf/T = get_step(src, turn(adjacencies, 180)) if(T && (T.density || T.smooth)) @@ -163,13 +171,14 @@ T = get_step(src, turn(adjacencies, 225)) if(istype(T, /turf/space) && !istype(T, /turf/space/transit)) - underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) + U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) else if(T && !T.density && !T.smooth) - underlays += T + U += T else if(baseturf && !initial(baseturf.density) && !initial(baseturf.smooth)) - underlays += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER) + U += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER) else - underlays += DEFAULT_UNDERLAY_IMAGE + U += DEFAULT_UNDERLAY_IMAGE + underlays = U /proc/cardinal_smooth(atom/A, adjacencies) //NW CORNER @@ -224,43 +233,36 @@ else if(adjacencies & N_EAST) se = "4-e" + var/list/New = list() + if(A.top_left_corner != nw) A.overlays -= A.top_left_corner A.top_left_corner = nw - A.overlays += nw + New += nw if(A.top_right_corner != ne) A.overlays -= A.top_right_corner A.top_right_corner = ne - A.overlays += ne + New += ne if(A.bottom_right_corner != sw) A.overlays -= A.bottom_right_corner A.bottom_right_corner = sw - A.overlays += sw + New += sw if(A.bottom_left_corner != se) A.overlays -= A.bottom_left_corner A.bottom_left_corner = se - A.overlays += se + New += se -/proc/find_type_in_direction(atom/source, direction, range=1) - var/x_offset = 0 - var/y_offset = 0 + if(New.len) + A.overlays.Add(New) - if(direction & NORTH) - y_offset = range - else if(direction & SOUTH) - y_offset -= range - - if(direction & EAST) - x_offset = range - else if(direction & WEST) - x_offset -= range - - var/turf/target_turf = locate(source.x + x_offset, source.y + y_offset, source.z) +/proc/find_type_in_direction(atom/source, direction) + var/turf/target_turf = get_step(source, direction) if(!target_turf) return NULLTURF_BORDER + if(source.canSmoothWith) var/atom/A if(source.smooth & SMOOTH_MORE) @@ -287,22 +289,22 @@ //Icon smoothing helpers -/proc/smooth_icon_neighbors(atom/A) - for(var/V in orange(1,A)) - var/atom/T = V - if(T.smooth) - smooth_icon(T) - -/proc/smooth_zlevel(var/zlevel) +/proc/smooth_zlevel(var/zlevel, now = FALSE) var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)) for(var/V in away_turfs) var/turf/T = V if(T.smooth) - smooth_icon(T) + if(now) + smooth_icon(T) + else + queue_smooth(T) for(var/R in T) var/atom/A = R if(A.smooth) - smooth_icon(A) + if(now) + smooth_icon(A) + else + queue_smooth(A) /atom/proc/clear_smooth_overlays() overlays -= top_left_corner @@ -316,14 +318,16 @@ /atom/proc/replace_smooth_overlays(nw, ne, sw, se) clear_smooth_overlays() + var/list/O = list() top_left_corner = nw - overlays += nw + O += nw top_right_corner = ne - overlays += ne + O += ne bottom_left_corner = sw - overlays += sw + O += sw bottom_right_corner = se - overlays += se + O += se + overlays.Add(O) /proc/reverse_ndir(ndir) switch(ndir) @@ -362,6 +366,21 @@ else return 0 +//SSicon_smooth +/proc/queue_smooth_neighbors(atom/A) + for(var/V in orange(1,A)) + var/atom/T = V + if(T.smooth) + queue_smooth(T) + +//SSicon_smooth +/proc/queue_smooth(atom/A) + if(SSicon_smooth) + SSicon_smooth.smooth_queue[A] = A + SSicon_smooth.can_fire = 1 + else + smooth_icon(A) + //Example smooth wall /turf/simulated/wall/smooth name = "smooth wall" diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index c30b2a3ef0d..1ca1fe01036 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -444,7 +444,7 @@ This is always put in the attack log. to_chat(user, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];") to_chat(user, "Location = [location_description];") to_chat(user, "[special_role_description]") - to_chat(user, "(PM) (PP) (VV) (SM) (FLW) (CA)") + to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)") // Gets the first mob contained in an atom, and warns the user if there's not exactly one /proc/get_mob_in_atom_with_warning(atom/A, mob/user = usr) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 4dd3c56d12f..6ce486bdc05 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1150,6 +1150,11 @@ var/global/list/common_tools = list( return 1 return 0 +/proc/ispowertool(O)//used to check if a tool can force powered doors + if(istype(O, /obj/item/crowbar/power) || istype(O, /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw)) + return TRUE + return FALSE + /proc/iswire(O) if(istype(O, /obj/item/stack/cable_coil)) return 1 diff --git a/code/_compile_options.dm b/code/_compile_options.dm index c6b63b77271..436970567a0 100644 --- a/code/_compile_options.dm +++ b/code/_compile_options.dm @@ -18,7 +18,7 @@ #define MAX_PAPER_MESSAGE_LEN 3072 #define MAX_PAPER_FIELDS 50 #define MAX_BOOK_MESSAGE_LEN 9216 -#define MAX_NAME_LEN 26 +#define MAX_NAME_LEN 50 //diona names can get loooooooong // Version check, terminates compilation if someone is using a version of BYOND that's too old #if DM_VERSION < 510 diff --git a/code/_globalvars/lists/reagents.dm b/code/_globalvars/lists/reagents.dm index 30809943a8a..daa2d634b9f 100644 --- a/code/_globalvars/lists/reagents.dm +++ b/code/_globalvars/lists/reagents.dm @@ -1,9 +1,9 @@ // Base chemicals -var/list/base_chemicals = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon", +GLOBAL_LIST_INIT(base_chemicals, list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon", "chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium", - "iron","aluminum","silicon","sugar","ethanol") + "iron","aluminum","silicon","sugar","ethanol")) // Standard chemicals -var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide", +GLOBAL_LIST_INIT(standard_chemicals, list("slimejelly","blood","water","lube","charcoal","toxin","cyanide", "morphine","epinephrine","space_drugs","serotrotium","oxygen","copper", "nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine", "fluorine","sodium","phosphorus","lithium","sugar","sacid","facid", @@ -15,21 +15,21 @@ var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal "cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant", "fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium", "lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin", - "enzyme","nothing","salglu_solution","antifreeze","neurotoxin") + "enzyme","nothing","salglu_solution","antifreeze","neurotoxin")) // Rare chemicals -var/list/rare_chemicals = list("minttoxin","syndicate_nanites", "xenomicrobes") +GLOBAL_LIST_INIT(rare_chemicals, list("minttoxin","syndicate_nanites", "xenomicrobes")) // Standard medicines -var/list/standard_medicines = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs", +GLOBAL_LIST_INIT(standard_medicines, list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs", "serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine", "salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol", "potass_iodide","pen_acid","mannitol","oculine","styptic_powder", "methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia", "diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin", - "frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin") + "frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")) // Rare medicines -var/list/rare_medicines = list("syndicate_nanites","minttoxin","blood", "xenomicrobes") +GLOBAL_LIST_INIT(rare_medicines, list("syndicate_nanites","minttoxin","blood", "xenomicrobes")) // Drinks -var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice", +GLOBAL_LIST_INIT(drinks, list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice", "berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana", "nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee", "icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb", @@ -44,10 +44,13 @@ var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice "vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead", "mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte", "cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk", - "silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe") + "silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe")) + +//Liver Toxins list +GLOBAL_LIST_INIT(liver_toxins, list("toxin", "plasma", "sacid", "facid", "cyanide","amanitin", "carpotoxin")) //Random chem blacklist -var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_initro", +GLOBAL_LIST_INIT(blocked_chems, list("polonium", "initropidril", "concentrated_initro", "sodium_thiopental", "ketamine", "coniine", "adminordrazine", "nanites", "hellwater", "mutationtoxin", "amutationtoxin", "venom", @@ -55,9 +58,9 @@ var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_i "syndicate_nanites", "ripping_tendrils", "boiling_oil", "envenomed_filaments", "lexorin_jelly", "kinetic", "cryogenic_liquid", "dark_matter", "b_sorium", - "reagent", "life","dragonsbreath", "nanocalcium") + "reagent", "life","dragonsbreath", "nanocalcium")) -var/global/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol", +GLOBAL_LIST_INIT(safe_chem_list, list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol", "omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder", "spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", "hydrocodone", - "mitocholide", "rezadone") \ No newline at end of file + "mitocholide", "rezadone")) \ No newline at end of file diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 006f350873b..8ce2177751c 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -236,6 +236,8 @@ Makes the mob face the direction of the clicked thing */ /mob/proc/MiddleShiftClickOn(atom/A) + if(incapacitated()) + return var/face_dir = get_cardinal_dir(src, A) if(forced_look == face_dir) forced_look = null diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 7c38ee1072a..623d1bb5dd6 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -175,66 +175,111 @@ icon_state = "zone_sel" screen_loc = ui_zonesel var/selecting = "chest" + var/static/list/hover_overlays_cache = list() + var/hovering /obj/screen/zone_sel/Click(location, control,params) + if(isobserver(usr)) + return + var/list/PL = params2list(params) var/icon_x = text2num(PL["icon-x"]) var/icon_y = text2num(PL["icon-y"]) - var/old_selecting = selecting //We're only going to update_icon() if there's been a change + var/choice = get_zone_at(icon_x, icon_y) + if(!choice) + return 1 + return set_selected_zone(choice, usr) + +/obj/screen/zone_sel/MouseEntered(location, control, params) + MouseMove(location, control, params) + +/obj/screen/zone_sel/MouseMove(location, control, params) + if(isobserver(usr)) + return + + var/list/PL = params2list(params) + var/icon_x = text2num(PL["icon-x"]) + var/icon_y = text2num(PL["icon-y"]) + var/choice = get_zone_at(icon_x, icon_y) + + if(hovering == choice) + return + cut_overlay(hover_overlays_cache[hovering]) + hovering = choice + + var/obj/effect/overlay/zone_sel/overlay_object = hover_overlays_cache[choice] + if(!overlay_object) + overlay_object = new + overlay_object.icon_state = "[choice]" + hover_overlays_cache[choice] = overlay_object + add_overlay(overlay_object) + + +/obj/effect/overlay/zone_sel + icon = 'icons/mob/zone_sel.dmi' + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + alpha = 128 + anchored = TRUE + layer = ABOVE_HUD_LAYER + plane = ABOVE_HUD_PLANE + +/obj/screen/zone_sel/MouseExited(location, control, params) + if(!isobserver(usr) && hovering) + cut_overlay(hover_overlays_cache[hovering]) + hovering = null + +/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y) switch(icon_y) if(1 to 3) //Feet switch(icon_x) if(10 to 15) - selecting = "r_foot" + return "r_foot" if(17 to 22) - selecting = "l_foot" - else - return 1 + return "l_foot" if(4 to 9) //Legs switch(icon_x) if(10 to 15) - selecting = "r_leg" + return "r_leg" if(17 to 22) - selecting = "l_leg" - else - return 1 + return "l_leg" if(10 to 13) //Hands and groin switch(icon_x) if(8 to 11) - selecting = "r_hand" + return "r_hand" if(12 to 20) - selecting = "groin" + return "groin" if(21 to 24) - selecting = "l_hand" - else - return 1 + return "l_hand" if(14 to 22) //Chest and arms to shoulders switch(icon_x) if(8 to 11) - selecting = "r_arm" + return "r_arm" if(12 to 20) - selecting = "chest" + return "chest" if(21 to 24) - selecting = "l_arm" - else - return 1 + return "l_arm" if(23 to 30) //Head, but we need to check for eye or mouth if(icon_x in 12 to 20) - selecting = "head" switch(icon_y) if(23 to 24) if(icon_x in 15 to 17) - selecting = "mouth" + return "mouth" if(26) //Eyeline, eyes are on 15 and 17 if(icon_x in 14 to 18) - selecting = "eyes" + return "eyes" if(25 to 27) if(icon_x in 15 to 17) - selecting = "eyes" + return "eyes" + return "head" - if(old_selecting != selecting) - update_icon() +/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user) + if(isobserver(user)) + return + + if(choice != selecting) + selecting = choice + update_icon(usr) return 1 /obj/screen/zone_sel/update_icon() diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 97dd02838d0..c1cb90919f5 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -59,7 +59,6 @@ SUBSYSTEM_DEF(garbage) msg += " | Fail:[fail_counts.Join(",")]" ..(msg) - /datum/controller/subsystem/garbage/Shutdown() //Adds the del() log to the qdel log file var/list/dellog = list() @@ -86,41 +85,21 @@ SUBSYSTEM_DEF(garbage) /datum/controller/subsystem/garbage/fire() //the fact that this resets its processing each fire (rather then resume where it left off) is intentional. - var/queue = GC_QUEUE_PREQUEUE + var/queue = GC_QUEUE_CHECK while(state == SS_RUNNING) switch(queue) - if(GC_QUEUE_PREQUEUE) - HandlePreQueue() - queue = GC_QUEUE_PREQUEUE + 1 if(GC_QUEUE_CHECK) HandleQueue(GC_QUEUE_CHECK) queue = GC_QUEUE_CHECK + 1 if(GC_QUEUE_HARDDELETE) HandleQueue(GC_QUEUE_HARDDELETE) + if(state == SS_PAUSED) //make us wait again before the next run. + state = SS_RUNNING break - if(state == SS_PAUSED) //make us wait again before the next run. - state = SS_RUNNING -//If you see this proc high on the profile, what you are really seeing is the garbage collection/soft delete overhead in byond. -//Don't attempt to optimize, not worth the effort. -/datum/controller/subsystem/garbage/proc/HandlePreQueue() - var/list/tobequeued = queues[GC_QUEUE_PREQUEUE] - var/static/count = 0 - if(count) - var/c = count - count = 0 //so if we runtime on the Cut, we don't try again. - tobequeued.Cut(1, c + 1) - for(var/ref in tobequeued) - count++ - Queue(ref, GC_QUEUE_PREQUEUE + 1) - if(MC_TICK_CHECK) - break - if(count) - tobequeued.Cut(1, count + 1) - count = 0 /datum/controller/subsystem/garbage/proc/HandleQueue(level = GC_QUEUE_CHECK) if(level == GC_QUEUE_CHECK) @@ -142,7 +121,7 @@ SUBSYSTEM_DEF(garbage) if(!refID) count++ if(MC_TICK_CHECK) - break + return continue var/GCd_at_time = queue[refID] @@ -161,7 +140,7 @@ SUBSYSTEM_DEF(garbage) reference_find_on_fail -= refID //It's deleted we don't care anymore. #endif if(MC_TICK_CHECK) - break + return continue // Something's still referring to the qdel'd object. @@ -184,27 +163,20 @@ SUBSYSTEM_DEF(garbage) if(GC_QUEUE_HARDDELETE) HardDelete(D) if(MC_TICK_CHECK) - break + return continue Queue(D, level + 1) if(MC_TICK_CHECK) - break + return if(count) queue.Cut(1, count + 1) count = 0 -/datum/controller/subsystem/garbage/proc/PreQueue(datum/D) - if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) - queues[GC_QUEUE_PREQUEUE] += D - D.gc_destroyed = GC_QUEUED_FOR_QUEUING - /datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_CHECK) if(isnull(D)) return - if(D.gc_destroyed == GC_QUEUED_FOR_HARD_DEL) - level = GC_QUEUE_HARDDELETE if(level > GC_QUEUE_COUNT) HardDelete(D) return @@ -250,11 +222,6 @@ SUBSYSTEM_DEF(garbage) message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time / 10] seconds to delete).") postpone(time) -/datum/controller/subsystem/garbage/proc/HardQueue(datum/D) - if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) - queues[GC_QUEUE_PREQUEUE] += D - D.gc_destroyed = GC_QUEUED_FOR_HARD_DEL - /datum/controller/subsystem/garbage/Recover() if(istype(SSgarbage.queues)) for(var/i in 1 to SSgarbage.queues.len) @@ -294,11 +261,13 @@ SUBSYSTEM_DEF(garbage) if(isnull(D.gc_destroyed)) - D.SendSignal(COMSIG_PARENT_QDELETED) + if(D.SendSignal(COMSIG_PARENT_PREQDELETED, force)) // Give the components a chance to prevent their parent from being deleted + return D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED var/start_time = world.time var/start_tick = world.tick_usage var/hint = D.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up. + D.SendSignal(COMSIG_PARENT_QDELETED, force, hint) // Let the (remaining) components know about the result of Destroy if(world.time != start_time) I.slept_destroy++ else @@ -307,7 +276,7 @@ SUBSYSTEM_DEF(garbage) return switch(hint) if(QDEL_HINT_QUEUE) //qdel should queue the object for deletion. - SSgarbage.PreQueue(D) + SSgarbage.Queue(D) if(QDEL_HINT_IWILLGC) D.gc_destroyed = world.time return @@ -327,18 +296,18 @@ SUBSYSTEM_DEF(garbage) #endif I.no_respect_force++ - SSgarbage.PreQueue(D) - if(QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete using a hard reference to save time from the locate() - SSgarbage.HardQueue(D) + SSgarbage.Queue(D) + if(QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete + SSgarbage.Queue(D, GC_QUEUE_HARDDELETE) if(QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste. SSgarbage.HardDelete(D) if(QDEL_HINT_FINDREFERENCE)//qdel will, if TESTING is enabled, display all references to this object, then queue the object for deletion. - SSgarbage.PreQueue(D) + SSgarbage.Queue(D) #ifdef TESTING D.find_references() #endif if(QDEL_HINT_IFFAIL_FINDREFERENCE) - SSgarbage.PreQueue(D) + SSgarbage.Queue(D) #ifdef TESTING SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE #endif @@ -348,7 +317,7 @@ SUBSYSTEM_DEF(garbage) testing("WARNING: [D.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.") #endif I.no_hint++ - SSgarbage.PreQueue(D) + SSgarbage.Queue(D) else if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED) CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic") @@ -463,4 +432,4 @@ SUBSYSTEM_DEF(garbage) CHECK_TICK #endif -#endif +#endif \ No newline at end of file diff --git a/code/controllers/subsystem/icon_smooth.dm b/code/controllers/subsystem/icon_smooth.dm new file mode 100644 index 00000000000..65260e5af55 --- /dev/null +++ b/code/controllers/subsystem/icon_smooth.dm @@ -0,0 +1,32 @@ +SUBSYSTEM_DEF(icon_smooth) + name = "Icon Smoothing" + init_order = INIT_ORDER_ICON_SMOOTHING + wait = 1 + priority = FIRE_PRIOTITY_SMOOTHING + flags = SS_TICKER + + var/list/smooth_queue = list() + +/datum/controller/subsystem/icon_smooth/fire() + while(smooth_queue.len) + var/atom/A = smooth_queue[smooth_queue.len] + smooth_queue.len-- + smooth_icon(A) + if(MC_TICK_CHECK) + return + if(!smooth_queue.len) + can_fire = 0 + +/datum/controller/subsystem/icon_smooth/Initialize() + smooth_zlevel(1,TRUE) + smooth_zlevel(2,TRUE) + var/queue = smooth_queue + smooth_queue = list() + for(var/V in queue) + var/atom/A = V + if(!A || A.z <= 2) + continue + smooth_icon(A) + CHECK_TICK + + ..() diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index e2539ebdf06..4bbc44c218a 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -10,7 +10,7 @@ SUBSYSTEM_DEF(timer) flags = SS_TICKER|SS_NO_INIT - var/list/second_queue = list() //awe, yes, you've had first queue, but what about second queue? Contains: /datum/timedevent + var/list/second_queue = list() //awe, yes, you've had first queue, but what about second queue? var/list/hashes = list() var/head_offset = 0 //world.time of the first entry in the the bucket. @@ -38,15 +38,15 @@ SUBSYSTEM_DEF(timer) /datum/controller/subsystem/timer/fire(resumed = FALSE) var/lit = last_invoke_tick - var/last_check = world.time - TIMER_NO_INVOKE_WARNING + var/last_check = world.time - TICKS2DS(BUCKET_LEN*1.5) var/list/bucket_list = src.bucket_list if(!bucket_count) last_invoke_tick = world.time - if(lit && lit < last_check && last_invoke_warning < last_check) + if(lit && lit < last_check && head_offset < last_check && last_invoke_warning < last_check) last_invoke_warning = world.time - var/msg = "No regular timers processed in the last [TIMER_NO_INVOKE_WARNING] ticks[bucket_auto_reset ? ", resetting buckets" : ""]!" + var/msg = "No regular timers processed in the last [BUCKET_LEN*1.5] ticks[bucket_auto_reset ? ", resetting buckets" : ""]!" message_admins(msg) WARNING(msg) if(bucket_auto_reset) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 1a78f8be2ca..653cc0020bc 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -261,9 +261,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(istype(target,/mob/living) && message) to_chat(target, text("[message]")) if(sparks_spread) - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() - sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is - sparks.start() + do_sparks(sparks_amt, 0, location) if(smoke_spread) if(smoke_spread == 1) var/datum/effect_system/smoke_spread/smoke = new @@ -328,10 +326,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/targeted/choose_targets(mob/user = usr) var/list/targets = list() - + switch(max_targets) if(0) //unlimited - + if(!humans_only) for(var/mob/living/target in view_or_range(range, user, selection_type)) targets += target @@ -344,7 +342,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin targets += user else var/possible_targets = list() - + if(!humans_only) for(var/mob/living/M in view_or_range(range, user, selection_type)) if(!include_user && user == M) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index ef439049611..766203f5330 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -220,7 +220,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 5 job = list("Chief Medical Officer", "Medical Doctor", "Geneticist", "Psychiatrist", "Chemist", "Paramedic", "Coroner", "Virologist") -/datum/uplink_item/dangerous/cat_grenade +/datum/uplink_item/jobspecific/cat_grenade name = "Feral Cat Delivery Grenade" desc = "The feral cat delivery grenade contains 8 dehydrated feral cats in a similar manner to dehydrated monkeys, which, upon detonation, will be rehydrated by a small reservoir of water contained within the grenade. These cats will then attack anything in sight." item = /obj/item/grenade/spawnergrenade/feral_cats @@ -960,6 +960,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 1 surplus = 20 +/datum/uplink_item/stealthy_tools/clownkit + name = "Honk Brand Infiltration Kit" + desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer clown mask, magnetic clown shoes, and standard clown outfit, tools, and backpack." + reference = "HBIK" + item = /obj/item/storage/backpack/clown/syndie + cost = 6 + gamemodes = list(/datum/game_mode/nuclear) + surplus = 0 + // DEVICE AND TOOLS /datum/uplink_item/device_tools diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm index d661e320dd8..b7036f9fbdc 100644 --- a/code/defines/procs/admin.dm +++ b/code/defines/procs/admin.dm @@ -46,7 +46,7 @@ . += "Administrator" else if(include_link && C) - . += "" + . += "" . += key if(include_link) @@ -68,8 +68,10 @@ return . /proc/key_name_admin(whom) - var/message = "[key_name(whom, 1)](?)[isAntag(whom) ? "(A)" : ""][isLivingSSD(whom) ? "(SSD!)" : ""] ([admin_jump_link(whom)])" - return message + if(whom) + var/datum/whom_datum = whom //As long as it's not null, will be close enough/has the proc UID() that is all that's needed + var/message = "[key_name(whom, 1)]([ADMIN_QUE(whom_datum,"?")])[isAntag(whom) ? "(A)" : ""][isLivingSSD(whom) ? "(SSD!)" : ""] ([admin_jump_link(whom)])" + return message /proc/key_name_mentor(whom) // Same as key_name_admin, but does not include (?) or (A) for antags. diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index fa6a1a93405..9993388afec 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -52,7 +52,8 @@ IO.rejuvenate() IO.trace_chemicals.Cut() H.remove_all_embedded_objects() - user.updatehealth() + user.status_flags &= ~(FAKEDEATH) + user.updatehealth("revive sting") user.update_blind_effects() user.update_blurry_effects() @@ -60,7 +61,6 @@ user.regenerate_icons() - user.status_flags &= ~(FAKEDEATH) user.update_revive() //Handle waking up the changeling after the regenerative stasis has completed. user.mind.changeling.purchasedpowers -= src user.med_hud_set_status() diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm index 2a1d9166370..8bd5fc3cc4f 100644 --- a/code/game/gamemodes/cult/cult_comms.dm +++ b/code/game/gamemodes/cult/cult_comms.dm @@ -34,6 +34,6 @@ if(iscultist(M)) to_chat(M, my_message) else if(M in GLOB.dead_mob_list) - to_chat(M, " (F) [my_message] ") + to_chat(M, " (F) [my_message] ") - log_say("(CULT) [message]", user) \ No newline at end of file + log_say("(CULT) [message]", user) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 28f6fd4544a..05a29a5f3f4 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -561,9 +561,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} /obj/item/restraints/handcuffs/energy/used/dropped(mob/user) user.visible_message("[user]'s [src] break in a discharge of energy!", \ "[user]'s [src] break in a discharge of energy!") - var/datum/effect_system/spark_spread/S = new - S.set_up(4,0,user.loc) - S.start() + do_sparks(4, 0, user.loc) . = ..() /obj/item/abductor_baton/examine(mob/user) diff --git a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm index ce30708a76f..f7ff2864608 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm @@ -46,7 +46,5 @@ duration = 80 /obj/effect/temp_visual/teleport_abductor/New() - var/datum/effect_system/spark_spread/S = new - S.set_up(10,0,loc) - S.start() + do_sparks(10, 0, loc) ..() \ No newline at end of file diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 5543a54caa6..6cdfdc736d9 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -91,6 +91,7 @@ ) var/talk_inside_host = FALSE // So that borers don't accidentally give themselves away on a botched message var/used_dominate + var/attempting_to_dominate = FALSE // To prevent people from spam opening the Dominate Victim input var/chemicals = 10 // Chemicals used for reproduction and chemical injection. var/max_chems = 250 var/mob/living/carbon/human/host // Human host for the brain worm. @@ -325,6 +326,9 @@ to_chat(src, "You cannot infest someone who is already infested!") return + if(incapacitated()) + return + to_chat(src, "You slither up [M] and begin probing at [M.p_their()] ear canal...") if(!do_after(src, 50, target = M)) @@ -471,7 +475,7 @@ set category = "Borer" set name = "Dominate Victim" set desc = "Freeze the limbs of a potential host with supernatural fear." - + if(world.time - used_dominate < 150) to_chat(src, "You cannot use that ability again so soon.") return @@ -483,23 +487,43 @@ if(stat) to_chat(src, "You cannot do that in your current state.") return - + + if(attempting_to_dominate) + to_chat(src, "You're already targeting someone!") + return + var/list/choices = list() for(var/mob/living/carbon/C in view(3,src)) if(C.stat != DEAD) choices += C - + if(world.time - used_dominate < 300) to_chat(src, "You cannot use that ability again so soon.") return - + + attempting_to_dominate = TRUE + var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices - if(!M || !src) + if(!M) + attempting_to_dominate = FALSE + return + + if(!src) //different statement to avoid a runtime since if the source is deleted then attempting_to_dominate would also be deleted return if(M.has_brain_worms()) to_chat(src, "You cannot dominate someone who is already infested!") + attempting_to_dominate = FALSE + return + + if(incapacitated()) + attempting_to_dominate = FALSE + return + + if(get_dist(src, M) > 7) //to avoid people remotely doing from across the map etc, 7 is the default view range + to_chat(src, "You're too far away!") + attempting_to_dominate = FALSE return to_chat(src, "You focus your psychic lance on [M] and freeze [M.p_their()] limbs with a wave of terrible dread.") @@ -507,6 +531,7 @@ M.Weaken(3) used_dominate = world.time + attempting_to_dominate = FALSE /mob/living/simple_animal/borer/verb/release_host() set category = "Borer" diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index fed089ee979..bd08ff210d5 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -251,6 +251,12 @@ var/ling_failure = "The deck refuses to respond to a souless creature such as you." var/list/possible_guardians = list("Chaos", "Standard", "Ranged", "Support", "Explosive", "Assassin", "Lightning", "Charger", "Protector") var/random = TRUE + var/color_list = list("Pink" = "#FFC0CB", + "Red" = "#FF0000", + "Orange" = "#FFA500", + "Green" = "#008000", + "Blue" = "#0000FF") + var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces") /obj/item/guardiancreator/attack_self(mob/living/user) for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.living_mob_list) @@ -275,15 +281,19 @@ to_chat(user, "[failure_message]") used = FALSE +/obj/item/guardiancreator/examine(mob/user, distance) + . = ..() + if(used) + to_chat(user, "[used_message]") -/obj/item/guardiancreator/proc/spawn_guardian(var/mob/living/user, var/key) - var/gaurdiantype = "Standard" +/obj/item/guardiancreator/proc/spawn_guardian(mob/living/user, key) + var/guardian_type = "Standard" if(random) - gaurdiantype = pick(possible_guardians) + guardian_type = pick(possible_guardians) else - gaurdiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians + guardian_type = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians var/pickedtype = /mob/living/simple_animal/hostile/guardian/punch - switch(gaurdiantype) + switch(guardian_type) if("Chaos") pickedtype = /mob/living/simple_animal/hostile/guardian/fire @@ -325,84 +335,19 @@ user.verbs += /mob/living/proc/guardian_recall user.verbs += /mob/living/proc/guardian_reset - var/color - - //names and their RGB - var/magic_list = list("Pink" = "#FFC0CB", \ - "Red" = "#FF0000", \ - "Orange" = "#FFA500", \ - "Green" = "#008000", \ - "Blue" = "#0000FF") - - var/tech_list = list("Rose" = "#F62C6B", \ - "Peony" = "#E54750", \ - "Lily" = "#F6562C", \ - "Daisy" = "#ECCD39", \ - "Zinnia" = "#89F62C", \ - "Ivy" = "#5DF62C", \ - "Iris" = "#2CF6B8", \ - "Petunia" = "#51A9D4", \ - "Violet" = "#8A347C", \ - "Lilac" = "#C7A0F6", \ - "Orchid" = "#F62CF5") - - var/bio_list = list("Rose" = "#F62C6B", \ - "Peony" = "#E54750", \ - "Lily" = "#F6562C", \ - "Daisy" = "#ECCD39", \ - "Zinnia" = "#89F62C", \ - "Ivy" = "#5DF62C", \ - "Iris" = "#2CF6B8", \ - "Petunia" = "#51A9D4", \ - "Violet" = "#8A347C", \ - "Lilac" = "#C7A0F6", \ - "Orchid" = "#F62CF5") - - var/picked_name -// var/picked_color = pick("#FFFFFF","#000000","#808080","#A52A2A","#FF0000","#8B0000","#DC143C","#FFA500","#FFFF00","#008000","#00FF00","#006400","#00FFFF","#0000FF","#000080","#008080","#800080","#4B0082") - - switch(theme) - if("magic") - color = pick(magic_list) - G.name_color = magic_list[color] - picked_name = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces") - - G.name = "[picked_name] [color]" - G.real_name = "[picked_name] [color]" - G.icon_living = "[theme][color]" - G.icon_state = "[theme][color]" - G.icon_dead = "[theme][color]" - - to_chat(user, "[G.magic_fluff_string].") - if("tech") - color = pick(tech_list) //technically not colors, just flowers that can be specific colors - G.name_color = tech_list[color] - picked_name = pick("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium") - - G.name = "[picked_name] [color]" - G.real_name = "[picked_name] [color]" - G.icon_living = "[theme][color]" - G.icon_state = "[theme][color]" - G.icon_dead = "[theme][color]" - - to_chat(user, "[G.tech_fluff_string].") - G.speak_emote = list("states") - if("bio") - color = pick(bio_list) //technically not colors, just using the same flowers as tech currerntly - G.name_color = tech_list[color] - picked_name = pick("brood", "hive", "nest") - to_chat(user, "[G.bio_fluff_string].") - - G.name = "[color] [picked_name]" - G.real_name = "[color] [picked_name]" - G.icon_living = "[theme][color]" - G.icon_state = "[theme][color]" - G.icon_dead = "[theme][color]" - - to_chat(user, "[G.bio_fluff_string].") - G.attacktext = "swarms" - G.speak_emote = list("chitters") + var/color = pick(color_list) + G.name_color = color_list[color] + var/picked_name = pick(name_list) + create_theme(G, user, picked_name, color) +/obj/item/guardiancreator/proc/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) + G.name = "[picked_name] [color]" + G.real_name = "[picked_name] [color]" + G.icon_living = "[theme][color]" + G.icon_state = "[theme][color]" + G.icon_dead = "[theme][color]" + to_chat(user, "[G.magic_fluff_string].") + /obj/item/guardiancreator/choose random = FALSE @@ -417,6 +362,27 @@ used_message = "The injector has already been used." failure_message = "...ERROR. BOOT SEQUENCE ABORTED. AI FAILED TO INTIALIZE. PLEASE CONTACT SUPPORT OR TRY AGAIN LATER." ling_failure = "The holoparasites recoil in horror. They want nothing to do with a creature like you." + color_list = list("Rose" = "#F62C6B", + "Peony" = "#E54750", + "Lily" = "#F6562C", + "Daisy" = "#ECCD39", + "Zinnia" = "#89F62C", + "Ivy" = "#5DF62C", + "Iris" = "#2CF6B8", + "Petunia" = "#51A9D4", + "Violet" = "#8A347C", + "Lilac" = "#C7A0F6", + "Orchid" = "#F62CF5") + name_list = list("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium") + +/obj/item/guardiancreator/tech/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) + G.name = "[picked_name] [color]" + G.real_name = "[picked_name] [color]" + G.icon_living = "[theme][color]" + G.icon_state = "[theme][color]" + G.icon_dead = "[theme][color]" + to_chat(user, "[G.tech_fluff_string].") + G.speak_emote = list("states") /obj/item/guardiancreator/tech/check_uplink_validity() return !used @@ -434,6 +400,28 @@ use_message = "The eggs begin to twitch..." used_message = "The cluster already hatched." failure_message = "...but soon settles again. Guess they weren't ready to hatch after all." + color_list = list("Rose" = "#F62C6B", + "Peony" = "#E54750", + "Lily" = "#F6562C", + "Daisy" = "#ECCD39", + "Zinnia" = "#89F62C", + "Ivy" = "#5DF62C", + "Iris" = "#2CF6B8", + "Petunia" = "#51A9D4", + "Violet" = "#8A347C", + "Lilac" = "#C7A0F6", + "Orchid" = "#F62CF5") + name_list = list("brood", "hive", "nest") + +/obj/item/guardiancreator/biological/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color) + G.name = "[color] [picked_name]" + G.real_name = "[color] [picked_name]" + G.icon_living = "[theme][color]" + G.icon_state = "[theme][color]" + G.icon_dead = "[theme][color]" + to_chat(user, "[G.bio_fluff_string].") + G.attacktext = "swarms" + G.speak_emote = list("chitters") /obj/item/guardiancreator/biological/choose random = FALSE diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index d75a1bd6d52..afae458a58d 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -102,7 +102,7 @@ if(istype(M, /mob/living/simple_animal/revenant)) to_chat(M, rendered) if(isobserver(M)) - to_chat(M, "(F) [rendered]") + to_chat(M, "(F) [rendered]") return /mob/living/simple_animal/revenant/Stat() diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 5a7825c0cfe..c201b1bc45d 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -209,9 +209,7 @@ if(!L.on) return L.visible_message("\The [L] suddenly flares brightly and begins to spark!") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread/ - s.set_up(4, 0, L) - s.start() + do_sparks(4, 0, L) new/obj/effect/temp_visual/revenant(L.loc) sleep(20) if(!L.on) //wait, wait, don't shock me @@ -222,9 +220,7 @@ return M.Beam(L,icon_state="purple_lightning",icon='icons/effects/effects.dmi',time=5) M.electrocute_act(shock_damage, "[L.name]", safety=1) - var/datum/effect_system/spark_spread/z = new /datum/effect_system/spark_spread/ - z.set_up(4, 0, M) - z.start() + do_sparks(4, 0, M) playsound(M, 'sound/machines/defib_zap.ogg', 50, 1, -1) //Defile: Corrupts nearby stuff, unblesses floor tiles. diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 257126e8586..11baf813890 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -267,7 +267,7 @@ if(beingborged) to_chat(rev_mind.current, "The frame's firmware detects and deletes your neural reprogramming! You remember nothing[remove_head ? "." : " but the name of the one who flashed you."]") - message_admins("[key_name_admin(rev_mind.current)] ? (FLW) has been borged while being a [remove_head ? "leader" : " member"] of the revolution.") + message_admins("[key_name_admin(rev_mind.current)] [ADMIN_QUE(rev_mind.current,"?")] ([ADMIN_FLW(rev_mind.current,"FLW")]) has been borged while being a [remove_head ? "leader" : " member"] of the revolution.") else rev_mind.current.Paralyse(5) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 63e37911224..d2c3cc2c72e 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -540,9 +540,7 @@ to_chat(S, "ERROR $!(@ ERROR )#^! SENSORY OVERLOAD \[$(!@#") S << 'sound/misc/interference.ogg' playsound(S, 'sound/machines/warning-buzzer.ogg', 50, 1) - var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread - sp.set_up(5, 1, S) - sp.start() + do_sparks(5, 1, S) S.Weaken(6) for(var/obj/structure/window/W in T.contents) W.take_damage(rand(80, 100)) diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm index 260f809334c..c6992f99b98 100644 --- a/code/game/gamemodes/wizard/godhand.dm +++ b/code/game/gamemodes/wizard/godhand.dm @@ -48,9 +48,7 @@ if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad return var/mob/M = target - var/datum/effect_system/spark_spread/sparks = new - sparks.set_up(4, 0, M.loc) //no idea what the 0 is - sparks.start() + do_sparks(4, 0, M.loc) //no idea what the 0 is M.gib() ..() @@ -84,9 +82,7 @@ /obj/item/melee/touch_attack/fake_disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity) if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //not exploding after touching yourself would be bad return - var/datum/effect_system/spark_spread/sparks = new - sparks.set_up(4, 0, target.loc) //no idea what the 0 is - sparks.start() + do_sparks(4, 0, target.loc) playsound(target.loc, 'sound/goonstation/effects/gib.ogg', 50, 1) ..() diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 418539b5bed..494da86d680 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -215,7 +215,7 @@ if(isturf(placed_in)) to_chat(H, "Placing [G.display_name] on [placed_in]!") else - to_chat(H, "Placing [G.display_name] in [placed_in.name]") + to_chat(H, "Placing [G.display_name] in [placed_in.name].") continue if(H.equip_to_appropriate_slot(G)) to_chat(H, "Placing [G.display_name] in your inventory!") diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 5d5e6bd9511..604ac3f02f3 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -217,9 +217,7 @@ for(var/turf/T in linkedholodeck) if(prob(30)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, T) - s.start() + do_sparks(2, 1, T) T.ex_act(3) T.hotspot_expose(1000,500,1) @@ -257,9 +255,7 @@ if(L.name=="Atmospheric Test Start") spawn(20) var/turf/T = get_turf(L) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, T) - s.start() + do_sparks(2, 1, T) if(T) T.temperature = 5000 T.hotspot_expose(50000,50000,1)*/ @@ -306,9 +302,7 @@ /* if(L.name=="Atmospheric Test Start") spawn(20) var/turf/T = get_turf(L) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, T) - s.start() + do_sparks(2, 1, T) if(T) T.temperature = 5000 T.hotspot_expose(50000,50000,1)*/ diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 4f2d3801526..9d7310c1c66 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -502,11 +502,11 @@ if(SSshuttle.cancelEvac(user)) log_game("[key_name(user)] has recalled the shuttle.") - message_admins("[key_name_admin(user)] has recalled the shuttle - [ADMIN_FLW(user)].", 1) + message_admins("[key_name_admin(user)] has recalled the shuttle - ([ADMIN_FLW(user,"FLW")]).", 1) else to_chat(user, "Central Command has refused the recall request!") log_game("[key_name(user)] has tried and failed to recall the shuttle.") - message_admins("[key_name_admin(user)] has tried and failed to recall the shuttle - [ADMIN_FLW(user)].", 1) + message_admins("[key_name_admin(user)] has tried and failed to recall the shuttle - ([ADMIN_FLW(user,"FLW")]).", 1) /proc/post_status(command, data1, data2, mob/user = null) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index bcbe7a07e5d..87d35c2d7b4 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -14,8 +14,6 @@ circuit = /obj/item/circuitboard/message_monitor //Server linked to. var/obj/machinery/message_server/linkedServer = null - //Sparks effect - For emag - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread //Messages - Saves me time if I want to change something. var/noserver = "ALERT: No server detected." var/incorrectkey = "ALERT: Incorrect decryption key!" @@ -56,8 +54,7 @@ icon_screen = hack_icon // An error screen I made in the computers.dmi emag = 1 screen = 2 - spark_system.set_up(5, 0, src) - src.spark_system.start() + do_sparks(5, 0, src) var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey MK.loc = src.loc playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 62bb8f75873..4c75e5dca8a 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -1,5 +1,6 @@ /obj/machinery/atmospherics/unary/cryo_cell name = "cryo cell" + desc = "Lowers the body temperature so certain medications may take effect." icon = 'icons/obj/cryogenics.dmi' icon_state = "pod0" density = 1 diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index af63a92e2ff..b6a02aacfd0 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -149,9 +149,7 @@ playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) return visible_message("The console sparks, and some items fall out!") - var/datum/effect_system/spark_spread/sparks = new - sparks.set_up(5, 1, src) - sparks.start() + do_sparks(5, 1, src) for(var/obj/item/I in objective_items) dispense_item(I) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 8c47855731f..a3ad1bae19f 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -188,9 +188,7 @@ for reference: to_chat(user, "Barrier lock toggled off.") return else - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() + do_sparks(2, 1, src) visible_message("BZZzZZzZZzZT") return return @@ -223,16 +221,12 @@ for reference: emagged = 1 req_access = null to_chat(user, "You break the ID authentication lock on the [src].") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() + do_sparks(2, 1, src) visible_message("BZZzZZzZZzZT") else if(src.emagged == 1) src.emagged = 2 to_chat(user, "You short out the anchoring mechanism on the [src].") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() + do_sparks(2, 1, src) visible_message("BZZzZZzZZzZT") ex_act(severity) @@ -275,9 +269,7 @@ for reference: /* var/obj/item/stack/rods/ =*/ new /obj/item/stack/rods(Tsec) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) explosion(src.loc,-1,-1,0) if(src) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 0fd3d27d3d4..8d9b17ef7c2 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -627,9 +627,7 @@ About the new airlock wires panel: if(isElectrified() && density && istype(mover, /obj/item)) var/obj/item/I = mover if(I.flags & CONDUCT) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return ..() /obj/machinery/door/airlock/attack_hand(mob/user) @@ -1024,7 +1022,7 @@ About the new airlock wires panel: else if(locked) to_chat(user, "The airlock's bolts prevent it from being forced!") else if(!welded && !operating) - if(!beingcrowbarred) //being fireaxe'd + if(istype(I, /obj/item/twohanded/fireaxe)) //let's make this more specific var/obj/item/twohanded/fireaxe/F = I if(F.wielded) spawn(0) @@ -1041,7 +1039,7 @@ About the new airlock wires panel: else close(1) - if(istype(I, /obj/item/crowbar/power)) + if(ispowertool(I)) //jaws of life and rescue claw if(isElectrified()) shock(user, 100)//it's like sticking a forck in a power socket return diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 706b1a82ce0..6f838319040 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -76,8 +76,7 @@ if(autoclose_timer) deltimer(autoclose_timer) autoclose_timer = 0 - if(spark_system) - QDEL_NULL(spark_system) + QDEL_NULL(spark_system) return ..() /obj/machinery/door/Bumped(atom/AM) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 013be887cce..e9836eb0ca6 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -15,7 +15,7 @@ /obj/machinery/floodlight/Initialize() . = ..() - src.cell = new(src) + cell = new(src) mapVarInit() /obj/machinery/floodlight/Destroy() @@ -26,13 +26,18 @@ icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]" /obj/machinery/floodlight/process() + if(!cell && on) + on = FALSE + visible_message("[src] shuts down due to lack of power!") + update_icon() + set_light(0) if(on) cell.charge -= use if(cell.charge <= 0) on = FALSE updateicon() set_light(0) - src.visible_message("[src] shuts down due to lack of power!") + visible_message("[src] shuts down due to lack of power!") /obj/machinery/floodlight/attack_ai() return @@ -48,8 +53,12 @@ cell.add_fingerprint(user) cell.update_icon() - src.cell = null + cell = null to_chat(user, "You remove the power cell.") + if(on) + on = FALSE + visible_message("[src] shuts down due to lack of power!") + set_light(0) updateicon() return @@ -80,14 +89,14 @@ /obj/machinery/floodlight/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/wrench)) if(!anchored && !isinspace()) - playsound(src.loc, W.usesound, 50, 1) + playsound(loc, W.usesound, 50, 1) user.visible_message( \ "[user] tightens \the [src]'s casters.", \ " You have tightened \the [src]'s casters.", \ "You hear ratchet.") anchored = TRUE else if(anchored) - playsound(src.loc, W.usesound, 50, 1) + playsound(loc, W.usesound, 50, 1) user.visible_message( \ "[user] loosens \the [src]'s casters.", \ " You have loosened \the [src]'s casters.", \ diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 87ec7974711..3c36edb1685 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -101,9 +101,7 @@ flick("[base_state]-spark", src) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, src) - s.start() + do_sparks(2, 1, src) src.last_spark = world.time use_power(1000) var/turf/location = src.loc diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 1d33a1ae795..d0abd774e6f 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -391,6 +391,9 @@ Class Procs: return ..() +/obj/machinery/proc/is_operational() + return !(stat & (NOPOWER|BROKEN|MAINT)) + /obj/machinery/CheckParts(list/parts_list) ..() RefreshParts() @@ -587,9 +590,7 @@ Class Procs: return 0 if((TK in user.mutations) && !Adjacent(user)) return 0 - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) if(electrocute_mob(user, get_area(src), src, 0.7)) if(user.stunned) return 1 diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index b58e9d12c84..e5a43c523f5 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -94,9 +94,7 @@ doteleport(user) /obj/machinery/quantumpad/proc/sparks() - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, get_turf(src)) - s.start() + do_sparks(5, 1, get_turf(src)) /obj/machinery/quantumpad/attack_ghost(mob/dead/observer/ghost) if(linked_pad) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index f0e23d6c7d4..1532eeaccbd 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -220,6 +220,14 @@ var/i = 1 for(1, i <= coeff, i++) LR.Charge(occupant) + //Fire extinguisher + if(istype(O, /obj/item/extinguisher)) + var/obj/item/extinguisher/ext = O + ext.reagents.check_and_add("water", ext.max_water, 5 * coeff) + //Welding tools + if(istype(O, /obj/item/weldingtool)) + var/obj/item/weldingtool/weld = O + weld.reagents.check_and_add("fuel", weld.max_fuel, 2 * coeff) if(R) if(R.module) R.module.respawn_consumable(R) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 370cef73559..2d395da0dd0 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -1,128 +1,353 @@ -////////////////////////////////////// // SUIT STORAGE UNIT ///////////////// -////////////////////////////////////// - - /obj/machinery/suit_storage_unit - name = "Suit Storage Unit" + name = "suit storage unit" desc = "An industrial U-Stor-It Storage unit designed to accomodate all kinds of space suits. Its on-board equipment also allows the user to decontaminate the contents through a UV-ray purging cycle. There's a warning label dangling from the control pad, reading \"STRICTLY NO BIOLOGICALS IN THE CONFINES OF THE UNIT\"." - icon = 'icons/obj/suitstorage.dmi' - icon_state = "suitstorage000000100" //order is: [has helmet][has suit][has human][is open][is locked][is UV cycling][is powered][is dirty/broken] [is superUVcycling] - anchored = 1 - density = 1 - var/mob/living/carbon/human/OCCUPANT = null - var/obj/item/clothing/suit/space/SUIT = null - var/SUIT_TYPE = null - var/obj/item/clothing/head/helmet/space/HELMET = null - var/HELMET_TYPE = null - var/obj/item/clothing/mask/MASK = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n - var/MASK_TYPE = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself. - var/isopen = 0 - var/islocked = 0 - var/isUV = 0 - var/ispowered = 1 //starts powered - var/isbroken = 0 - var/issuperUV = 0 - var/panelopen = 0 - var/safetieson = 1 - var/cycletime_left = 0 + icon = 'icons/obj/machines/suit_storage.dmi' + icon_state = "close" + anchored = TRUE + density = TRUE + max_integrity = 250 + var/obj/item/clothing/suit/space/suit = null + var/obj/item/clothing/head/helmet/space/helmet = null + var/obj/item/clothing/mask/mask = null + var/obj/item/storage = null + + var/helmet_type = null + var/suit_type = null + var/mask_type = null + var/storage_type = null + + var/locked = FALSE + var/safeties = TRUE + var/broken = FALSE + + var/uv = FALSE + var/uv_super = FALSE + var/uv_cycles = 6 + var/message_cooldown + var/breakout_time = 300 + + //abstract these onto machinery eventually + var/state_open = FALSE + var/list/occupant_typecache //if set, turned into typecache in Initialize, other wise, defaults to mob/living typecache + var/atom/movable/occupant = null -//The units themselves///////////////// /obj/machinery/suit_storage_unit/standard_unit - SUIT_TYPE = /obj/item/clothing/suit/space/eva - HELMET_TYPE = /obj/item/clothing/head/helmet/space/eva - MASK_TYPE = /obj/item/clothing/mask/breath + suit_type = /obj/item/clothing/suit/space/eva + helmet_type = /obj/item/clothing/head/helmet/space/eva + mask_type = /obj/item/clothing/mask/breath /obj/machinery/suit_storage_unit/captain - SUIT_TYPE = /obj/item/clothing/suit/space/captain - HELMET_TYPE = /obj/item/clothing/head/helmet/space/capspace - MASK_TYPE = /obj/item/clothing/mask/gas + suit_type = /obj/item/clothing/suit/space/captain + helmet_type = /obj/item/clothing/head/helmet/space/capspace + mask_type = /obj/item/clothing/mask/gas + storage_type = /obj/item/tank/jetpack/oxygen/captain /obj/machinery/suit_storage_unit/engine - SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/engineering - HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/engineering - MASK_TYPE = /obj/item/clothing/mask/breath + suit_type = /obj/item/clothing/suit/space/hardsuit/engineering + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/engineering + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/clothing/shoes/magboots /obj/machinery/suit_storage_unit/ce - SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/elite - HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/elite - MASK_TYPE = /obj/item/clothing/mask/breath + suit_type = /obj/item/clothing/suit/space/hardsuit/elite + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/elite + mask_type = /obj/item/clothing/mask/gas + storage_type = /obj/item/clothing/shoes/magboots/advance /obj/machinery/suit_storage_unit/security - SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/security - HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/security - MASK_TYPE = /obj/item/clothing/mask/gas/sechailer + suit_type = /obj/item/clothing/suit/space/hardsuit/security + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/security + mask_type = /obj/item/clothing/mask/gas/sechailer /obj/machinery/suit_storage_unit/atmos - SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/atmos - HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/atmos - MASK_TYPE = /obj/item/clothing/mask/gas + suit_type = /obj/item/clothing/suit/space/hardsuit/atmos + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/atmos + mask_type = /obj/item/clothing/mask/gas + storage_type = /obj/item/clothing/shoes/magboots /obj/machinery/suit_storage_unit/mining - SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/mining - HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/mining - MASK_TYPE = /obj/item/clothing/mask/breath + suit_type = /obj/item/clothing/suit/space/hardsuit/mining + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/mining + mask_type = /obj/item/clothing/mask/breath /obj/machinery/suit_storage_unit/cmo - SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/medical - HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/medical - MASK_TYPE = /obj/item/clothing/mask/breath + suit_type = /obj/item/clothing/suit/space/hardsuit/medical + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/medical + mask_type = /obj/item/clothing/mask/breath -/obj/machinery/suit_storage_unit/New() - src.update_icon() - if(SUIT_TYPE) - SUIT = new SUIT_TYPE(src) - if(HELMET_TYPE) - HELMET = new HELMET_TYPE(src) - if(MASK_TYPE) - MASK = new MASK_TYPE(src) +/obj/machinery/suit_storage_unit/syndicate + suit_type = /obj/item/clothing/suit/space/hardsuit/syndi + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/syndi + mask_type = /obj/item/clothing/mask/gas/syndicate + storage_type = /obj/item/tank/jetpack/oxygen/harness + +/obj/machinery/suit_storage_unit/ert/command + suit_type = /obj/item/clothing/suit/space/hardsuit/ert/commander + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/commander + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/emergency_oxygen/double + +/obj/machinery/suit_storage_unit/ert/security + suit_type = /obj/item/clothing/suit/space/hardsuit/ert/security + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/security + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/emergency_oxygen/double + +/obj/machinery/suit_storage_unit/ert/engineer + suit_type = /obj/item/clothing/suit/space/hardsuit/ert/engineer + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/engineer + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/emergency_oxygen/double + +/obj/machinery/suit_storage_unit/ert/medical + suit_type = /obj/item/clothing/suit/space/hardsuit/ert/medical + helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/medical + mask_type = /obj/item/clothing/mask/breath + storage_type = /obj/item/tank/emergency_oxygen/double + + + +/obj/machinery/suit_storage_unit/Initialize() + . = ..() + if(suit_type) + suit = new suit_type(src) + if(helmet_type) + helmet = new helmet_type(src) + if(mask_type) + mask = new mask_type(src) + if(storage_type) + storage = new storage_type(src) + update_icon() + + //move this into machinery eventually... + if(occupant_typecache) + occupant_typecache = typecacheof(occupant_typecache) + +/obj/machinery/suit_storage_unit/Destroy() + QDEL_NULL(suit) + QDEL_NULL(helmet) + QDEL_NULL(mask) + QDEL_NULL(storage) + return ..() /obj/machinery/suit_storage_unit/update_icon() - var/hashelmet = 0 - var/hassuit = 0 - var/hashuman = 0 - if(HELMET) - hashelmet = 1 - if(SUIT) - hassuit = 1 - if(OCCUPANT) - hashuman = 1 - icon_state = text("suitstorage[][][][][][][][][]",hashelmet,hassuit,hashuman,src.isopen,src.islocked,src.isUV,src.ispowered,src.isbroken,src.issuperUV) + cut_overlays() + if(uv) + if(uv_super) + add_overlay("super") + else if(occupant) + add_overlay("uvhuman") + else + add_overlay("uv") + else if(state_open) + if(stat & BROKEN) + add_overlay("broken") + else + add_overlay("open") + if(suit) + add_overlay("suit") + if(helmet) + add_overlay("helm") + if(storage) + add_overlay("storage") + else if(occupant) + add_overlay("human") + +/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob, params) + if(!is_operational()) + return + if(isscrewdriver(I)) + panel_open = !panel_open + playsound(loc, I.usesound, 100, 1) + to_chat(user, text("You [panel_open ? "open up" : "close"] the unit's maintenance panel.")) + updateUsrDialog() /obj/machinery/suit_storage_unit/power_change() - if( powered() ) - src.ispowered = 1 - stat &= ~NOPOWER - src.update_icon() + ..() + if(!is_operational() && state_open) + open_machine() + dump_contents() + update_icon() + + +/obj/machinery/suit_storage_unit/proc/dump_contents() + dropContents() + helmet = null + suit = null + mask = null + storage = null + occupant = null + +/obj/machinery/suit_storage_unit/deconstruct(disassembled = TRUE) + open_machine() + dump_contents() + new /obj/item/stack/sheet/metal (loc, 2) + qdel(src) + +/obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/user) + if(user.stat || user.lying || !Adjacent(user) || !Adjacent(A) || !isliving(A)) + return + var/mob/living/target = A + if(!state_open) + to_chat(user, "The [src]'s doors are shut!") + return + if(!is_operational()) + to_chat(user, "The [src] is not operational!") + return + if(occupant || helmet || suit || storage) + to_chat(user, "It's too cluttered inside to fit in!") + return + + if(target == user) + user.visible_message("[user] starts squeezing into [src]!", "You start working your way into [src]...") else - spawn(rand(0, 15)) - src.ispowered = 0 - stat |= NOPOWER - src.islocked = 0 - src.isopen = 1 - src.dump_everything() - src.update_icon() + target.visible_message("[user] starts shoving [target] into [src]!", "[user] starts shoving you into [src]!") - -/obj/machinery/suit_storage_unit/ex_act(severity) - switch(severity) - if(1.0) - if(prob(50)) - src.dump_everything() //So suits dont survive all the time - qdel(src) - return - if(2.0) - if(prob(50)) - src.dump_everything() - qdel(src) + if(do_mob(user, target, 30)) + if(occupant || helmet || suit || storage) return + if(target == user) + user.visible_message("[user] slips into [src] and closes the door behind [user.p_them()]!", "You slip into [src]'s cramped space and shut its door.") else - return - return + target.visible_message("[user] pushes [target] into [src] and shuts its door!", "[user] shoves you into [src] and shuts the door!") + close_machine(target) + add_fingerprint(user) +/obj/machinery/suit_storage_unit/proc/cook() + if(uv_cycles) + uv_cycles-- + uv = TRUE + locked = TRUE + update_icon() + if(occupant) + var/mob/living/mob_occupant = occupant + if(uv_super) + mob_occupant.adjustFireLoss(rand(20, 36)) + else + mob_occupant.adjustFireLoss(rand(10, 16)) + mob_occupant.emote("scream") + addtimer(CALLBACK(src, .proc/cook), 50) + else + uv_cycles = initial(uv_cycles) + uv = FALSE + locked = FALSE + if(uv_super) + visible_message("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.") + playsound(src, 'sound/machines/airlock_alien_prying.ogg', 50, 1) + helmet = null + qdel(helmet) + suit = null + qdel(suit) // Delete everything but the occupant. + mask = null + qdel(mask) + storage = null + qdel(storage) + else + if(!occupant) + visible_message("[src]'s door slides open. The glowing yellow lights dim to a gentle green.") + else + visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.") + playsound(src, 'sound/machines/airlock_close.ogg', 25, 1) + open_machine(FALSE) + if(occupant) + dump_contents() + +/obj/machinery/suit_storage_unit/shock(mob/user, prb) + if(!prob(prb)) + var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread + s.set_up(5, 1, src) + s.start() + if(electrocute_mob(user, src, src, 1, TRUE)) + return 1 + +/obj/machinery/suit_storage_unit/relaymove(mob/user) + if(locked) + if(message_cooldown <= world.time) + message_cooldown = world.time + 50 + to_chat(user, "[src]'s door won't budge!") + return + open_machine() + dump_contents() + +/obj/machinery/suit_storage_unit/container_resist(mob/living/user) + if(!locked) + open_machine() + dump_contents() + return + user.changeNext_move(CLICK_CD_BREAKOUT) + user.last_special = world.time + CLICK_CD_BREAKOUT + user.visible_message("You see [user] kicking against the doors of [src]!", \ + "You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)", \ + "You hear a thump from [src].") + if(do_after(user,(breakout_time), target = src)) + if(!user || user.stat != CONSCIOUS || user.loc != src ) + return + user.visible_message("[user] successfully broke out of [src]!", \ + "You successfully break out of [src]!") + open_machine() + dump_contents() + + add_fingerprint(user) + if(locked) + visible_message("You see [user] kicking against the doors of [src]!", \ + "You start kicking against the doors...") + addtimer(CALLBACK(src, .proc/resist_open, user), 300) + else + open_machine() + dump_contents() + +/obj/machinery/suit_storage_unit/proc/resist_open(mob/user) + if(!state_open && occupant && (user in src) && !user.stat) // Check they're still here. + visible_message("You see [user] burst out of [src]!", \ + "You escape the cramped confines of [src]!") + open_machine() + +//eventually move these onto the parent.... + +/obj/machinery/suit_storage_unit/proc/open_machine(drop = TRUE) + state_open = TRUE + if(drop) + dropContents() + update_icon() + updateUsrDialog() + +/obj/machinery/suit_storage_unit/dropContents() + var/turf/T = get_turf(src) + for(var/atom/movable/A in contents) + A.forceMove(T) + if(isliving(A)) + var/mob/living/L = A + L.update_canmove() + occupant = null + +/obj/machinery/suit_storage_unit/proc/close_machine(atom/movable/target = null) + state_open = FALSE + if(!target) + for(var/am in loc) + if(!(occupant_typecache ? is_type_in_typecache(am, occupant_typecache) : isliving(am))) + continue + var/atom/movable/AM = am + if(AM.has_buckled_mobs()) + continue + if(isliving(AM)) + var/mob/living/L = am + if(L.buckled || L.mob_size >= MOB_SIZE_LARGE) + continue + target = am + + var/mob/living/mobtarget = target + if(target && !target.has_buckled_mobs() && (!isliving(target) || !mobtarget.buckled)) + occupant = target + target.forceMove(src) + updateUsrDialog() + update_icon() + + +//////// /obj/machinery/suit_storage_unit/attack_hand(mob/user as mob) var/dat @@ -131,54 +356,49 @@ if(stat & NOPOWER) return if(!user.IsAdvancedToolUser()) - return 0 - if(src.panelopen) //The maintenance panel is open. Time for some shady stuff + return FALSE + if(panel_open) //The maintenance panel is open. Time for some shady stuff dat+= "Suit storage unit: Maintenance panel" dat+= "Maintenance panel controls
" dat+= "The panel is ridden with controls, button and meters, labeled in strange signs and symbols that
you cannot understand. Probably the manufactoring world's language.
Among other things, a few controls catch your eye.

" - dat+= text("A small dial with a \"�\" symbol embroidded on it. It's pointing towards a gauge that reads [].
Turn towards []
",(src.issuperUV ? "15nm" : "185nm"),(src.issuperUV ? "185nm" : "15nm") ) - dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
Press button",(src.safetieson? "GREEN" : "RED")) + dat+= text("A small dial with a arrow embroidered on it. It's pointing towards a gauge that reads [].
Turn towards []
",(uv_super ? "15nm" : "185nm"),(uv_super ? "185nm" : "15nm") ) + dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
Press button",(safeties ? "GREEN" : "RED")) dat+= "

Close panel" - //user << browse(dat, "window=ssu_m_panel;size=400x500") - //onclose(user, "ssu_m_panel") - else if(src.isUV) //The thing is running its cauterisation cycle. You have to wait. + else if(uv) //The thing is running its cauterisation cycle. You have to wait. dat += "Suit storage unit" dat+= "Unit is cauterising contents with selected UV ray intensity. Please wait.
" - //dat+= "Cycle end in: [src.cycletimeleft()] seconds. " - //user << browse(dat, "window=ssu_cycling_panel;size=400x500") - //onclose(user, "ssu_cycling_panel") else - if(!src.isbroken) + if(!broken) dat+= "Welcome to the Unit control panel.
" - dat+= text("Helmet storage compartment: []
",(src.HELMET ? HELMET.name : "
No helmet detected.") ) - if(HELMET && src.isopen) + dat+= text("Helmet storage compartment: []
",(helmet ? helmet.name : "
No helmet detected.") ) + if(helmet && state_open) dat+="Dispense helmet
" - dat+= text("Suit storage compartment: []
",(src.SUIT ? SUIT.name : "
No exosuit detected.") ) - if(SUIT && src.isopen) + dat+= text("Suit storage compartment: []
",(suit ? suit.name : "
No exosuit detected.") ) + if(suit && state_open) dat+="Dispense suit
" - dat+= text("Breathmask storage compartment: []
",(src.MASK ? MASK.name : "
No breathmask detected.") ) - if(MASK && src.isopen) + dat+= text("Breathmask storage compartment: []
",(mask ? mask.name : "
No breathmask detected.") ) + if(mask && state_open) dat+="Dispense mask
" - if(src.OCCUPANT) + dat+= text("Breathmask storage compartment: []
",(storage ? storage.name : "
No storage item detected.") ) + if(storage && state_open) + dat+="Dispense storage item
" + if(occupant) dat+= "
WARNING: Biological entity detected inside the Unit's storage. Please remove.
" dat+= "Eject extra load" - dat+= text("
Unit is: [] - [] Unit ",(src.isopen ? "Open" : "Closed"),(src.isopen ? "Close" : "Open")) - if(src.isopen) + dat+= text("
Unit is: [] - [] Unit ",(state_open ? "Open" : "Closed"),(state_open ? "Close" : "Open")) + if(state_open) dat+="
" else - dat+= text(" - *[] Unit*
",(src.islocked ? "Unlock" : "Lock") ) - dat+= text("Unit status: []",(src.islocked? "**LOCKED**
" : "**UNLOCKED**
") ) - dat+= "Start Disinfection cycle
" + dat+= text(" - *[] Unit*
",(locked ? "Unlock" : "Lock") ) + dat+= text("Unit status: []",(locked? "**LOCKED**
" : "**UNLOCKED**
") ) + dat+= "Start Disinfection cycle
" dat += "

Close control panel" - //user << browse(dat, "window=Suit Storage Unit;size=400x500") - //onclose(user, "Suit Storage Unit") else //Ohhhh shit it's dirty or broken! Let's inform the guy. dat+= "Suit storage unit" dat+= "Unit chamber is too contaminated to continue usage. Please call for a qualified individual to perform maintenance.

" dat+= "
Close control panel" - //user << browse(dat, "window=suit_storage_unit;size=400x500") - //onclose(user, "suit_storage_unit") + var/datum/browser/popup = new(user, "suit_storage_unit", name, 400, 500) popup.set_content(dat) @@ -187,263 +407,134 @@ return -/obj/machinery/suit_storage_unit/Topic(href, href_list) //I fucking HATE this proc +/obj/machinery/suit_storage_unit/Topic(href, href_list) if(..()) return 1 if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) usr.set_machine(src) if(href_list["toggleUV"]) - src.toggleUV(usr) - src.updateUsrDialog() - src.update_icon() + toggleUV(usr) + updateUsrDialog() + update_icon() if(href_list["togglesafeties"]) - src.togglesafeties(usr) - src.updateUsrDialog() - src.update_icon() + togglesafeties(usr) + updateUsrDialog() + update_icon() if(href_list["dispense_helmet"]) - src.dispense_helmet(usr) - src.updateUsrDialog() - src.update_icon() + dispense_helmet(usr) + updateUsrDialog() + update_icon() if(href_list["dispense_suit"]) - src.dispense_suit(usr) - src.updateUsrDialog() - src.update_icon() + dispense_suit(usr) + updateUsrDialog() + update_icon() if(href_list["dispense_mask"]) - src.dispense_mask(usr) - src.updateUsrDialog() - src.update_icon() + dispense_mask(usr) + updateUsrDialog() + update_icon() + if(href_list["dispense_storage"]) + dispense_storage(usr) + updateUsrDialog() + update_icon() if(href_list["toggle_open"]) - src.toggle_open(usr) - src.updateUsrDialog() - src.update_icon() + toggle_open(usr) + updateUsrDialog() + update_icon() if(href_list["toggle_lock"]) - src.toggle_lock(usr) - src.updateUsrDialog() - src.update_icon() - if(href_list["start_UV"]) - src.start_UV(usr) - src.updateUsrDialog() - src.update_icon() + toggle_lock(usr) + updateUsrDialog() + update_icon() + if(href_list["cook"]) + cook(usr) + updateUsrDialog() + update_icon() if(href_list["eject_guy"]) - src.eject_occupant(usr) - src.updateUsrDialog() - src.update_icon() - /*if(href_list["refresh"]) - src.updateUsrDialog()*/ - src.add_fingerprint(usr) + eject_occupant(usr) + updateUsrDialog() + update_icon() + add_fingerprint(usr) return /obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob) -// var/protected = 0 -// var/mob/living/carbon/human/H = user - if(!src.panelopen) + + if(!panel_open) return - - /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves - if(H.gloves) - var/obj/item/clothing/gloves/G = H.gloves - if(istype(G,/obj/item/clothing/gloves/color/yellow)) - protected = 1 - - if(!protected) - playsound(src.loc, "sparks", 75, 1, -1) - to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.") - return*/ - else //welp, the guy is protected, we can continue - if(src.issuperUV) - to_chat(user, "You slide the dial back towards \"185nm\".") - src.issuperUV = 0 + else + if(uv_super) + to_chat(user, "You slide the dial back towards \"185nm\".") + uv_super = FALSE else - to_chat(user, "You crank the dial all the way up to \"15nm\".") - src.issuperUV = 1 - return - + to_chat(user, "You crank the dial all the way up to \"15nm\".") + uv_super = TRUE /obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob) -// var/protected = 0 -// var/mob/living/carbon/human/H = user - if(!src.panelopen) //Needed check due to bugs + if(!panel_open) return - - /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves - if(H.gloves) - var/obj/item/clothing/gloves/G = H.gloves - if(istype(G,/obj/item/clothing/gloves/color/yellow) ) - protected = 1 - - if(!protected) - playsound(src.loc, "sparks", 75, 1, -1) - to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.") - return*/ else - to_chat(user, "You push the button. The coloured LED next to it changes.") - src.safetieson = !src.safetieson - + to_chat(user, "You push the button. The coloured LED next to it changes.") + safeties = !safeties /obj/machinery/suit_storage_unit/proc/dispense_helmet(mob/user as mob) - if(!src.HELMET) - return //Do I even need this sanity check? Nyoro~n - else - src.HELMET.loc = src.loc - src.HELMET = null + if(!helmet) return - + else + helmet.forceMove(loc) + helmet = null /obj/machinery/suit_storage_unit/proc/dispense_suit(mob/user as mob) - if(!src.SUIT) + if(!suit) return else - src.SUIT.loc = src.loc - src.SUIT = null - return - + suit.forceMove(loc) + suit = null /obj/machinery/suit_storage_unit/proc/dispense_mask(mob/user as mob) - if(!src.MASK) + if(!mask) return else - src.MASK.loc = src.loc - src.MASK = null + mask.forceMove(loc) + mask = null + +/obj/machinery/suit_storage_unit/proc/dispense_storage(mob/user as mob) + if(!storage) return - - -/obj/machinery/suit_storage_unit/proc/dump_everything() - src.islocked = 0 //locks go free - if(src.SUIT) - src.SUIT.loc = src.loc - src.SUIT = null - if(src.HELMET) - src.HELMET.loc = src.loc - src.HELMET = null - if(src.MASK) - src.MASK.loc = src.loc - src.MASK = null - if(src.OCCUPANT) - src.eject_occupant(OCCUPANT) - return - + else + storage.forceMove(loc) + storage = null /obj/machinery/suit_storage_unit/proc/toggle_open(mob/user as mob) - if(src.islocked || src.isUV) - to_chat(user, "Unable to open unit.") + if(locked || uv) + to_chat(user, "Unable to open unit.") return - if(src.OCCUPANT) - src.eject_occupant(user) - return // eject_occupant opens the door, so we need to return - src.isopen = !src.isopen - return - + if(occupant) + eject_occupant(user) + return + state_open = !state_open /obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob) - if(src.OCCUPANT && src.safetieson) - to_chat(user, "The Unit's safety protocols disallow locking when a biological form is detected inside its compartments.") + if(occupant && safeties) + to_chat(user, "The unit's safety protocols disallow locking when a biological form is detected inside its compartments.") return - if(src.isopen) + if(state_open) return - src.islocked = !src.islocked - return - - -/obj/machinery/suit_storage_unit/proc/start_UV(mob/user as mob) - if(src.isUV || src.isopen) //I'm bored of all these sanity checks - return - if(src.OCCUPANT && src.safetieson) - to_chat(user, "WARNING: Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle.") - return - if(!src.HELMET && !src.MASK && !src.SUIT && !src.OCCUPANT ) //shit's empty yo - to_chat(user, "Unit storage bays empty. Nothing to disinfect -- Aborting.") - return - to_chat(user, "You start the Unit's cauterisation cycle.") - src.cycletime_left = 20 - src.isUV = 1 - if(src.OCCUPANT && !src.islocked) - src.islocked = 1 //Let's lock it for good measure - src.update_icon() - src.updateUsrDialog() - - var/i //our counter - for(i=0,i<4,i++) - sleep(50) - if(src.OCCUPANT) - if(src.issuperUV) - var/burndamage = rand(35,45) - OCCUPANT.take_organ_damage(0,burndamage) - OCCUPANT.emote("scream") - else - var/burndamage = rand(10,15) - OCCUPANT.take_organ_damage(0,burndamage) - OCCUPANT.emote("scream") - if(i==3) //End of the cycle - if(!src.issuperUV) - if(src.HELMET) - HELMET.clean_blood() - if(src.SUIT) - SUIT.clean_blood() - if(src.MASK) - MASK.clean_blood() - else //It was supercycling, destroy everything - if(src.HELMET) - src.HELMET = null - if(src.SUIT) - src.SUIT = null - if(src.MASK) - src.MASK = null - visible_message("With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.") - src.isbroken = 1 - src.isopen = 1 - src.islocked = 0 - src.eject_occupant(OCCUPANT) //Mixing up these two lines causes bug. DO NOT DO IT. - src.isUV = 0 //Cycle ends - src.update_icon() - src.updateUsrDialog() - return - -/* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work - if(src.HELMET) - HELMET.clean_blood() - if(src.SUIT) - SUIT.clean_blood() - if(src.MASK) - MASK.clean_blood() - src.isUV = 0 //Cycle ends - src.update_icon() - src.updateUsrDialog() - - var/i - for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity - spawn(50) - if(OCCUPANT) - if(issuperUV) - OCCUPANT.take_organ_damage(0,40) - to_chat(user, "Test. You gave [OCCUPANT.p_them()] 40 damage") - else - OCCUPANT.take_organ_damage(0,8) - to_chat(user, "Test. You gave [OCCUPANT.p_them()] 8 damage") - return*/ - - -/obj/machinery/suit_storage_unit/proc/cycletimeleft() - if(src.cycletime_left >= 1) - src.cycletime_left-- - return src.cycletime_left - + locked = !locked /obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user as mob) - if(islocked) + if(locked) return - if(!OCCUPANT) + if(!occupant) return - if(user != OCCUPANT) - to_chat(OCCUPANT, "The machine kicks you out!") + if(user != occupant) + to_chat(occupant, "The machine kicks you out!") if(user.loc != loc) - to_chat(OCCUPANT, "You leave the not-so-cozy confines of the SSU.") - OCCUPANT.forceMove(loc) - OCCUPANT = null - if(!isopen) - isopen = 1 + to_chat(occupant, "You leave the not-so-cozy confines of the SSU.") + occupant.forceMove(loc) + occupant = null + if(!state_open) + state_open = 1 update_icon() return @@ -455,13 +546,12 @@ if(usr.stat != 0) return - src.eject_occupant(usr) + eject_occupant(usr) add_fingerprint(usr) - src.updateUsrDialog() - src.update_icon() + updateUsrDialog() + update_icon() return - /obj/machinery/suit_storage_unit/verb/move_inside() set name = "Hide in Suit Storage Unit" set category = "Object" @@ -469,640 +559,28 @@ if(usr.stat != 0) return - if(!src.isopen) - to_chat(usr, "The unit's doors are shut.") + if(!state_open) + to_chat(usr, "The unit's doors are shut.") return - if(!src.ispowered || src.isbroken) - to_chat(usr, "The unit is not operational.") + if(broken) + to_chat(usr, "The unit is not operational.") return - if( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) - to_chat(usr, "It's too cluttered inside for you to fit in!") + if((occupant) || (helmet) || (suit) || (storage)) + to_chat(usr, "It's too cluttered inside for you to fit in!") return visible_message("[usr] starts squeezing into the suit storage unit!") if(do_after(usr, 10, target = usr)) usr.stop_pulling() usr.forceMove(src) -// usr.metabslow = 1 - src.OCCUPANT = usr - src.isopen = 0 //Close the thing after the guy gets inside - src.update_icon() + occupant = usr + state_open = FALSE //Close the thing after the guy gets inside + update_icon() -// for(var/obj/O in src) -// qdel(O) - - src.add_fingerprint(usr) - src.updateUsrDialog() + add_fingerprint(usr) + updateUsrDialog() return else - src.OCCUPANT = null //Testing this as a backup sanity test - return - - -/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob, params) - if(!src.ispowered) - return - if(istype(I, /obj/item/screwdriver)) - src.panelopen = !src.panelopen - playsound(src.loc, I.usesound, 100, 1) - to_chat(user, text("You [] the unit's maintenance panel.",(src.panelopen ? "open up" : "close") )) - src.updateUsrDialog() - return - if( istype(I, /obj/item/grab) ) - var/obj/item/grab/G = I - if( !(ismob(G.affecting)) ) - return - if(!src.isopen) - to_chat(usr, "The unit's doors are shut.") - return - if(!src.ispowered || src.isbroken) - to_chat(usr, "The unit is not operational.") - return - if( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) //Unit needs to be absolutely empty - to_chat(user, "The unit's storage area is too cluttered.") - return - visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.") - if(do_after(user, 20, target = G:affecting)) - if(!G || !G.affecting) return //derpcheck - var/mob/M = G.affecting - M.forceMove(src) - src.OCCUPANT = M - src.isopen = 0 //close ittt - - //for(var/obj/O in src) - // O.loc = src.loc - src.add_fingerprint(user) - qdel(G) - src.updateUsrDialog() - src.update_icon() - return - return - if( istype(I,/obj/item/clothing/suit/space) ) - if(!src.isopen) - return - var/obj/item/clothing/suit/space/S = I - if(src.SUIT) - to_chat(user, "The unit already contains a suit.") - return - to_chat(user, "You load the [S.name] into the storage compartment.") - user.drop_item() - S.loc = src - src.SUIT = S - src.update_icon() - src.updateUsrDialog() - return - if( istype(I,/obj/item/clothing/head/helmet) ) - if(!src.isopen) - return - var/obj/item/clothing/head/helmet/H = I - if(src.HELMET) - to_chat(user, "The unit already contains a helmet.") - return - to_chat(user, "You load the [H.name] into the storage compartment.") - user.drop_item() - H.loc = src - src.HELMET = H - src.update_icon() - src.updateUsrDialog() - return - if( istype(I,/obj/item/clothing/mask) ) - if(!src.isopen) - return - var/obj/item/clothing/mask/M = I - if(src.MASK) - to_chat(user, "The unit already contains a mask.") - return - to_chat(user, "You load the [M.name] into the storage compartment.") - user.drop_item() - M.loc = src - src.MASK = M - src.update_icon() - src.updateUsrDialog() - return - src.update_icon() - src.updateUsrDialog() - return - + occupant = null /obj/machinery/suit_storage_unit/attack_ai(mob/user as mob) - return src.attack_hand(user) - - - -//////////////////////////////REMINDER: Make it lock once you place some fucker inside. - -//God this entire file is fucking awful -//Suit painter for Bay's special snowflake aliums. - -/obj/machinery/suit_cycler - - name = "suit cycler" - desc = "An industrial machine for repairing, painting and equipping hardsuits." - anchored = 1 - density = 1 - - icon = 'icons/obj/suitstorage.dmi' - icon_state = "suitstorage000000100" - - req_access = list(access_captain,access_heads) - - var/active = 0 // PLEASE HOLD. - var/safeties = 1 // The cycler won't start with a living thing inside it unless safeties are off. - var/irradiating = 0 // If this is > 0, the cycler is decontaminating whatever is inside it. - var/radiation_level = 2 // 1 is removing germs, 2 is removing blood, 3 is removing plasma. - var/model_text = "" // Some flavour text for the topic box. - var/locked = 1 // If locked, nothing can be taken from or added to the cycler. - - // Wiring bollocks. - var/wires = 15 - var/electrified = 0 - var/const/WIRE_EXTEND = 1 // Safeties - var/const/WIRE_SCANID = 2 // Locked status - var/const/WIRE_SHOCK = 3 // What it says on the tin. - - //Departments that the cycler can paint suits to look like. - var/list/departments = list("Engineering","Mining","Medical","Security","Atmos") - //Species that the suits can be configured to fit. - var/list/species = list("Human","Skrell","Unathi","Tajaran") - - var/target_department = "Engineering" - var/target_species = "Human" - - var/mob/living/carbon/human/occupant = null - var/obj/item/clothing/suit/space/hardsuit/suit = null - var/obj/item/clothing/head/helmet/space/helmet = null - -/obj/machinery/suit_cycler/engineering - name = "Engineering suit cycler" - model_text = "Engineering" - req_access = list(access_construction) - departments = list("Engineering","Atmos") - species = list("Human","Unathi","Tajaran") - -/obj/machinery/suit_cycler/mining - name = "Mining suit cycler" - model_text = "Mining" - req_access = list(access_mining) - departments = list("Mining") - species = list("Human","Unathi","Tajaran") - -/obj/machinery/suit_cycler/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/suit_cycler/attackby(obj/item/I as obj, mob/user as mob, params) - - if(electrified != 0) - if(src.shock(user, 100)) - return - - //Hacking init. - if(istype(I, /obj/item/multitool) || istype(I, /obj/item/wirecutters)) - if(panel_open) - attack_hand(user) - return - //Other interface stuff. - if(istype(I, /obj/item/grab)) - var/obj/item/grab/G = I - - if(!(ismob(G.affecting))) - return - - if(locked) - to_chat(user, "The suit cycler is locked.") - return - - if(src.contents.len > 0) - to_chat(user, "There is no room inside the cycler for [G.affecting.name].") - return - - visible_message("[user] starts putting [G.affecting.name] into the suit cycler.") - - if(do_after(user, 20, target = G:affecting)) - if(!G || !G.affecting) return - var/mob/M = G.affecting - M.forceMove(src) - src.occupant = M - - src.add_fingerprint(user) - qdel(G) - - src.updateUsrDialog() - - return - else if(istype(I,/obj/item/screwdriver)) - - panel_open = !panel_open - to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") - src.updateUsrDialog() - return - - else if(istype(I,/obj/item/clothing/head/helmet/space)) - - if(locked) - to_chat(user, "The suit cycler is locked.") - return - - if(helmet) - to_chat(user, "The cycler already contains a helmet.") - return - - to_chat(user, "You fit \the [I] into the suit cycler.") - user.drop_item() - I.loc = src - helmet = I - - src.update_icon() - src.updateUsrDialog() - return - - else if(istype(I,/obj/item/clothing/suit/space/hardsuit)) - - if(locked) - to_chat(user, "The suit cycler is locked.") - return - - if(suit) - to_chat(user, "The cycler already contains a hardsuit.") - return - - var/obj/item/clothing/suit/space/hardsuit/S = I - - if(S.helmet) - to_chat(user, "\The [S] will not fit into the cycler with a helmet attached.") - return - - if(S.boots) - to_chat(user, "\The [S] will not fit into the cycler with boots attached.") - return - - to_chat(user, "You fit \the [I] into the suit cycler.") - user.drop_item() - I.loc = src - suit = I - - src.update_icon() - src.updateUsrDialog() - return - - ..() - -/obj/machinery/suit_cycler/emag_act(user as mob) - if(emagged) - to_chat(user, "The cycler has already been subverted.") - return - - //Clear the access reqs, disable the safeties, and open up all paintjobs. - to_chat(user, "You run the sequencer across the interface, corrupting the operating protocols.") - departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$") - emagged = 1 - safeties = 0 - req_access = list() - return - -/obj/machinery/suit_cycler/attack_hand(mob/user as mob) - - add_fingerprint(user) - - if(..() || stat & (BROKEN|NOPOWER)) - return - - if(!user.IsAdvancedToolUser()) - return 0 - - if(electrified != 0) - if(src.shock(user, 100)) - return - - usr.set_machine(src) - - var/dat = "Suit Cycler Interface" - - if(src.active) - dat+= "
The [model_text ? "[model_text] " : ""]suit cycler is currently in use. Please wait..." - - else if(locked) - dat += "
The [model_text ? "[model_text] " : ""]suit cycler is currently locked. Please contact your system administrator." - if(src.allowed(usr)) - dat += "
\[unlock unit\]" - else - dat += "

Suit cycler

" - dat += "Welcome to the [model_text ? "[model_text] " : ""]suit cycler control panel. \[lock unit\]
" - - dat += "

Maintenance

" - dat += "Helmet: [helmet ? "\the [helmet]" : "no helmet stored" ]. \[eject\]
" - dat += "Suit: [suit ? "\the [suit]" : "no suit stored" ]. \[eject\]" - - if(suit && istype(suit)) - dat += "[(suit.damage ? " \[repair\]" : "")]" - - dat += "
UV decontamination systems: SYSTEM ERROR" : "green'>READY"]
" - dat += "Output level: [radiation_level]
" - dat += "\[select power level\] \[begin decontamination cycle\]

" - - dat += "

Customisation

" - dat += "Target product: [target_department], [target_species]." - dat += "
\[apply customisation routine\]


" - -/* if(panel_open) - var/list/vendwires = list( - "Violet" = 1, - "Orange" = 2, - "Goldenrod" = 3, - ) - dat += "

Access Panel

" - for(var/wiredesc in vendwires) - var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]] - dat += "[wiredesc] wire: " - if(!is_uncut) - dat += "Mend" - else - dat += "Cut " - dat += "Pulse " - dat += "
" - - dat += "
" - dat += "The orange light is [(electrified == 0) ? "off" : "on"].
" - dat += "The red light is [safeties ? "blinking" : "off"].
" - dat += "The yellow light is [locked ? "on" : "off"].
" */ - - var/datum/browser/popup = new(user, "suit_cycler", name, 400, 400) - popup.set_content(dat) - popup.open(0) - onclose(user, "suit_cycler") - return - -/obj/machinery/suit_cycler/Topic(href, href_list) - if(href_list["eject_suit"]) - if(!suit) return - suit.loc = get_turf(src) - suit = null - else if(href_list["eject_helmet"]) - if(!helmet) return - helmet.loc = get_turf(src) - helmet = null - else if(href_list["select_department"]) - var/choice = input("Please select the target department paintjob.","Suit cycler",null) as null|anything in departments - if(choice) target_department = choice - else if(href_list["select_species"]) - var/choice = input("Please select the target species configuration.","Suit cycler",null) as null|anything in species - if(choice) target_species = choice - else if(href_list["select_rad_level"]) - var/choices = list(1,2,3) - if(emagged) - choices = list(1,2,3,4,5) - radiation_level = input("Please select the desired radiation level.","Suit cycler",null) as null|anything in choices - else if(href_list["repair_suit"]) - - if(!suit) return - active = 1 - spawn(100) - repair_suit() - finished_job() - - else if(href_list["apply_paintjob"]) - - if(!suit && !helmet) return - active = 1 - spawn(100) - apply_paintjob() - finished_job() - - else if(href_list["toggle_safties"]) - safeties = !safeties - - else if(href_list["toggle_lock"]) - - if(src.allowed(usr)) - locked = !locked - to_chat(usr, "You [locked ? "" : "un"]lock \the [src].") - else - to_chat(usr, "Access denied.") - - else if(href_list["begin_decontamination"]) - - if(safeties && occupant) - to_chat(usr, "The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.") - return - - active = 1 - irradiating = 10 - src.updateUsrDialog() - - sleep(10) - - if(helmet) - if(radiation_level > 1) - helmet.clean_blood() - - if(suit) - if(radiation_level > 1) - suit.clean_blood() - -/* else if((href_list["cutwire"]) && (src.panel_open)) - var/twire = text2num(href_list["cutwire"]) - if(!( istype(usr.get_active_hand(), /obj/item/wirecutters) )) - to_chat(usr, "You need wirecutters!") - return - if(src.isWireColorCut(twire)) - src.mend(twire) - else - src.cut(twire) - - else if((href_list["pulsewire"]) && (src.panel_open)) - var/twire = text2num(href_list["pulsewire"]) - if(!istype(usr.get_active_hand(), /obj/item/multitool)) - to_chat(usr, "You need a multitool!") - return - if(src.isWireColorCut(twire)) - to_chat(usr, "You can't pulse a cut wire.") - return - else - src.pulse(twire)*/ - - src.updateUsrDialog() - return - -/obj/machinery/suit_cycler/process() - - if(electrified > 0) - electrified-- - - if(!active) - return - - if(active && stat & (BROKEN|NOPOWER)) - active = 0 - irradiating = 0 - electrified = 0 - return - - if(irradiating == 1) - finished_job() - irradiating = 0 - return - - irradiating-- - - if(occupant) - if(prob(radiation_level*2)) occupant.emote("scream") - if(radiation_level > 2) - occupant.take_organ_damage(0,radiation_level*2 + rand(1,3)) - if(radiation_level > 1) - occupant.take_organ_damage(0,radiation_level + rand(1,3)) - occupant.apply_effect(radiation_level*10, IRRADIATE) - -/obj/machinery/suit_cycler/proc/finished_job() - var/turf/T = get_turf(src) - T.visible_message("\The [src] pings loudly.") - icon_state = initial(icon_state) - active = 0 - src.updateUsrDialog() - -/obj/machinery/suit_cycler/proc/repair_suit() - if(!suit || !suit.damage || !suit.can_breach) - return - - suit.breaches = list() - suit.calc_breach_damage() - - return - -/obj/machinery/suit_cycler/verb/leave() - set name = "Eject Cycler" - set category = "Object" - set src in oview(1) - - if(usr.stat != 0) - return - - eject_occupant(usr) - -/obj/machinery/suit_cycler/proc/eject_occupant(mob/user as mob) - - if(locked || active) - to_chat(user, "The cycler is locked.") - return - - if(!occupant) - return - - occupant.forceMove(loc) - occupant = null - - add_fingerprint(usr) - updateUsrDialog() - update_icon() - - return -/* -//HACKING PROCS, MOSTLY COPIED FROM VENDING MACHINES -/obj/machinery/suit_cycler/proc/isWireColorCut(var/wireColor) - var/wireFlag = APCWireColorToFlag[wireColor] - return ((src.wires & wireFlag) == 0) - -/obj/machinery/suit_cycler/proc/isWireCut(var/wireIndex) - var/wireFlag = APCIndexToFlag[wireIndex] - return ((src.wires & wireFlag) == 0) - -/obj/machinery/suit_cycler/proc/cut(var/wireColor) - var/wireFlag = APCWireColorToFlag[wireColor] - var/wireIndex = APCWireColorToIndex[wireColor] - src.wires &= ~wireFlag - switch(wireIndex) - - if(WIRE_EXTEND) - safeties = 0 - if(WIRE_SHOCK) - electrified = -1 - if(WIRE_SCANID) - locked = 0 - -/obj/machinery/suit_cycler/proc/mend(var/wireColor) - var/wireFlag = APCWireColorToFlag[wireColor] - var/wireIndex = APCWireColorToIndex[wireColor] //not used in this function - src.wires |= wireFlag - switch(wireIndex) - if(WIRE_SHOCK) - src.electrified = 0 - -/obj/machinery/suit_cycler/proc/pulse(var/wireColor) - var/wireIndex = APCWireColorToIndex[wireColor] - switch(wireIndex) - if(WIRE_EXTEND) - safeties = !locked - if(WIRE_SHOCK) - electrified = 30 - if(WIRE_SCANID) - locked = !locked -*/ - -//There HAS to be a less bloated way to do this. TODO: some kind of table/icon name coding? ~Z -/obj/machinery/suit_cycler/proc/apply_paintjob() - - if(!target_species || !target_department) - return - - if(target_species) - if(helmet) helmet.refit_for_species(target_species) - if(suit) suit.refit_for_species(target_species) - - switch(target_department) - if("Engineering") - if(helmet) - helmet.name = "engineering hardsuit helmet" - helmet.icon_state = "hardsuit0-engineering" - helmet.item_state = "eng_helm" - helmet.item_color = "engineering" - if(suit) - suit.name = "engineering hardsuit" - suit.icon_state = "hardsuit-engineering" - suit.item_state = "eng_hardsuit" - if("Mining") - if(helmet) - helmet.name = "mining hardsuit helmet" - helmet.icon_state = "hardsuit0-mining" - helmet.item_state = "mining_helm" - helmet.item_color = "mining" - if(suit) - suit.name = "mining hardsuit" - suit.icon_state = "hardsuit-mining" - suit.item_state = "mining_hardsuit" - if("Medical") - if(helmet) - helmet.name = "medical hardsuit helmet" - helmet.icon_state = "hardsuit0-medical" - helmet.item_state = "medical_helm" - helmet.item_color = "medical" - if(suit) - suit.name = "medical hardsuit" - suit.icon_state = "hardsuit-medical" - suit.item_state = "medical_hardsuit" - if("Security") - if(helmet) - helmet.name = "security hardsuit helmet" - helmet.icon_state = "hardsuit0-sec" - helmet.item_state = "sec_helm" - helmet.item_color = "sec" - if(suit) - suit.name = "security hardsuit" - suit.icon_state = "hardsuit-sec" - suit.item_state = "sec_hardsuit" - if("Atmos") - if(helmet) - helmet.name = "atmospherics hardsuit helmet" - helmet.icon_state = "hardsuit0-atmos" - helmet.item_state = "atmos_helm" - helmet.item_color = "atmos" - if(suit) - suit.name = "atmospherics hardsuit" - suit.icon_state = "hardsuit-atmos" - suit.item_state = "atmos_hardsuit" - if("^%###^%$") - if(helmet) - helmet.name = "blood-red hardsuit helmet" - helmet.icon_state = "hardsuit0-syndie" - helmet.item_state = "syndie_helm" - helmet.item_color = "syndie" - if(suit) - suit.name = "blood-red hardsuit" - suit.item_state = "syndie_hardsuit" - suit.icon_state = "hardsuit-syndie" + return attack_hand(user) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index a8e854467a2..9dc6c8e6f11 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -519,3 +519,50 @@ for(var/reagent in processed_reagents) reagents.add_reagent(reagent,amount) chassis.use_power(energy_drain) + +/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw + name = "rescue jaw" + desc = "Emergency rescue jaws, designed to help first responders reach their patients. Opens doors and removes obstacles." + icon_state = "mecha_clamp" //can work, might use a blue resprite later but I think it works for now + origin_tech = "materials=2;engineering=2" //kind of sad, but identical to jaws of life + equip_cooldown = 15 + energy_drain = 10 + var/dam_force = 20 + + +/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/action(atom/target) + if(!action_checks(target)) + return + if(istype(target, /obj)) + if(!istype(target, /obj/machinery/door))//early return if we're not trying to open a door + return + var/obj/machinery/door/D = target //the door we want to open + D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function + if(isliving(target)) //interact with living beings + var/mob/living/M = target + if(chassis.occupant.a_intent == INTENT_HARM)//the patented, medical rescue claw is incapable of doing harm. Worry not. + target.visible_message("[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.", \ + "") + else + push_aside(chassis, M)//out of the way, I have people to save! + occupant_message("You gently push [target] out of the way.") + chassis.visible_message("[chassis] gently pushes [target] out of the way.") + +/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/proc/push_aside(obj/mecha/M, mob/living/L) + switch(get_dir(M, L)) + if(NORTH, SOUTH) + if(prob(50)) + step(L, WEST) + else + step(L, EAST) + if(WEST, EAST) + if(prob(50)) + step(L, NORTH) + else + step(L, SOUTH) + +/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/can_attach(obj/mecha/M) + if(istype(M, /obj/mecha/medical) || istype(M, /obj/mecha/working/ripley/firefighter)) //Odys or firefighters + if(M.equipment.len < M.max_equip) + return TRUE + return FALSE diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 501b41be4cb..a42e76015c1 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -69,7 +69,7 @@ P.failchance = 0 P.icon_state = "anom" P.name = "wormhole" - message_admins("[key_name_admin(chassis.occupant, chassis.occupant.client)](?) (FLW) used a Wormhole Generator in ([loc.x],[loc.y],[loc.z] - JMP)",0,1) + message_admins("[key_name_admin(chassis.occupant, chassis.occupant.client)]([ADMIN_QUE(chassis.occupant,"?")]) ([ADMIN_FLW(chassis.occupant,"FLW")]) used a Wormhole Generator in ([loc.x],[loc.y],[loc.z] - JMP)",0,1) log_game("[key_name(chassis.occupant)] used a Wormhole Generator in ([loc.x],[loc.y],[loc.z])") src = null spawn(rand(150,300)) diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index b63bb4fc40c..d119469d55a 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -63,8 +63,8 @@ start_cooldown() else step_away(M,chassis) - occupant_message("You push [target] out of the way.") - chassis.visible_message("[chassis] pushes [target] out of the way.") + occupant_message("You push [target] out of the way.") + chassis.visible_message("[chassis] pushes [target] out of the way.") return 1 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 41f60361831..d4650aa1bbb 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -41,7 +41,7 @@ var/datum/effect_system/spark_spread/spark_system = new var/lights = 0 var/lights_power = 6 - var/emagged = 0 + var/emagged = FALSE //inner atmos var/use_internal_tank = 0 @@ -851,14 +851,8 @@ check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) -/obj/mecha/emag_act(user as mob) - if(istype(src, /obj/mecha/working/ripley) && emagged == 0) - emagged = 1 - to_chat(usr, "You slide the card through the [src]'s ID slot.") - playsound(loc, "sparks", 100, 1) - desc += "
The mech's equipment slots spark dangerously!" - else - to_chat(usr, "The [src]'s ID slot rejects the card.") +/obj/mecha/emag_act(mob/user) + to_chat(user, "[src]'s ID slot rejects the card.") return diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index 333c05fdd5d..d0fcb0f99be 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -42,5 +42,4 @@ A.remove_hud_from(H) builtin_hud_user = 0 - . = ..() - + . = ..() \ No newline at end of file diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index d29bf2ae460..407c9cd63dc 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -180,4 +180,13 @@ else step_in = 5 for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment) - drill.equip_cooldown = initial(drill.equip_cooldown) \ No newline at end of file + drill.equip_cooldown = initial(drill.equip_cooldown) + +/obj/mecha/working/ripley/emag_act(mob/user) + if(!emagged) + emagged = TRUE + to_chat(user, "You slide the card through [src]'s ID slot.") + playsound(loc, "sparks", 100, 1) + desc += "
The mech's equipment slots spark dangerously!" + else + to_chat(user, "[src]'s ID slot rejects the card.") diff --git a/code/game/objects/effects/decals/Cleanable/robots.dm b/code/game/objects/effects/decals/Cleanable/robots.dm index 16a9bf5a711..1c8ad706dc8 100644 --- a/code/game/objects/effects/decals/Cleanable/robots.dm +++ b/code/game/objects/effects/decals/Cleanable/robots.dm @@ -29,9 +29,7 @@ var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc) streak.update_icon() else if(prob(10)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) if(step_to(src, get_step(src, direction), 0)) break diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 9dc62b3551e..130a50cac89 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -12,13 +12,13 @@ src.icon_state = pick(src.random_icon_states) create_reagents(100) if(smooth) - smooth_icon(src) - smooth_icon_neighbors(src) + queue_smooth(src) + queue_smooth_neighbors(src) ..() /obj/effect/decal/cleanable/Destroy() if(smooth) - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) return ..() /obj/effect/decal/cleanable/attackby(obj/item/W as obj, mob/user as mob,) diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm index b97b149991b..77a51b4d975 100644 --- a/code/game/objects/effects/decals/remains.dm +++ b/code/game/objects/effects/decals/remains.dm @@ -22,12 +22,6 @@ icon_state = "remainsrobot" anchored = TRUE -/obj/effect/decal/remains/robot/New() - ..() - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() - /obj/effect/decal/remains/slime name = "You shouldn't see this" desc = "Noooooooooooooooooooooo" diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm index d71e7631565..1231c8136fa 100644 --- a/code/game/objects/effects/effect_system/effect_system.dm +++ b/code/game/objects/effects/effect_system/effect_system.dm @@ -8,8 +8,9 @@ would spawn and follow the beaker, even if it is carried or thrown. /obj/effect/particle_effect name = "particle effect" mouse_opacity = MOUSE_OPACITY_TRANSPARENT - unacidable = 1//So effects are not targeted by alien acid. + unacidable = TRUE //So effects are not targeted by alien acid. pass_flags = PASSTABLE | PASSGRILLE + anchored = TRUE /obj/effect/particle_effect/New() ..() @@ -28,6 +29,7 @@ would spawn and follow the beaker, even if it is carried or thrown. var/atom/holder var/effect_type var/total_effects = 0 + var/autocleanup = FALSE //will delete itself after use /datum/effect_system/Destroy() holder = null @@ -71,3 +73,5 @@ would spawn and follow the beaker, even if it is carried or thrown. /datum/effect_system/proc/decrement_total_effect() total_effects-- + if(autocleanup && total_effects <= 0) + qdel(src) \ No newline at end of file diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm index ef9ed8ac11a..194a37c860f 100644 --- a/code/game/objects/effects/effect_system/effects_other.dm +++ b/code/game/objects/effects/effect_system/effects_other.dm @@ -155,9 +155,7 @@ /datum/effect_system/reagents_explosion/start() if(amount <= 2) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, location) - s.start() + do_sparks(2, 1, location) for(var/mob/M in viewers(5, location)) to_chat(M, "The solution violently explodes.") diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm index 77925b3170a..f59f44ca1db 100644 --- a/code/game/objects/effects/effect_system/effects_sparks.dm +++ b/code/game/objects/effects/effect_system/effects_sparks.dm @@ -5,15 +5,26 @@ // will always spawn at the items location. ///////////////////////////////////////////// +/proc/do_sparks(n, c, source) + // n - number of sparks + // c - cardinals, bool, do the sparks only move in cardinal directions? + // source - source of the sparks. + + var/datum/effect_system/spark_spread/sparks = new + sparks.set_up(n, c, source) + sparks.autocleanup = TRUE + sparks.start() + /obj/effect/particle_effect/sparks name = "sparks" desc = "it's a spark what do you need to know?" icon_state = "sparks" - anchored = 1 + anchored = TRUE var/hotspottemp = 1000 /obj/effect/particle_effect/sparks/New() ..() + flick("sparks", src) // replay the animation playsound(loc, "sparks", 100, 1) var/turf/T = loc if(isturf(T)) diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index 3cffb3f7eaf..3b08c44114b 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -30,9 +30,7 @@ var/obj/effect/decal/cleanable/blood/gibs/gib = null if(sparks) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, location) - s.start() + do_sparks(2, 1, location) for(var/i = 1, i<= gibtypes.len, i++) if(gibamounts[i]) diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 8323641c899..1b619faa41b 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -25,9 +25,7 @@ if(triggered) return visible_message("[victim] sets off [bicon(src)] [src]!") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) mineEffect(victim) triggered = 1 qdel(src) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index e190988392d..793d7265c27 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -57,9 +57,7 @@ /obj/effect/portal/proc/invalid_teleport() visible_message("[src] flickers and fails due to bluespace interference!") - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, loc) - spark_system.start() + do_sparks(5, 0, loc) qdel(src) diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index b587c650c4c..7a25f4ece1b 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -67,10 +67,7 @@ /obj/item/chameleon/proc/disrupt(var/delete_dummy = 1) if(active_dummy) - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread - spark_system.set_up(5, 0, src) - spark_system.attach(src) - spark_system.start() + do_sparks(5, 0, src) eject_all() if(delete_dummy) qdel(active_dummy) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 175ca0886ad..8b53e3d8ed7 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -35,7 +35,7 @@ return if(H.mind) span = H.mind.speech_span - if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice)) + if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice) || istype(H.get_item_by_slot(slot_wear_mask), /obj/item/clothing/mask/gas/voice/clown)) span = "sans" if(spamcheck) to_chat(user, "\The [src] needs to recharge!") diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 9aa30053983..71fc397a2c4 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -87,9 +87,7 @@ if(M) M.moved_recently = 0 to_chat(M, "You feel a sharp shock!") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, M) - s.start() + do_sparks(3, 1, M) M.Weaken(5) diff --git a/code/game/objects/items/random_items.dm b/code/game/objects/items/random_items.dm index 906c04ba8c8..e6e6fcfc8a0 100644 --- a/code/game/objects/items/random_items.dm +++ b/code/game/objects/items/random_items.dm @@ -51,9 +51,9 @@ /obj/item/reagent_containers/glass/bottle/random_reagent/New() ..() var/list/possible_chems = GLOB.chemical_reagents_list.Copy() - possible_chems -= blocked_chems.Copy() + possible_chems -= GLOB.blocked_chems.Copy() var/datum/reagent/R = pick(possible_chems) - if(rare_chemicals.Find(R)) + if(GLOB.rare_chemicals.Find(R)) reagents.add_reagent(R, 10) else reagents.add_reagent(R, rand(2, 3)*10) @@ -68,7 +68,7 @@ /obj/item/reagent_containers/glass/bottle/random_chem/New() ..() var/R = get_random_reagent_id() - if(rare_chemicals.Find(R)) + if(GLOB.rare_chemicals.Find(R)) reagents.add_reagent(R, 10) else reagents.add_reagent(R, rand(2, 3)*10) @@ -82,7 +82,7 @@ /obj/item/reagent_containers/glass/bottle/random_base_chem/New() ..() - var/datum/reagent/R = pick(base_chemicals) + var/datum/reagent/R = pick(GLOB.base_chemicals) reagents.add_reagent(R, rand(2, 6)*5) name = "unlabelled bottle" pixel_x = rand(-10, 10) @@ -94,7 +94,7 @@ /obj/item/reagent_containers/food/drinks/bottle/random_drink/New() ..() - var/list/possible_drinks = drinks.Copy() + var/list/possible_drinks = GLOB.drinks.Copy() if(prob(50)) possible_drinks += list("pancuronium","lsd","omnizine","blood") @@ -113,7 +113,7 @@ ..() var/R = get_random_reagent_id() - if(rare_chemicals.Find(R)) + if(GLOB.rare_chemicals.Find(R)) reagents.add_reagent(R, 10) else reagents.add_reagent(R, rand(3, 10)*10) @@ -131,13 +131,13 @@ /obj/item/storage/pill_bottle/random_meds/New() ..() for(var/i in 1 to storage_slots) - var/list/possible_medicines = standard_medicines.Copy() + var/list/possible_medicines = GLOB.standard_medicines.Copy() if(prob(50)) - possible_medicines += rare_medicines.Copy() + possible_medicines += GLOB.rare_medicines.Copy() var/datum/reagent/R = pick(possible_medicines) var/obj/item/reagent_containers/food/pill/P = new(src) - if(rare_medicines.Find(R)) + if(GLOB.rare_medicines.Find(R)) P.reagents.add_reagent(R, 10) else P.reagents.add_reagent(R, rand(2, 5)*10) @@ -182,7 +182,7 @@ /obj/structure/closet/crate/secure/chemicals/New() ..() - for(var/chem in standard_chemicals) + for(var/chem in GLOB.standard_chemicals) var/obj/item/reagent_containers/glass/bottle/B = new(src) B.reagents.add_reagent(chem, B.volume) if(prob(85)) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 4064bf63adb..017dade9ac4 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -166,7 +166,7 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \ /obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W, mob/user, params) if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite - message_admins("Plasma sheets ignited by [key_name_admin(user)](?) (FLW) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma sheets ignited by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) in ([x],[y],[z] - JMP)",0,1) log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])") investigate_log("was ignited by [key_name(user)]","atmos") fire_act() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index bd06be3282b..3c33d8f66a0 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -54,7 +54,7 @@ to_chat(user, "There are [amount] [singular_name]\s in the stack.") else to_chat(user, "There are [amount] [name]\s in the stack.") - to_chat(user,"Alt-click to take a custom amount.") + to_chat(user,"Ctrl-Shift-click to take a custom amount.") /obj/item/stack/proc/add(newamount) amount += newamount @@ -269,7 +269,7 @@ else ..() -/obj/item/stack/AltClick(mob/living/user) +/obj/item/stack/CtrlShiftClick(mob/living/user) if(!istype(user) || user.incapacitated()) to_chat(user, "You can't do that right now!") return diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index c1b88897bfd..e672ff14b10 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -250,9 +250,7 @@ /obj/item/toy/snappop/virus/throw_impact(atom/hit_atom) ..() - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) new /obj/effect/decal/cleanable/ash(src.loc) visible_message("The [name] explodes!","You hear a bang!") playsound(src, 'sound/effects/snap.ogg', 50, 1) @@ -270,9 +268,7 @@ var/ash_type = /obj/effect/decal/cleanable/ash /obj/item/toy/snappop/proc/pop_burst(var/n=3, var/c=1) - var/datum/effect_system/spark_spread/s = new() - s.set_up(n, c, src) - s.start() + do_sparks(n, c, src) new ash_type(loc) visible_message("[src] explodes!", "You hear a snap!") diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 19f989ec7b7..dc691055420 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -152,8 +152,13 @@ RCD var/obj/item/pda/pda = I I = pda.id var/obj/item/card/id/ID = I - if(istype(ID) && ID && check_access(ID)) - locked = 0 + if(istype(ID) && ID) + if(check_access(ID)) + locked = 0 + else + to_chat(usr, "This ID lacks access.") + else + to_chat(usr, "You can't swipe without your ID in hand.") . = 1 if(href_list["logout"]) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index daaa5c3e4c4..38051dde621 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -774,9 +774,9 @@ // Decals /obj/item/id_decal name = "identification card decal" - desc = "A modification kit to make your ID cards look snazzy.." - icon = 'icons/obj/device.dmi' - icon_state = "batterer" + desc = "A nano-cellophane wrap that molds to an ID card to make it look snazzy." + icon = 'icons/obj/toy.dmi' + icon_state = "id_decal" var/decal_name = "identification card" var/decal_desc = "A card used to provide ID and determine access across the station." var/decal_icon_state = "id" @@ -784,30 +784,40 @@ var/override_name = 0 /obj/item/id_decal/gold - name = "gold ID card card decal" + name = "gold ID card decal" + icon_state = "id_decal_gold" + desc = "Make your ID look like the Captain's or a self-centered HOP's. Applies to any ID." decal_desc = "A golden card which shows power and might." decal_icon_state = "gold" decal_item_state = "gold_id" /obj/item/id_decal/silver name = "silver ID card decal" + icon_state = "id_decal_silver" + desc = "Make your ID look like HOP's because they wouldn't change it officially. Applies to any ID." decal_desc = "A silver card which shows honour and dedication." decal_icon_state = "silver" decal_item_state = "silver_id" /obj/item/id_decal/prisoner name = "prisoner ID card decal" + icon_state = "id_decal_prisoner" + desc = "All the cool kids have an ID that's this color. Applies to any ID." decal_desc = "You are a number, you are not a free man." decal_icon_state = "prisoner" decal_item_state = "orange-id" /obj/item/id_decal/centcom name = "centcom ID card decal" + icon_state = "id_decal_centcom" + desc = "All the prestige without the responsibility or the access. Applies to any ID." decal_desc = "An ID straight from Cent. Com." decal_icon_state = "centcom" /obj/item/id_decal/emag name = "cryptographic sequencer ID card decal" + icon_state = "id_decal_emag" + desc = "A bundle of wires that you can tape to your ID to look very suspect. Applies to any ID." decal_name = "cryptographic sequencer" decal_desc = "It's a card with a magnetic strip attached to some circuitry." decal_icon_state = "emag" diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 26639543426..34877ac8788 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -79,7 +79,7 @@ src.target = AM loc = null - message_admins("[key_name_admin(user)](?) (FLW) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [det_time] second fuse",0,1) + message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [det_time] second fuse",0,1) log_game("[key_name(user)] planted [name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse") target.overlays += image_overlay @@ -88,7 +88,7 @@ addtimer(CALLBACK(src, .proc/prime), det_time*10) /obj/item/grenade/plastic/suicide_act(mob/user) - message_admins("[key_name_admin(user)](?) (FLW) suicided with [src.name] at ([user.x],[user.y],[user.z] - JMP)",0,1) + message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) suicided with [src.name] at ([user.x],[user.y],[user.z] - JMP)",0,1) log_game("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])") user.visible_message("[user] activates the [name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!") var/message_say = "FOR NO RAISIN!" diff --git a/code/game/objects/items/weapons/fireworks.dm b/code/game/objects/items/weapons/fireworks.dm index 138cb24ff40..d2e523cf953 100644 --- a/code/game/objects/items/weapons/fireworks.dm +++ b/code/game/objects/items/weapons/fireworks.dm @@ -25,7 +25,7 @@ obj/item/sparkler icon = 'icons/obj/fireworks.dmi' icon_state = "sparkler_0" var/litzor = 0 - var/datum/effect_system/spark_spread/S + obj/item/sparkler/attackby(obj/item/W,mob/user, params) if(litzor) return @@ -36,11 +36,7 @@ obj/item/sparkler/attackby(obj/item/W,mob/user, params) icon_state = "sparkler_1" var/b = rand(5,9) for(var/xy, xy<=b, xy++) - S = new() - S.set_up(1,0,src.loc) - if(ismob(src.loc) || isobj(src.loc)) - S.attach(src.loc) - S.start() + do_sparks(1, 0, loc) sleep(10) qdel(src) /obj/crate/fireworks diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 9e836fecc87..6d2bd3649cf 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -289,7 +289,7 @@ var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast) var/turf/T = get_turf(src) var/area/A = get_area(T) - message_admins("grenade primed by an assembly, attached by [key_name_admin(M)](?) ([admin_jump_link(M)]) and last touched by [key_name_admin(last)](?) ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP). [contained]") + message_admins("grenade primed by an assembly, attached by [key_name_admin(M)][ADMIN_QUE(M,"(?)")] ([admin_jump_link(M)]) and last touched by [key_name_admin(last)][ADMIN_QUE(last,"(?)")] ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP). [contained]") log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z]) [contained]") update_mob() @@ -419,7 +419,7 @@ var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast) var/turf/T = get_turf(src) var/area/A = get_area(T) - message_admins("grenade primed by an assembly, attached by [key_name_admin(M)](?) (FLW) and last touched by [key_name_admin(last)](?) (FLW) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP).") + message_admins("grenade primed by an assembly, attached by [key_name_admin(M)][ADMIN_QUE(M,"(?)")] ([ADMIN_FLW(M,"FLW")]) and last touched by [key_name_admin(last)][ADMIN_QUE(last,"(?)")] ([ADMIN_FLW(last,"FLW")]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP).") log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])") else addtimer(CALLBACK(src, .proc/prime), det_time) diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index c705374f7a9..3391687f20a 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -136,9 +136,7 @@ /obj/item/restraints/legcuffs/beartrap/energy/proc/dissipate() if(!ismob(loc)) - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread - sparks.set_up(1, 1, src) - sparks.start() + do_sparks(1, 1, src) qdel(src) /obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 2dcbef5b1a5..8ad283a77da 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -215,16 +215,8 @@ throw_speed = 3 throw_range = 1 w_class = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such. - var/datum/effect_system/spark_spread/spark_system sharp = 1 -//Most of the other special functions are handled in their own files. aka special snowflake code so kewl -/obj/item/melee/energy/blade/New() - ..() - spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, src) - spark_system.attach(src) - /obj/item/melee/energy/blade/attack_self(mob/user) return diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 85a0e679bb6..cd2f6dff192 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -89,6 +89,24 @@ icon_state = "clownpack" item_state = "clownpack" +/obj/item/storage/backpack/clown/syndie + +/obj/item/storage/backpack/clown/syndie/New() + ..() + new /obj/item/clothing/under/rank/clown(src) + new /obj/item/clothing/shoes/magboots/clown(src) + new /obj/item/clothing/mask/gas/voice/clown(src) + new /obj/item/radio/headset/headset_service(src) + new /obj/item/pda/clown(src) + new /obj/item/reagent_containers/food/snacks/grown/banana(src) + new /obj/item/stamp/clown(src) + new /obj/item/toy/crayon/rainbow(src) + new /obj/item/storage/fancy/crayons(src) + new /obj/item/reagent_containers/spray/waterflower(src) + new /obj/item/reagent_containers/food/drinks/bottle/bottleofbanana(src) + new /obj/item/instrument/bikehorn(src) + new /obj/item/bikehorn(src) + /obj/item/storage/backpack/mime name = "Parcel Parceaux" desc = "A silent backpack made for those silent workers. Silence Co." diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index bb78ba208ec..0a256136d2e 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -74,9 +74,7 @@ overlays += image('icons/obj/storage.dmi', icon_locking) locked = 0 if(istype(weapon, /obj/item/melee/energy/blade)) - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() + do_sparks(5, 0, loc) playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) playsound(loc, "sparks", 50, 1) to_chat(user, "You slice through the lock on [src].") diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 4defb3b4aae..be803058ea7 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -100,6 +100,8 @@ return L /obj/item/storage/proc/show_to(mob/user as mob) + if(!user.client) + return if(user.s_active != src) for(var/obj/item/I in src) if(I.on_found(user)) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 56bf5538b02..b9d383b9308 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -139,12 +139,15 @@ /obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/user) + if(!ismob(L)) //because this was being called on turfs for some reason + return + if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that playsound(L, 'sound/weapons/Genhit.ogg', 50, 1) return - + L.Stun(stunforce) L.Weaken(stunforce) L.apply_effect(STUTTER, stunforce) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 08a6a3e168c..b30d932eed2 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -120,7 +120,7 @@ name = "screwdriver" desc = "You can be totally screwy with this." icon = 'icons/obj/tools.dmi' - icon_state = null + icon_state = "screwdriver_map" flags = CONDUCT slot_flags = SLOT_BELT force = 5 @@ -133,6 +133,7 @@ hitsound = 'sound/weapons/bladeslice.ogg' usesound = 'sound/items/Screwdriver.ogg' toolspeed = 1 + var/random_color = TRUE //if the screwdriver uses random coloring /obj/item/screwdriver/nuke name = "screwdriver" @@ -146,7 +147,7 @@ /obj/item/screwdriver/New(loc, var/param_color = null) ..() - if(!icon_state) + if(random_color) if(!param_color) param_color = pick("red","blue","pink","brown","green","cyan","yellow") icon_state = "screwdriver_[param_color]" @@ -168,6 +169,7 @@ desc = "A screwdriver made of brass. The handle feels freezing cold." icon_state = "screwdriver_brass" toolspeed = 0.5 + random_color = FALSE /obj/item/screwdriver/abductor name = "alien screwdriver" @@ -176,6 +178,7 @@ icon_state = "screwdriver" usesound = 'sound/items/PSHOOM.ogg' toolspeed = 0.1 + random_color = FALSE /obj/item/screwdriver/power name = "hand drill" @@ -192,6 +195,7 @@ hitsound = 'sound/items/drill_hit.ogg' usesound = 'sound/items/drill_use.ogg' toolspeed = 0.25 + random_color = FALSE /obj/item/screwdriver/power/suicide_act(mob/user) user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!") @@ -215,7 +219,7 @@ name = "wirecutters" desc = "This cuts wires." icon = 'icons/obj/tools.dmi' - icon_state = null + icon_state = "cutters" flags = CONDUCT slot_flags = SLOT_BELT force = 6 @@ -229,10 +233,11 @@ usesound = 'sound/items/Wirecutter.ogg' sharp = 1 toolspeed = 1 + var/random_color = TRUE /obj/item/wirecutters/New(loc, param_color = null) ..() - if(!icon_state) + if(random_color) if(!param_color) param_color = pick("yellow", "red") icon_state = "cutters_[param_color]" @@ -258,6 +263,7 @@ desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch." icon_state = "cutters_brass" toolspeed = 0.5 + random_color = FALSE /obj/item/wirecutters/abductor name = "alien wirecutters" @@ -266,6 +272,7 @@ icon_state = "cutters" toolspeed = 0.1 origin_tech = "materials=5;engineering=4;abductor=3" + random_color = FALSE /obj/item/wirecutters/cyborg name = "wirecutters" @@ -281,6 +288,7 @@ materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) usesound = 'sound/items/jaws_cut.ogg' toolspeed = 0.25 + random_color = FALSE /obj/item/wirecutters/power/suicide_act(mob/user) user.visible_message("[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!") diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 9b50956f1af..9418df86368 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -614,9 +614,7 @@ origin_tech = "combat=4;powerstorage=7" /obj/item/twohanded/mjollnir/proc/shock(mob/living/target) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread() - s.set_up(5, 1, target.loc) - s.start() + do_sparks(5, 1, target.loc) target.visible_message("[target.name] was shocked by the [name]!", \ "You feel a powerful shock course through your body sending you flying!", \ "You hear a heavy electrical crack!") @@ -739,9 +737,7 @@ Z.take_organ_damage(0, 30) user.visible_message("[user] slams the charged axe into [Z.name] with all [user.p_their()] might!") playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1) - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread - sparks.set_up(1, 1, src) - sparks.start() + do_sparks(1, 1, src) if(A && wielded && (istype(A, /obj/structure/window) || istype(A, /obj/structure/grille))) if(istype(A, /obj/structure/window)) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index f74a3b542ca..e38350a0136 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -32,8 +32,8 @@ ..() if(smooth) if(ticker && ticker.current_state == GAME_STATE_PLAYING) - smooth_icon(src) - smooth_icon_neighbors(src) + queue_smooth(src) + queue_smooth_neighbors(src) icon_state = "" if(climbable) verbs += /obj/structure/proc/climb_on @@ -46,7 +46,7 @@ if(smooth) var/turf/T = get_turf(src) spawn(0) - smooth_icon_neighbors(T) + queue_smooth_neighbors(T) return ..() /obj/structure/proc/climb_on() diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 2f681c79d76..8e328c9400e 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -206,9 +206,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) do_teleport(src, E.pad, 0) to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.") return @@ -233,9 +231,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) do_teleport(src, L) to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.") return diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 2a5639eb081..b5b29e8caac 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -253,6 +253,7 @@ new /obj/item/clothing/accessory/holster(src) new /obj/item/clothing/accessory/blue(src) new /obj/item/clothing/shoes/jackboots/jacksandals(src) + new /obj/item/clothing/under/rank/centcom/blueshield(src) /obj/structure/closet/secure_closet/ntrep diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 648f3c95622..87cae2fb993 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -38,15 +38,13 @@ if(isliving(usr)) var/mob/living/L = usr if(L.electrocute_act(17, src)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return 2 playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3) for(var/obj/O in src) //Objects - O.forceMove(loc) - for(var/mob/M in src) //Mobs + O.forceMove(loc) + for(var/mob/M in src) //Mobs M.forceMove(loc) icon_state = icon_opened src.opened = 1 @@ -115,9 +113,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) do_teleport(src, E.pad, 0) to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.") return @@ -139,9 +135,7 @@ if(!(E.rcell && E.rcell.use(E.chargecost))) to_chat(user, "Unable to teleport, insufficient charge.") return - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) do_teleport(src, L) to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.") return @@ -217,9 +211,7 @@ if(isliving(user)) var/mob/living/L = user if(L.electrocute_act(17, src)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return src.add_fingerprint(user) src.toggle(user) diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index 348c6fde265..dcbc7c017bb 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -69,9 +69,7 @@ A.updateicon() flick("echair_shock", src) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(12, 1, src) - s.start() + do_sparks(12, 1, src) visible_message("The electric chair went off!", "You hear a deep sharp shock!") if(buckled_mob) buckled_mob.electrocute_act(110, src, 1) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 31239a5ecb4..98d17d71be9 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -82,7 +82,7 @@ if(density) icon_state = initial(icon_state) smooth = SMOOTH_TRUE - smooth_icon(src) + queue_smooth(src) else icon_state = "fwall_open" @@ -322,4 +322,4 @@ mineral = /obj/item/stack/sheet/mineral/plastitanium walltype = /turf/simulated/wall/mineral/plastitanium smooth = SMOOTH_MORE - canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater) \ No newline at end of file + canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 6b8f5544428..22b796c4c20 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -254,9 +254,7 @@ var/obj/structure/cable/C = T.get_cable_node() if(C) if(electrocute_mob(user, C, src)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) return 1 else return 0 diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 44c9da74b20..7cee3769888 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -6,29 +6,44 @@ FLOOR SAFES //SAFES /obj/structure/safe - name = "safe" + name = "\improper Safe" desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\"" icon = 'icons/obj/structures.dmi' icon_state = "safe" anchored = 1 density = 1 - var/open = 0 //is the safe open? + var/open = FALSE //is the safe open? + var/unlocked = FALSE var/tumbler_1_pos //the tumbler position- from 0 to 72 var/tumbler_1_open //the tumbler position to open at- 0 to 72 var/tumbler_2_pos var/tumbler_2_open + var/open_pos var/dial = 0 //where is the dial pointing? var/space = 0 //the combined w_class of everything in the safe var/maxspace = 24 //the maximum combined w_class of stuff in the safe + var/combo_to_open //so admins know the code /obj/structure/safe/New() - tumbler_1_pos = rand(0, 71) - tumbler_1_open = rand(0, 71) + tumbler_2_pos = rand(0, 99) // first value in the combination set first + tumbler_2_open = rand(0, 99) - tumbler_2_pos = rand(0, 71) - tumbler_2_open = rand(0, 71) + tumbler_1_pos = rand(0, 99) + do + tumbler_1_open = rand(0, 99) + while(tumbler_1_open > Wrap(tumbler_2_open +48, 0, 100) && tumbler_1_open < Wrap(tumbler_2_open + 53, 0, 100)) // prevents a combination that wont open + do + open_pos = rand(0,99) + while(open_pos > Wrap(tumbler_1_open - 2, 0, 100) && open_pos < Wrap(tumbler_1_open + 2, 0, 100)) // prevents a combination that wont open + var/num1 = tumbler_2_open + 54 + if(num1 > 99) + num1 = num1 - 100 + var/num2 = tumbler_1_open + 98 + if(num2 > 99) + num2 = num2 - 100 + combo_to_open = "Go right past [num1] twice then stop at [num1]. Go left past [num2] once then stop at [num2]. Turn right till it stops and its open." /obj/structure/safe/Initialize() ..() @@ -40,31 +55,28 @@ FLOOR SAFES I.loc = src -/obj/structure/safe/proc/check_unlocked(mob/user, canhear) +/obj/structure/safe/proc/check_unlocked() + if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open && dial == open_pos) + unlocked = TRUE + return TRUE + unlocked = FALSE + return FALSE + +/obj/structure/safe/proc/make_noise(turns, turns_total, tum1 = 0, tum2 = 0, mob/user, canhear) if(user && canhear) - if(tumbler_1_pos == tumbler_1_open) + if(turns == 2) + to_chat(user, "The sounds from [src] are too fast and blend together.") + if(tum1 && (turns_total == 1 || prob(10))) // So multi turns dont super spam the chat + to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].") + if(tum2 && (turns_total == 1 || prob(10))) // So multi turns dont super spam the chat + to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].") + if(tumbler_1_pos == tumbler_1_open && turns_total == 1) // You cant hear tumblers if you spin fast! to_chat(user, "You hear a [pick("tonk", "krunk", "plunk")] from [src].") - if(tumbler_2_pos == tumbler_2_open) + if(tumbler_2_pos == tumbler_2_open && turns_total == 1 ) // You cant hear tumblers if you spin fast! to_chat(user, "You hear a [pick("tink", "krink", "plink")] from [src].") - if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open) - if(user) visible_message("[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!") - return 1 - return 0 - - -/obj/structure/safe/proc/decrement(num) - num -= 1 - if(num < 0) - num = 71 - return num - - -/obj/structure/safe/proc/increment(num) - num += 1 - if(num > 71) - num = 0 - return num - + if(unlocked) + if(user) + visible_message("[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!") /obj/structure/safe/update_icon() if(open) @@ -72,75 +84,112 @@ FLOOR SAFES else icon_state = initial(icon_state) - /obj/structure/safe/attack_hand(mob/user) - user.set_machine(src) - var/dat = "
" - dat += "[open ? "Close" : "Open"] [src] | - [dial * 5] +" + if(..()) + return TRUE + ui_interact(user) + return + +/obj/structure/safe/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "safe.tmpl", name, 600, 750) + ui.open() + ui.set_auto_update(1) + +/obj/structure/safe/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) + var/data[0] + var/list/contents_names = list() if(open) - dat += "" - for(var/i = contents.len, i>=1, i--) - var/obj/item/P = contents[i] - dat += "" - dat += "
[P.name]
" - user << browse("[name][dat]", "window=safe;size=350x300") + for(var/obj/O in contents) + contents_names[++contents_names.len] = list("name" = O.name, "index" = contents.Find(O), "sprite" = O.icon_state) + user << browse_rsc(icon(O.icon, O.icon_state), "[O.icon_state].png") + else + contents_names = list(list("name" = "you're"), list("name" = "a"), list("name" = "cheater")) + + data["dial"] = dial + data["open"] = open + data["unlocked"] = unlocked + data["rotation"] = "[-dial*3.6]deg" + data["contents"] = contents_names + + return data /obj/structure/safe/Topic(href, href_list) - if(!ishuman(usr)) return - var/mob/living/carbon/human/user = usr + if(..()) + return TRUE var/canhear = 0 + if(!ishuman(usr)) + to_chat(usr, "You don't have hands to operate the safe!") + return FALSE + + var/mob/living/carbon/human/user = usr if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope)) canhear = 1 if(href_list["open"]) - if(check_unlocked()) + if(check_unlocked() || open) to_chat(user, "You [open ? "close" : "open"] [src].") open = !open update_icon() - updateUsrDialog() - return else - to_chat(user, "You can't [open ? "close" : "open"] [src], the lock is engaged!") - return + to_chat(user, "You can't open [src], the lock is engaged!") + .= TRUE + SSnanoui.update_uis(src) if(href_list["decrement"]) - dial = decrement(dial) - if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71) - tumbler_1_pos = decrement(tumbler_1_pos) - if(canhear) - to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].") - if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35) - tumbler_2_pos = decrement(tumbler_2_pos) - if(canhear) - to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].") - check_unlocked(user, canhear) - updateUsrDialog() - return + var/ticks = text2num(href_list["decrement"]) + if(open) + return + for(var/i=1 to ticks) + if(!check_unlocked()) + dial = Wrap(dial - 1, 0 ,100) + if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 99) + tumbler_1_pos = Wrap(tumbler_1_pos - 1, 0, 100) + make_noise(i, ticks, 1, 0, user, canhear) + if(tumbler_1_pos == tumbler_2_pos + 51 || tumbler_1_pos == tumbler_2_pos - 49) + tumbler_2_pos = Wrap(tumbler_2_pos - 1, 0, 100) + make_noise(0, ticks, 0, 1, user, canhear) + sleep(1) + check_unlocked() + SSnanoui.update_uis(src) + make_noise(0, 0, 0, 0, user, canhear) + .= TRUE if(href_list["increment"]) - dial = increment(dial) - if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71) - tumbler_1_pos = increment(tumbler_1_pos) - if(canhear) - to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].") - if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35) - tumbler_2_pos = increment(tumbler_2_pos) - if(canhear) - to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].") - check_unlocked(user, canhear) - updateUsrDialog() - return + var/ticks = text2num(href_list["increment"]) + if(open) + return + for(var/i=1 to ticks) + check_unlocked() + dial = Wrap(dial + 1, 0, 100) + if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 99) + tumbler_1_pos = Wrap(tumbler_1_pos + 1, 0, 100) + make_noise(i, ticks, 1, 0, user, canhear) + if(tumbler_1_pos == tumbler_2_pos - 51 || tumbler_1_pos == tumbler_2_pos + 49) + tumbler_2_pos = Wrap(tumbler_2_pos + 1, 0, 100) + make_noise(0, ticks, 0, 1, user, canhear) + sleep(1) + SSnanoui.update_uis(src) + make_noise(0, 0, 0, 0, user, canhear) + .= TRUE if(href_list["retrieve"]) - user << browse("", "window=safe") // Close the menu + var/index = text2num(href_list["retrieve"]) + if(index > 0 && index <= contents.len) + var/obj/item/P = contents[index] + if(open) + if(P && in_range(src, user)) + user.put_in_hands(P) + space -= P.w_class + SSnanoui.update_uis(src) + .= TRUE - var/obj/item/P = locate(href_list["retrieve"]) in src - if(open) - if(P && in_range(src, user)) - user.put_in_hands(P) - updateUsrDialog() + + updateUsrDialog() + return /obj/structure/safe/attackby(obj/item/I, mob/user, params) @@ -161,14 +210,19 @@ FLOOR SAFES if(istype(I, /obj/item/clothing/accessory/stethoscope)) to_chat(user, "Hold [I] in one of your hands while you manipulate the dial!") return + else + to_chat(user, "You can't put [I] in into the safe while it is closed!") + return -obj/structure/safe/blob_act() +/obj/structure/safe/blob_act() return -obj/structure/safe/ex_act(severity) +/obj/structure/safe/ex_act(severity) return +/obj/structure/safe/examine_status(mob/user) + return //FLOOR SAFES /obj/structure/safe/floor diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 2d122921b12..14ef2b08f2b 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -184,17 +184,17 @@ burn = TRUE if(burn) if(Proj.firer) - message_admins("Plasma statue ignited by [key_name_admin(Proj.firer)](?) (FLW) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma statue ignited by [key_name_admin(Proj.firer)]([ADMIN_QUE(Proj.firer,"?")]) ([ADMIN_FLW(Proj.firer,"FLW")]) in ([x],[y],[z] - JMP)",0,1) log_game("Plasma statue ignited by [key_name(Proj.firer)] in ([x],[y],[z])") investigate_log("was ignited by [key_name(Proj.firer)]","atmos") else - message_admins("Plasma statue ignited by [Proj]. No known firer.(?) (FLW) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma statue ignited by [Proj]. No known firer.([ADMIN_QUE(Proj.firer,"?")]) ([ADMIN_FLW(Proj.firer,"FLW")]) in ([x],[y],[z] - JMP)",0,1) log_game("Plasma statue ignited by [Proj] in ([x],[y],[z]). No known firer.") ..() /obj/structure/statue/plasma/attackby(obj/item/W, mob/user, params) if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite - message_admins("Plasma statue ignited by [key_name_admin(user)](?) (FLW) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma statue ignited by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) in ([x],[y],[z] - JMP)",0,1) log_game("Plasma statue ignited by [key_name(user)] in ([x],[y],[z])") investigate_log("was ignited by [key_name(user)]","atmos") ignite(is_hot(W)) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 91f348d0106..7554b7ae194 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -50,8 +50,8 @@ /obj/structure/table/update_icon() if(smooth && !flipped) icon_state = "" - smooth_icon(src) - smooth_icon_neighbors(src) + queue_smooth(src) + queue_smooth_neighbors(src) if(flipped) clear_smooth_overlays() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 25c78f6e972..a33e4176599 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -65,7 +65,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f else to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.") if(!anchored && !fulltile) - to_chat(user, "Alt-click to rotate it clockwise.") + to_chat(user, "Alt-click to rotate it.") /obj/structure/window/New(Loc, direct) ..() @@ -355,7 +355,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f set category = "Object" set src in oview(1) - if(usr.stat || !usr.canmove || usr.restrained()) + if(usr.incapacitated()) return if(anchored) @@ -378,7 +378,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f set category = "Object" set src in oview(1) - if(usr.stat || !usr.canmove || usr.restrained()) + if(usr.incapacitated()) return if(anchored) @@ -397,12 +397,31 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return TRUE /obj/structure/window/AltClick(mob/user) + if(user.incapacitated()) to_chat(user, "You can't do that right now!") return + if(!Adjacent(user)) + to_chat(user, "Move closer to the window!") return - revrotate() + + if(anchored) + to_chat(user, "[src] cannot be rotated while it is fastened to the floor!") + return FALSE + + var/target_dir = turn(dir, 270) + + if(!valid_window_location(loc, target_dir)) + target_dir = turn(dir, 90) + if(!valid_window_location(loc, target_dir)) + to_chat(user, "There is no room to rotate the [src]") + return FALSE + + setDir(target_dir) + ini_dir = dir + add_fingerprint(user) + return TRUE /obj/structure/window/Destroy() density = FALSE @@ -425,7 +444,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f /obj/structure/window/proc/update_nearby_icons() update_icon() if(smooth) - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) /obj/structure/window/update_icon() if(!QDELETED(src)) @@ -434,7 +453,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f var/ratio = obj_integrity / max_integrity ratio = CEILING(ratio*4, 1) * 25 if(smooth) - smooth_icon(src) + queue_smooth(src) overlays -= crack_overlay if(ratio > 75) return @@ -714,4 +733,4 @@ obj/structure/window/full/reinforced/ice dir = FULLTILE_WINDOW_DIR max_integrity = 120 level = 3 - glass_amount = 2 \ No newline at end of file + glass_amount = 2 diff --git a/code/game/sound.dm b/code/game/sound.dm index c791d3eebb5..ed42af1223f 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -146,4 +146,7 @@ 'sound/machines/terminal_button07.ogg', 'sound/machines/terminal_button08.ogg') if("growls") soundin = pick('sound/goonstation/voice/growl1.ogg', 'sound/goonstation/voice/growl2.ogg', 'sound/goonstation/voice/growl3.ogg') + + if("bonebreak") + soundin = pick('sound/effects/bone_break_1.ogg', 'sound/effects/bone_break_2.ogg', 'sound/effects/bone_break_3.ogg', 'sound/effects/bone_break_4.ogg', 'sound/effects/bone_break_5.ogg', 'sound/effects/bone_break_6.ogg') return soundin diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index fedbfaa5929..21dbdb9e024 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -85,6 +85,6 @@ /turf/simulated/ChangeTurf(var/path) . = ..() - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) /turf/simulated/proc/is_shielded() diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 42d241404b1..d26a24b39a2 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -180,7 +180,6 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," var/turf/simulated/floor/plating/P = pry_tile(CB, user, TRUE) if(!istype(P)) return - update_icon() P.attackby(T, user, params) /turf/simulated/floor/proc/pry_tile(obj/item/C, mob/user, silent = FALSE) diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm index 96f10a832b5..e9f8d96e70f 100644 --- a/code/game/turfs/simulated/floor/fancy_floor.dm +++ b/code/game/turfs/simulated/floor/fancy_floor.dm @@ -128,11 +128,11 @@ return 0 if(!broken && !burnt) if(smooth) - smooth_icon(src) + queue_smooth(src) else make_plating() if(smooth) - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) /turf/simulated/floor/carpet/break_tile() broken = 1 diff --git a/code/game/turfs/simulated/floor/mineral.dm b/code/game/turfs/simulated/floor/mineral.dm index d2e147d9532..f5a07bf9241 100644 --- a/code/game/turfs/simulated/floor/mineral.dm +++ b/code/game/turfs/simulated/floor/mineral.dm @@ -38,7 +38,7 @@ /turf/simulated/floor/mineral/plasma/attackby(obj/item/W, mob/user, params) if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite - message_admins("Plasma flooring was ignited by [key_name_admin(user)](?) (FLW) in ([x],[y],[z] - JMP)",0,1) + message_admins("Plasma flooring was ignited by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) in ([x],[y],[z] - JMP)",0,1) log_game("Plasma flooring was ignited by [key_name(user)] in ([x],[y],[z])") investigate_log("was ignited by [key_name(user)]","atmos") ignite(is_hot(W)) diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 4c6eee6311e..c6de130c81a 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -15,9 +15,6 @@ /turf/simulated/floor/plating/New() ..() icon_plating = icon_state - if(icon == 'icons/turf/floors/plating.dmi') - smooth = SMOOTH_MORE - canSmoothWith = list(/turf/simulated/floor/plating, /turf/space) update_icon() /turf/simulated/floor/plating/update_icon() @@ -25,7 +22,6 @@ return if(!broken && !burnt) icon_state = icon_plating //Because asteroids are 'platings' too. - underlays += image(icon, icon_state) /turf/simulated/floor/plating/attackby(obj/item/C, mob/user, params) if(..()) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index c22c7530505..6008b093c5a 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -72,7 +72,7 @@ if(!damage_overlays[1]) //list hasn't been populated generate_overlays() - smooth_icon(src) + queue_smooth(src) if(!damage) if(damage_overlay) overlays -= damage_overlays[damage_overlay] diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index eb054ba19ed..f1837173d6d 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -65,7 +65,7 @@ d_state = RWALL_INTACT update_icon() - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) to_chat(user, "You repair the last of the damage.") return TRUE @@ -84,7 +84,7 @@ to_chat(user, "You add an additional layer of coating to the wall.") ChangeTurf(/turf/simulated/wall/r_wall/coated) update_icon() - smooth_icon_neighbors(src) + queue_smooth_neighbors(src) can_be_reinforced = FALSE return TRUE return FALSE diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 2e60537ce6f..d7ed44c3c9a 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -39,18 +39,18 @@ for(var/atom/movable/AM in src) Entered(AM) if(smooth && ticker && ticker.current_state == GAME_STATE_PLAYING) - smooth_icon(src) + queue_smooth(src) /hook/startup/proc/smooth_world() var/watch = start_watch() log_startup_progress("Smoothing atoms...") for(var/turf/T in world) if(T.smooth) - smooth_icon(T) + queue_smooth(T) for(var/A in T) var/atom/AA = A if(AA.smooth) - smooth_icon(AA) + queue_smooth(AA) log_startup_progress(" Smoothed atoms in [stop_watch(watch)]s.") return 1 @@ -226,8 +226,6 @@ for(var/obj/structure/cable/C in contents) qdel(C) - smooth_icon(src) - /turf/simulated/AfterChange(ignore_air, keep_cabling = FALSE) ..() RemoveLattice() diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm index fa65fffbce9..8a322edd2f8 100644 --- a/code/game/verbs/who.dm +++ b/code/game/verbs/who.dm @@ -47,7 +47,7 @@ if(is_special_character(C.mob)) entry += " - Antagonist" - entry += " (?)" + entry += " ([ADMIN_QUE(C.mob,"?")])" Lines += entry else for(var/client/C in GLOB.clients) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 1b3b2edcf3d..ec9fa9af05e 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -11,7 +11,7 @@ world/IsBanned(key,address,computer_id) var/ckey = ckey(key) if((ckey in admin_datums) || (ckey in GLOB.deadmins)) var/datum/admins/A = admin_datums[ckey] - if(A.rights & R_ADMIN) + if(A && (A.rights & R_ADMIN)) admin = 1 //Guest Checking diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 4382c36b58a..2c16a0feb49 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -53,13 +53,13 @@ var/global/nologevent = 0 if(istype(M, /mob/new_player)) body += " Hasn't Entered Game " else - body += " \[Heal\] " + body += " \[Heal\] " body += "

\[ " body += "VV - " - body += "TP - " - body += "PM - " - body += "SM - " + body += "[ADMIN_TP(M,"TP")] - " + body += "PM - " + body += "[ADMIN_SM(M,"SM")] - " if(ishuman(M) && M.mind) body += "HM -" body += "[admin_jump_link(M)]\]

" @@ -70,45 +70,45 @@ var/global/nologevent = 0 if(M.client.related_accounts_ip.len) body += "Related accounts by IP: [jointext(M.client.related_accounts_ip, " - ")]

" - body += "Kick | " + body += "Kick | " body += "Warn | " - body += "Ban | " - body += "Jobban | " - body += "Appearance Ban | " + body += "Ban | " + body += "Jobban | " + body += "Appearance Ban | " body += "Notes | " if(M.client) if(M.client.check_watchlist(M.client.ckey)) body += "Remove from Watchlist | " body += "Edit Watchlist Reason " else - body += "Add to Watchlist " + body += "Add to Watchlist " if(M.client) - body += "| Prison | " - body += "\ Send back to Lobby | " + body += "| Prison | " + body += "\ Send back to Lobby | " var/muted = M.client.prefs.muted body += {"
Mute: - \[IC | - OOC | - PRAY | - ADMINHELP | - DEADCHAT\] - (toggle all) + \[IC | + OOC | + PRAY | + ADMINHELP | + DEADCHAT\] + (toggle all) "} var/jumptoeye = "" if(isAI(M)) var/mob/living/silicon/ai/A = M if(A.client && A.eyeobj) // No point following clientless AI eyes - jumptoeye = " (Eye)" + jumptoeye = " (Eye)" body += {"

- Jump to[jumptoeye] | - Get | - Send To + Jump to[jumptoeye] | + Get | + Send To

- [check_rights(R_ADMIN,0) ? "Traitor panel | " : "" ] - Narrate to | - Subtle message + [check_rights(R_ADMIN,0) ? "[ADMIN_TP(M,"Traitor panel")] | " : "" ] + Narrate to | + [ADMIN_SM(M,"Subtle message")] "} if(check_rights(R_EVENT, 0)) @@ -128,39 +128,39 @@ var/global/nologevent = 0 if(issmall(M)) body += "Monkeyized | " else - body += "Monkeyize | " + body += "Monkeyize | " //Corgi if(iscorgi(M)) body += "Corgized | " else - body += "Corgize | " + body += "Corgize | " //AI / Cyborg if(isAI(M)) body += "Is an AI " else if(ishuman(M)) - body += {"Make AI | - Make Mask | - Make Robot | - Make Alien | - Make Slime | - Make Superhero + body += {"Make AI | + Make Mask | + Make Robot | + Make Alien | + Make Slime | + Make Superhero "} //Simple Animals if(isanimal(M)) - body += "Re-Animalize | " + body += "Re-Animalize | " else - body += "Animalize | " + body += "Animalize | " if(istype(M, /mob/dead/observer)) - body += "Re-incarnate | " + body += "Re-incarnate | " if(ispAI(M)) body += "Is a pAI " else - body += "Make pAI | " + body += "Make pAI | " // DNA2 - Admin Hax if(M.dna && iscarbon(M)) @@ -175,7 +175,7 @@ var/global/nologevent = 0 if(bname) var/bstate=M.dna.GetSEState(block) var/bcolor="[(bstate)?"#006600":"#ff0000"]" - body += "[bname][block]" + body += "[bname][block]" else body += "[block]" body+="" @@ -183,39 +183,39 @@ var/global/nologevent = 0 body += {"

Rudimentary transformation:
These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.

- Observer | - \[ Alien: Drone, - Hunter, - Queen, - Sentinel, - Larva \] - Human - \[ slime: Baby, - Adult \] - Monkey | - Cyborg | - Cat | - Runtime | - Corgi | - Ian | - Crab | - Coffee | - \[ Construct: Armoured , - Builder , - Wraith \] - Shade + Observer | + \[ Alien: Drone, + Hunter, + Queen, + Sentinel, + Larva \] + Human + \[ slime: Baby, + Adult \] + Monkey | + Cyborg | + Cat | + Runtime | + Corgi | + Ian | + Crab | + Coffee | + \[ Construct: Armoured , + Builder , + Wraith \] + Shade "} if(M.client) body += {"

Other actions:
- Forcesay | - Admin Room | - Thunderdome 1 | - Thunderdome 2 | - Thunderdome Admin | - Thunderdome Observer | + Forcesay | + Admin Room | + Thunderdome 1 | + Thunderdome 2 | + Thunderdome Admin | + Thunderdome Observer | "} body += {"
@@ -953,7 +953,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space return "[A.name] - [loc.x],[loc.y],[loc.z]" /proc/formatPlayerPanel(var/mob/U,var/text="PP") - return "[text]" + return "[ADMIN_PP(U,"[text]")]" //Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked //defaults to kicking everyone (afk + non afk clients in the lobby) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 9a39c51d971..8c83961d8ad 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -61,7 +61,7 @@ } - function expand(id,job,name,real_name,image,key,ip,antagonist,ref,eyeref){ + function expand(id,job,name,real_name,image,key,ip,antagonist,UID,eyeUID){ clearAll(); @@ -75,15 +75,15 @@ body += ""; - body += "PP - " + body += "PP - " body += "N - " - body += "VV - " - body += "TP - " - body += "PM - " - body += "SM - " - body += "FLW" - if(eyeref) - body += "|EYE" + body += "VV - " + body += "TP - " + body += "PM - " + body += "SM - " + body += "FLW" + if(eyeUID) + body += "|EYE" body += "
" if(antagonist > 0) body += "Antagonist"; @@ -288,11 +288,11 @@ M_key = replacetext(M_key, "\"", "") M_key = replacetext(M_key, "\\", "") - var/M_eyeref = "" + var/M_eyeUID = "" if(isAI(M)) var/mob/living/silicon/ai/A = M if(A.client && A.eyeobj) // No point following clientless AI eyes - M_eyeref = "\ref[A.eyeobj]" + M_eyeUID = "[A.eyeobj.UID()]" //output for each mob dat += {" @@ -300,7 +300,7 @@ [M_name] - [M_rname] - [M_key] ([M_job]) @@ -370,16 +370,16 @@ dat += {"[(M.client ? "[M.client]" : "No client")] - X - PM + X + PM "} switch(is_special_character(M)) if(0) - dat += {"Traitor?"} + dat += {"Traitor?"} if(1) - dat += {"Traitor?"} + dat += {"Traitor?"} if(2) - dat += {"Traitor?"} + dat += {"Traitor?"} dat += "" @@ -397,8 +397,8 @@ if(!dname) dname = M - return {"[dname][caption][logout_status][M.stat == 2 ? " (DEAD)" : ""] - PM[close ? "" : ""]"} + return {"[dname][caption][logout_status][M.stat == 2 ? " (DEAD)" : ""] + PM[close ? "" : ""]"} /datum/admins/proc/check_antagonists() if(!check_rights(R_ADMIN)) return @@ -433,7 +433,7 @@ while(!istype(disk_loc, /turf)) if(istype(disk_loc, /mob)) var/mob/M = disk_loc - dat += "carried by [M.real_name] " + dat += "carried by [M.real_name] " if(istype(disk_loc, /obj)) var/obj/O = disk_loc dat += "in \a [O.name] " @@ -472,7 +472,7 @@ for(var/datum/mind/blob in mode.infected_crew) var/mob/M = blob.current if(M) - dat += "[M.real_name][M.client ? "" : " (ghost)"][M.stat == 2 ? " (DEAD)" : ""]" + dat += "[ADMIN_PP(M,"[M.real_name]")][M.client ? "" : " (ghost)"][M.stat == 2 ? " (DEAD)" : ""]" dat += "PM" else dat += "Blob not found!" @@ -563,7 +563,7 @@ if(show_objectives) txt += {" - Show Objective + Show Objective "} diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 4edd7e709ab..3df28fdf505 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -13,7 +13,7 @@ if(href_list["rejectadminhelp"]) if(!check_rights(R_ADMIN|R_MOD)) return - var/client/C = locate(href_list["rejectadminhelp"]) + var/client/C = locateUID(href_list["rejectadminhelp"]) if(!C) return @@ -317,7 +317,7 @@ else if(href_list["simplemake"]) if(!check_rights(R_SPAWN)) return - var/mob/M = locate(href_list["mob"]) + var/mob/M = locateUID(href_list["mob"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -426,7 +426,7 @@ else if(href_list["appearanceban"]) if(!check_rights(R_BAN)) return - var/mob/M = locate(href_list["appearanceban"]) + var/mob/M = locateUID(href_list["appearanceban"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -475,7 +475,7 @@ else if(href_list["jobban2"]) // if(!check_rights(R_BAN)) return - var/mob/M = locate(href_list["jobban2"]) + var/mob/M = locateUID(href_list["jobban2"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -501,17 +501,17 @@ //Regular jobs //Command (Blue) jobs += "" - jobs += "" + jobs += "" for(var/jobPos in command_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 6) //So things dont get squiiiiished! @@ -522,17 +522,17 @@ //Security (Red) counter = 0 jobs += "
Command Positions
Command Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in security_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -543,17 +543,17 @@ //Engineering (Yellow) counter = 0 jobs += "
Security Positions
Security Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in engineering_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -564,17 +564,17 @@ //Medical (White) counter = 0 jobs += "
Engineering Positions
Engineering Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in medical_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -585,17 +585,17 @@ //Science (Purple) counter = 0 jobs += "
Medical Positions
Medical Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in science_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -606,17 +606,17 @@ //Support (Grey) counter = 0 jobs += "
Science Positions
Science Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in support_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -627,17 +627,17 @@ //Non-Human (Green) counter = 0 jobs += "
Support Positions
Support Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in nonhuman_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -646,29 +646,29 @@ //Drone if(jobban_isbanned(M, "Drone")) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" //pAI if(jobban_isbanned(M, "pAI")) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" jobs += "
Non-human Positions
Non-human Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]DroneDroneDroneDronepAIpAIpAIpAI
" //Antagonist (Orange) var/isbanned_dept = jobban_isbanned(M, "Syndicate") jobs += "" - jobs += "" + jobs += "" counter = 0 for(var/role in antag_roles) if(jobban_isbanned(M, role) || isbanned_dept) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -683,9 +683,9 @@ counter = 0 for(var/role in other_roles) if(jobban_isbanned(M, role) || isbanned_dept) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -696,17 +696,17 @@ //Whitelisted positions counter = 0 jobs += "
Antagonist Positions
Antagonist Positions
[replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in whitelisted_positions) if(!jobPos) continue var/datum/job/job = job_master.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -723,7 +723,7 @@ else if(href_list["jobban3"]) if(!check_rights(R_BAN)) return - var/mob/M = locate(href_list["jobban4"]) + var/mob/M = locateUID(href_list["jobban4"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -885,10 +885,10 @@ return 0 //we didn't do anything! else if(href_list["boot2"]) - var/mob/M = locate(href_list["boot2"]) + var/mob/M = locateUID(href_list["boot2"]) if(ismob(M)) if(M.client && M.client.holder && (M.client.holder.rights & R_BAN)) - to_chat(src, "[key_name_admin(M)] cannot be kicked from the server.") + to_chat(usr, "[key_name_admin(M)] cannot be kicked from the server.") return to_chat(M, "You have been kicked from the server") log_admin("[key_name(usr)] booted [key_name(M)].") @@ -958,7 +958,7 @@ else if(href_list["newban"]) if(!check_rights(R_BAN)) return - var/mob/M = locate(href_list["newban"]) + var/mob/M = locateUID(href_list["newban"]) if(!ismob(M)) return switch(alert("Temporary Ban?",,"Yes","No", "Cancel")) @@ -1016,7 +1016,7 @@ //Watchlist else if(href_list["watchadd"]) - var/target_ckey = locate(href_list["watchadd"]) + var/target_ckey = href_list["watchadd"] usr.client.watchlist_add(target_ckey) else if(href_list["watchremove"]) @@ -1062,7 +1062,7 @@ if(!check_rights(R_ADMIN|R_MOD)) return - var/mob/M = locate(href_list["mute"]) + var/mob/M = locateUID(href_list["mute"]) if(!ismob(M)) return if(!M.client) return @@ -1128,7 +1128,7 @@ else if(href_list["monkeyone"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["monkeyone"]) + var/mob/living/carbon/human/H = locateUID(href_list["monkeyone"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1143,7 +1143,7 @@ else if(href_list["corgione"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["corgione"]) + var/mob/living/carbon/human/H = locateUID(href_list["corgione"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1158,7 +1158,7 @@ else if(href_list["makePAI"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["makePAI"]) + var/mob/living/carbon/human/H = locateUID(href_list["makePAI"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1182,7 +1182,7 @@ else if(href_list["forcespeech"]) if(!check_rights(R_SERVER|R_EVENT)) return - var/mob/M = locate(href_list["forcespeech"]) + var/mob/M = locateUID(href_list["forcespeech"]) if(!ismob(M)) to_chat(usr, "this can only be used on instances of type /mob") @@ -1199,7 +1199,7 @@ if(alert(usr, "Send to admin prison for the round?", "Message", "Yes", "No") != "Yes") return - var/mob/M = locate(href_list["sendtoprison"]) + var/mob/M = locateUID(href_list["sendtoprison"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -1242,7 +1242,7 @@ if(!check_rights(R_ADMIN)) return - var/mob/M = locate(href_list["sendbacktolobby"]) + var/mob/M = locateUID(href_list["sendbacktolobby"]) if(!isobserver(M)) to_chat(usr, "You can only send ghost players back to the Lobby.") @@ -1269,7 +1269,7 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return - var/mob/M = locate(href_list["tdome1"]) + var/mob/M = locateUID(href_list["tdome1"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -1299,7 +1299,7 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return - var/mob/M = locate(href_list["tdome2"]) + var/mob/M = locateUID(href_list["tdome2"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -1329,7 +1329,7 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return - var/mob/M = locate(href_list["tdomeadmin"]) + var/mob/M = locateUID(href_list["tdomeadmin"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -1351,7 +1351,7 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return - var/mob/M = locate(href_list["tdomeobserve"]) + var/mob/M = locateUID(href_list["tdomeobserve"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -1385,7 +1385,7 @@ if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return - var/mob/M = locate(href_list["aroomwarp"]) + var/mob/M = locateUID(href_list["aroomwarp"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob") return @@ -1405,7 +1405,7 @@ else if(href_list["revive"]) if(!check_rights(R_REJUVINATE)) return - var/mob/living/L = locate(href_list["revive"]) + var/mob/living/L = locateUID(href_list["revive"]) if(!istype(L)) to_chat(usr, "This can only be used on instances of type /mob/living") return @@ -1417,7 +1417,7 @@ else if(href_list["makeai"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["makeai"]) + var/mob/living/carbon/human/H = locateUID(href_list["makeai"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1433,7 +1433,7 @@ else if(href_list["makealien"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["makealien"]) + var/mob/living/carbon/human/H = locateUID(href_list["makealien"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1445,7 +1445,7 @@ else if(href_list["makeslime"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["makeslime"]) + var/mob/living/carbon/human/H = locateUID(href_list["makeslime"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1457,7 +1457,7 @@ else if(href_list["makesuper"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["makesuper"]) + var/mob/living/carbon/human/H = locateUID(href_list["makesuper"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1470,7 +1470,7 @@ else if(href_list["makerobot"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["makerobot"]) + var/mob/living/carbon/human/H = locateUID(href_list["makerobot"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1482,7 +1482,7 @@ else if(href_list["makeanimal"]) if(!check_rights(R_SPAWN)) return - var/mob/M = locate(href_list["makeanimal"]) + var/mob/M = locateUID(href_list["makeanimal"]) if(istype(M, /mob/new_player)) to_chat(usr, "This cannot be used on instances of type /mob/new_player") return @@ -1494,7 +1494,7 @@ else if(href_list["incarn_ghost"]) if(!check_rights(R_SPAWN)) return - var/mob/dead/observer/G = locate(href_list["incarn_ghost"]) + var/mob/dead/observer/G = locateUID(href_list["incarn_ghost"]) if(!istype(G)) to_chat(usr, "This will only work on /mob/dead/observer") log_admin("[key_name(G)] was incarnated by [key_name(src.owner)]") @@ -1504,7 +1504,7 @@ else if(href_list["togmutate"]) if(!check_rights(R_SPAWN)) return - var/mob/living/carbon/human/H = locate(href_list["togmutate"]) + var/mob/living/carbon/human/H = locateUID(href_list["togmutate"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1515,25 +1515,14 @@ //H.regenerate_icons() else if(href_list["adminplayeropts"]) - var/mob/M = locate(href_list["adminplayeropts"]) + var/mob/M = locateUID(href_list["adminplayeropts"]) show_player_panel(M) - else if(href_list["adminplayerobservejump"]) - if(!check_rights(R_ADMIN|R_MOD)) - return - - var/mob/M = locate(href_list["adminplayerobservejump"]) - - var/client/C = usr.client - if(!isobserver(usr)) C.admin_ghost() - sleep(2) - C.jumptomob(M) - else if(href_list["adminplayerobservefollow"]) if(!check_rights(R_ADMIN|R_MOD)) return - var/mob/M = locate(href_list["adminplayerobservefollow"]) + var/mob/M = locateUID(href_list["adminplayerobservefollow"]) var/client/C = usr.client if(!isobserver(usr)) C.admin_ghost() @@ -1605,13 +1594,13 @@ output_ai_laws() else if(href_list["adminmoreinfo"]) - var/mob/M = locate(href_list["adminmoreinfo"]) + var/mob/M = locateUID(href_list["adminmoreinfo"]) admin_mob_info(M) else if(href_list["adminspawncookie"]) if(!check_rights(R_ADMIN|R_EVENT)) return - var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"]) + var/mob/living/carbon/human/H = locateUID(href_list["adminspawncookie"]) if(!ishuman(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1635,7 +1624,7 @@ else if(href_list["BlueSpaceArtillery"]) if(!check_rights(R_ADMIN|R_EVENT)) return - var/mob/living/M = locate(href_list["BlueSpaceArtillery"]) + var/mob/living/M = locateUID(href_list["BlueSpaceArtillery"]) if(!isliving(M)) to_chat(usr, "This can only be used on instances of type /mob/living") return @@ -1694,7 +1683,7 @@ else if(href_list["EvilFax"]) if(!check_rights(R_ADMIN)) return - var/mob/living/carbon/human/H = locate(href_list["EvilFax"]) + var/mob/living/carbon/human/H = locateUID(href_list["EvilFax"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -1979,7 +1968,7 @@ else if(href_list["FaxReplyTemplate"]) if(!check_rights(R_ADMIN)) return - var/mob/living/carbon/human/H = locate(href_list["FaxReplyTemplate"]) + var/mob/living/carbon/human/H = locateUID(href_list["FaxReplyTemplate"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -2033,7 +2022,7 @@ message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)] with a standard '[stype]' fax") else if(href_list["HONKReply"]) - var/mob/living/carbon/human/H = locate(href_list["HONKReply"]) + var/mob/living/carbon/human/H = locateUID(href_list["HONKReply"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -2053,7 +2042,7 @@ return if(alert(src.owner, "Accept or Deny ERT request?", "CentComm Response", "Accept", "Deny") == "Deny") - var/mob/living/carbon/human/H = locate(href_list["ErtReply"]) + var/mob/living/carbon/human/H = locateUID(href_list["ErtReply"]) if(!istype(H)) to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return @@ -2282,32 +2271,32 @@ else if(href_list["jumpto"]) if(!check_rights(R_ADMIN)) return - var/mob/M = locate(href_list["jumpto"]) + var/mob/M = locateUID(href_list["jumpto"]) usr.client.jumptomob(M) else if(href_list["getmob"]) if(!check_rights(R_ADMIN)) return if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return - var/mob/M = locate(href_list["getmob"]) + var/mob/M = locateUID(href_list["getmob"]) usr.client.Getmob(M) else if(href_list["sendmob"]) if(!check_rights(R_ADMIN)) return - var/mob/M = locate(href_list["sendmob"]) + var/mob/M = locateUID(href_list["sendmob"]) usr.client.sendmob(M) else if(href_list["narrateto"]) if(!check_rights(R_ADMIN)) return - var/mob/M = locate(href_list["narrateto"]) + var/mob/M = locateUID(href_list["narrateto"]) usr.client.cmd_admin_direct_narrate(M) else if(href_list["subtlemessage"]) if(!check_rights(R_ADMIN)) return - var/mob/M = locate(href_list["subtlemessage"]) + var/mob/M = locateUID(href_list["subtlemessage"]) usr.client.cmd_admin_subtle_message(M) else if(href_list["traitor"]) @@ -2317,7 +2306,7 @@ alert("The game hasn't started yet!") return - var/mob/M = locate(href_list["traitor"]) + var/mob/M = locateUID(href_list["traitor"]) if(!ismob(M)) to_chat(usr, "This can only be used on instances of type /mob.") return @@ -3221,12 +3210,12 @@ return 1 else if(href_list["viewruntime"]) - var/datum/ErrorViewer/error_viewer = locate(href_list["viewruntime"]) + var/datum/ErrorViewer/error_viewer = locateUID(href_list["viewruntime"]) if(!istype(error_viewer)) to_chat(usr, "That runtime viewer no longer exists.") return if(href_list["viewruntime_backto"]) - error_viewer.showTo(usr, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"]) + error_viewer.showTo(usr, locateUID(href_list["viewruntime_backto"]), href_list["viewruntime_linear"]) else error_viewer.showTo(usr, null, href_list["viewruntime_linear"]) @@ -3364,19 +3353,13 @@ /proc/admin_jump_link(var/atom/target) if(!target) return // The way admin jump links handle their src is weirdly inconsistent... - var/source = "_src_=holder" + . = ADMIN_FLW(target,"FLW") if(isAI(target)) // AI core/eye follow links var/mob/living/silicon/ai/A = target - . = "FLW" if(A.client && A.eyeobj) // No point following clientless AI eyes - . += "|EYE" - return + . += "|[ADMIN_FLW(A.eyeobj,"EYE")]" else if(istype(target, /mob/dead/observer)) var/mob/dead/observer/O = target - . = "FLW" if(O.mind && O.mind.current) - . += "|BDY" - return - else - return "FLW" + . += "|[ADMIN_FLW(O.mind.current,"BDY")]" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 997b586149a..e0baebfc775 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -86,9 +86,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(!mob) return //this doesn't happen - var/ref_mob = "\ref[mob]" - var/ref_client = "\ref[src]" - //send this msg to all admins var/admin_number_afk = 0 var/list/mentorholders = list() @@ -109,7 +106,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," switch(selected_type) if("Mentorhelp") - msg = "[selected_type]: [key_name(src, TRUE, selected_type)] (?) (PP) (VV) (SM) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""] (TAKE) :[msg]" + msg = "[selected_type]: [key_name(src, TRUE, selected_type)] ([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_SM(mob,"SM")]) ([admin_jump_link(mob)]) (CA) (REJT) [ai_found ? " (CL)" : ""] (TAKE) :[msg]" for(var/client/X in mentorholders + modholders + adminholders) if(X.prefs.sound & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' @@ -123,7 +120,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," T.addResponse(usr.client, msg) else ticketNum = SStickets.getTicketCounter() // ticketNum is the ticket ready to be assigned. - msg = "[selected_type]: [key_name(src, TRUE, selected_type)] (?) (PP) (VV) (SM) ([admin_jump_link(mob)]) (CA) (TICKET) [ai_found ? " (CL)" : ""](TAKE) :[msg]" + msg = "[selected_type]: [key_name(src, TRUE, selected_type)] ([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_SM(mob,"SM")]) ([admin_jump_link(mob)]) (CA) (TICKET) [ai_found ? " (CL)" : ""](TAKE) :[msg]" //Open a new adminticket and inform the user. SStickets.newTicket(src, prunedmsg, msg) for(var/client/X in modholders + adminholders) diff --git a/code/modules/admin/verbs/freeze.dm b/code/modules/admin/verbs/freeze.dm index 67ae72817f9..8dc852e9221 100644 --- a/code/modules/admin/verbs/freeze.dm +++ b/code/modules/admin/verbs/freeze.dm @@ -9,12 +9,12 @@ var/global/list/frozen_mob_list = list() /client/proc/freeze(var/mob/living/M as mob in GLOB.mob_list) set category = "Admin" set name = "Freeze" - + if(!check_rights(R_ADMIN)) return - - if(!istype(M)) - return + + if(!istype(M)) + return if(M in frozen_mob_list) M.admin_unFreeze(src) @@ -89,8 +89,8 @@ var/global/list/frozen_mob_list = list() set name = "Freeze Mech" if(!check_rights(R_ADMIN)) - return - + return + var/obj/mecha/M = O if(!istype(M,/obj/mecha)) to_chat(src, "This can only be used on mechs!") @@ -105,7 +105,7 @@ var/global/list/frozen_mob_list = list() M.overlays += adminomaly if(M.occupant) M.removeVerb(/obj/mecha/verb/eject) - to_chat(M.occupant, "You have been frozen by [key]") + to_chat(M.occupant, "You have been frozen by [key]") message_admins("[key_name_admin(usr)] froze [key_name(M.occupant)] in a [M.name]") log_admin("[key_name(usr)] froze [key_name(M.occupant)] in a [M.name]") else @@ -116,7 +116,7 @@ var/global/list/frozen_mob_list = list() M.overlays -= adminomaly if(M.occupant) M.addVerb(/obj/mecha/verb/eject) - to_chat(M.occupant, "You have been unfrozen by [key]") + to_chat(M.occupant, "You have been unfrozen by [key]") message_admins("[key_name_admin(usr)] unfroze [key_name(M.occupant)] in a [M.name]") log_admin("[key_name(usr)] unfroze [key_name(M.occupant)] in a [M.name]") else diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 0823a0e75a5..b92b304fd57 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -29,7 +29,7 @@ deity = ticker.cultdat.entity_name log_say("(PRAYER) [msg]", usr) - msg = "[bicon(cross)][prayer_type][deity ? " (to [deity])" : ""]:[key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src)]) (CA) (SC) (BLESS) (SMITE): [msg]" + msg = "[bicon(cross)][prayer_type][deity ? " (to [deity])" : ""]:[key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) (CA) ([ADMIN_SC(src,"SC")]) (BLESS) (SMITE): [msg]" for(var/client/X in GLOB.admins) if(check_rights(R_EVENT,0,X.mob)) @@ -40,7 +40,7 @@ /proc/Centcomm_announce(var/text , var/mob/Sender) var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN)) - msg = "CENTCOMM: [key_name(Sender, 1)] (PP) (VV) (SM) ([admin_jump_link(Sender)]) (CA) (BSA) [ADMIN_CENTCOM_REPLY(Sender)]): [msg]" + msg = "CENTCOMM: [key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) (CA) ([ADMIN_BSA(Sender,"BSA")]) ([ADMIN_CENTCOM_REPLY(Sender,"RPLY")])): [msg]" for(var/client/X in GLOB.admins) if(R_EVENT & X.holder.rights) to_chat(X, msg) @@ -49,7 +49,7 @@ /proc/Syndicate_announce(var/text , var/mob/Sender) var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN)) - msg = "SYNDICATE: [key_name(Sender, 1)] (PP) (VV) (SM) ([admin_jump_link(Sender)]) (CA) (BSA) [ADMIN_SYNDICATE_REPLY(Sender)]: [msg]" + msg = "SYNDICATE: [key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) (CA) ([ADMIN_BSA(Sender,"BSA")]) ([ADMIN_SYNDICATE_REPLY(Sender,"RPLY")]): [msg]" for(var/client/X in GLOB.admins) if(check_rights(R_EVENT,0,X.mob)) to_chat(X, msg) @@ -58,7 +58,7 @@ /proc/HONK_announce(var/text , var/mob/Sender) var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN)) - msg = "HONK: [key_name(Sender, 1)] (PP) (VV) (SM) ([admin_jump_link(Sender)]) (CA) (BSA) (RPLY): [msg]" + msg = "HONK: [key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) (CA) ([ADMIN_BSA(Sender,"BSA")]) (RPLY): [msg]" for(var/client/X in GLOB.admins) if(R_EVENT & X.holder.rights) to_chat(X, msg) @@ -67,7 +67,7 @@ /proc/ERT_Announce(var/text , var/mob/Sender, var/repeat_warning) var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN)) - msg = "ERT REQUEST: [key_name(Sender, 1)] (PP) (VV) (SM) ([admin_jump_link(Sender)]) (CA) (BSA) (RESPOND): [msg]" + msg = "ERT REQUEST: [key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) (CA) ([ADMIN_BSA(Sender,"BSA")]) (RESPOND): [msg]" if(repeat_warning) msg += "
WARNING: ERT request has gone 5 minutes with no reply!" for(var/client/X in GLOB.admins) @@ -79,7 +79,7 @@ /proc/Nuke_request(text , mob/Sender) var/nuke_code = get_nuke_code() var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN)) - msg = "NUKE CODE REQUEST: [key_name(Sender)] (PP) (VV) (SM) ([admin_jump_link(Sender)]) (CA) (BSA) [ADMIN_CENTCOM_REPLY(Sender)]: [msg]" + msg = "NUKE CODE REQUEST: [key_name(Sender)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) (CA) ([ADMIN_BSA(Sender,"BSA")]) ([ADMIN_CENTCOM_REPLY(Sender,"RPLY")]): [msg]" for(var/client/X in GLOB.admins) if(check_rights(R_EVENT,0,X.mob)) to_chat(X, msg) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 38442d9011f..365a0beaead 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -663,8 +663,17 @@ Traitors and the like can also be revived with the previous role mostly intact. return if(job_master) + var/currentpositiontally + var/totalpositiontally + to_chat(src, "Job Name: Filled job slot / Total job slots (Free job slots)") for(var/datum/job/job in job_master.occupations) - to_chat(src, "[job.title]: [job.total_positions]") + to_chat(src, "[job.title]: [job.current_positions] / \ + [job.total_positions == -1 ? "UNLIMITED" : job.total_positions] \ + ([job.total_positions == -1 ? "UNLIMITED" : job.total_positions - job.current_positions])") + if(job.total_positions != -1) // Only count position that isn't unlimited + currentpositiontally += job.current_positions + totalpositiontally += job.total_positions + to_chat(src, "Currently filled job slots (Excluding unlimited): [currentpositiontally] / [totalpositiontally] ([totalpositiontally - currentpositiontally])") feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in view()) @@ -981,7 +990,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!H.key && H.mind.key) key_string = H.mind.key msg += "" - msg += "" + msg += "" if(istype(H.loc, /obj/machinery/cryopod)) msg += "" else diff --git a/code/modules/antagonists/_common/antag_spawner.dm b/code/modules/antagonists/_common/antag_spawner.dm index ecf8c336118..80a62f9c818 100644 --- a/code/modules/antagonists/_common/antag_spawner.dm +++ b/code/modules/antagonists/_common/antag_spawner.dm @@ -52,9 +52,7 @@ if(!borg_to_spawn) //If there's no type at all, let it still be used but don't do anything used = FALSE return - var/datum/effect_system/spark_spread/S = new /datum/effect_system/spark_spread - S.set_up(4, 1, src) - S.start() + do_sparks(4, 1, src) var/mob/living/silicon/robot/R switch(borg_to_spawn) if("Medical") diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index f67d1ac6c0b..448344761ba 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -9,7 +9,7 @@ icon = 'icons/effects/blood.dmi' icon_state = "remains" var/mob_type = null - var/mob_name = "" + var/mob_name = "unidentified entity" var/mob_gender = null var/death = TRUE //Kill the mob var/roundstart = TRUE //fires on initialize @@ -48,7 +48,7 @@ /obj/effect/mob_spawn/Initialize(mapload) . = ..() - if(instant || (roundstart && (ticker && ticker.current_state > GAME_STATE_SETTING_UP))) + if(instant || roundstart) //at some point we should probably re-introduce the (ticker && ticker.current_state > GAME_STATE_SETTING_UP) portion of this check, but for now it was preventing the corpses from spawning at roundstart and resulting in ghost role spawners that made dead bodies. create() else GLOB.poi_list |= src @@ -83,7 +83,7 @@ if(disease) M.ForceContractDisease(new disease) if(death) - M.death(1) //Kills the new mob + M.death() //Kills the new mob M.adjustOxyLoss(oxy_damage) M.adjustBruteLoss(brute_damage) @@ -155,6 +155,8 @@ outfit = new outfit() if(!outfit) outfit = new /datum/outfit + if(!mob_name) + mob_name = id_job return ..() /obj/effect/mob_spawn/human/equip(mob/living/carbon/human/H) @@ -271,6 +273,7 @@ /obj/effect/mob_spawn/human/corpse/assistant name = "Assistant" + mob_name = "Assistant" id_job = "Assistant" outfit = /datum/outfit/job/assistant @@ -285,11 +288,13 @@ /obj/effect/mob_spawn/human/cook name = "Cook" + mob_name = "Chef" id_job = "Chef" outfit = /datum/outfit/job/chef /obj/effect/mob_spawn/human/doctor name = "Doctor" + mob_name = "Medical Doctor" id_job = "Medical Doctor" outfit = /datum/outfit/job/doctor @@ -313,6 +318,7 @@ /obj/effect/mob_spawn/human/engineer name = "Engineer" + mob_name = "Engineer" id_job = "Engineer" outfit = /datum/outfit/job/engineer @@ -393,16 +399,18 @@ /obj/effect/mob_spawn/human/scientist name = "Scientist" + mob_name = "Scientist" id_job = "Scientist" outfit = /datum/outfit/job/scientist /obj/effect/mob_spawn/human/miner name = "Shaft Miner" + mob_name = "Shaft Miner" id_job = "Shaft Miner" outfit = /datum/outfit/job/mining/suit /datum/outfit/job/mining/suit - name = "Station Engineer" + name = "Shaft Miner" suit = /obj/item/clothing/suit/space/hardsuit/mining head = /obj/item/clothing/head/helmet/space/hardsuit/mining uniform = /obj/item/clothing/under/rank/miner @@ -416,6 +424,7 @@ /obj/effect/mob_spawn/human/bartender name = "Space Bartender" + mob_name = "Bartender" id_job = "Bartender" id_access_list = list(access_bar) outfit = /datum/outfit/spacebartender @@ -479,6 +488,7 @@ /obj/effect/mob_spawn/human/bridgeofficer name = "Bridge Officer" + mob_name = "Bridge Officer" id_job = "Bridge Officer" id_access = "Captain" outfit = /datum/outfit/nanotrasenbridgeofficercorpse @@ -495,6 +505,7 @@ /obj/effect/mob_spawn/human/commander name = "Commander" + mob_name = "Commander" id_job = "Commander" id_access = "Captain" outfit = /datum/outfit/nanotrasencommandercorpse diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index 73509693012..91c09d15f30 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -155,10 +155,8 @@ call(src,triggerproc)(M) /obj/effect/meatgrinder/proc/triggerrad1(mob) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread for(var/mob/O in viewers(world.view, src.loc)) - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) explosion(mob, 1, 0, 0, 0) qdel(src) diff --git a/code/modules/awaymissions/trigger.dm b/code/modules/awaymissions/trigger.dm index 0ac6e656206..60a43702cb1 100644 --- a/code/modules/awaymissions/trigger.dm +++ b/code/modules/awaymissions/trigger.dm @@ -22,13 +22,9 @@ M.Move(dest) if(entersparks) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(4, 1, src) - s.start() + do_sparks(4, 1, src) if(exitsparks) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(4, 1, dest) - s.start() + do_sparks(4, 1, dest) if(entersmoke) var/datum/effect_system/smoke_spread/s = new diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index c617b90030f..36a4eeda829 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -17,11 +17,11 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away log_debug("Smoothing tiles") for(var/turf/T in smoothTurfs) if(T.smooth) - smooth_icon(T) + queue_smooth(T) for(var/R in T) var/atom/A = R if(A.smooth) - smooth_icon(A) + queue_smooth(A) if(istype(T, /turf/simulated/mineral)) // For the listening post, among other maps var/turf/simulated/mineral/MT = T MT.add_edges() diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index 3c91dc49a4b..7f43f20c934 100644 --- a/code/modules/buildmode/buildmode.dm +++ b/code/modules/buildmode/buildmode.dm @@ -49,8 +49,9 @@ var/x = pos_idx % switch_width var/y = FLOOR(pos_idx / switch_width, 1) var/obj/screen/buildmode/B = new buttontype(src, thing) - // extra .5 for a nice offset look - B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]" + // this stuff is equivalent to the commented out line for 511 compat + // B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]" + B.screen_loc = "NORTH-[1 + FLOOR(0.5 + 1.5*y, 1) + ((y + 1) % 2)]:[16*((y + 1) % 2)],WEST+[FLOOR(0.5 + 1.5*x, 1)]:[16*((x + 1) % 2)]" buttonslist += B pos_idx++ diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 40c29c1d991..5e1beb969ef 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -92,9 +92,7 @@ if(H.a_intent == INTENT_HARM) var/mob/living/carbon/C = A if(cell.use(stun_cost)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 0, loc) - s.start() + do_sparks(5, 0, loc) playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) H.do_attack_animation(C) visible_message("[C] has been touched with [src] by [H]!") diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index fba251f71f8..c10ccf32f89 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -170,9 +170,7 @@ var/mob/M = can_shock(loc) if(M) to_chat(M, "You feel a sharp shock!") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, M) - s.start() + do_sparks(3, 1, M) M.Weaken(5) M.Stuttering(1) diff --git a/code/modules/clothing/masks/voice.dm b/code/modules/clothing/masks/voice.dm index 01dd9a65a99..b5b6298dcb2 100644 --- a/code/modules/clothing/masks/voice.dm +++ b/code/modules/clothing/masks/voice.dm @@ -28,4 +28,11 @@ /obj/item/clothing/mask/gas/voice/New() ..() - changer = new(src) \ No newline at end of file + changer = new(src) + +/obj/item/clothing/mask/gas/voice/clown + name = "clown wig and mask" + desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask." + icon_state = "clown" + item_state = "clown_hat" + flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT | BLOCKHAIR \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 2ba550d8a81..dea27a5b946 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -591,9 +591,7 @@ /obj/item/clothing/suit/space/hardsuit/shielded/hit_reaction(mob/living/carbon/human/owner, attack_text) if(current_charges > 0) - var/datum/effect_system/spark_spread/s = new - s.set_up(2, 1, src) - s.start() + do_sparks(2, 1, src) owner.visible_message("[owner]'s shields deflect [attack_text] in a shower of sparks!") current_charges-- recharge_cooldown = world.time + recharge_delay diff --git a/code/modules/error_handler/error_viewer.dm b/code/modules/error_handler/error_viewer.dm index d17b75b986e..fdcbe6056b5 100644 --- a/code/modules/error_handler/error_viewer.dm +++ b/code/modules/error_handler/error_viewer.dm @@ -14,7 +14,7 @@ var/global/datum/ErrorViewer/ErrorCache/error_cache = new() var/global/datum/ErrorViewer/ErrorCache/error_cache = null #endif -// - ErrorSource datums exist for each line (of code) that generates an error, +// - ErrorSource datums exist for each line (of code) that generates an error, // and keep track of all errors generated by that line. // // - ErrorEntry datums exist for each logged error, and keep track of all @@ -68,10 +68,10 @@ var/global/datum/ErrorViewer/ErrorCache/error_cache = null if(!linktext) linktext = name if(istype(back_to)) - back_to_param = ";viewruntime_backto=\ref[back_to]" + back_to_param = ";viewruntime_backto=[back_to.UID()]" if(linear) back_to_param += ";viewruntime_linear=1" - return "[html_encode(linktext)]" + return "[html_encode(linktext)]" /datum/ErrorViewer/ErrorCache var/list/errors = list() @@ -181,15 +181,15 @@ var/global/datum/ErrorViewer/ErrorCache/error_cache = null if(srcRef) html += "
src: VV" if(ispath(srcType, /mob)) - html += " PP" - html += " Follow" + html += " PP" + html += " Follow" if(istype(srcLoc)) html += "
src.loc: VV" html += " JMP" if(usrRef) html += "
usr: VV" - html += " PP" - html += " Follow" + html += " PP" + html += " Follow" if(istype(usrLoc)) html += "
usr.loc: VV" html += " JMP" diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm index eef486ee5cd..2179cf411b4 100644 --- a/code/modules/events/brand_intelligence.dm +++ b/code/modules/events/brand_intelligence.dm @@ -29,7 +29,7 @@ vendingMachines.Remove(originMachine) originMachine.shut_up = 0 originMachine.shoot_inventory = 1 - log_debug("Original brand intelligence machine: [originMachine] [ADMIN_VV(originMachine)] [ADMIN_JMP(originMachine)]") + log_debug("Original brand intelligence machine: [originMachine] ([ADMIN_VV(originMachine,"VV")]) [ADMIN_JMP(originMachine)]") /datum/event/brand_intelligence/tick() if(!originMachine || QDELETED(originMachine) || originMachine.shut_up || originMachine.wires.IsAllCut()) //if the original vending machine is missing or has it's voice switch flipped diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm index c4f1f8ac40a..2b61744658e 100644 --- a/code/modules/events/rogue_drones.dm +++ b/code/modules/events/rogue_drones.dm @@ -38,9 +38,7 @@ /datum/event/rogue_drone/end() var/num_recovered = 0 for(var/mob/living/simple_animal/hostile/retaliate/malf_drone/D in drones_list) - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread() - sparks.set_up(3, 0, D.loc) - sparks.start() + do_sparks(3, 0, D.loc) D.z = level_name_to_num(CENTCOMM) D.has_loot = 0 diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 63d07ad3d27..be11094bc6b 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -492,9 +492,7 @@ if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!") if(istype(M, /mob/living/simple_animal/pet/cat/Syndi)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) else //No water or didn't slip, get that fish! M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!") kill_fish() //Kill a random fish diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 19997df2805..fd8a32ff7fc 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -39,7 +39,7 @@ var/mob/living/silicon/robot/borg = user borg.cell.use(30) var/refill = reagents.get_master_reagent_id() - if(refill in drinks) // Only synthesize drinks + if(refill in GLOB.drinks) // Only synthesize drinks addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, bitesize), 600) return TRUE return FALSE @@ -81,7 +81,7 @@ to_chat(user, " You transfer [trans] units of the solution to [target].") if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell - if(refill in drinks) // Only synthesize drinks + if(refill in GLOB.drinks) // Only synthesize drinks var/mob/living/silicon/robot/bro = user var/chargeAmount = max(30,4*trans) bro.cell.use(chargeAmount) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index d9c59a46d58..cbf06629954 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -329,7 +329,7 @@ active = 1 var/turf/bombturf = get_turf(src) var/area/bombarea = get_area(bombturf) - message_admins("[key_name(user)]? has primed a [name] for detonation at [bombarea] (JMP).") + message_admins("[key_name(user)][ADMIN_QUE(user,"?")] has primed a [name] for detonation at [bombarea] (JMP).") log_game("[key_name(user)] has primed a [name] for detonation at [bombarea] ([bombturf.x],[bombturf.y],[bombturf.z]).") to_chat(user, "You light [src] on fire.") diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index d97d5742b06..298a5ae2e7e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -392,9 +392,7 @@ updateUsrDialog() /obj/machinery/kitchen_machine/proc/broke() - var/datum/effect_system/spark_spread/s = new - s.set_up(2, 1, src) - s.start() + do_sparks(2, 1, src) icon_state = broken_icon // Make it look all busted up and shit visible_message("The [src] breaks!") //Let them know they're stupid broken = 2 // Make it broken so it can't be used util fixed diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index 09c16544396..ba67bf426fa 100644 --- a/code/modules/hydroponics/grown/kudzu.dm +++ b/code/modules/hydroponics/grown/kudzu.dm @@ -30,7 +30,7 @@ if(istype(user.loc, /turf/space)) return var/turf/T = get_turf(src) - message_admins("Kudzu planted by [key_name_admin(user)](?) (FLW) at ([T.x],[T.y],[T.z] - (JMP))",0,1) + message_admins("Kudzu planted by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) at ([T.x],[T.y],[T.z] - (JMP))",0,1) investigate_log("was planted by [key_name(user)] at ([T.x],[T.y],[T.z])","kudzu") new /obj/structure/spacevine_controller(user.loc, mutations, potency, production) user.drop_item() @@ -59,7 +59,7 @@ mutations.Remove(pick(temp_mut_list)) temp_mut_list.Cut() - if(S.has_reagent("welding_fuel", 5)) + if(S.has_reagent("fuel", 5)) for(var/datum/spacevine_mutation/SM in mutations) if(SM.quality == POSITIVE) temp_mut_list += SM @@ -94,4 +94,4 @@ desc = "Pueraria Virallis: An invasive species with vines that rapidly creep and wrap around whatever they contact." icon_state = "kudzupod" filling_color = "#6B8E23" - bitesize_mod = 2 \ No newline at end of file + bitesize_mod = 2 diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 56d032045c0..95ea83cd424 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -81,7 +81,7 @@ /obj/item/reagent_containers/food/snacks/grown/mushroom/angel seed = /obj/item/seeds/angel name = "destroying angel" - desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amatoxins." + desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amanitin." icon_state = "angel" filling_color = "#C0C0C0" diff --git a/code/modules/hydroponics/sample.dm b/code/modules/hydroponics/sample.dm index 4478671b2fb..10ba2642107 100644 --- a/code/modules/hydroponics/sample.dm +++ b/code/modules/hydroponics/sample.dm @@ -11,8 +11,8 @@ var/list/chem_t2_reagents = list( var/list/chem_t3_reagents = list( "ethanol", "chlorine", "potassium", - "aluminium", "radium", "fluorine", - "iron", "welding_fuel", "silver", + "aluminum", "radium", "fluorine", + "iron", "fuel", "silver", "stable_plasma" ) @@ -41,4 +41,4 @@ var/list/chem_t4_reagents = list( /obj/item/seeds/sample/alienweed name = "alien weed sample" icon_state = "alienweed" - sample_color = null \ No newline at end of file + sample_color = null diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 61e1f2efeed..6b62f07c103 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -352,9 +352,7 @@ updateUsrDialog() /obj/machinery/mineral/ore_redemption/ex_act(severity, target) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) if(severity == 1) if(prob(50)) qdel(src) @@ -564,9 +562,7 @@ qdel(voucher) /obj/machinery/mineral/equipment_vendor/ex_act(severity, target) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) if(prob(50 / severity) && severity < 3) qdel(src) diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index f781b57a309..c3c276a5766 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -326,7 +326,7 @@ var/turf/T = deploy_location if(!is_mining_level(T.z))//only report capsules away from the mining/lavaland level - message_admins("[key_name_admin(usr)] (?) (FLW) activated a bluespace capsule away from the mining level! (JMP)") + message_admins("[key_name_admin(usr)] ([ADMIN_QUE(usr,"?")]) ([ADMIN_FLW(usr,"FLW")]) activated a bluespace capsule away from the mining level! (JMP)") log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [T.x], [T.y], [T.z]") template.load(deploy_location, centered = TRUE) new /obj/effect/particle_effect/smoke(get_turf(src)) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 303b34aed34..79cfc3ae9f8 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -462,10 +462,10 @@ var/global/list/rockTurfEdgeCache = list( /turf/simulated/floor/plating/airless/asteroid/New() var/proper_name = name + ..() name = proper_name if(prob(20)) icon_state = "asteroid[rand(0,12)]" - ..() /turf/simulated/floor/plating/airless/asteroid/ex_act(severity, target) switch(severity) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index ba23b1c2153..26f77a31adc 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -540,18 +540,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if((!target) || (!ghost)) return if(isAI(target)) // AI core/eye follow links var/mob/living/silicon/ai/A = target - . = "core" + . = "core" if(A.client && A.eyeobj) // No point following clientless AI eyes - . += "|eye" + . += "|eye" return else if(istype(target, /mob/dead/observer)) var/mob/dead/observer/O = target - . = "follow" + . = "follow" if(O.mind && O.mind.current) - . += "|body" + . += "|body" return else - return "follow" + return "follow" //BEGIN TELEPORT HREF CODE /mob/dead/observer/Topic(href, href_list) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index b2d2d24400b..1f405b91464 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -19,8 +19,9 @@ for(var/obj/item/organ/internal/I in internal_organs) if(isturf(loc)) var/atom/movable/thing = I.remove(src) - thing.forceMove(get_turf(src)) - thing.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5) + if(thing) + thing.forceMove(get_turf(src)) + thing.throw_at(get_edge_target_turf(src, pick(alldirs)), rand(1,3), 5) for(var/obj/item/organ/external/E in bodyparts) if(istype(E, /obj/item/organ/external/chest)) @@ -41,9 +42,7 @@ hgibs(loc, dna) else new /obj/effect/decal/cleanable/blood/gibs/robot(loc) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) QDEL_IN(animation, 15) QDEL_IN(src, 0) return TRUE diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index ccd4c1540f6..9201075bd56 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -840,7 +840,7 @@ if(locate(/obj/item/storage/bible) in get_turf(src)) to_chat(viewers(src), "[src] farts on the Bible!") var/image/cross = image('icons/obj/storage.dmi', "bible") - var/adminbfmessage = "[bicon(cross)] Bible Fart: [key_name(src, 1)] (?) (PP) (VV) (SM) ([admin_jump_link(src)]) (CA) (SMITE):" + var/adminbfmessage = "[bicon(cross)] Bible Fart: [key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) (CA) (SMITE):" for(var/client/X in GLOB.admins) if(check_rights(R_EVENT, 0, X.mob)) to_chat(X, adminbfmessage) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 2c03e66bf8a..55228c51a51 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -107,12 +107,7 @@ custom_emote(1, "drops what [p_they()] [p_were()] holding, [p_their()] [E.name] malfunctioning!") - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, src) - spark_system.attach(src) - spark_system.start() - spawn(10) - qdel(spark_system) + do_sparks(5, 0, src) /mob/living/carbon/human/proc/becomeSlim() to_chat(src, "You feel fit again!") diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 11df45462c4..a1d0630e586 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -709,14 +709,10 @@ adjustToxLoss(0.1) else //stuff only for synthetics if(alcohol_strength >= spark_start && prob(25)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) if(alcohol_strength >= collapse_start && prob(10)) emote("collapse") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) if(alcohol_strength >= braindamage_start && prob(10)) adjustBrainLoss(1) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index a9f93f3d441..70cab4751e2 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -150,7 +150,7 @@ message = uppertext(message) verb = "yells loudly" - if((COMIC in mutations) || (locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs)) + if((COMIC in mutations) || (locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs) || istype(get_item_by_slot(slot_wear_mask), /obj/item/clothing/mask/gas/voice/clown)) span = "sans" if(span) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index ed6ef267fb0..bc4eeb804b9 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -286,9 +286,7 @@ visible_message("The [M.name] has shocked [src]!", \ "The [M.name] has shocked [src]!") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return 1 add_attack_logs(src, M, "Slime'd") return diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 07df995658e..9dfaa8337fc 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -38,6 +38,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates var/obj/item/paicard/card = locate(href_list["device"]) if(card.pai) return + if(usr.incapacitated() || isobserver(usr) || !card.Adjacent(usr)) + return if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate)) var/mob/living/silicon/pai/pai = new(card) if(!candidate.name) diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index cb207932a9a..6e3e4ba7d95 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -3,6 +3,8 @@ ..(user) var/msg = "" + if(module) + msg += "It has loaded a [module.name].\n" var/obj/act_module = get_active_hand() if(act_module) msg += "It is holding [bicon(act_module)] \a [act_module].\n" diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index d2e065d3b8d..2f4056f6149 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -275,6 +275,7 @@ var/list/robot_verbs_default = list( QDEL_NULL(camera) QDEL_NULL(cell) QDEL_NULL(robot_suit) + QDEL_NULL(spark_system) return ..() /mob/living/silicon/robot/proc/pick_module() diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 8414f928544..dbec1d42bbe 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -373,17 +373,13 @@ to_chat(user, "The welder must be on for this task!") else if(W.force) //if force is non-zero - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) ..() /mob/living/simple_animal/bot/bullet_act(obj/item/projectile/Proj) if(Proj && (Proj.damage_type == BRUTE || Proj.damage_type == BURN)) if(prob(75) && Proj.damage > 0) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return ..() /mob/living/simple_animal/bot/emp_act(severity) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 5a0a04d0189..b6cca5940e3 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -187,9 +187,7 @@ if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) ..() /obj/machinery/bot_core/cleanbot diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 6895dc21cbc..5969d7a6d40 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -406,9 +406,7 @@ if(lasercolor == "r") new /obj/item/clothing/suit/redtag(Tsec) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) new /obj/effect/decal/cleanable/blood/oil(loc) ..() diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index b1133cb0e08..68e64ee65ed 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -407,9 +407,7 @@ T.amount = amount amount = 0 - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) ..() /obj/machinery/bot_core/floorbot diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 52de4660908..3ed09c39a99 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -595,9 +595,7 @@ if(emagged && prob(25)) playsound(loc, 'sound/voice/minsult.ogg', 50, 0) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) ..() /mob/living/simple_animal/bot/medbot/proc/declare(crit_patient) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index a65e0198539..103e443d7e7 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -847,9 +847,7 @@ cell.update_icon() cell = null - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) new /obj/effect/decal/cleanable/blood/oil(loc) ..() diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 451f21ce09a..3069499b3f0 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -439,9 +439,7 @@ Auto Patrol: []"}, if(prob(50)) new /obj/item/robot_parts/l_arm(Tsec) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) new /obj/effect/decal/cleanable/blood/oil(loc) ..() diff --git a/code/modules/mob/living/simple_animal/bot/syndicate.dm b/code/modules/mob/living/simple_animal/bot/syndicate.dm index 3ca3c6d1f2b..d1e42598ff4 100644 --- a/code/modules/mob/living/simple_animal/bot/syndicate.dm +++ b/code/modules/mob/living/simple_animal/bot/syndicate.dm @@ -165,9 +165,7 @@ depotarea.list_remove(src, depotarea.guard_list) walk_to(src,0) visible_message("[src] blows apart!") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) new /obj/effect/decal/cleanable/blood/oil(loc) var/obj/effect/decal/mecha_wreckage/gygax/dark/wreck = new /obj/effect/decal/mecha_wreckage/gygax/dark(loc) wreck.name = "sentry bot wreckage" diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 77d930b6b69..e26a004e2c3 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -613,15 +613,11 @@ //spark for no reason if(prob(5)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) /mob/living/simple_animal/pet/corgi/Ian/borgi/death(gibbed) // Only execute the below if we successfully died . = ..(gibbed) if(!.) return FALSE - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index e08e7e11502..051f2209729 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -52,9 +52,7 @@ . = ..(gibbed) if(!.) return FALSE - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) /mob/living/simple_animal/hostile/hivebot/tele//this still needs work name = "Beacon" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 118ee54e858..6a6e44a5852 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -75,7 +75,7 @@ return var/turf/newloc = loc message_admins("Megafauna [src] \ - (FLW) \ + ([ADMIN_FLW(src,"FLW")]) \ moved via shuttle from ([oldloc.x], [oldloc.y], [oldloc.z]) to \ ([newloc.x], [newloc.y], [newloc.z])") diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index 90586bb43c6..709a238346a 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -80,16 +80,12 @@ //repair a bit of damage if(prob(1)) src.visible_message("[bicon(src)] [src] shudders and shakes as some of it's damaged systems come back online.") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) health += rand(25,100) //spark for no reason if(prob(5)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) //sometimes our targetting sensors malfunction, and we attack anyone nearby if(prob(disabled ? 0 : 1)) @@ -129,9 +125,7 @@ src.visible_message("[bicon(src)] [src] begins to spark and shake violenty!") else src.visible_message("[bicon(src)] [src] sparks and shakes like it's about to explode!") - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) if(!exploding && !disabled && prob(explode_chance)) exploding = 1 @@ -154,9 +148,7 @@ /mob/living/simple_animal/hostile/retaliate/malf_drone/Destroy() //Seriously, what the actual hell. //some random debris left behind if(has_loot) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) var/obj/O //shards diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 1da97adf801..eecd0650af0 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -19,10 +19,10 @@ spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") if(matches) if(M.client) - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)].") else - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).") /mob/Login() diff --git a/code/modules/modular_computers/file_system/computer_file.dm b/code/modules/modular_computers/file_system/computer_file.dm index 25ca387a78e..f3b5a9659b2 100644 --- a/code/modules/modular_computers/file_system/computer_file.dm +++ b/code/modules/modular_computers/file_system/computer_file.dm @@ -4,10 +4,11 @@ var/global/file_uid = 0 var/filename = "NewFile" // Placeholder. No spacebars var/filetype = "XXX" // File full names are [filename].[filetype] so like NewFile.XXX in this case var/size = 1 // File size in GQ. Integers only! - var/obj/item/computer_hardware/hard_drive/holder // Holder that contains this file. + var/obj/item/computer_hardware/hard_drive/holder // Holder that contains this file. var/unsendable = 0 // Whether the file may be sent to someone via NTNet transfer or other means. var/undeletable = 0 // Whether the file may be deleted. Setting to 1 prevents deletion/renaming/etc. var/uid // UID of this file + var/password = "" // Placeholder for password. /datum/computer_file/New() ..() @@ -36,4 +37,14 @@ var/global/file_uid = 0 else temp.filename = filename temp.filetype = filetype - return temp \ No newline at end of file + temp.password = password + return temp + +/datum/computer_file/proc/can_access_file(mob/user, input_password = "") + if(!password) + return TRUE + if(!input_password) + input_password = sanitize(input(user, "Please enter a password to access file '[filename]':")) + if(input_password == password) + return TRUE + return FALSE \ No newline at end of file diff --git a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm index aadf49ad9c0..22df710c6f8 100644 --- a/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm +++ b/code/modules/modular_computers/file_system/programs/antagonist/revelation.dm @@ -27,16 +27,12 @@ if(battery_module && prob(25)) qdel(battery_module) computer.visible_message("\The [computer]'s battery explodes in rain of sparks.") - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, computer.loc) - spark_system.start() + do_sparks(5, 0, computer.loc) if(recharger && prob(50)) qdel(recharger) computer.visible_message("\The [computer]'s recharger explodes in rain of sparks.") - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, computer.loc) - spark_system.start() + do_sparks(5, 0, computer.loc) /datum/computer_file/program/revelation/Topic(href, list/href_list) diff --git a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm index 89fea156510..23b2cdab7ab 100644 --- a/code/modules/modular_computers/file_system/programs/generic/file_browser.dm +++ b/code/modules/modular_computers/file_system/programs/generic/file_browser.dm @@ -55,7 +55,8 @@ "name" = F.filename, "type" = F.filetype, "size" = F.size, - "undeletable" = F.undeletable + "undeletable" = F.undeletable, + "encrypted" = !!F.password ))) data["files"] = files if(RHDD) @@ -66,7 +67,8 @@ "name" = F.filename, "type" = F.filetype, "size" = F.size, - "undeletable" = F.undeletable + "undeletable" = F.undeletable, + "encrypted" = !!F.password ))) data["usbfiles"] = usbfiles @@ -83,6 +85,9 @@ switch(href_list["action"]) if("PRG_openfile") . = 1 + var/datum/computer_file/F = HDD.find_file_by_name(href_list["name"]) + if(!F.can_access_file(usr)) + return open_file = href_list["name"] if("PRG_newtextfile") . = 1 @@ -197,4 +202,27 @@ if(!F || !istype(F)) return 1 var/datum/computer_file/C = F.clone(0) - HDD.store_file(C) \ No newline at end of file + HDD.store_file(C) + if("PRG_encrypt") + . = 1 + if(!HDD) + return 1 + var/datum/computer_file/F = HDD.find_file_by_name(href_list["name"]) + if(!F || F.undeletable) + return 1 + if(F.password) + return + var/new_password = sanitize(input(usr, "Enter an encryption key:", "Encrypt File")) + if(!new_password) + to_chat(usr, "File not encrypted.") + return + F.password=new_password + if("PRG_decrypt") + . = 1 + if(!HDD) + return 1 + var/datum/computer_file/F = HDD.find_file_by_name(href_list["name"]) + if(!F || F.undeletable) + return 1 + if(F.can_access_file(usr)) + F.password = "" \ No newline at end of file diff --git a/code/modules/paperwork/fax.dm b/code/modules/paperwork/fax.dm index ade10febd2c..4b8d4f9db6e 100644 --- a/code/modules/paperwork/fax.dm +++ b/code/modules/paperwork/fax.dm @@ -45,7 +45,7 @@ var/list/adminfaxes = list() html += "" if(A.sent_by) var/mob/living/S = A.sent_by - html += "" + html += "" else html += "" html += "" @@ -74,7 +74,7 @@ var/list/adminfaxes = list() html += "" if(F.sent_by) var/mob/living/S = F.sent_by - html += "" + html += "" else html += "" html += "" diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index a43e0b66a95..cd0832bd714 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -316,7 +316,7 @@ var/list/alldepartments = list() /obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/faxtype, var/obj/item/sent, font_colour="#9A04D1") - var/msg = "[faxname]: [key_name_admin(sender)] | REPLY: (RADIO) (FAX) (SM) | REJECT: (TEMPLATE) (BSA) (EVILFAX) : Receiving '[sent.name]' via secure connection... view message" + var/msg = "[faxname]: [key_name_admin(sender)] | REPLY: (RADIO) (FAX) ([ADMIN_SM(sender,"SM")]) | REJECT: (TEMPLATE) ([ADMIN_BSA(sender,"BSA")]) (EVILFAX) : Receiving '[sent.name]' via secure connection... view message" for(var/client/C in GLOB.admins) if(check_rights(R_EVENT, 0, C.mob)) to_chat(C, msg) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index f8c47a0214c..06921bce252 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -316,7 +316,7 @@ to_chat(user, "Take off the carbon copy first.") add_fingerprint(user) return - var/obj/item/paper_bundle/B = new(src.loc) + var/obj/item/paper_bundle/B = new(src.loc, default_papers = FALSE) if(name != "paper") B.name = name else if(P.name != "paper" && P.name != "photo") diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 08cb7b6555e..73c9f9459dc 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -11,11 +11,15 @@ layer = 4 pressure_resistance = 1 attack_verb = list("bapped") - var/amount = 0 //Amount of items clipped to the paper + var/amount = 0 //Amount of items clipped to the paper. Note: If you have 2 paper, this should be 1 var/page = 1 var/screen = 0 - +/obj/item/paper_bundle/New(default_papers = TRUE) + if(default_papers) // This is to avoid runtime occuring from a paper bundle being created without a paper in it. + new /obj/item/paper(src) + new /obj/item/paper(src) + amount += 1 /obj/item/paper_bundle/attackby(obj/item/W as obj, mob/user as mob, params) ..() var/obj/item/paper/P diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index a8a0c8ddd19..a3a8dda68e1 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -72,9 +72,15 @@ photocopy(copyitem) sleep(15) else if(istype(copyitem, /obj/item/paper_bundle)) + var/obj/item/paper_bundle/C = copyitem + if(toner < (C.amount + 1)) + visible_message("A yellow light on [src] flashes, indicating there's not enough toner for the operation.") // It is better to prevent partial bundle than to produce broken paper bundle + return var/obj/item/paper_bundle/B = bundlecopy(copyitem) + if(!B) + return sleep(15*B.amount) - else if(ass && ass.loc == src.loc) + else if(ass && ass.loc == loc) copyass() sleep(15) else @@ -287,7 +293,7 @@ //If need_toner is 0, the copies will still be lightened when low on toner, however it will not be prevented from printing. TODO: Implement print queues for fax machines and get rid of need_toner /obj/machinery/photocopier/proc/bundlecopy(var/obj/item/paper_bundle/bundle, var/need_toner=1) - var/obj/item/paper_bundle/p = new /obj/item/paper_bundle (src) + var/obj/item/paper_bundle/P = new /obj/item/paper_bundle (src, default_papers = FALSE) for(var/obj/item/W in bundle) if(toner <= 0 && need_toner) toner = 0 @@ -298,16 +304,19 @@ W = copy(W) else if(istype(W, /obj/item/photo)) W = photocopy(W) - W.forceMove(p) - p.amount++ - p.amount-- - p.forceMove(get_turf(src)) - p.update_icon() - p.icon_state = "paper_words" - p.name = bundle.name - p.pixel_y = rand(-8, 8) - p.pixel_x = rand(-9, 9) - return p + W.forceMove(P) + P.amount++ + if(!P.amount) + qdel(P) + return null + P.amount-- + P.forceMove(get_turf(src)) + P.update_icon() + P.icon_state = "paper_words" + P.name = bundle.name + P.pixel_y = rand(-8, 8) + P.pixel_x = rand(-9, 9) + return P /obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 5f7ddcc035c..dbf30cd59b0 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -536,9 +536,7 @@ var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() if(prob(50) && electrocute_mob(usr, N, N)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return C.use(10) user.visible_message(\ @@ -555,9 +553,7 @@ if(do_after(user, 50 * W.toolspeed, target = src)) if(terminal && opened && has_electronics!=2) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return new /obj/item/stack/cable_coil(loc,10) to_chat(user, "You cut the cables and dismantle the power terminal.") @@ -1076,9 +1072,7 @@ smoke.set_up(3, 0, src.loc) smoke.attach(src) smoke.start() - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) for(var/mob/M in viewers(src)) M.show_message("The [src.name] suddenly lets out a blast of smoke and some sparks!", 3, "You hear sizzling electronics.", 2) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 5860bcd1e3a..048cbf65500 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -195,9 +195,7 @@ By design, d1 is the smallest direction and d2 is the highest if(!prob(prb)) return 0 if(electrocute_mob(user, powernet, src, siemens_coeff)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return 1 else return 0 diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index d978e39a7f0..fcb0b12f0d3 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -386,9 +386,7 @@ to_chat(user, "You stick \the [W] into the light socket!") if(has_power() && (W.flags & CONDUCT)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) if(prob(75)) electrocute_mob(user, get_area(src), src, rand(0.7,1.0)) @@ -540,9 +538,7 @@ if(status == LIGHT_OK || status == LIGHT_BURNED) playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) if(on || overloaded) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) status = LIGHT_BROKEN update() diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 0e9bdd8ddf3..a0e84f8455a 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -99,9 +99,7 @@ if(hasShocked) return 0 hasShocked = 1 - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, AM.loc) - s.start() + do_sparks(5, 1, AM.loc) var/atom/target = get_edge_target_turf(AM, get_dir(src, get_step_away(AM, src))) AM.throw_at(target, 200, 4) spawn(5) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 0bcde54af4b..ca0c4cb749a 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -24,6 +24,7 @@ var/frequency = 0 var/id_tag = null var/datum/radio_frequency/radio_connection + var/datum/effect_system/spark_spread/sparks /obj/machinery/power/emitter/New() ..() @@ -32,6 +33,8 @@ component_parts += new /obj/item/stock_parts/micro_laser(null) component_parts += new /obj/item/stock_parts/manipulator(null) RefreshParts() + sparks = new + sparks.set_up(5, 1, src) /obj/machinery/power/emitter/RefreshParts() var/max_firedelay = 120 @@ -124,6 +127,7 @@ msg_admin_attack("Emitter deleted at ([x],[y],[z] - [ADMIN_JMP(src)])", ATKLOG_FEW) log_game("Emitter deleted at ([x],[y],[z])") investigate_log("deleted at ([x],[y],[z])","singulo") + QDEL_NULL(sparks) return ..() /obj/machinery/power/emitter/update_icon() @@ -206,9 +210,7 @@ A.dir = src.dir playsound(get_turf(src), 'sound/weapons/emitter.ogg', 25, 1) if(prob(35)) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + sparks.start() switch(dir) if(NORTH) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index e5a669ef860..6d5d0226e69 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -184,9 +184,7 @@ if(do_after(user, 50 * I.toolspeed, target = src)) if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return //give the wires back and delete the terminal @@ -323,9 +321,7 @@ var/turf/T = get_turf(user) var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one if(prob(50) && electrocute_mob(user, N, N)) //animate the electrocution if uncautious and unlucky - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) return user.visible_message(\ @@ -446,9 +442,7 @@ qdel(src) return if(prob(15)) //Power drain - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) if(prob(50)) emp_act(1) else diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 6c19971a996..cd73c90d1cf 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -96,9 +96,7 @@ ..() /obj/item/projectile/bullet/pellet/weak/on_range() - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread - sparks.set_up(1, 1, src) - sparks.start() + do_sparks(1, 1, src) ..() /obj/item/projectile/bullet/pellet/overload @@ -114,9 +112,7 @@ /obj/item/projectile/bullet/pellet/overload/on_range() explosion(src, 0, 0, 2) - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread - sparks.set_up(3, 3, src) - sparks.start() + do_sparks(3, 3, src) ..() /obj/item/projectile/bullet/midbullet diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index 10786ec4b82..5da56d179bd 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -22,9 +22,7 @@ /obj/item/projectile/energy/electrode/on_hit(var/atom/target, var/blocked = 0) . = ..() if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - burst into sparks! - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread - sparks.set_up(1, 1, src) - sparks.start() + do_sparks(1, 1, src) else if(iscarbon(target)) var/mob/living/carbon/C = target if(HULK in C.mutations) @@ -34,9 +32,7 @@ C.do_jitter_animation(jitter) /obj/item/projectile/energy/electrode/on_range() //to ensure the bolt sparks when it reaches the end of its range if it didn't hit a target yet - var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread - sparks.set_up(1, 1, src) - sparks.start() + do_sparks(1, 1, src) ..() /obj/item/projectile/energy/declone diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index ef8a36f7f86..85eb3b25c9f 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -193,9 +193,7 @@ icon_state = "snappop" /obj/item/projectile/clown/Bump(atom/A as mob|obj|turf|area) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, src) - s.start() + do_sparks(3, 1, src) new /obj/effect/decal/cleanable/ash(loc) visible_message("The [name] explodes!","You hear a snap!") playsound(src, 'sound/effects/snap.ogg', 50, 1) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index d6dc8f91806..81fed023251 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -378,7 +378,7 @@ /obj/machinery/chem_master/proc/chemical_safety_check(datum/reagents/R) var/all_safe = 1 for(var/datum/reagent/A in R.reagent_list) - if(!safe_chem_list.Find(A.id)) + if(!GLOB.safe_chem_list.Find(A.id)) all_safe = 0 return all_safe diff --git a/code/modules/reagents/chemistry/reagents/drinks.dm b/code/modules/reagents/chemistry/reagents/drinks.dm index b6b4a27e10d..be5e71d53bd 100644 --- a/code/modules/reagents/chemistry/reagents/drinks.dm +++ b/code/modules/reagents/chemistry/reagents/drinks.dm @@ -296,6 +296,7 @@ /datum/reagent/consumable/drink/coffee/overdose_process(mob/living/M, severity) if(volume > 45) M.Jitter(5) + return list(0, STATUS_UPDATE_NONE) /datum/reagent/consumable/drink/coffee/icecoffee name = "Iced Coffee" diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index bc6f8f66317..6ca2c4a1260 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -192,7 +192,7 @@ /datum/reagent/medicine/styptic_powder name = "Styptic Powder" id = "styptic_powder" - description = "Styptic (aluminium sulfate) powder helps control bleeding and heal physical wounds." + description = "Styptic (aluminum sulfate) powder helps control bleeding and heal physical wounds." reagent_state = LIQUID color = "#C8A5DC" metabolization_rate = 3 @@ -641,6 +641,7 @@ update_flags |= M.Weaken(3, FALSE) if(effect <= 15) M.emote("collapse") + return list(effect, update_flags) /datum/reagent/medicine/strange_reagent name = "Strange Reagent" diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index d6813ee6f61..4bc534c6d8b 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -7,7 +7,7 @@ /datum/reagent/toxin/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE - update_flags |= M.adjustToxLoss(2, FALSE) + update_flags |= M.adjustToxLoss(2*REAGENTS_EFFECT_MULTIPLIER, FALSE) return ..() | update_flags /datum/reagent/spider_venom diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 28994d10fb2..281bed84b0e 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -38,11 +38,11 @@ var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs var/turf/T = get_turf(A) var/area/my_area = get_area(T) var/message = "A [reaction_name] reaction has occured in [my_area.name]. (JMP)" - message += " (VV)" + message += " ([ADMIN_VV(A,"VV")])" var/mob/M = get(A, /mob) if(M) - message += " - Carried By: [key_name_admin(M)](?) (FLW)" + message += " - Carried By: [key_name_admin(M)]([ADMIN_QUE(M,"?")]) ([ADMIN_FLW(M,"FLW")])" else message += " - Last Fingerprint: [(A.fingerprintslast ? A.fingerprintslast : "N/A")]" diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index a5d37cb8b60..b08e96a8d9e 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -157,9 +157,7 @@ /datum/chemical_reaction/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, location) - s.start() + do_sparks(2, 1, location) sleep(rand(20,30)) blackpowder_detonate(holder, created_volume) @@ -186,9 +184,7 @@ datum/chemical_reaction/flash_powder if(holder.has_reagent("stabilizing_agent")) return var/location = get_turf(holder.my_atom) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, location) - s.start() + do_sparks(2, 1, location) for(var/mob/living/carbon/C in viewers(5, location)) if(C.flash_eyes()) if(get_dist(C, location) < 4) @@ -206,9 +202,7 @@ datum/chemical_reaction/flash_powder /datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(2, 1, location) - s.start() + do_sparks(2, 1, location) for(var/mob/living/carbon/C in viewers(5, location)) if(C.flash_eyes()) if(get_dist(C, location) < 4) diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm index 462402c4317..0697ccd50d4 100644 --- a/code/modules/reagents/chemistry/recipes/toxins.dm +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -144,9 +144,7 @@ /datum/chemical_reaction/teslium/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(6, 1, location) - s.start() + do_sparks(6, 1, location) /datum/chemical_reaction/mutagen name = "Unstable mutagen" diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index bd037c49239..37e9e2d2bc0 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -85,7 +85,7 @@ var/datum/reagent/injected = GLOB.chemical_reagents_list[reagent_ids[mode]] var/contained = injected.name var/trans = R.trans_to(M, amount_per_transfer_from_this) - add_attack_logs(M, user, "Injected with [name] containing [contained], transfered [trans] units") + add_attack_logs(user, M, "Injected with [name] containing [contained], transfered [trans] units") M.LAssailant = user to_chat(user, "[trans] units injected. [R.total_volume] units remaining.") return diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 042b12e3122..9bb3e41e4ec 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -52,7 +52,7 @@ if(safety_hypo && !emagged) var/found_forbidden_reagent = FALSE for(var/datum/reagent/R in reagents.reagent_list) - if(!safe_chem_list.Find(R.id)) + if(!GLOB.safe_chem_list.Find(R.id)) reagents.del_reagent(R.id) found_forbidden_reagent = TRUE if(found_forbidden_reagent) diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index 1589b78438b..0253bb32055 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -653,6 +653,15 @@ construction_time = 200 category = list("Exosuit Equipment") +/datum/design/medical_jaw + name = "Exosuit Medical Equipment (Rescue Jaw)" + id = "mech_medical_jaw" + build_type = MECHFAB + req_tech = list("materials" = 4, "engineering" = 6, "magnets" = 6) //now same as jaws of life + materials = list(MAT_METAL=5000,MAT_SILVER=2000,MAT_TITANIUM=1500) + construction_time = 200 + category = list("Exosuit Equipment") + /datum/design/mech_generator name = "Exosuit Equipment (Plasma Generator)" id = "mech_generator" diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 88551f49096..4a587ac1253 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -52,7 +52,7 @@ // After docking // /atom/proc/postDock(obj/docking_port/S1) if(smooth) - smooth_icon(src) + queue_smooth(src) /obj/machinery/door/airlock/postDock(obj/docking_port/stationary/S1) . = ..() diff --git a/code/modules/shuttle/ripple.dm b/code/modules/shuttle/ripple.dm index ef3b18d2e39..3d3b52d9023 100644 --- a/code/modules/shuttle/ripple.dm +++ b/code/modules/shuttle/ripple.dm @@ -15,5 +15,5 @@ /obj/effect/temp_visual/ripple/New() . = ..() - smooth_icon(src) + queue_smooth(src) animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME) diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index dffb6da79b9..7f5bcda9614 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -233,12 +233,19 @@ if(!health) spawn(0) message_to_riders("Critical damage to the vessel detected, core explosion imminent!") - for(var/i = 10, i >= 0; --i) - message_to_riders("[i]") - if(i == 0) - explosion(loc, 2, 4, 8) - qdel(src) + for(var/i in 1 to 3) + var/count = 3 + message_to_riders("[count]") + count-- sleep(10) + if(LAZYLEN(pilot) || LAZYLEN(passengers)) + for(var/M in passengers + pilot) + var/mob/living/L = M + L.adjustBruteLoss(300) + explosion(loc, 0, 0, 2) + robogibs(loc) + robogibs(loc) + qdel(src) update_icons() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index 3c52246cb23..00bf181a6d3 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -60,8 +60,8 @@ name = "DNA Sampler" desc = "Can be used to take chemical and genetic samples of pretty much anything." icon = 'icons/obj/hypo.dmi' - item_state = "hypo" - icon_state = "hypo" + item_state = "sampler_hypo" + icon_state = "sampler_hypo" flags = NOBLUDGEON var/list/animals = list() var/list/plants = list() diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index e83dc1abc44..2616c6c6c7e 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -284,9 +284,7 @@ var/mob/living/carbon/human/H = user if(H.get_int_organ(/obj/item/organ/internal/cell)) if(A.emagged || A.stat & BROKEN) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(3, 1, A) - s.start() + do_sparks(3, 1, A) to_chat(H, "The APC power currents surge erratically, damaging your chassis!") H.adjustFireLoss(10,0) else if(A.cell && A.cell.charge > 0) @@ -326,11 +324,11 @@ /obj/item/organ/internal/cyberimp/arm/telebaton name = "telebaton implant" desc = "Telescopic baton implant. Does what it says on the tin" // A better description - + contents = newlist(/obj/item/melee/classic_baton) /obj/item/organ/internal/cyberimp/arm/advmop name = "advanced mop implant" desc = "Advanced mop implant. Does what it says on the tin" // A better description - + contents = newlist(/obj/item/mop/advanced) \ No newline at end of file diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index bf6f085275b..ba3112b6392 100644 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -46,7 +46,7 @@ owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) // Can't cope with toxins at all - for(var/toxin in list("toxin", "plasma", "sacid", "facid", "cyanide", "amanitin", "carpotoxin")) + for(var/toxin in GLOB.liver_toxins) if(owner.reagents.has_reagent(toxin)) owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 02a6d54a073..74d498704aa 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -608,6 +608,7 @@ Note that amputating the affected organ does in fact remove the infection from t "You hear a loud cracking sound coming from \the [owner].",\ "Something feels like it shattered in your [name]!",\ "You hear a sickening crack.") + playsound(owner, "bonebreak", 150, 1) if(owner.dna.species && !(NO_PAIN in owner.dna.species.species_traits)) owner.emote("scream") @@ -728,12 +729,7 @@ Note that amputating the affected organ does in fact remove the infection from t "Your [src.name] explodes!",\ "You hear an explosion!") explosion(get_turf(owner),-1,-1,2,3) - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(5, 0, victim) - spark_system.attach(owner) - spark_system.start() - spawn(10) - qdel(spark_system) + do_sparks(5, 0, victim) qdel(src) /obj/item/organ/external/proc/disfigure() diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 73da331e342..2f3667a645f 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -155,8 +155,6 @@ /obj/item/rcs/emag_act(user as mob) if(!emagged) emagged = 1 - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, src) - s.start() + do_sparks(5, 1, src) to_chat(user, " You emag the RCS. Activate it to toggle between modes.") return diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 2e3cd109062..f458d6e7152 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -145,9 +145,7 @@ /obj/machinery/computer/telescience/proc/sparks() if(telepad) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, get_turf(telepad)) - s.start() + do_sparks(5, 1, get_turf(telepad)) else return @@ -203,9 +201,7 @@ // use a lot of power use_power(power * 10) - var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread - s.set_up(5, 1, get_turf(telepad)) - s.start() + do_sparks(5, 1, get_turf(telepad)) temp_msg = "Teleport successful.
" if(teles_left < 10) @@ -214,9 +210,7 @@ temp_msg += "Data printed below." var/sparks = get_turf(target) - var/datum/effect_system/spark_spread/y = new /datum/effect_system/spark_spread - y.set_up(5, 1, sparks) - y.start() + do_sparks(5, 1, sparks) var/turf/source = target var/turf/dest = get_turf(telepad) diff --git a/html/changelog.html b/html/changelog.html index 622f5b0825c..38a71165fc0 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,171 @@ -->
+

20 October 2018

+

Birdtalon updated:

+
    +
  • Spacepods explosions are significantly reduced.
  • +
+

Dapocalypse updated:

+
    +
  • Adds password protected files to modular computer.
  • +
+

Farie82 updated:

+
    +
  • Guardian injectors now tell in their examination text if they are spend or not.
  • +
  • Added feedback on the RCD airlock access topic.
  • +
+

Fox McCloud updated:

+
    +
  • Updates the Garbage SS so it's less likely to induce lag
  • +
+

Purpose updated:

+
    +
  • Suit storage units now contain magboots for relevant roles.
  • +
  • Adds the captains jetpack to his suit storage unit, so it is now stealable again on Delta.
  • +
  • Aluminum & Aluminium properly standardized.
  • +
+

craftxbox updated:

+
    +
  • added check to make sure person downloading pAI isnt dead.
  • +
+

uc_guy updated:

+
    +
  • It is no longer possible to duplicate uvents.
  • +
+

variableundefined updated:

+
    +
  • Plating's icon is back to the old one once again.
  • +
+ +

19 October 2018

+

Fox McCloud updated:

+
    +
  • Fixes round-start sparks being stuck in maintenance
  • +
+

Purpose updated:

+
    +
  • Fixed an issue with Space Vine mutations
  • +
+

SpaceManiac updated:

+
    +
  • The body zone selector now indicates which body part you are about to select when hovered over.
  • +
+

TDSSS updated:

+
    +
  • New exosuit equipment: The rescue jaws for the Odysseus lets it open doors, firelocks and even force powered doors. It can also be added to firefighter ripleys.
  • +
+

Triiodine updated:

+
    +
  • new DNA Sampler Sprite
  • +
+

Warior4356 updated:

+
    +
  • Added nanoui for safe. Added minor quality of life to safe.
  • +
  • Removed old UI from safe
  • +
  • Safe now is only Right - Left - Right. Safe is 0-99 rather than 0-71.
  • +
  • Added safe dial for it's nanoui.
  • +
+ +

18 October 2018

+

IrkallaEpsilon updated:

+
    +
  • Feral Cat grenades are now listed as job specific items.
  • +
+

Shazbot updated:

+
    +
  • Shazbot's custom cyborg sprites.
  • +
+

Squirgenheimer updated:

+
    +
  • Ghosting from cryopods with an inventory open should no longer cause a runtime
  • +
+

Triiodine updated:

+
    +
  • disposals pipes sprite offsets & stray pixels.
  • +
  • id_decal icons
  • +
  • arcade id_decals using mind batterer sprite. (That's just silly.)
  • +
+ +

17 October 2018

+

Alonefromhell updated:

+
    +
  • Added a Nanotrasen Navy Uniform to the blueshields locker
  • +
+

Crazylemon updated:

+
    +
  • Buildmode is now compatible with 511 clients.
  • +
+

FalseIncarnate updated:

+
    +
  • Floodlights will now shut off if lacking a power cell.
  • +
+

Fox McCloud updated:

+
    +
  • Fixes the Timer SS timing out when it shouldn't
  • +
  • Fixes reagent overdose runtimes
  • +
+

TDSSS updated:

+
    +
  • Examining a borg tells you what module it has loaded
  • +
+

datlo updated:

+
    +
  • Added the Honk Brand Infiltration Kit to Nuke Ops.
  • +
+ +

16 October 2018

+

FalseIncarnate updated:

+
    +
  • Corpse spawners (such as those on the Wild West away mission) now properly spawn corpses at roundstart that don't remain standing.
  • +
+ +

15 October 2018

+

FreeStylaLT updated:

+
    +
  • Crunchy sounds when bones are broken
  • +
+

Squirgenheimer updated:

+
    +
  • Changelings will now wake up after using Regenerative Stasis.
  • +
+

TDSSS updated:

+
    +
  • The maximal length of a name that won't be rejected as a 'bad name' has been raised.
  • +
+

Ty-Omaha updated:

+
    +
  • Fixes stunbaton runtime (Stun() being called on a turf)
  • +
  • Borers with their "Dominate" window already open can no longer run across the map and successfully cast the spell on those people, they must be within 7 tiles (default view range)
  • +
  • Borers can no longer spam open the "Dominate" spell
  • +
  • Borers with their "Dominate" target window already open can no longer successfully target someone if they are dead
  • +
  • Borers no longer "slither up and probe people's ear canal" if they select the target of an "infect host" spell after they die
  • +
+

uc_guy updated:

+
    +
  • You can no longer roll around when dead.
  • +
+ +

14 October 2018

+

Purpose updated:

+
    +
  • Makes it so that Screwdrivers & Wirecutters are no longer invisible in the map editor.
  • +
  • Fixes a gibbing runtime
  • +
+

taac updated:

+
    +
  • added cryo cell description
  • +
+

uc_guy updated:

+
    +
  • fixed runtime in IsBanned.dm
  • +
+

variableundefined updated:

+
    +
  • Stacks are split by CtrlShiftClick instead of AltClick now.
  • +
  • A runtime that occurs with paper bundle being created with one or less paper.
  • +
+

13 October 2018

Birdtalon updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 668ff62a364..614b31a3e41 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -7497,3 +7497,107 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. uc_guy: - bugfix: You can no longer get an infection and die during abductor surgery. - bugfix: Voice analyzers no longer activate on noise. +2018-10-14: + Purpose: + - bugfix: Makes it so that Screwdrivers & Wirecutters are no longer invisible in + the map editor. + - bugfix: Fixes a gibbing runtime + taac: + - bugfix: added cryo cell description + uc_guy: + - bugfix: fixed runtime in IsBanned.dm + variableundefined: + - tweak: Stacks are split by CtrlShiftClick instead of AltClick now. + - bugfix: A runtime that occurs with paper bundle being created with one or less + paper. +2018-10-15: + FreeStylaLT: + - rscadd: Crunchy sounds when bones are broken + Squirgenheimer: + - bugfix: Changelings will now wake up after using Regenerative Stasis. + TDSSS: + - tweak: The maximal length of a name that won't be rejected as a 'bad name' has + been raised. + Ty-Omaha: + - bugfix: Fixes stunbaton runtime (Stun() being called on a turf) + - bugfix: Borers with their "Dominate" window already open can no longer run across + the map and successfully cast the spell on those people, they must be within + 7 tiles (default view range) + - bugfix: Borers can no longer spam open the "Dominate" spell + - bugfix: Borers with their "Dominate" target window already open can no longer + successfully target someone if they are dead + - bugfix: Borers no longer "slither up and probe people's ear canal" if they select + the target of an "infect host" spell after they die + uc_guy: + - bugfix: You can no longer roll around when dead. +2018-10-16: + FalseIncarnate: + - bugfix: Corpse spawners (such as those on the Wild West away mission) now properly + spawn corpses at roundstart that don't remain standing. +2018-10-17: + Alonefromhell: + - rscadd: Added a Nanotrasen Navy Uniform to the blueshields locker + Crazylemon: + - bugfix: Buildmode is now compatible with 511 clients. + FalseIncarnate: + - bugfix: Floodlights will now shut off if lacking a power cell. + Fox McCloud: + - bugfix: Fixes the Timer SS timing out when it shouldn't + - bugfix: Fixes reagent overdose runtimes + TDSSS: + - rscadd: Examining a borg tells you what module it has loaded + datlo: + - rscadd: Added the Honk Brand Infiltration Kit to Nuke Ops. +2018-10-18: + IrkallaEpsilon: + - bugfix: Feral Cat grenades are now listed as job specific items. + Shazbot: + - rscadd: Shazbot's custom cyborg sprites. + Squirgenheimer: + - bugfix: Ghosting from cryopods with an inventory open should no longer cause a + runtime + Triiodine: + - bugfix: disposals pipes sprite offsets & stray pixels. + - rscadd: id_decal icons + - bugfix: arcade id_decals using mind batterer sprite. (That's just silly.) +2018-10-19: + Fox McCloud: + - bugfix: Fixes round-start sparks being stuck in maintenance + Purpose: + - bugfix: Fixed an issue with Space Vine mutations + SpaceManiac: + - rscadd: The body zone selector now indicates which body part you are about to + select when hovered over. + TDSSS: + - rscadd: 'New exosuit equipment: The rescue jaws for the Odysseus lets it open + doors, firelocks and even force powered doors. It can also be added to firefighter + ripleys.' + Triiodine: + - rscadd: new DNA Sampler Sprite + Warior4356: + - rscadd: Added nanoui for safe. Added minor quality of life to safe. + - rscdel: Removed old UI from safe + - tweak: Safe now is only Right - Left - Right. Safe is 0-99 rather than 0-71. + - imageadd: Added safe dial for it's nanoui. +2018-10-20: + Birdtalon: + - tweak: Spacepods explosions are significantly reduced. + Dapocalypse: + - rscadd: Adds password protected files to modular computer. + Farie82: + - tweak: Guardian injectors now tell in their examination text if they are spend + or not. + - tweak: Added feedback on the RCD airlock access topic. + Fox McCloud: + - tweak: Updates the Garbage SS so it's less likely to induce lag + Purpose: + - rscadd: Suit storage units now contain magboots for relevant roles. + - bugfix: Adds the captains jetpack to his suit storage unit, so it is now stealable + again on Delta. + - spellcheck: Aluminum & Aluminium properly standardized. + craftxbox: + - bugfix: added check to make sure person downloading pAI isnt dead. + uc_guy: + - bugfix: It is no longer possible to duplicate uvents. + variableundefined: + - tweak: Plating's icon is back to the old one once again. diff --git a/html/changelogs/AutoChangeLog-pr-9562.yml b/html/changelogs/AutoChangeLog-pr-9562.yml new file mode 100644 index 00000000000..033e5c7b202 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9562.yml @@ -0,0 +1,4 @@ +author: "Desolate" +delete-after: True +changes: + - tweak: "Refactors some reagent lists into global list" diff --git a/html/changelogs/AutoChangeLog-pr-9719.yml b/html/changelogs/AutoChangeLog-pr-9719.yml new file mode 100644 index 00000000000..b18f8874b49 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9719.yml @@ -0,0 +1,4 @@ +author: "Purpose" +delete-after: True +changes: + - tweak: "Moves Icon Smoothing to a Subsystem." diff --git a/html/changelogs/AutoChangeLog-pr-9839.yml b/html/changelogs/AutoChangeLog-pr-9839.yml new file mode 100644 index 00000000000..40a0ca087a9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9839.yml @@ -0,0 +1,4 @@ +author: "variableundefined" +delete-after: True +changes: + - bugfix: "Cyborg hypospray's attack log message should no longer be reversed." diff --git a/html/changelogs/AutoChangeLog-pr-9842.yml b/html/changelogs/AutoChangeLog-pr-9842.yml new file mode 100644 index 00000000000..d1c2b499e6e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9842.yml @@ -0,0 +1,4 @@ +author: "variableundefined" +delete-after: True +changes: + - tweak: "Improves the List free slots admin verb to show useful information." diff --git a/html/changelogs/AutoChangeLog-pr-9895.yml b/html/changelogs/AutoChangeLog-pr-9895.yml new file mode 100644 index 00000000000..19ad1fe31bf --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9895.yml @@ -0,0 +1,5 @@ +author: "Triiodine" +delete-after: True +changes: + - tweak: "Skrell & Tajaran sechardsuit to paracode palette, from Bay12 palette." + - rscdel: "TG & BS12 sec-hardsuits in all dmis" diff --git a/html/changelogs/AutoChangeLog-pr-9913.yml b/html/changelogs/AutoChangeLog-pr-9913.yml new file mode 100644 index 00000000000..70bbf5ca3df --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9913.yml @@ -0,0 +1,4 @@ +author: "Farie82" +delete-after: True +changes: + - tweak: "Cyborgs can now refill welding tools and fire extinguishers using the recharging station" diff --git a/html/changelogs/AutoChangeLog-pr-9914.yml b/html/changelogs/AutoChangeLog-pr-9914.yml new file mode 100644 index 00000000000..2f3a7f7ba9e --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9914.yml @@ -0,0 +1,4 @@ +author: "Warior4356" +delete-after: True +changes: + - bugfix: "Final UI update was missed in Safe Refactor PR" diff --git a/html/changelogs/AutoChangeLog-pr-9920.yml b/html/changelogs/AutoChangeLog-pr-9920.yml new file mode 100644 index 00000000000..26e1d62557a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-9920.yml @@ -0,0 +1,4 @@ +author: "Alonefromhell" +delete-after: True +changes: + - spellcheck: "Fixed some formatting issues in post_equip." diff --git a/icons/mob/custom_synthetic/custom-synthetic.dmi b/icons/mob/custom_synthetic/custom-synthetic.dmi index 3d3a7a5c685..5b50438d6dd 100644 Binary files a/icons/mob/custom_synthetic/custom-synthetic.dmi and b/icons/mob/custom_synthetic/custom-synthetic.dmi differ diff --git a/icons/mob/species/drask/suit.dmi b/icons/mob/species/drask/suit.dmi index 0259f9c9275..697c3888f77 100644 Binary files a/icons/mob/species/drask/suit.dmi and b/icons/mob/species/drask/suit.dmi differ diff --git a/icons/mob/species/skrell/helmet.dmi b/icons/mob/species/skrell/helmet.dmi index 7c7142516cb..e17fa4174c5 100644 Binary files a/icons/mob/species/skrell/helmet.dmi and b/icons/mob/species/skrell/helmet.dmi differ diff --git a/icons/mob/species/skrell/suit.dmi b/icons/mob/species/skrell/suit.dmi index 0dcd38e5364..878831b5595 100644 Binary files a/icons/mob/species/skrell/suit.dmi and b/icons/mob/species/skrell/suit.dmi differ diff --git a/icons/mob/species/tajaran/helmet.dmi b/icons/mob/species/tajaran/helmet.dmi index a2626a6fb24..41e8c84959b 100644 Binary files a/icons/mob/species/tajaran/helmet.dmi and b/icons/mob/species/tajaran/helmet.dmi differ diff --git a/icons/mob/species/tajaran/suit.dmi b/icons/mob/species/tajaran/suit.dmi index 0a6cf3c9787..1b7299cc8fb 100644 Binary files a/icons/mob/species/tajaran/suit.dmi and b/icons/mob/species/tajaran/suit.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index b721063fcf9..5c64de09e86 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/obj/hypo.dmi b/icons/obj/hypo.dmi index a51a981251d..7dd561de617 100644 Binary files a/icons/obj/hypo.dmi and b/icons/obj/hypo.dmi differ diff --git a/icons/obj/machines/suit_storage.dmi b/icons/obj/machines/suit_storage.dmi new file mode 100644 index 00000000000..e61f9567c60 Binary files /dev/null and b/icons/obj/machines/suit_storage.dmi differ diff --git a/icons/obj/pipes/disposal.dmi b/icons/obj/pipes/disposal.dmi index 83440fc1b52..f2dd62c9393 100644 Binary files a/icons/obj/pipes/disposal.dmi and b/icons/obj/pipes/disposal.dmi differ diff --git a/icons/obj/suitstorage.dmi b/icons/obj/suitstorage.dmi deleted file mode 100644 index 3fc3e4e7337..00000000000 Binary files a/icons/obj/suitstorage.dmi and /dev/null differ diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi index a78a0babdc4..1111dfb02ee 100644 Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi index b7f40b4cdbb..524418ba0e9 100644 Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ diff --git a/icons/turf/floors/plating.dmi b/icons/turf/floors/plating.dmi index c3c480bfc6a..fee52346e3c 100644 Binary files a/icons/turf/floors/plating.dmi and b/icons/turf/floors/plating.dmi differ diff --git a/nano/images/Scarborough Arms.svg b/nano/images/Scarborough Arms.svg new file mode 100644 index 00000000000..cf164903bdf --- /dev/null +++ b/nano/images/Scarborough Arms.svg @@ -0,0 +1,75 @@ + + + + + + + + + + image/svg+xml + + + + + + + SA + + diff --git a/nano/images/safe_dial.png b/nano/images/safe_dial.png new file mode 100644 index 00000000000..de24f16b670 Binary files /dev/null and b/nano/images/safe_dial.png differ diff --git a/nano/templates/autolathe.tmpl b/nano/templates/autolathe.tmpl index 55e017ca95c..d56ae4926c3 100644 --- a/nano/templates/autolathe.tmpl +++ b/nano/templates/autolathe.tmpl @@ -121,7 +121,7 @@ Used In File(s): \code\game\machinery\autolathe.dm {{if !value.can_build}} {{/if}} - {{:value.name}} {{:value.multiplier > 1 ? '(xvalue.multiplier)' : ''}} + {{:value.name}} {{:value.multiplier > 1 ? '(' + value.multiplier + ')' : ''}} {{if !value.can_build}} {{/if}} diff --git a/nano/templates/file_manager.tmpl b/nano/templates/file_manager.tmpl index 1bdb0cd95c4..51d40b84475 100644 --- a/nano/templates/file_manager.tmpl +++ b/nano/templates/file_manager.tmpl @@ -32,6 +32,11 @@ {{:helper.link('DELETE', 'trash', {'action' : 'PRG_deletefile', 'name' : value.name}, value.undeletable ? 'disabled' : null)}} {{:helper.link('RENAME', 'pencil', {'action' : 'PRG_rename', 'name' : value.name}, value.undeletable ? 'disabled' : null)}} {{:helper.link('CLONE', 'files-o', {'action' : 'PRG_clone', 'name' : value.name}, value.undeletable ? 'disabled' : null)}} + {{if !value.encrypted}} + {{:helper.link('ENCRYPT', null, {'action' : 'PRG_encrypt', 'name' : value.name}, value.undeletable ? 'disabled' : null)}} + {{else}} + {{:helper.link('DECRYPT', null, {'action' : 'PRG_decrypt', 'name' : value.name}, value.undeletable ? 'disabled' : null)}} + {{/if}} {{if data.usbconnected}} {{:helper.link('EXPORT', 'upload', {'action' : 'PRG_copytousb', 'name' : value.name}, value.undeletable ? 'disabled' : null)}} {{/if}} diff --git a/nano/templates/safe.tmpl b/nano/templates/safe.tmpl new file mode 100644 index 00000000000..0e8bb29faa0 --- /dev/null +++ b/nano/templates/safe.tmpl @@ -0,0 +1,65 @@ + + + +{{if data.open}} +
    +
    +
    {{:helper.link('Close', 'caret-square-o-up', {'open': 1})}}
    +
    +
    +
    + {{for data.contents}} +
    + {{:helper.link(value.name, 'arrow-left', {'retrieve': value.index})}} +
    + {{/for}} +
    +{{else}} +
    +
    +
    {{:helper.link('Open', 'caret-square-o-down', {'open': 1})}}
    +
    +
    +
    +
    +
    {{:helper.link('Left 50', 'arrow-left', {'increment': 50})}}
    +
    {{:helper.link('Left 10', 'arrow-left', {'increment': 10})}}
    +
    {{:helper.link('Left 1', 'arrow-left', {'increment': 1})}}
    +
    + {{if data.unlocked}} +
    {{:helper.link('Right 1', 'arrow-right', null, 'disabled')}}
    +
    {{:helper.link('Right 10', 'arrow-right', null, 'disabled')}}
    +
    {{:helper.link('Right 100', 'arrow-right', null, 'disabled')}}
    + {{else}} +
    {{:helper.link('Right 1', 'arrow-right', {'decrement': 1})}}
    +
    {{:helper.link('Right 10', 'arrow-right', {'decrement': 10})}}
    +
    {{:helper.link('Right 50', 'arrow-right', {'decrement': 50})}}
    + {{/if}} +
    +
    +
    + +
    +
    +
    +
    +
    +
    How to open your Scarborough Arms - 2 tumbler safe.
    +
    +
    1. Turn the dial right two full turns.
    +
    2. Keep turning right and stop on first number.
    +
    3. Turn the dial left one full turn.
    +
    4. Turn left to second number. Do not go past it.
    +
    5. Turn the dial right until it stops.
    +
    6. Open the safe.
    +
    +
    To lock fully, turn the dial to the left for three rotations.
    +
    +{{/if}} diff --git a/paradise.dme b/paradise.dme index a20b8d43042..d35fedc2589 100644 --- a/paradise.dme +++ b/paradise.dme @@ -203,6 +203,7 @@ #include "code\controllers\subsystem\atoms.dm" #include "code\controllers\subsystem\fires.dm" #include "code\controllers\subsystem\garbage.dm" +#include "code\controllers\subsystem\icon_smooth.dm" #include "code\controllers\subsystem\machinery.dm" #include "code\controllers\subsystem\mobs.dm" #include "code\controllers\subsystem\nano_mob_hunter.dm" diff --git a/sound/effects/bone_break_1.ogg b/sound/effects/bone_break_1.ogg new file mode 100644 index 00000000000..0c7d31a9769 Binary files /dev/null and b/sound/effects/bone_break_1.ogg differ diff --git a/sound/effects/bone_break_2.ogg b/sound/effects/bone_break_2.ogg new file mode 100644 index 00000000000..0e0c71def88 Binary files /dev/null and b/sound/effects/bone_break_2.ogg differ diff --git a/sound/effects/bone_break_3.ogg b/sound/effects/bone_break_3.ogg new file mode 100644 index 00000000000..420c61a9f8d Binary files /dev/null and b/sound/effects/bone_break_3.ogg differ diff --git a/sound/effects/bone_break_4.ogg b/sound/effects/bone_break_4.ogg new file mode 100644 index 00000000000..93ad793b6a2 Binary files /dev/null and b/sound/effects/bone_break_4.ogg differ diff --git a/sound/effects/bone_break_5.ogg b/sound/effects/bone_break_5.ogg new file mode 100644 index 00000000000..e052c0ba091 Binary files /dev/null and b/sound/effects/bone_break_5.ogg differ diff --git a/sound/effects/bone_break_6.ogg b/sound/effects/bone_break_6.ogg new file mode 100644 index 00000000000..7cba2da19ae Binary files /dev/null and b/sound/effects/bone_break_6.ogg differ
Whitelisted Positions
Whitelisted Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
[key_string][H.real_name][job_string][mins_ssd][role_string][get_area(H)]PP[get_area(H)][ADMIN_PP(H,"PP")]In Cryo[station_time_timestamp("hh:mm:ss", A.sent_at)][S.name][ADMIN_PP(S,"[S.name]")]UnknownView[station_time_timestamp("hh:mm:ss", F.sent_at)][S.name][ADMIN_PP(S,"[S.name]")]UnknownView