diff --git a/code/__DEFINES/autowiki.dm b/code/__DEFINES/autowiki.dm new file mode 100644 index 000000000000..4edf385bcc82 --- /dev/null +++ b/code/__DEFINES/autowiki.dm @@ -0,0 +1,7 @@ +#ifdef AUTOWIKI + #define AUTOWIKI_SKIP(skip) autowiki_skip = skip + #define IS_AUTOWIKI_SKIP(datum) datum.autowiki_skip +#else + #define AUTOWIKI_SKIP(skip) + #define IS_AUTOWIKI_SKIP(datum) UNLINT(FALSE) +#endif diff --git a/code/__DEFINES/chemistry.dm b/code/__DEFINES/chemistry.dm index 35e040654881..a3b3b1a4768f 100644 --- a/code/__DEFINES/chemistry.dm +++ b/code/__DEFINES/chemistry.dm @@ -2,8 +2,10 @@ * Chemistry defines */ +/// Amount of bottle icon variations in total +#define BOTTLE_ICON_CHOICES 4 /// Amount of random icon variations for pills in total -#define PILL_ICON_CHOICES 21 +#define PILL_ICON_CHOICES 22 /* Pill icon classes to generate mappings for */ #define PILL_ICON_CLASSES list("bica", "kelo", "dex", "para", "tram", "atox", "tox", "inap", "peri", "spac", "drug", "stim", "alky", "imi", "qc", "tric", "psych", "oxy") diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index d8f820ab382b..53ad9904abd0 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -166,8 +166,9 @@ #define ORGAN_ROBOT 2 #define ORGAN_HEALTHY 0 -#define ORGAN_BRUISED 1 -#define ORGAN_BROKEN 2 +#define ORGAN_LITTLE_BRUISED 1 //used by stethoscopes and penlights +#define ORGAN_BRUISED 2 +#define ORGAN_BROKEN 3 //================================================= diff --git a/code/__DEFINES/skills.dm b/code/__DEFINES/skills.dm index d33e26c1c3f6..e4965907f707 100644 --- a/code/__DEFINES/skills.dm +++ b/code/__DEFINES/skills.dm @@ -70,10 +70,11 @@ // engineer skill #define SKILL_ENGINEER_DEFAULT 0 -#define SKILL_ENGINEER_TRAINED 1 //barricade repair && c4 use (mini-engis, specs) -#define SKILL_ENGINEER_ENGI 2 //plasteel barricade deconstruction, hacking&&planet engine fixing&&apc building, Telecomms fixing (Combat Engi, OT, etc.) -#define SKILL_ENGINEER_MASTER 3 //Synths -#define SKILL_ENGINEER_MAX 3 +#define SKILL_ENGINEER_NOVICE 1 //barricade repair && c4 use (mini-engis, specs) +#define SKILL_ENGINEER_TRAINED 2 //plasteel barricade deconstruction, hacking&&planet engine fixing&&apc building, Telecomms fixing (OT, etc.) +#define SKILL_ENGINEER_ENGI 3 // Slightly faster at everything (Combat Technicians) +#define SKILL_ENGINEER_MASTER 4 //Synths +#define SKILL_ENGINEER_MAX 4 //medical skill #define SKILL_MEDICAL_DEFAULT 0 diff --git a/code/__DEFINES/sounds.dm b/code/__DEFINES/sounds.dm index 807305174b34..35f388f351ea 100644 --- a/code/__DEFINES/sounds.dm +++ b/code/__DEFINES/sounds.dm @@ -31,6 +31,28 @@ #define SOUND_CHANNEL_LOBBY 1023 #define SOUND_CHANNEL_Z 1024 + +//default byond sound echo list index positions. +//ECHO_DIRECT and ECHO_ROOM are the only two that actually appear to do anything, and represent the dry and wet channels of the environment effects, respectively. +#define ECHO_DIRECT 1 +#define ECHO_DIRECTHF 2 +#define ECHO_ROOM 3 +#define ECHO_ROOMHF 4 +#define ECHO_OBSTRUCTION 5 +#define ECHO_OBSTRUCTIONLFRATIO 6 +#define ECHO_OCCLUSION 7 +#define ECHO_OCCLUSIONLFRATIO 8 +#define ECHO_OCCLUSIONROOMRATIO 9 +#define ECHO_OCCLUSIONDIRECTRATIO 10 +#define ECHO_EXCLUSION 11 +#define ECHO_EXCLUSIONLFRATIO 12 +#define ECHO_OUTSIDEVOLUMEHF 13 +#define ECHO_DOPPLERFACTOR 14 +#define ECHO_ROLLOFFFACTOR 15 +#define ECHO_ROOMROLLOFFFACTOR 16 +#define ECHO_AIRABSORPTIONFACTOR 17 +#define ECHO_FLAGS 18 + //default byond sound environments #define SOUND_ENVIRONMENT_NONE -1 #define SOUND_ENVIRONMENT_GENERIC 0 diff --git a/code/__DEFINES/turfs.dm b/code/__DEFINES/turfs.dm index 158c66754e18..1b549440deee 100644 --- a/code/__DEFINES/turfs.dm +++ b/code/__DEFINES/turfs.dm @@ -1,15 +1,16 @@ -#define RANGE_TURFS(RADIUS, CENTER) \ - block( \ - (CENTER).x-(RADIUS), (CENTER).y-(RADIUS), (CENTER).z, \ - (CENTER).x+(RADIUS), (CENTER).y+(RADIUS), (CENTER).z \ - ) - +/// Returns a list of turfs within H_RADIUS tiles horizontally and V_RADIUS tiles vertically of CENTER. #define RECT_TURFS(H_RADIUS, V_RADIUS, CENTER) \ block( \ (CENTER).x-(H_RADIUS), (CENTER).y-(V_RADIUS), (CENTER).z, \ (CENTER).x+(H_RADIUS), (CENTER).y+(V_RADIUS), (CENTER).z \ ) +/// Returns a list of turfs within Dist tiles of Center. When Dist >= 5 faster than a `range()` filtered to `/turf`s. +#define RANGE_TURFS(Dist, Center) RECT_TURFS(Dist, Dist, Center) + +/// Returns a list of turfs within Dist tiles of Center, excluding Center. When Dist >= 5 faster than an `orange()` filtered to `/turf`s. +#define ORANGE_TURFS(Dist, Center) (RANGE_TURFS(Dist, Center) - Center) + ///Returns all turfs in a zlevel #define Z_TURFS(ZLEVEL) block(1, 1, (ZLEVEL), world.maxx, world.maxy, (ZLEVEL)) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 094f8205c80e..ba27d4192ded 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -45,7 +45,7 @@ var/list/turfs = new/list() var/rsq = radius * (radius+0.5) - for(var/turf/T in range(radius, centerturf)) + for(var/turf/T as anything in RANGE_TURFS(radius, centerturf)) var/dx = T.x - centerturf.x var/dy = T.y - centerturf.y if(dx*dx + dy*dy <= rsq) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index f442ca3b1a32..5a307ac02ed5 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1289,10 +1289,7 @@ GLOBAL_LIST_INIT(WALLITEMS, list( origin = get_turf(origin) if(!origin) return - var/list/turfs = list() - for(var/turf/T in orange(origin, outer_range)) - if(!inner_range || get_dist(origin, T) >= inner_range) - turfs += T + var/list/turfs = (RANGE_TURFS(outer_range, origin) - RANGE_TURFS(inner_range - 1, origin)) if(length(turfs)) return pick(turfs) @@ -1343,29 +1340,35 @@ GLOBAL_LIST_INIT(WALLITEMS, list( GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) /// Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant). -/proc/dview(range = world.view, center, invis_flags = 0) +/proc/dview(range = world.view, atom/center, invis_flags = 0) if(!center) return - GLOB.dview_mob.loc = center - + GLOB.dview_mob.loc = isturf(center) ? center : center.loc GLOB.dview_mob.see_invisible = invis_flags - . = view(range, GLOB.dview_mob) + . = oview(range, GLOB.dview_mob) GLOB.dview_mob.loc = null +/// Version of oview() which ignores darkness +/proc/doview(range, atom/center, invis_flags) + if(!center) + return + + return dview(range, center, invis_flags) - center + /mob/dview name = "INTERNAL DVIEW MOB" - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT density = FALSE - see_in_dark = 1e6 + see_in_dark = INFINITY var/ready_to_die = FALSE /mob/dview/Initialize() //Properly prevents this mob from gaining huds or joining any global lists SHOULD_CALL_PARENT(FALSE) - if(flags_atom & INITIALIZED) + if(CHECK_BITFIELD(flags_atom, INITIALIZED)) stack_trace("Warning: [src]([type]) initialized multiple times!") - flags_atom |= INITIALIZED + ENABLE_BITFIELD(flags_atom, INITIALIZED) return INITIALIZE_HINT_NORMAL /mob/dview/Destroy(force = FALSE) @@ -1381,12 +1384,19 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) #define FOR_DVIEW(type, range, center, invis_flags) \ - GLOB.dview_mob.loc = center; \ + GLOB.dview_mob.loc = isturf(center) ? (center) : (center).loc; \ GLOB.dview_mob.see_invisible = invis_flags; \ - for(type in view(range, GLOB.dview_mob)) + for(type in oview(range, GLOB.dview_mob)) #define FOR_DVIEW_END GLOB.dview_mob.loc = null +#define FOR_DOVIEW(type, range, center, invis_flags) \ + GLOB.dview_mob.loc = isturf(center) ? (center) : (center).loc; \ + GLOB.dview_mob.see_invisible = invis_flags; \ + for(type in oview(range, GLOB.dview_mob) - (center)) + +#define FOR_DOVIEW_END FOR_DVIEW_END + /proc/get_turf_pixel(atom/AM) if(!istype(AM)) return diff --git a/code/_globalvars/global_lists.dm b/code/_globalvars/global_lists.dm index c6957eefd22c..d2165fecc9b1 100644 --- a/code/_globalvars/global_lists.dm +++ b/code/_globalvars/global_lists.dm @@ -152,6 +152,9 @@ GLOBAL_LIST_INIT_TYPED(chemical_gen_classes_list, /list, list("C" = list(),"C1" //properties generated in chemicals, helps to make sure the same property doesn't show up 10 times GLOBAL_LIST_INIT_TYPED(generated_properties, /list, list("positive" = list(), "negative" = list(), "neutral" = list())) +GLOBAL_LIST_INIT_TYPED(space_weapons, /datum/space_weapon, setup_ship_weapon()) +GLOBAL_LIST_INIT_TYPED(space_weapons_ammo, /datum/space_weapon_ammo, setup_ship_ammo()) + GLOBAL_LIST_INIT_TYPED(ammo_list, /datum/ammo, setup_ammo()) //List of all ammo types. Used by guns to tell the projectile how to act. GLOBAL_REFERENCE_LIST_INDEXED(joblist, /datum/job, title) //List of all jobstypes, minus borg and AI @@ -348,6 +351,20 @@ GLOBAL_LIST_INIT(hj_emotes, setup_hazard_joe_emotes()) all_species[S.name] = S return all_species +/proc/setup_ship_weapon() + var/list/ammo_list = list() + for(var/weapon_type in subtypesof(/datum/space_weapon)) + var/datum/space_weapon/new_weapon = new weapon_type + ammo_list[new_weapon.type] = new_weapon + return ammo_list + +/proc/setup_ship_ammo() + var/list/ammo_list = list() + for(var/ammo_type in subtypesof(/datum/space_weapon_ammo)) + var/datum/space_weapon_ammo/new_ammo = new ammo_type + ammo_list[new_ammo.type] = new_ammo + return ammo_list + /proc/setup_ammo() var/list/blacklist = list(/datum/ammo/energy, /datum/ammo/energy/yautja, /datum/ammo/energy/yautja/rifle, /datum/ammo/bullet/shotgun, /datum/ammo/xeno) var/list/ammo_list = list() diff --git a/code/controllers/subsystem/who.dm b/code/controllers/subsystem/who.dm index 43ecbb435587..6c817fb1245e 100644 --- a/code/controllers/subsystem/who.dm +++ b/code/controllers/subsystem/who.dm @@ -17,17 +17,29 @@ SUBSYSTEM_DEF(who) who.update_data() staff_who.update_data() -//datum + + +// WHO DATA /datum/player_list var/tgui_name = "Who" var/tgui_interface_name = "Who" - var/list/mobs_ckey = list() - var/list/list_data = list() + var/list/base_data = list() + var/list/admin_sorted_additional = list() /datum/player_list/proc/update_data() - var/list/new_list_data = list() - var/list/new_mobs_ckey = list() - var/list/additional_data = list( + var/list/base_data = list() + var/list/admin_sorted_additional = list() + + var/list/factions_additional = list() + admin_sorted_additional["factions_additional"] = list("flags" = R_MOD|R_ADMIN, "data" = factions_additional) + + var/list/player_additional = list() + admin_sorted_additional["player_additional"] = list("flags" = R_MOD|R_ADMIN, "data" = player_additional) + + var/list/player_stealthed_additional = list() + admin_sorted_additional["player_stealthed_additional"] = list("flags" = R_STEALTH, "data" = player_stealthed_additional) + + var/list/counted_additional = list( "lobby" = 0, "admin_observers" = 0, "observers" = 0, @@ -38,35 +50,40 @@ SUBSYSTEM_DEF(who) "uscm" = 0, "uscm_marines" = 0, ) - new_list_data["additional_info"] = list() var/list/counted_factions = list() + + // Running thru all clients and doing some counts for(var/client/client as anything in sortTim(GLOB.clients, GLOBAL_PROC_REF(cmp_ckey_asc))) - CHECK_TICK - new_list_data["all_clients"]++ var/list/client_payload = list() - client_payload["ckey"] = "[client.key]" - client_payload["text"] = "[client.key]" + client_payload["text"] = client.key client_payload["ckey_color"] = "white" + if(CLIENT_IS_STEALTHED(client)) + player_stealthed_additional["total_players"] += list(list(client.key = list(client_payload))) + else if(client.admin_holder?.fakekey) + player_additional["total_players"] += list(list(client.key = list(client_payload))) + else + base_data["total_players"] += list(list(client.key = list(client_payload.Copy()))) + player_additional["total_players"] += list(list(client.key = list(client_payload))) + var/mob/client_mob = client.mob - new_mobs_ckey[client.key] = client_mob if(client_mob) if(istype(client_mob, /mob/new_player)) client_payload["text"] += " - in Lobby" - additional_data["lobby"]++ + counted_additional["lobby"]++ else if(isobserver(client_mob)) client_payload["text"] += " - Playing as [client_mob.real_name]" if(CLIENT_IS_STAFF(client)) - additional_data["admin_observers"]++ + counted_additional["admin_observers"]++ else - additional_data["observers"]++ + counted_additional["observers"]++ var/mob/dead/observer/observer = client_mob if(observer.started_as_observer) - client_payload["color"] += "#ce89cd" + client_payload["color"] = "#ce89cd" client_payload["text"] += " - Spectating" else - client_payload["color"] += "#A000D0" + client_payload["color"] = "#A000D0" client_payload["text"] += " - DEAD" else @@ -74,120 +91,66 @@ SUBSYSTEM_DEF(who) switch(client_mob.stat) if(UNCONSCIOUS) - client_payload["color"] += "#B0B0B0" + client_payload["color"] = "#B0B0B0" client_payload["text"] += " - Unconscious" if(DEAD) - client_payload["color"] += "#A000D0" + client_payload["color"] = "#A000D0" client_payload["text"] += " - DEAD" if(client_mob.stat != DEAD) if(isxeno(client_mob)) - client_payload["color"] += "#ec3535" + client_payload["color"] = "#ec3535" client_payload["text"] += " - Xenomorph" else if(ishuman(client_mob)) if(client_mob.faction == FACTION_ZOMBIE) counted_factions[FACTION_ZOMBIE]++ - client_payload["color"] += "#2DACB1" + client_payload["color"] = "#2DACB1" client_payload["text"] += " - Zombie" else if(client_mob.faction == FACTION_YAUTJA) - client_payload["color"] += "#7ABA19" + client_payload["color"] = "#7ABA19" client_payload["text"] += " - Yautja" - additional_data["yautja"]++ + counted_additional["yautja"]++ if(client_mob.status_flags & XENO_HOST) - additional_data["infected_preds"]++ + counted_additional["infected_preds"]++ else - additional_data["humans"]++ + counted_additional["humans"]++ if(client_mob.status_flags & XENO_HOST) - additional_data["infected_humans"]++ + counted_additional["infected_humans"]++ if(client_mob.faction == FACTION_MARINE) - additional_data["uscm"]++ + counted_additional["uscm"]++ if(client_mob.job in (GLOB.ROLES_MARINES)) - additional_data["uscm_marines"]++ + counted_additional["uscm_marines"]++ else counted_factions[client_mob.faction]++ - new_list_data["total_players"] += list(client_payload) - - new_list_data["additional_info"] += list(list( - "content" = "In Lobby: [additional_data["lobby"]]", - "color" = "#777", - "text" = "Player in lobby", - )) - - new_list_data["additional_info"] += list(list( - "content" = "Spectating Players: [additional_data["observers"]]", - "color" = "#777", - "text" = "Spectating players", - )) - - new_list_data["additional_info"] += list(list( - "content" = "Spectating Admins: [additional_data["admin_observers"]]", - "color" = "#777", - "text" = "Spectating administrators", - )) - - new_list_data["additional_info"] += list(list( - "content" = "Humans: [additional_data["humans"]]", - "color" = "#2C7EFF", - "text" = "Players playing as Human", - )) - - new_list_data["additional_info"] += list(list( - "content" = "Infected Humans: [additional_data["infected_humans"]]", - "color" = "#ec3535", - "text" = "Players playing as Infected Human", - )) - - new_list_data["additional_info"] += list(list( - "content" = "[MAIN_SHIP_NAME] Personnel: [additional_data["uscm"]]", - "color" = "#5442bd", - "text" = "Players playing as [MAIN_SHIP_NAME] Personnel", - )) - - new_list_data["additional_info"] += list(list( - "content" = "Marines: [additional_data["uscm_marines"]]", - "color" = "#5442bd", - "text" = "Players playing as Marines", - )) - - new_list_data["additional_info"] += list(list( - "content" = "Yautjas: [additional_data["yautja"]]", - "color" = "#7ABA19", - "text" = "Players playing as Yautja", - )) - - new_list_data["additional_info"] += list(list( - "content" = "Infected Predators: [additional_data["infected_preds"]]", - "color" = "#7ABA19", - "text" = "Players playing as Infected Yautja", - )) + //Bulky section with pre writen names and desc for counts + factions_additional += list(list("content" = "In Lobby: [counted_additional["lobby"]]", "color" = "#777", "text" = "Player in lobby")) + factions_additional += list(list("content" = "Spectating Players: [counted_additional["observers"]]", "color" = "#777", "text" = "Spectating players")) + factions_additional += list(list("content" = "Spectating Admins: [counted_additional["admin_observers"]]", "color" = "#777", "text" = "Spectating administrators")) + factions_additional += list(list("content" = "Humans: [counted_additional["humans"]]", "color" = "#2C7EFF", "text" = "Players playing as Human")) + factions_additional += list(list("content" = "Infected Humans: [counted_additional["infected_humans"]]", "color" = "#ec3535", "text" = "Players playing as Infected Human")) + factions_additional += list(list("content" = "[MAIN_SHIP_NAME] Personnel: [counted_additional["uscm"]]", "color" = "#5442bd", "text" = "Players playing as [MAIN_SHIP_NAME] Personnel")) + factions_additional += list(list("content" = "Marines: [counted_additional["uscm_marines"]]", "color" = "#5442bd", "text" = "Players playing as Marines")) + factions_additional += list(list("content" = "Yautjas: [counted_additional["yautja"]]", "color" = "#7ABA19", "text" = "Players playing as Yautja")) + factions_additional += list(list("content" = "Infected Predators: [counted_additional["infected_preds"]]", "color" = "#7ABA19", "text" = "Players playing as Infected Yautja")) for(var/i in 1 to length(counted_factions)) - if(counted_factions[counted_factions[i]]) - new_list_data["factions"] += list(list( - "content" = "[counted_factions[i]]: [counted_factions[counted_factions[i]]]", - "color" = "#2C7EFF", - "text" = "Other", - )) + if(!counted_factions[counted_factions[i]]) + continue + factions_additional += list(list("content" = "[counted_factions[i]]: [counted_factions[counted_factions[i]]]", "color" = "#2C7EFF", "text" = "Other")) + if(counted_factions[FACTION_NEUTRAL]) - new_list_data["factions"] += list(list( - "content" = "[FACTION_NEUTRAL] Humans: [counted_factions[FACTION_NEUTRAL]]", - "color" = "#688944", - "text" = "Neutrals", - )) + factions_additional += list(list("content" = "[FACTION_NEUTRAL] Humans: [counted_factions[FACTION_NEUTRAL]]", "color" = "#688944", "text" = "Neutrals")) for(var/faction_to_get in ALL_XENO_HIVES) var/datum/hive_status/hive = GLOB.hive_datum[faction_to_get] - if(hive && length(hive.totalXenos)) - new_list_data["xenomorphs"] += list(list( - "content" = "[hive.name]: [length(hive.totalXenos)]", - "color" = hive.color ? hive.color : "#8200FF", - "text" = "Queen: [hive.living_xeno_queen ? "Alive" : "Dead"]", - )) + if(!hive || !length(hive.totalXenos)) + continue + factions_additional += list(list("content" = "[hive.name]: [length(hive.totalXenos)]", "color" = hive.color ? hive.color : "#8200FF", "text" = "Queen: [hive.living_xeno_queen ? "Alive" : "Dead"]")) - list_data = new_list_data - mobs_ckey = new_mobs_ckey + src.base_data = base_data + src.admin_sorted_additional = admin_sorted_additional /datum/player_list/tgui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) @@ -197,12 +160,17 @@ SUBSYSTEM_DEF(who) ui.set_autoupdate(TRUE) /datum/player_list/ui_data(mob/user) - . = list_data - -/datum/player_list/ui_static_data(mob/user) . = list() + // Sending base client data, this data sended to EVERYONE + .["base_data"] = base_data - .["admin"] = CLIENT_IS_STAFF(user.client) + // Admin rights based data + if(!CLIENT_IS_STAFF(user.client)) + return + for(var/data_packet_name in admin_sorted_additional) // One by one for Drulikar complains + if(!check_client_rights(user.client, admin_sorted_additional[data_packet_name]["flags"], FALSE)) + continue + . += list("[data_packet_name]" = admin_sorted_additional[data_packet_name]["data"]) /datum/player_list/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) . = ..() @@ -211,13 +179,21 @@ SUBSYSTEM_DEF(who) switch(action) if("get_player_panel") - if(mobs_ckey[params["ckey"]]) - GLOB.admin_datums[usr.client.ckey].show_player_panel(mobs_ckey[params["ckey"]]) + if(!CLIENT_IS_STAFF(ui.user.client)) + return + var/chosen_ckey = params["ckey"] + for(var/client/target in GLOB.clients) + if(target.key != chosen_ckey) + continue + if(target.mob) + GLOB.admin_datums[ui.user.client.ckey].show_player_panel(target.mob) + break /datum/player_list/ui_status(mob/user, datum/ui_state/state) return UI_INTERACTIVE +// STAFF DATA /datum/player_list/staff tgui_name = "StaffWho" tgui_interface_name = "Staff Who" @@ -231,74 +207,79 @@ SUBSYSTEM_DEF(who) ) /datum/player_list/staff/update_data() - var/list/new_list_data = list() - mobs_ckey = list() + var/list/base_data = list() + var/list/admin_sorted_additional = list() - var/list/listings - var/list/mappings + var/list/admin_additional = list() + admin_sorted_additional["admin_additional"] = list("flags" = R_MOD|R_ADMIN, "data" = admin_additional) + + var/list/admin_stealthed_additional = list() + admin_sorted_additional["admin_stealthed_additional"] = list("flags" = R_STEALTH, "data" = admin_stealthed_additional) + + var/list/listings = list() if(CONFIG_GET(flag/show_manager)) - LAZYSET(mappings, "Management", R_PERMISSIONS) + listings["Management"] = list(R_PERMISSIONS, list()) if(CONFIG_GET(flag/show_devs)) - LAZYSET(mappings, "Maintainers", R_PROFILER) - LAZYSET(mappings, "Administrators", R_ADMIN) + listings["Maintainers"] = list(R_PROFILER, list()) + listings["Administrators"] = list(R_ADMIN, list()) if(CONFIG_GET(flag/show_mods)) - LAZYSET(mappings, "Moderators", R_MOD && R_BAN) + listings["Moderators"] = list(R_MOD|R_BAN, list()) if(CONFIG_GET(flag/show_mentors)) - LAZYSET(mappings, "Mentors", R_MENTOR) - - for(var/category in mappings) - LAZYSET(listings, category, list()) + listings["Mentors"] = list(R_MENTOR, list()) for(var/client/client as anything in GLOB.admins) - if(client.admin_holder?.fakekey && !CLIENT_IS_STAFF(client)) - continue - - for(var/category in mappings) - if(CLIENT_HAS_RIGHTS(client, mappings[category])) - LAZYADD(listings[category], client) + for(var/category in listings) + if(CLIENT_HAS_RIGHTS(client, listings[category][1])) + listings[category][2] += client break for(var/category in listings) - var/list/admins = list() - for(var/client/entry as anything in listings[category]) - var/list/admin = list() - var/rank = entry.admin_holder.rank - if(entry.admin_holder.extra_titles?.len) - for(var/srank in entry.admin_holder.extra_titles) - rank += " & [srank]" + base_data["categories"] += list(list( + "category" = category, + "category_color" = category_colors[category], + )) - admin["content"] = "[entry.key] ([rank])" - admin["text"] = "" + for(var/client/client as anything in listings[category][2]) + var/list/admin_payload = list() + admin_payload["category"] = category + var/rank = client.admin_holder.rank + if(client.admin_holder.extra_titles?.len) + for(var/srank in client.admin_holder.extra_titles) + rank += " & [srank]" - if(entry.admin_holder?.fakekey) - admin["text"] += " (HIDDEN)" + if(CLIENT_IS_STEALTHED(client)) + admin_payload["special_color"] = "#b60d0d" + admin_payload["special_text"] = " (STEALTHED)" + admin_stealthed_additional["total_admins"] += list(list("[client.key] ([rank])" = list(admin_payload))) + else if(client.admin_holder?.fakekey) + admin_payload["special_color"] = "#7b582f" + admin_payload["special_text"] += " (HIDDEN)" + admin_additional["total_admins"] += list(list("[client.key] ([rank])" = list(admin_payload))) + else + admin_additional["total_admins"] += list(list("[client.key] ([rank])" = list(admin_payload))) + base_data["total_admins"] += list(list("[client.key] ([rank])" = list(admin_payload.Copy()))) - if(istype(entry.mob, /mob/dead/observer)) - admin["color"] = "#808080" - admin["text"] += " Spectating" + admin_payload["text"] = "" + if(istype(client.mob, /mob/dead/observer)) + admin_payload["color"] = "#808080" + admin_payload["text"] += "Spectating" - else if(istype(entry.mob, /mob/new_player)) - admin["color"] = "#688944" - admin["text"] += " in Lobby" + else if(istype(client.mob, /mob/new_player)) + admin_payload["color"] = "#FFFFFF" + admin_payload["text"] += "in Lobby" else - admin["color"] = "#688944" - admin["text"] += " Playing" - - if(entry.is_afk()) - admin["color"] = "#A040D0" - admin["text"] += " (AFK)" + admin_payload["color"] = "#688944" + admin_payload["text"] += "Playing" - admins += list(admin) + if(client.is_afk()) + admin_payload["color"] = "#A040D0" + admin_payload["special_text"] += " (AFK)" - new_list_data["administrators"] += list(list( - "category" = category, - "category_color" = category_colors[category], - "category_administrators" = length(listings[category]), - "admins" = admins, - )) + src.base_data = base_data + src.admin_sorted_additional = admin_sorted_additional - list_data = new_list_data +// VERBS /mob/verb/who() set category = "OOC" set name = "Who" diff --git a/code/datums/agents/tools/decoy.dm b/code/datums/agents/tools/decoy.dm index 57c8e5130fee..57eef25a446d 100644 --- a/code/datums/agents/tools/decoy.dm +++ b/code/datums/agents/tools/decoy.dm @@ -1,4 +1,6 @@ /obj/item/explosive/grenade/decoy + AUTOWIKI_SKIP(TRUE) + name = "decoy grenade" desc = "A grenade typically used to distract the enemy. Emits a loud bang. Detonates in 5 seconds. Has 3 uses" diff --git a/code/datums/ammo/bullet/pistol.dm b/code/datums/ammo/bullet/pistol.dm index ced951241754..8b5239ba9127 100644 --- a/code/datums/ammo/bullet/pistol.dm +++ b/code/datums/ammo/bullet/pistol.dm @@ -180,12 +180,12 @@ headshot_state = HEADSHOT_OVERLAY_MEDIUM debilitate = list(0,0,0,0,0,0,0,2) - effective_range_max = 3 + effective_range_max = 6 accuracy = HIT_ACCURACY_TIER_4 damage = 45 penetration= ARMOR_PENETRATION_TIER_6 shrapnel_chance = SHRAPNEL_CHANCE_TIER_2 - damage_falloff = DAMAGE_FALLOFF_TIER_6 //"VP78 - the only pistol viable as a primary."-Vampmare, probably. + damage_falloff = DAMAGE_FALLOFF_TIER_6 /datum/ammo/bullet/pistol/squash/toxin name = "toxic squash-head pistol bullet" diff --git a/code/datums/ammo/energy.dm b/code/datums/ammo/energy.dm index 3ddd11eedf55..6eb865034cbe 100644 --- a/code/datums/ammo/energy.dm +++ b/code/datums/ammo/energy.dm @@ -204,7 +204,7 @@ /datum/ammo/energy/yautja/caster/sphere/stun/proc/do_area_stun(obj/projectile/P) playsound(P, 'sound/weapons/wave.ogg', 75, 1, 25) - for (var/mob/living/carbon/M in view(src.stun_range, get_turf(P))) + FOR_DVIEW(var/mob/living/carbon/M, src.stun_range, get_turf(P), HIDE_INVISIBLE_OBSERVER) var/stun_time = src.stun_time log_attack("[key_name(M)] was stunned by a plasma immobilizer from [key_name(P.firer)] at [get_area(P)]") if (isyautja(M)) @@ -214,6 +214,7 @@ to_chat(M, SPAN_DANGER("A powerful electric shock ripples through your body, freezing you in place!")) M.apply_effect(stun_time, STUN) M.apply_effect(stun_time, WEAKEN) + FOR_DVIEW_END /datum/ammo/energy/yautja/rifle/bolt name = "plasma rifle bolt" diff --git a/code/datums/beam.dm b/code/datums/beam.dm index 4b024df585f9..e700016b5f32 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -215,13 +215,7 @@ return newbeam /proc/zap_beam(atom/source, zap_range, damage, list/blacklistmobs) - var/list/zap_data = list() - for(var/mob/living/carbon/xenomorph/beno in oview(zap_range, source)) - zap_data += beno - for(var/xeno in zap_data) - var/mob/living/carbon/xenomorph/living = xeno - if(!living) - return + FOR_DOVIEW(var/mob/living/carbon/xenomorph/living, zap_range, source, HIDE_INVISIBLE_OBSERVER) if(living.stat == DEAD) continue if(living in blacklistmobs) @@ -229,3 +223,4 @@ source.beam(living, icon_state="lightning[rand(1,12)]", time = 3, maxdistance = zap_range + 2) living.set_effect(2, SLOW) log_attack("[living] was zapped by [source]") + FOR_DOVIEW_END diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index e10096059bda..44e8924ef68d 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -263,7 +263,7 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new) record_general.fields["age"] = target.age record_general.fields["p_stat"] = "Active" record_general.fields["m_stat"] = "Stable" - record_general.fields["sex"] = target.gender + record_general.fields["sex"] = capitalize(target.gender) record_general.fields["species"] = target.get_species() record_general.fields["origin"] = target.origin record_general.fields["faction"] = target.personal_faction diff --git a/code/datums/datum.dm b/code/datums/datum.dm index e926dfd022ca..2370987b4cfc 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -70,6 +70,10 @@ var/list/cached_vars #endif +#ifdef AUTOWIKI + var/autowiki_skip = FALSE +#endif + /** * Default implementation of clean-up code. * diff --git a/code/datums/disease.dm b/code/datums/disease.dm index 024337c8e065..497c62cddec6 100644 --- a/code/datums/disease.dm +++ b/code/datums/disease.dm @@ -121,10 +121,11 @@ GLOBAL_LIST_INIT(diseases, typesof(/datum/disease) - /datum/disease) check_range = 1 // everything else, like infect-on-contact things, only infect things on top of it if(isturf(source.loc)) - for(var/mob/living/carbon/victim in oview(check_range, source)) + FOR_DOVIEW(var/mob/living/carbon/victim, check_range, source, HIDE_INVISIBLE_OBSERVER) if(isturf(victim.loc)) if(AStar(source.loc, victim.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range)) victim.contract_disease(src, 0, 1, force_spread) + FOR_DOVIEW_END return diff --git a/code/datums/emergency_calls/cryo_marines.dm b/code/datums/emergency_calls/cryo_marines.dm index fb8d4b8a5a69..56fa434d09c3 100644 --- a/code/datums/emergency_calls/cryo_marines.dm +++ b/code/datums/emergency_calls/cryo_marines.dm @@ -37,10 +37,11 @@ human.create_hud() if(!mind) - for(var/obj/structure/machinery/cryopod/pod in view(7,human)) + FOR_DVIEW(var/obj/structure/machinery/cryopod/pod, 7, human, HIDE_INVISIBLE_OBSERVER) if(pod && !pod.occupant) pod.go_in_cryopod(human, silent = TRUE) break + FOR_DVIEW_END sleep(5) var/datum/squad/marine/cryo/cryo_squad = GLOB.RoleAuthority.squads_by_type[/datum/squad/marine/cryo] diff --git a/code/datums/emergency_calls/cryo_spec.dm b/code/datums/emergency_calls/cryo_spec.dm index 945ab474d4c9..5d4f621a473a 100644 --- a/code/datums/emergency_calls/cryo_spec.dm +++ b/code/datums/emergency_calls/cryo_spec.dm @@ -35,10 +35,11 @@ human.create_hud() if(!mind) - for(var/obj/structure/machinery/cryopod/pod in view(7,human)) + FOR_DVIEW(var/obj/structure/machinery/cryopod/pod, 7, human, HIDE_INVISIBLE_OBSERVER) if(pod && !pod.occupant) pod.go_in_cryopod(human, silent = TRUE) break + FOR_DVIEW_END sleep(5) human.client?.prefs.copy_all_to(human, JOB_SQUAD_SPECIALIST, TRUE, TRUE) diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm index 33b756fc8447..011dc8e25dba 100644 --- a/code/datums/mob_hud.dm +++ b/code/datums/mob_hud.dm @@ -408,7 +408,6 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( var/revive_enabled = stat == DEAD && check_tod() && is_revivable() if(stat == DEAD) revive_enabled = check_tod() && is_revivable() - var/datum/internal_organ/heart/heart = islist(internal_organs_by_name) ? internal_organs_by_name["heart"] : null var/holder2_set = 0 if(hivenumber) diff --git a/code/datums/skills/civilian.dm b/code/datums/skills/civilian.dm index 0ff13ae67225..ff9cadf02913 100644 --- a/code/datums/skills/civilian.dm +++ b/code/datums/skills/civilian.dm @@ -20,7 +20,7 @@ CIVILIAN SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, SKILL_INTEL = SKILL_INTEL_EXPERT, ) @@ -31,7 +31,7 @@ CIVILIAN SKILL_CQC = SKILL_CQC_DEFAULT, SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, //The ASRS consoles + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, //The ASRS consoles SKILL_FIREARMS = SKILL_FIREARMS_CIVILIAN, SKILL_POLICE = SKILL_POLICE_SKILLED, //The CMB Tradeband Compliance Device ) @@ -43,7 +43,7 @@ CIVILIAN SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, @@ -115,7 +115,7 @@ CIVILIAN SKILL_ENDURANCE = SKILL_ENDURANCE_SURVIVOR, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_POWERLOADER = SKILL_POWERLOADER_MASTER, ) @@ -131,7 +131,7 @@ CIVILIAN /datum/skills/civilian/survivor/clf name = "Survivor CLF" additional_skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, @@ -158,7 +158,7 @@ CIVILIAN name = "Survivor Miner" additional_skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_POWERLOADER = SKILL_POWERLOADER_MASTER, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, ) @@ -167,7 +167,7 @@ CIVILIAN name = "Survivor Trucker" additional_skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_VEHICLE = SKILL_VEHICLE_CREWMAN, ) @@ -176,7 +176,7 @@ CIVILIAN name = "Survivor Engineer" additional_skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_POWERLOADER = SKILL_POWERLOADER_MASTER, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, @@ -192,7 +192,7 @@ CIVILIAN /datum/skills/civilian/survivor/marshal name = "Survivor Marshal" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, @@ -201,7 +201,7 @@ CIVILIAN SKILL_FIREARMS = SKILL_FIREARMS_TRAINED, SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_CQC = SKILL_CQC_SKILLED, SKILL_FIREARMS = SKILL_FIREARMS_TRAINED, ) diff --git a/code/datums/skills/clf.dm b/code/datums/skills/clf.dm index 88aa14a41f79..64a8864d3c51 100644 --- a/code/datums/skills/clf.dm +++ b/code/datums/skills/clf.dm @@ -12,7 +12,7 @@ COLONIAL LIBERATION FRONT SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, SKILL_ENDURANCE = SKILL_ENDURANCE_WEAK, @@ -24,7 +24,7 @@ COLONIAL LIBERATION FRONT skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_POWERLOADER = SKILL_POWERLOADER_TRAINED, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, @@ -48,7 +48,7 @@ COLONIAL LIBERATION FRONT skills = list( SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, //to use c4 in demo set. + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, //to use c4 in demo set. SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, SKILL_SPEC_WEAPONS = SKILL_SPEC_ALL, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, @@ -60,7 +60,7 @@ COLONIAL LIBERATION FRONT name = "CLF Leader" skills = list( SKILL_FIREARMS = SKILL_FIREARMS_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, // to use their C4 + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, // to use their C4 SKILL_CQC = SKILL_CQC_SKILLED, SKILL_LEADERSHIP = SKILL_LEAD_EXPERT, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -78,7 +78,7 @@ COLONIAL LIBERATION FRONT name = "CLF Cell Commander" skills = list( SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CQC = SKILL_CQC_SKILLED, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, diff --git a/code/datums/skills/cmb.dm b/code/datums/skills/cmb.dm index b29a4c314567..8fa7ca4dd892 100644 --- a/code/datums/skills/cmb.dm +++ b/code/datums/skills/cmb.dm @@ -26,7 +26,7 @@ COLONIAL MARSHALS SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_FIREMAN = SKILL_FIREMAN_MASTER, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, diff --git a/code/datums/skills/commando.dm b/code/datums/skills/commando.dm index ed5e5ee086e4..5133cb0e55ea 100644 --- a/code/datums/skills/commando.dm +++ b/code/datums/skills/commando.dm @@ -9,7 +9,7 @@ SPEC-OPS skills = list( SKILL_CQC = SKILL_CQC_EXPERT, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, @@ -24,7 +24,7 @@ SPEC-OPS skills = list( SKILL_CQC = SKILL_CQC_EXPERT, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, @@ -40,7 +40,7 @@ SPEC-OPS skills = list( SKILL_CQC = SKILL_CQC_EXPERT, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, @@ -56,7 +56,7 @@ SPEC-OPS skills = list( SKILL_CQC = SKILL_CQC_MASTER, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, @@ -71,7 +71,7 @@ SPEC-OPS skills = list( SKILL_CQC = SKILL_CQC_MASTER, SKILL_FIREMAN = SKILL_FIREMAN_MASTER, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, @@ -87,7 +87,7 @@ SPEC-OPS skills = list( SKILL_CQC = SKILL_CQC_MASTER, SKILL_FIREMAN = SKILL_FIREMAN_MASTER, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_LEADERSHIP = SKILL_LEAD_EXPERT, @@ -105,7 +105,7 @@ SPEC-OPS SKILL_CQC = SKILL_CQC_TRAINED, SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_POWERLOADER = SKILL_POWERLOADER_MASTER, diff --git a/code/datums/skills/contractor.dm b/code/datums/skills/contractor.dm index 183e95c941f5..5e079e5664d4 100644 --- a/code/datums/skills/contractor.dm +++ b/code/datums/skills/contractor.dm @@ -7,7 +7,7 @@ CONTRACTORS name = "Contractor Standard" skills = list( SKILL_CQC = SKILL_CQC_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_POLICE = SKILL_POLICE_SKILLED, @@ -22,7 +22,7 @@ CONTRACTORS /datum/skills/contractor/leader name = "Contractor Leader" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, @@ -45,7 +45,7 @@ CONTRACTORS SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_MEDICAL = SKILL_MEDICAL_DOCTOR, SKILL_SURGERY = SKILL_SURGERY_TRAINED, SKILL_VEHICLE = SKILL_VEHICLE_LARGE, @@ -76,7 +76,7 @@ CONTRACTORS name = "Contractor Machinegunner" skills = list( SKILL_CQC = SKILL_CQC_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_POLICE = SKILL_POLICE_SKILLED, diff --git a/code/datums/skills/dutch.dm b/code/datums/skills/dutch.dm index 4f19233e66d0..ec550f8e2bdf 100644 --- a/code/datums/skills/dutch.dm +++ b/code/datums/skills/dutch.dm @@ -4,7 +4,7 @@ SKILL_CQC = SKILL_CQC_MASTER, SKILL_FIREMAN = SKILL_FIREMAN_MAX, SKILL_MELEE_WEAPONS = SKILL_MELEE_MAX, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, @@ -20,7 +20,7 @@ name = "Dutch's Dozen Mercenary" skills = list( SKILL_CQC = SKILL_CQC_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, @@ -35,7 +35,7 @@ name = "Dutch's Dozen Medic" skills = list( SKILL_CQC = SKILL_CQC_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_DOCTOR, diff --git a/code/datums/skills/forecon.dm b/code/datums/skills/forecon.dm index 724a49ee98ca..aef187ce05dd 100644 --- a/code/datums/skills/forecon.dm +++ b/code/datums/skills/forecon.dm @@ -8,7 +8,7 @@ MILITARY SURVIVORS /datum/skills/military/survivor/forecon_standard name = "Reconnaissance Rifleman" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_DEFAULT, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -24,7 +24,7 @@ MILITARY SURVIVORS /datum/skills/military/survivor/forecon_techician name = "Reconnaissance Support Technician" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -41,7 +41,7 @@ MILITARY SURVIVORS /datum/skills/military/survivor/forecon_marksman name = "Reconnaissance Designated Marksman" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_DEFAULT, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -58,7 +58,7 @@ MILITARY SURVIVORS /datum/skills/military/survivor/forecon_smartgunner name = "Reconnaissance Smartgunner" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_DEFAULT, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -75,7 +75,7 @@ MILITARY SURVIVORS /datum/skills/military/survivor/forecon_sniper name = "Reconnaissance Sniper" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_DEFAULT, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -92,7 +92,7 @@ MILITARY SURVIVORS /datum/skills/military/survivor/forecon_squad_leader name = "Reconnaissance Squad Leader" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_DEFAULT, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_CQC = SKILL_CQC_SKILLED, diff --git a/code/datums/skills/freelancer.dm b/code/datums/skills/freelancer.dm index 09df9f32369c..cf7baa15532b 100644 --- a/code/datums/skills/freelancer.dm +++ b/code/datums/skills/freelancer.dm @@ -11,7 +11,7 @@ FREELANCERS skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, ) @@ -20,7 +20,7 @@ FREELANCERS skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_TRAINED, @@ -31,7 +31,7 @@ FREELANCERS skills = list( SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_CQC = SKILL_CQC_TRAINED, diff --git a/code/datums/skills/mercenary.dm b/code/datums/skills/mercenary.dm index 1dc18eaa2fbc..35a6378f51a4 100644 --- a/code/datums/skills/mercenary.dm +++ b/code/datums/skills/mercenary.dm @@ -3,7 +3,7 @@ skills = list( SKILL_CQC = SKILL_CQC_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, @@ -16,7 +16,7 @@ skills = list( SKILL_CQC = SKILL_CQC_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, @@ -31,7 +31,7 @@ skills = list( SKILL_CQC = SKILL_CQC_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_MEDICAL = SKILL_MEDICAL_MASTER, @@ -62,7 +62,7 @@ skills = list( SKILL_CQC = SKILL_CQC_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, @@ -78,7 +78,7 @@ skills = list( SKILL_CQC = SKILL_CQC_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_MAX, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, diff --git a/code/datums/skills/misc.dm b/code/datums/skills/misc.dm index 0f0ca657f995..204890685b91 100644 --- a/code/datums/skills/misc.dm +++ b/code/datums/skills/misc.dm @@ -11,7 +11,7 @@ MISCELLANEOUS SKILL_LEADERSHIP = SKILL_LEAD_EXPERT, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_POWERLOADER = SKILL_POWERLOADER_MASTER, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, SKILL_JTAC = SKILL_JTAC_EXPERT, @@ -23,7 +23,7 @@ MISCELLANEOUS SKILL_CQC = SKILL_CQC_MASTER, SKILL_MELEE_WEAPONS = SKILL_MELEE_SUPER, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_EXPERT, @@ -52,7 +52,7 @@ MISCELLANEOUS name = "Souto Man" skills = list( SKILL_CQC = SKILL_CQC_MASTER, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, diff --git a/code/datums/skills/pmc.dm b/code/datums/skills/pmc.dm index df7027e2a7ab..1860157c0a54 100644 --- a/code/datums/skills/pmc.dm +++ b/code/datums/skills/pmc.dm @@ -14,7 +14,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, ) @@ -26,7 +26,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_NOVICE, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, @@ -40,7 +40,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_RESEARCH = SKILL_RESEARCH_TRAINED, @@ -54,7 +54,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_SPEC_WEAPONS = SKILL_SPEC_SMARTGUN, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_JTAC = SKILL_JTAC_BEGINNER, @@ -68,7 +68,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, SKILL_SPEC_WEAPONS = SKILL_SPEC_ALL, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, @@ -83,7 +83,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CQC = SKILL_CQC_SKILLED, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -99,7 +99,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CQC = SKILL_CQC_SKILLED, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -116,7 +116,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, SKILL_JTAC = SKILL_JTAC_TRAINED, @@ -131,7 +131,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_MEDICAL = SKILL_MEDICAL_DOCTOR, SKILL_SURGERY = SKILL_SURGERY_EXPERT, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, //trained in medicine more than combat @@ -160,7 +160,7 @@ Private Military Contractors SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_CQC = SKILL_CQC_TRAINED, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, diff --git a/code/datums/skills/rmc.dm b/code/datums/skills/rmc.dm index 89aa39b154ad..4385253e9a28 100644 --- a/code/datums/skills/rmc.dm +++ b/code/datums/skills/rmc.dm @@ -14,7 +14,7 @@ Royal Marines Commando SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_NOVICE, @@ -28,7 +28,7 @@ Royal Marines Commando SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_NOVICE, @@ -44,7 +44,7 @@ Royal Marines Commando SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_NOVICE, @@ -61,7 +61,7 @@ Royal Marines Commando SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_NOVICE, diff --git a/code/datums/skills/synthetic.dm b/code/datums/skills/synthetic.dm index 3925dd9605b3..c4d7296dee5d 100644 --- a/code/datums/skills/synthetic.dm +++ b/code/datums/skills/synthetic.dm @@ -33,7 +33,7 @@ SYNTHETIC name = SYNTH_COLONY skills = list( SKILL_CQC = SKILL_CQC_EXPERT, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_SPEC_WEAPONS = SKILL_SPEC_ALL, diff --git a/code/datums/skills/upp.dm b/code/datums/skills/upp.dm index e367372719d6..8ada7ccad124 100644 --- a/code/datums/skills/upp.dm +++ b/code/datums/skills/upp.dm @@ -10,7 +10,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Private" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_CQC = SKILL_CQC_DEFAULT, @@ -22,7 +22,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Sapper" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_CQC = SKILL_CQC_DEFAULT, @@ -45,7 +45,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Specialist" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_CQC = SKILL_CQC_TRAINED, SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, @@ -60,7 +60,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Squad Leader" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_CQC = SKILL_CQC_TRAINED, SKILL_FIREMAN = SKILL_FIREMAN_SKILLED, @@ -78,7 +78,7 @@ UNITED PROGRESSIVE PEOPLES SKILL_FIREMAN = SKILL_FIREMAN_EXPERT, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, ) @@ -93,7 +93,7 @@ UNITED PROGRESSIVE PEOPLES SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_LEADERSHIP = SKILL_LEAD_EXPERT, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, @@ -109,7 +109,7 @@ UNITED PROGRESSIVE PEOPLES SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, @@ -126,7 +126,7 @@ UNITED PROGRESSIVE PEOPLES SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_MASTER, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, @@ -147,7 +147,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Private" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -161,7 +161,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Sapper" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -176,7 +176,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Medic" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_DOCTOR, SKILL_SURGERY = SKILL_SURGERY_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, @@ -192,7 +192,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Specialist" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -210,7 +210,7 @@ UNITED PROGRESSIVE PEOPLES name = "UPP Squad Leader" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_SPEC_WEAPONS = SKILL_SPEC_UPP, SKILL_FIREARMS = SKILL_FIREARMS_TRAINED, diff --git a/code/datums/skills/uscm.dm b/code/datums/skills/uscm.dm index 3daaef4156b8..1bfb58996b4e 100644 --- a/code/datums/skills/uscm.dm +++ b/code/datums/skills/uscm.dm @@ -12,7 +12,7 @@ United States Colonial Marines name = "Crafty Private" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, ) /datum/skills/combat_medic @@ -28,7 +28,7 @@ United States Colonial Marines name = "Crafty Combat Medic" skills = list( SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, ) /datum/skills/combat_engineer @@ -55,7 +55,7 @@ United States Colonial Marines SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, //to use c4 in demo set. + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, //to use c4 in demo set. SKILL_SPEC_WEAPONS = SKILL_SPEC_TRAINED, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, @@ -66,7 +66,7 @@ United States Colonial Marines name = "Fireteam Leader" skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_JTAC = SKILL_JTAC_EXPERT, ) @@ -77,7 +77,7 @@ United States Colonial Marines SKILL_CQC = SKILL_CQC_TRAINED, SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, @@ -90,7 +90,7 @@ United States Colonial Marines name = "Intelligence Officer" skills = list( SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_CQC = SKILL_CQC_TRAINED, @@ -157,7 +157,7 @@ MILITARY NONCOMBATANT SKILL_MEDICAL = SKILL_MEDICAL_MEDIC, SKILL_SURGERY = SKILL_SURGERY_NOVICE, SKILL_JTAC = SKILL_JTAC_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, ) /datum/skills/MP @@ -180,7 +180,7 @@ MILITARY NONCOMBATANT SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, ) /datum/skills/provost @@ -216,7 +216,7 @@ MILITARY NONCOMBATANT name = "Mess Technician" skills = list( SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, // need to hunt food somehow - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, + SKILL_ENGINEER = SKILL_ENGINEER_NOVICE, SKILL_FIREMAN = SKILL_FIREMAN_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, SKILL_DOMESTIC = SKILL_DOMESTIC_MASTER @@ -240,7 +240,7 @@ COMMAND STAFF name = "General" skills = list( SKILL_CQC = SKILL_CQC_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -259,7 +259,7 @@ COMMAND STAFF /datum/skills/commander name = "Commanding Officer" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -282,7 +282,7 @@ COMMAND STAFF /datum/skills/XO name = "Executive Officer" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, //to fix CIC apc. + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, //to fix CIC apc. SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -303,7 +303,7 @@ COMMAND STAFF /datum/skills/SO name = "Staff Officer" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_LEADERSHIP = SKILL_LEAD_EXPERT, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -322,7 +322,7 @@ COMMAND STAFF name = "Senior Enlisted Advisor" skills = list( SKILL_CQC = SKILL_CQC_SKILLED, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_LEADERSHIP = SKILL_LEAD_EXPERT, @@ -375,7 +375,7 @@ COMMAND STAFF SKILL_JTAC = SKILL_JTAC_EXPERT, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_INTEL = SKILL_INTEL_TRAINED, ) @@ -392,7 +392,7 @@ COMMAND STAFF SKILL_JTAC = SKILL_JTAC_EXPERT, SKILL_INTEL = SKILL_INTEL_EXPERT, SKILL_VEHICLE = SKILL_VEHICLE_SMALL, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_POLICE = SKILL_POLICE_FLASH, SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED, diff --git a/code/datums/skills/wygoons.dm b/code/datums/skills/wygoons.dm index 2d2c247bd1ea..73d8da15b976 100644 --- a/code/datums/skills/wygoons.dm +++ b/code/datums/skills/wygoons.dm @@ -18,7 +18,7 @@ SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, ) /datum/skills/wy_goon_lead @@ -31,6 +31,6 @@ SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED, SKILL_MEDICAL = SKILL_MEDICAL_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_LEADERSHIP = SKILL_LEAD_TRAINED, ) diff --git a/code/datums/soundOutput.dm b/code/datums/soundOutput.dm index 6ebc32c7e41f..cc7334d2cb98 100644 --- a/code/datums/soundOutput.dm +++ b/code/datums/soundOutput.dm @@ -52,10 +52,14 @@ S.y += T.y_s_offset S.x += T.x_s_offset S.echo = SOUND_ECHO_REVERB_ON //enable environment reverb for positional sounds + for(var/pos = 1 to length(T.echo)) + if(!T.echo[pos]) + continue + S.echo[pos] = T.echo[pos] if(owner.mob.ear_deaf > 0) S.status |= SOUND_MUTE - sound_to(owner,S) + sound_to(owner, S) /datum/soundOutput/proc/update_ambience(area/target_area, ambience_override, force_update = FALSE) var/status_flags = SOUND_STREAM diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index be7037295497..db0702200d16 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -27,7 +27,6 @@ var/unique = TRUE - var/has_gravity = 1 // var/list/lights // list of all lights on this area var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area var/air_doors_activated = 0 @@ -381,42 +380,6 @@ if(istype(M)) use_power(-M.calculate_current_power_usage(), M.power_channel) -/area/proc/gravitychange(gravitystate = 0, area/A) - - A.has_gravity = gravitystate - - if(gravitystate) - for(var/mob/living/carbon/human/M in A) - thunk(M) - for(var/mob/M1 in A) - M1.make_floating(0) - else - for(var/mob/M in A) - if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/)) - var/mob/living/carbon/human/H = src - if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags_inventory & NOSLIPPING)) //magboots + dense_object = no floaty effect - H.make_floating(0) - else - H.make_floating(1) - else - M.make_floating(1) - -/area/proc/thunk(M) - if(istype(get_turf(M), /turf/open/space)) // Can't fall onto nothing. - return - - if(istype(M,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to. - var/mob/living/carbon/human/H = M - if((istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags_inventory & NOSLIPPING))) - return - H.adjust_effect(5, STUN) - H.adjust_effect(5, WEAKEN) - - to_chat(M, "Gravity!") - - - - //atmos related procs /area/return_air() diff --git a/code/game/area/space_station_13_areas.dm b/code/game/area/space_station_13_areas.dm index df5e54a77013..6b3084ba8068 100644 --- a/code/game/area/space_station_13_areas.dm +++ b/code/game/area/space_station_13_areas.dm @@ -59,7 +59,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station requires_power = FALSE static_lighting = FALSE base_lighting_alpha = 255 - has_gravity = 1 // === end remove @@ -72,7 +71,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station statistic_exempt = TRUE ceiling = CEILING_METAL - base_lighting_alpha = 255 + base_lighting_alpha = 255 /area/centcom/control name = "\improper abandoned Centcom Control" diff --git a/code/game/gamemodes/colonialmarines/whiskey_outpost/skills.dm b/code/game/gamemodes/colonialmarines/whiskey_outpost/skills.dm index a5126627adaf..746e6ed53c18 100644 --- a/code/game/gamemodes/colonialmarines/whiskey_outpost/skills.dm +++ b/code/game/gamemodes/colonialmarines/whiskey_outpost/skills.dm @@ -35,7 +35,7 @@ /datum/skills/honor_guard/lead name = "Honor Guard Squad Leader" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, //to fix CIC apc. + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, //to fix CIC apc. SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, @@ -49,7 +49,7 @@ /datum/skills/mortar_crew name = "Mortar Crew" skills = list( - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, SKILL_JTAC = SKILL_JTAC_BEGINNER, SKILL_POWERLOADER = SKILL_POWERLOADER_MASTER, diff --git a/code/game/jobs/job/marine/squad_info.dm b/code/game/jobs/job/marine/squad_info.dm index 37db48c3116e..406263115196 100644 --- a/code/game/jobs/job/marine/squad_info.dm +++ b/code/game/jobs/job/marine/squad_info.dm @@ -146,7 +146,7 @@ if(skillcheck(H, SKILL_MEDICAL, SKILL_MEDICAL_TRAINED)) Med = TRUE else - if(skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) Eng = TRUE ID = H.get_idcard() squad_info_data["fireteams"][team]["tl"] = list( @@ -223,7 +223,7 @@ if(skillcheck(H, SKILL_MEDICAL, SKILL_MEDICAL_TRAINED)) Med = TRUE else - if(skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) Eng = TRUE mar[H.real_name] = list( "name" = H.real_name, @@ -270,7 +270,7 @@ if(skillcheck(H, SKILL_MEDICAL, SKILL_MEDICAL_TRAINED)) Med = TRUE else - if(skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) Eng = TRUE mar[H.real_name] = list( "name" = H.real_name, diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 4150aead979e..4013aec3fb29 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -224,7 +224,7 @@ if("cutwire") if(!panel_open) return FALSE - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't understand anything about this wiring...")) return FALSE var/obj/item/held_item = usr.get_held_item() @@ -238,7 +238,7 @@ if("fixwire") if(!panel_open) return FALSE - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't understand anything about this wiring...")) return FALSE var/obj/item/held_item = usr.get_held_item() @@ -251,7 +251,7 @@ if("pulsewire") if(!panel_open) return FALSE - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't understand anything about this wiring...")) return FALSE var/obj/item/held_item = usr.get_held_item() @@ -269,7 +269,7 @@ /obj/structure/machinery/autolathe/attackby(obj/item/O as obj, mob/user as mob) if(HAS_TRAIT(O, TRAIT_TOOL_SCREWDRIVER)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You are not trained to dismantle machines...")) return panel_open = !panel_open @@ -586,7 +586,7 @@ stored_material = list("metal" = 56250, "plastic" = 20000) //15 metal and 10 plastic sheets /obj/structure/machinery/autolathe/armylathe/attack_hand(mob/user) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea how to operate the [name].")) return FALSE . = ..() diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 4f6b40968bdb..3b7d824928df 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -263,9 +263,11 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) //Return a working camera that can see a given mob //or null if none /proc/seen_by_camera(mob/M) - for(var/obj/structure/machinery/camera/C in oview(4, M)) + FOR_DOVIEW(var/obj/structure/machinery/camera/C, 4, M, HIDE_INVISIBLE_OBSERVER) if(C.can_use()) // check if camera disabled + FOR_DOVIEW_END return C + FOR_DOVIEW_END return null /proc/near_range_camera(mob/M) diff --git a/code/game/machinery/colony_floodlights.dm b/code/game/machinery/colony_floodlights.dm index 0267c7e95487..e8f59ad643d7 100644 --- a/code/game/machinery/colony_floodlights.dm +++ b/code/game/machinery/colony_floodlights.dm @@ -125,7 +125,7 @@ /obj/structure/machinery/colony_floodlight/attackby(obj/item/I, mob/user) if(damaged) if(HAS_TRAIT(I, TRAIT_TOOL_SCREWDRIVER)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair [src].")) return FALSE @@ -160,7 +160,7 @@ return TRUE else if(HAS_TRAIT(I, TRAIT_TOOL_CROWBAR)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair [src].")) return FALSE @@ -183,7 +183,7 @@ return var/obj/item/tool/weldingtool/welder = I - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair [src].")) return FALSE @@ -206,7 +206,7 @@ else if(iscoil(I)) var/obj/item/stack/cable_coil/coil = I - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair [src].")) return FALSE @@ -228,7 +228,7 @@ return TRUE else if(istype(I, /obj/item/device/lightreplacer)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair [src].")) return FALSE @@ -271,7 +271,7 @@ if(ishuman(user)) if(damaged) . += SPAN_WARNING("It is damaged.") - if(skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) switch(repair_state) if(FLOODLIGHT_REPAIR_UNSCREW) . += SPAN_INFO("You must first unscrew its maintenance hatch.") if(FLOODLIGHT_REPAIR_CROWBAR) . += SPAN_INFO("You must crowbar its lighting assembly out or use a light replacer.") diff --git a/code/game/machinery/computer/almayer_control.dm b/code/game/machinery/computer/almayer_control.dm index 3d3c0fdbe4df..e9c9cf91a816 100644 --- a/code/game/machinery/computer/almayer_control.dm +++ b/code/game/machinery/computer/almayer_control.dm @@ -184,7 +184,7 @@ to_chat(user, SPAN_WARNING("Arrays are re-cycling. Please stand by.")) return FALSE var/input = stripped_input(user, "Please choose a message to transmit to USCM. Please be aware that this process is very expensive, and abuse will lead to termination. Transmission does not guarantee a response. There is a small delay before you may send another message. Be clear and concise.", "To abort, send an empty message.", "") - if(!input || !(user in view(1,src)) || !COOLDOWN_FINISHED(src, cooldown_central)) + if(!input || !(user in dview(1, src)) || !COOLDOWN_FINISHED(src, cooldown_central)) return FALSE high_command_announce(input, user) @@ -211,7 +211,7 @@ to_chat(user, SPAN_WARNING("Please allow at least [COOLDOWN_TIMELEFT(src, cooldown_message)/10] second\s to pass between announcements.")) return FALSE var/input = stripped_multiline_input(user, "Please write a message to announce to the station crew.", "Priority Announcement", "") - if(!input || !COOLDOWN_FINISHED(src, cooldown_message) || !(user in view(1,src))) + if(!input || !COOLDOWN_FINISHED(src, cooldown_message) || !(user in dview(1, src))) return FALSE var/signed = null diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 2e6922e43a85..8d3f78cb1857 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -134,7 +134,7 @@ to_chat(usr, SPAN_WARNING("Please allow at least [COOLDOWN_COMM_MESSAGE_LONG*0.1] second\s to pass between announcements.")) return FALSE var/input = stripped_multiline_input(usr, "Please write a message to announce to the station crew.", "Priority Announcement", "") - if(!input || authenticated != 2 || world.time < cooldown_message + COOLDOWN_COMM_MESSAGE_LONG || !(usr in view(1,src))) + if(!input || authenticated != 2 || world.time < cooldown_message + COOLDOWN_COMM_MESSAGE_LONG || !(usr in dview(1, src))) return FALSE marine_announcement(input) @@ -302,7 +302,7 @@ to_chat(usr, SPAN_WARNING("Arrays recycling. Please stand by.")) return FALSE var/input = stripped_input(usr, "Please choose a message to transmit to USCM. Please be aware that this process is very expensive, and abuse will lead to termination. Transmission does not guarantee a response. There is a small delay before you may send another message. Be clear and concise.", "To abort, send an empty message.", "") - if(!input || !(usr in view(1,src)) || authenticated != 2 || world.time < cooldown_central + COOLDOWN_COMM_CENTRAL) return FALSE + if(!input || !(usr in dview(1, src)) || authenticated != 2 || world.time < cooldown_central + COOLDOWN_COMM_CENTRAL) return FALSE high_command_announce(input, usr) to_chat(usr, SPAN_NOTICE("Message transmitted.")) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index bfa64ab174ed..bb434e8ca114 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -99,7 +99,7 @@ if(!deconstructible) to_chat(user, SPAN_WARNING("You can't figure out how to deconstruct [src]...")) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You don't know how to deconstruct [src]...")) return playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, 1) diff --git a/code/game/machinery/computer/demo_sim.dm b/code/game/machinery/computer/demo_sim.dm index f633e8f351d4..2b2ca9fda775 100644 --- a/code/game/machinery/computer/demo_sim.dm +++ b/code/game/machinery/computer/demo_sim.dm @@ -11,7 +11,7 @@ /obj/structure/machinery/computer/demo_sim/attackby(obj/item/B, mob/living/user) if(inoperable()) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You don't know how to configure [src].")) return if(configuration) diff --git a/code/game/machinery/computer/groundside_operations.dm b/code/game/machinery/computer/groundside_operations.dm index 591c63a76bee..376357a49174 100644 --- a/code/game/machinery/computer/groundside_operations.dm +++ b/code/game/machinery/computer/groundside_operations.dm @@ -235,7 +235,7 @@ to_chat(usr, SPAN_WARNING("Access denied.")) return var/input = stripped_multiline_input(usr, "Please write a message to announce to the station crew.", "Priority Announcement", "") - if(!input || !is_announcement_active || !(usr in view(1,src))) + if(!input || !is_announcement_active || !(usr in dview(1, src))) return FALSE is_announcement_active = FALSE diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 40b23667636f..ac6de251ab45 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -93,8 +93,12 @@ if ((istype(src.active2, /datum/data/record) && GLOB.data_core.medical.Find(src.active2))) dat += "
\n
Medical Data

\nBlood Type: [active2.fields["b_type"]]
\n
\nMinor Disabilities: [active2.fields["mi_dis"]]
\nDetails: [active2.fields["mi_dis_d"]]
\n
\nMajor Disabilities: [active2.fields["ma_dis"]]
\nDetails: [active2.fields["ma_dis_d"]]
\n
\nAllergies: [active2.fields["alg"]]
\nDetails: [active2.fields["alg_d"]]
\n
\nCurrent Diseases: [active2.fields["cdi"]] (per disease info placed in log/comment section)
\nDetails: [active2.fields["cdi_d"]]
\n
\nImportant Notes:
\n\t[decode(src.active2.fields["notes"])]
\n
\n
Comments/Log

" var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - dat += text("[]
Delete Entry

", src.active2.fields[text("com_[]", counter)], src, counter) + while(active2.fields[text("com_[]", counter)]) + var/current_index = text("com_[]", counter) + if(findtext(active2.fields[current_index], "
")) + dat += text("[]
Delete Entry

", active2.fields[current_index], src, counter) + else + dat += text("[]

", active2.fields[current_index]) counter++ dat += text("Add Entry

", src) dat += text("Delete Record (Medical Only)

", src) @@ -209,142 +213,156 @@ GLOB.data_core.medical -= R qdel(R) //Foreach goto(494) - src.temp = "All records deleted." + temp = "All records deleted." + msg_admin_niche("[key_name_admin(usr)] deleted all medical records.") if (href_list["field"]) - var/a1 = src.active1 - var/a2 = src.active2 + var/a1 = active1 + var/a2 = active2 switch(href_list["field"]) if("sex") - if (istype(src.active1, /datum/data/record)) - if (src.active1.fields["sex"] == "Male") - src.active1.fields["sex"] = "Female" - else - src.active1.fields["sex"] = "Male" + if (istype(active1, /datum/data/record)) + var/new_value = "Male" + if (active1.fields["sex"] == "Male") + new_value = "Female" + active1.fields["sex"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record sex for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("age") - if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active1 != a1)) + if (istype(active1, /datum/data/record)) + var/new_value = input("Please input age:", "Med. records", active1.fields["age"], null) as num + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) return - src.active1.fields["age"] = t1 + active1.fields["age"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record age for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("mi_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please input minor disabilities list:", "Med. records", active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["mi_dis"] = t1 + active2.fields["mi_dis"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record minor disabilities list for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("mi_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please summarize minor dis.:", "Med. records", active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["mi_dis_d"] = t1 + active2.fields["mi_dis_d"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record minor disabilities desc for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("ma_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please input major diabilities list:", "Med. records", active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["ma_dis"] = t1 + active2.fields["ma_dis"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record major disabilities list for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("ma_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please summarize major dis.:", "Med. records", active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["ma_dis_d"] = t1 + active2.fields["ma_dis_d"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record major disabilities desc for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("alg") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please state allergies:", "Med. records", active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["alg"] = t1 + active2.fields["alg"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record allergies list for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("alg_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please summarize allergies:", "Med. records", active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["alg_d"] = t1 + active2.fields["alg_d"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record allergies desc for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("cdi") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please state diseases:", "Med. records", active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["cdi"] = t1 + active2.fields["cdi"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record disabilities list for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("cdi_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(trim(strip_html(input("Please summarize diseases:", "Med. records", active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["cdi_d"] = t1 + active2.fields["cdi_d"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record disabilities desc for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("notes") - if (istype(src.active2, /datum/data/record)) - var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + if (istype(active2, /datum/data/record)) + var/new_value = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return - src.active2.fields["notes"] = t1 + active2.fields["notes"] = new_value + msg_admin_niche("[key_name_admin(usr)] set the medical record notes for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if("p_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Physical Condition:
\n\t*Deceased*
\n\t*SSD*
\n\tActive
\n\tPhysically Unfit
\n\tDisabled
", src, src, src, src, src) + if (istype(active1, /datum/data/record)) + temp = text("Physical Condition:
\n\t*Deceased*
\n\t*SSD*
\n\tActive
\n\tPhysically Unfit
\n\tDisabled
", src, src, src, src, src) if("m_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src) + if (istype(active1, /datum/data/record)) + temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src) if("b_type") - if (istype(src.active2, /datum/data/record)) - src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) + if (istype(active2, /datum/data/record)) + temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src) if (href_list["p_stat"]) - if (src.active1) + if(istype(active1, /datum/data/record)) switch(href_list["p_stat"]) if("deceased") - src.active1.fields["p_stat"] = "*Deceased*" + active1.fields["p_stat"] = "*Deceased*" if("ssd") - src.active1.fields["p_stat"] = "*SSD*" + active1.fields["p_stat"] = "*SSD*" if("active") - src.active1.fields["p_stat"] = "Active" + active1.fields["p_stat"] = "Active" if("unfit") - src.active1.fields["p_stat"] = "Physically Unfit" + active1.fields["p_stat"] = "Physically Unfit" if("disabled") - src.active1.fields["p_stat"] = "Disabled" + active1.fields["p_stat"] = "Disabled" + msg_admin_niche("[key_name_admin(usr)] set the medical record physical state for [active1.fields["name"]] ([active1.fields["id"]]) to [href_list["p_stat"]].") if (href_list["m_stat"]) - if (src.active1) + if(istype(active1, /datum/data/record)) switch(href_list["m_stat"]) if("insane") - src.active1.fields["m_stat"] = "*Insane*" + active1.fields["m_stat"] = "*Insane*" if("unstable") - src.active1.fields["m_stat"] = "*Unstable*" + active1.fields["m_stat"] = "*Unstable*" if("watch") - src.active1.fields["m_stat"] = "*Watch*" + active1.fields["m_stat"] = "*Watch*" if("stable") - src.active1.fields["m_stat"] = "Stable" - + active1.fields["m_stat"] = "Stable" + msg_admin_niche("[key_name_admin(usr)] set the medical record mental state for [active1.fields["name"]] ([active1.fields["id"]]) to [href_list["m_stat"]].") if (href_list["b_type"]) - if (src.active2) + if(istype(active2, /datum/data/record)) switch(href_list["b_type"]) if("an") - src.active2.fields["b_type"] = "A-" + active2.fields["b_type"] = "A-" if("bn") - src.active2.fields["b_type"] = "B-" + active2.fields["b_type"] = "B-" if("abn") - src.active2.fields["b_type"] = "AB-" + active2.fields["b_type"] = "AB-" if("on") - src.active2.fields["b_type"] = "O-" + active2.fields["b_type"] = "O-" if("ap") - src.active2.fields["b_type"] = "A+" + active2.fields["b_type"] = "A+" if("bp") - src.active2.fields["b_type"] = "B+" + active2.fields["b_type"] = "B+" if("abp") - src.active2.fields["b_type"] = "AB+" + active2.fields["b_type"] = "AB+" if("op") - src.active2.fields["b_type"] = "O+" - + active2.fields["b_type"] = "O+" + msg_admin_niche("[key_name_admin(usr)] set the medical record blood type for [active1.fields["name"]] ([active1.fields["id"]]) to [active2.fields["b_type"]].") if (href_list["del_r"]) - if (active2) - src.temp = text("Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
", src, src) + if(istype(active2, /datum/data/record)) + temp = text("Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
", src, src) if (href_list["del_r2"]) + msg_admin_niche("[key_name_admin(usr)] deleted the medical record for [active1.fields["name"]] ([active1.fields["id"]]).") QDEL_NULL(active2) if (href_list["d_rec"]) @@ -381,20 +399,22 @@ src.screen = 4 if (href_list["add_c"]) - if (!( istype(src.active2, /datum/data/record) )) + if (!( istype(active2, /datum/data/record) )) return - var/a2 = src.active2 - var/t1 = copytext(trim(strip_html(input("Add Comment:", "Med. records", null, null) as message)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || src.active2 != a2)) + var/a2 = active2 + var/new_value = copytext(trim(strip_html(input("Add Comment:", "Med. records", null, null) as message)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active2 != a2)) return var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) + while(active2.fields[text("com_[]", counter)]) counter++ - src.active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
[t1]") + active2.fields[text("com_[counter]")] = text("Made by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]
[new_value]") + msg_admin_niche("[key_name_admin(usr)] added a medical comment for [active1.fields["name"]] ([active1.fields["id"]]): [new_value].") if (href_list["del_c"]) - if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) - src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted" + if ((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])])) + msg_admin_niche("[key_name_admin(usr)] deleted a medical comment for [active1.fields["name"]] ([active1.fields["id"]]): [active2.fields[text("com_[]", href_list["del_c"])]].") + active2.fields[text("com_[]", href_list["del_c"])] = text("Deleted entry by [authenticated] ([rank]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [GLOB.game_year]") if (href_list["search"]) var/t1 = stripped_input(usr, "Search String: (Name, DNA, or ID)", "Med. records") @@ -442,7 +462,7 @@ else P.info += "Medical Record Lost!
" P.info += "" - P.info += text("

This report was printed by [] [].
The [MAIN_SHIP_NAME],[]/[], []

\n",last_user_rank,last_user_name,time2text(world.timeofday, "MM/DD"),GLOB.game_year,worldtime2text()) + P.info += text("

This report was printed by [] [].
The [MAIN_SHIP_NAME],[]/[], []

\n",rank,authenticated,time2text(world.timeofday, "MM/DD"),GLOB.game_year,worldtime2text()) src.printing = null if(href_list["print_bs"])//Prints latest body scan @@ -465,7 +485,7 @@ break else P.info += "No scan on record." - P.info += text("

This report was printed by [] [].
The [MAIN_SHIP_NAME], []/[], []

\n",last_user_rank,last_user_name,time2text(world.timeofday, "MM/DD"),GLOB.game_year,worldtime2text()) + P.info += text("

This report was printed by [] [].
The [MAIN_SHIP_NAME], []/[], []

\n",rank,authenticated,time2text(world.timeofday, "MM/DD"),GLOB.game_year,worldtime2text()) src.printing = null @@ -483,20 +503,27 @@ if(prob(10/severity)) switch(rand(1,6)) if(1) + msg_admin_niche("The medical record name of [R.fields["name"]] was scrambled!") R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]" if(2) R.fields["sex"] = pick("Male", "Female") + msg_admin_niche("The medical record sex of [R.fields["name"]] was scrambled!") if(3) R.fields["age"] = rand(5, 85) + msg_admin_niche("The medical record age of [R.fields["name"]] was scrambled!") if(4) R.fields["b_type"] = pick("A-", "B-", "AB-", "O-", "A+", "B+", "AB+", "O+") + msg_admin_niche("The medical record blood type of [R.fields["name"]] was scrambled!") if(5) R.fields["p_stat"] = pick("*SSD*", "Active", "Physically Unfit", "Disabled") + msg_admin_niche("The medical record physical state of [R.fields["name"]] was scrambled!") if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") + msg_admin_niche("The medical record mental state of [R.fields["name"]] was scrambled!") continue else if(prob(1)) + msg_admin_niche("The medical record of [R.fields["name"]] was lost!") GLOB.data_core.medical -= R qdel(R) continue diff --git a/code/game/machinery/computer/research.dm b/code/game/machinery/computer/research.dm index b51da245844e..de4d3edf927c 100644 --- a/code/game/machinery/computer/research.dm +++ b/code/game/machinery/computer/research.dm @@ -59,36 +59,24 @@ GLOB.chemical_data.update_credits(cred.credit_value) visible_message(SPAN_NOTICE("[user] inserts [cred] in [src], collecting [cred.credit_value] points from sales.")) qdel(cred) - //Clearance Updating + //Clearance Card Updating if(!istype(B, /obj/item/card/id)) return var/obj/item/card/id/silver/clearance_badge/card = B if(!istype(card)) - visible_message(SPAN_NOTICE("[user] swipes their ID card on \the [src], but it is refused.")) + visible_message(SPAN_NOTICE("[user] swipes their ID card on [src], but it is refused.")) return - if(card.clearance_access <= GLOB.chemical_data.clearance_level || (card.clearance_access == 6 && GLOB.chemical_data.clearance_level >= 5 && GLOB.chemical_data.clearance_x_access)) - visible_message(SPAN_NOTICE("[user] swipes the clearance card on [src], but nothing happens.")) + if(!card.check_biometrics(user)) + visible_message(SPAN_WARNING("WARNING: ILLEGAL CLEARANCE USER DETECTED. ABORTING.")) return - if(user.real_name != card.registered_name) - visible_message(SPAN_WARNING("WARNING: ILLEGAL CLEARANCE USER DETECTED. CARD DATA HAS BEEN WIPED.")) - card.clearance_access = 0 - return - - var/give_level - var/give_x = FALSE - if(card.clearance_access == 6) - give_level = 5 - give_x = TRUE - else - give_level = card.clearance_access - GLOB.chemical_data.clearance_level = give_level - if(give_x) - GLOB.chemical_data.clearance_x_access = TRUE - GLOB.chemical_data.reached_x_access = TRUE + var/credits_to_add = max(card.credits_to_give - GLOB.chemical_data.credits_gained, 0) + if(credits_to_add) + GLOB.chemical_data.update_credits(credits_to_add) + GLOB.chemical_data.credits_gained += credits_to_add - visible_message(SPAN_NOTICE("[user] swipes their ID card on \the [src], updating the clearance to level [give_level][give_x ? "X" : ""].")) - msg_admin_niche("[key_name(user)] has updated the research clearance to level [give_level][give_x ? "X" : ""].") + visible_message(SPAN_NOTICE("[user] swipes their ID card on [src], granting [credits_to_add] credits.")) + msg_admin_niche("[key_name(user)] has swiped a clearance card to give [credits_to_add] credits to research.") return /obj/structure/machinery/computer/research/ui_state(mob/user) @@ -181,30 +169,6 @@ if(5) new /obj/item/paper/research_notes/unique/tier_five/(photocopier.loc) max_clearance = 5 - if("purchase_document") - if(!photocopier) - return - var/purchase_tier = floor(text2num(params["purchase_document"])) - if(purchase_tier <= 0 || purchase_tier > 5) - return - if(purchase_tier > GLOB.chemical_data.clearance_level) - return - var/purchase_cost = base_purchase_cost + purchase_tier * 2 - if(purchase_cost <= GLOB.chemical_data.rsc_credits) - GLOB.chemical_data.update_credits(purchase_cost * -1) - var/obj/item/paper/research_notes/unique/N - switch(purchase_tier) - if(1) - N = new /obj/item/paper/research_notes/unique/tier_one/(photocopier.loc) - if(2) - N = new /obj/item/paper/research_notes/unique/tier_two/(photocopier.loc) - if(3) - N = new /obj/item/paper/research_notes/unique/tier_three/(photocopier.loc) - if(4) - N = new /obj/item/paper/research_notes/unique/tier_four/(photocopier.loc) - else - N = new /obj/item/paper/research_notes/unique/tier_five/(photocopier.loc) - visible_message(SPAN_NOTICE("Research report for [N.data.name] has been purchased.")) if("publish_document") var/print_type = params["print_type"] var/print_title = params["print_title"] diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index b3892de24413..ae6ddc3d411e 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -355,16 +355,17 @@ What a mess.*/ GLOB.data_core.security -= R qdel(R) temp = "All Security records deleted." + msg_admin_niche("[key_name_admin(usr)] deleted all security records.") if ("Add Entry") if (!(istype(active2, /datum/data/record))) return var/a2 = active2 - var/t1 = copytext(trim(strip_html(input("Your name and time will be added to this new comment.", "Add a comment", null, null) as message)),1,MAX_MESSAGE_LEN) - if((!t1 || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isSilicon(usr))) || active2 != a2)) + var/new_value = copytext(trim(strip_html(input("Your name and time will be added to this new comment.", "Add a comment", null, null) as message)),1,MAX_MESSAGE_LEN) + if((!new_value || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isSilicon(usr))) || active2 != a2)) return var/created_at = text("[]  []  []", time2text(world.realtime, "MMM DD"), time2text(world.time, "[worldtime2text()]:ss"), GLOB.game_year) - var/new_comment = list("entry" = t1, "created_by" = list("name" = "", "rank" = ""), "deleted_by" = null, "deleted_at" = null, "created_at" = created_at) + var/new_comment = list("entry" = new_value, "created_by" = list("name" = "", "rank" = ""), "deleted_by" = null, "deleted_at" = null, "created_at" = created_at) if(istype(usr,/mob/living/carbon/human)) var/mob/living/carbon/human/U = usr new_comment["created_by"] = list("name" = U.get_authentification_name(), "rank" = U.get_assignment()) @@ -374,6 +375,7 @@ What a mess.*/ var/new_com_i = length(active2.fields["comments"]) + 1 active2.fields["comments"]["[new_com_i]"] = new_comment to_chat(usr, text("You have added a new comment to the Security Record of [].", active2.fields["name"])) + msg_admin_niche("[key_name_admin(usr)] added a security comment for [active1.fields["name"]] ([active1.fields["id"]]): [new_value].") if ("Delete Entry") if(!islist(active2.fields["comments"])) @@ -406,23 +408,28 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = reject_bad_name(input(usr, "Please input name:", "Secure. records", active1.fields["name"]) as text|null) - if (!t1 || active1 != a1) + var/new_value = reject_bad_name(input(usr, "Please input name:", "Secure. records", active1.fields["name"]) as text|null) + if (!new_value || active1 != a1) return - message_admins("[key_name(usr)] has changed the record name of [active1.fields["name"]] to [t1]") - active1.fields["name"] = t1 + message_admins("[key_name(usr)] changed the security record name of [active1.fields["name"]] to [new_value]") + active1.fields["name"] = new_value + if("sex") if (istype(active1, /datum/data/record)) + var/new_value = "Male" if (active1.fields["sex"] == "Male") - active1.fields["sex"] = "Female" - else - active1.fields["sex"] = "Male" + new_value = "Female" + active1.fields["sex"] = new_value + msg_admin_niche("[key_name(usr)] changed the security record sex of [active1.fields["name"]] to [new_value]") + if("age") if (istype(active1, /datum/data/record)) - var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num - if (!t1 || active1 != a1) + var/new_value = input("Please input age:", "Secure. records", active1.fields["age"], null) as num + if (!new_value || active1 != a1) return - active1.fields["age"] = t1 + active1.fields["age"] = new_value + msg_admin_niche("[key_name(usr)] changed the security record age of [active1.fields["name"]] to [new_value]") + if("criminal") if (istype(active2, /datum/data/record)) temp = "
Criminal Status:
" @@ -434,22 +441,25 @@ What a mess.*/ temp += "
  • Suspect
  • " temp += "
  • NJP
  • " temp += "" + if("rank") //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N if (istype(active1, /datum/data/record) && GLOB.uscm_highcom_paygrades.Find(rank)) temp = "
    Occupation:
    " temp += "" else alert(usr, "You do not have the required rank to do this!") + if("species") if (istype(active1, /datum/data/record)) - var/t1 = copytext(trim(strip_html(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN) - if (!t1 || active1 != a1) + var/new_value = copytext(trim(strip_html(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN) + if (!new_value || active1 != a1) return - active1.fields["species"] = t1 + active1.fields["species"] = new_value + msg_admin_niche("[key_name(usr)] changed the security record species of [active1.fields["name"]] to [new_value]") //TEMPORARY MENU FUNCTIONS @@ -457,14 +467,17 @@ What a mess.*/ temp=null switch(href_list["choice"]) if ("Change Rank") - if (active1) - active1.fields["rank"] = href_list["rank"] - if(href_list["rank"] in GLOB.joblist) - active1.fields["real_rank"] = href_list["real_rank"] + if(istype(active1, /datum/data/record) && GLOB.uscm_highcom_paygrades.Find(rank)) + var/new_value = href_list["rank"] + active1.fields["rank"] = new_value + if(new_value in GLOB.joblist) + active1.fields["real_rank"] = new_value + message_admins("[key_name(usr)] changed the security record sex of [active1.fields["name"]] to [new_value]") if ("Change Criminal Status") - if (active2) - switch(href_list["criminal2"]) + if(istype(active2, /datum/data/record)) + var/new_value = href_list["criminal2"] + switch(new_value) if("none") active2.fields["criminal"] = "None" if("arrest") @@ -481,6 +494,8 @@ What a mess.*/ for(var/mob/living/carbon/human/H in GLOB.human_mob_list) H.sec_hud_set_security_status() + message_admins("[key_name(usr)] changed the security record criminal status of [active1.fields["name"]] to [new_value]") + add_fingerprint(usr) updateUsrDialog() return @@ -521,20 +536,27 @@ What a mess.*/ if(prob(10/severity)) switch(rand(1,6)) if(1) + msg_admin_niche("The security record name of [R.fields["name"]] was scrambled!") R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]" if(2) R.fields["sex"] = pick("Male", "Female") + msg_admin_niche("The security record sex of [R.fields["name"]] was scrambled!") if(3) R.fields["age"] = rand(5, 85) + msg_admin_niche("The security record age of [R.fields["name"]] was scrambled!") if(4) R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Released", "Suspect", "NJP") + msg_admin_niche("The security record criminal status of [R.fields["name"]] was scrambled!") if(5) R.fields["p_stat"] = pick("*Unconscious*", "Active", "Physically Unfit") + msg_admin_niche("The security record physical state of [R.fields["name"]] was scrambled!") if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") + msg_admin_niche("The security record mental state of [R.fields["name"]] was scrambled!") continue else if(prob(1)) + msg_admin_niche("The security record of [R.fields["name"]] was lost!") GLOB.data_core.security -= R qdel(R) continue diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index cba8d50791f9..d0ace4d4dfb5 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -259,9 +259,10 @@ What a mess.*/ GLOB.data_core.security -= R qdel(R) temp = "All Employment records deleted." + msg_admin_niche("[key_name_admin(usr)] deleted all employment records.") if ("Delete Record (ALL)") - if (active1) + if(istype(active1, /datum/data/record)) temp = "
    Are you sure you wish to delete the record (ALL)?
    " temp += "Yes
    " temp += "No" @@ -275,63 +276,75 @@ What a mess.*/ switch(href_list["field"]) if("name") if (istype(active1, /datum/data/record)) - var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) - if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr)))) || active1 != a1) + var/new_value = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) + if ((!( new_value ) || !length(trim(new_value)) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr)))) || active1 != a1) return - message_admins("[key_name(usr)] has changed the record name of [active1.fields["name"]] to [t1]") - active1.fields["name"] = t1 + message_admins("[key_name(usr)] changed the employment record name of [active1.fields["name"]] to [new_value]") + active1.fields["name"] = new_value + if("id") if (istype(active1, /datum/data/record)) - var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) + var/new_value = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) return - active1.fields["id"] = t1 + msg_admin_niche("[key_name_admin(usr)] changed the employment record id for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") + active1.fields["id"] = new_value if("sex") if (istype(active1, /datum/data/record)) + var/new_value = "Male" if (active1.fields["sex"] == "Male") - active1.fields["sex"] = "Female" - else - active1.fields["sex"] = "Male" + new_value = "Female" + active1.fields["sex"] = new_value + msg_admin_niche("[key_name_admin(usr)] changed the employment record sex for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") + if("age") if (istype(active1, /datum/data/record)) - var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num - if ((!( t1 ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) + var/new_value = input("Please input age:", "Secure. records", active1.fields["age"], null) as num + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) return - active1.fields["age"] = t1 + active1.fields["age"] = new_value + msg_admin_niche("[key_name_admin(usr)] changed the employment record age for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") + if("rank") + if(istype(active1, /datum/data/record)) //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N - if(istype(active1, /datum/data/record) && GLOB.uscm_highcom_paygrades.Find(rank)) - temp = "
    Occupation:
    " - temp += "" - else - alert(usr, "You do not have the required rank to do this!") + if(GLOB.uscm_highcom_paygrades.Find(rank)) + temp = "
    Occupation:
    " + temp += "" + else + alert(usr, "You do not have the required rank to do this!") + if("species") if (istype(active1, /datum/data/record)) - var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN) - if ((!( t1 ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) + var/new_value = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN) + if ((!( new_value ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) return - active1.fields["species"] = t1 + active1.fields["species"] = new_value + msg_admin_niche("[key_name_admin(usr)] changed the employment record species for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") //TEMPORARY MENU FUNCTIONS else//To properly clear as per clear screen. temp=null switch(href_list["choice"]) if ("Change Rank") - if (active1) - active1.fields["rank"] = href_list["rank"] - if(href_list["rank"] in GLOB.joblist) - active1.fields["real_rank"] = href_list["real_rank"] + if(istype(active1, /datum/data/record) && GLOB.uscm_highcom_paygrades.Find(rank)) + var/new_value = href_list["rank"] + active1.fields["rank"] = new_value + if(new_value in GLOB.joblist) + active1.fields["real_rank"] = new_value + message_admins("[key_name_admin(usr)] changed the employment record rank for [active1.fields["name"]] ([active1.fields["id"]]) to [new_value].") if ("Delete Record (ALL) Execute") - if (active1) + if(istype(active1, /datum/data/record)) for(var/datum/data/record/R as anything in GLOB.data_core.medical) if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"])) GLOB.data_core.medical -= R qdel(R) + msg_admin_niche("[key_name_admin(usr)] deleted all employment records for [active1.fields["name"]] ([active1.fields["id"]]).") QDEL_NULL(active1) else temp = "This function does not appear to be working at the moment. Our apologies." @@ -349,20 +362,27 @@ What a mess.*/ if(prob(10/severity)) switch(rand(1,6)) if(1) + msg_admin_niche("The employment record name of [R.fields["name"]] was scrambled!") R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]" if(2) R.fields["sex"] = pick("Male", "Female") + msg_admin_niche("The employment record sex of [R.fields["name"]] was scrambled!") if(3) R.fields["age"] = rand(5, 85) + msg_admin_niche("The employment record age of [R.fields["name"]] was scrambled!") if(4) R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Released") + msg_admin_niche("The employment record criminal status of [R.fields["name"]] was scrambled!") if(5) R.fields["p_stat"] = pick("*Unconscious*", "Active", "Physically Unfit") + msg_admin_niche("The employment record physical state of [R.fields["name"]] was scrambled!") if(6) R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable") + msg_admin_niche("The employment record mental state of [R.fields["name"]] was scrambled!") continue else if(prob(1)) + msg_admin_niche("The employment record of [R.fields["name"]] was lost!") GLOB.data_core.security -= R qdel(R) continue diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 0c8cc62c3f87..3b7880320da7 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -15,7 +15,7 @@ var/list/req_component_names = null var/state = CONSTRUCTION_STATE_BEGIN var/required_skill = SKILL_CONSTRUCTION_ENGI - var/required_dismantle_skill = SKILL_ENGINEER_ENGI + var/required_dismantle_skill = SKILL_ENGINEER_TRAINED /obj/structure/machinery/constructable_frame/Initialize(mapload, ...) . = ..() diff --git a/code/game/machinery/door_display/door_display.dm b/code/game/machinery/door_display/door_display.dm index 4624ba5f1bd2..529ac6f95959 100644 --- a/code/game/machinery/door_display/door_display.dm +++ b/code/game/machinery/door_display/door_display.dm @@ -203,7 +203,7 @@ if(F.id == id) targets += F if(has_wall_divider) - for(var/turf/closed/wall/almayer/research/containment/wall/divide/W in orange(src, 8)) + for(var/turf/closed/wall/almayer/research/containment/wall/divide/W in ORANGE_TURFS(8, src)) targets += W /obj/structure/machinery/door_display/research_cell/Destroy() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 84f02f0a5bbd..9ac9765371f3 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -439,7 +439,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( return if(panel_open) - if(ishuman(usr) && !skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(ishuman(usr) && !skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You look into \the [src]'s access panel and can only see a jumbled mess of colored wires...")) return FALSE @@ -483,7 +483,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( add_fingerprint(usr) if((in_range(src, usr) && istype(loc, /turf)) && panel_open) - if(ishuman(usr) && !skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(ishuman(usr) && !skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't understand anything about [src]'s wiring!")) return FALSE @@ -649,7 +649,7 @@ GLOBAL_LIST_INIT(airlock_wire_descriptions, list( else if(attacking_item.pry_capable) if(attacking_item.pry_capable == IS_PRY_CAPABLE_CROWBAR && panel_open && welded) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You don't seem to know how to deconstruct machines.")) return playsound(loc, 'sound/items/Crowbar.ogg', 25, 1) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 27bb58397956..9ca1fb064568 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -87,10 +87,7 @@ return located_turfs /obj/structure/machinery/door/proc/borders_space() - for(var/turf/target in range(1, src)) - if(istype(target, /turf/open/space)) - return TRUE - return FALSE + return !!(locate(/turf/open/space) in range(1, src)) /obj/structure/machinery/door/Collided(atom/movable/AM) if(panel_open || operating) diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm index f95ef09e812f..6e7f571a0d4e 100644 --- a/code/game/machinery/doors/multi_tile.dm +++ b/code/game/machinery/doors/multi_tile.dm @@ -262,14 +262,14 @@ var/datum/door_controller/single/control = linked_dropship.door_control.door_controllers[direction] if (control.status != SHUTTLE_DOOR_BROKEN) return ..() - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI) && !skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) && !skillcheck(user, SKILL_PILOT, SKILL_PILOT_TRAINED)) to_chat(user, SPAN_WARNING("You don't seem to understand how to restore a remote connection to [src].")) return if(user.action_busy) return to_chat(user, SPAN_WARNING("You begin to restore the remote connection to [src].")) - if(!do_after(user, (skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI) ? 5 SECONDS : 8 SECONDS), INTERRUPT_ALL, BUSY_ICON_BUILD)) + if(!do_after(user, (skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) ? 5 SECONDS : 8 SECONDS), INTERRUPT_ALL, BUSY_ICON_BUILD)) to_chat(user, SPAN_WARNING("You fail to restore a remote connection to [src].")) return unlock(TRUE) diff --git a/code/game/machinery/fusion_engine.dm b/code/game/machinery/fusion_engine.dm index 72f836717b0f..06ae3321a2c5 100644 --- a/code/game/machinery/fusion_engine.dm +++ b/code/game/machinery/fusion_engine.dm @@ -140,7 +140,7 @@ if(overloaded) . += SPAN_INFO("It is overloaded.") return - if(skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) . += SPAN_INFO("You could overload its safeties with a multitool.") /obj/structure/machinery/power/reactor/power_change() @@ -344,7 +344,7 @@ if(!is_ship_reactor) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) return to_chat(user, SPAN_WARNING("You start [overloaded ? "overloading" : "restoring"] the safeties on [src].")) @@ -446,7 +446,7 @@ var/repair_time = 20 SECONDS repair_time *= user.get_skill_duration_multiplier(SKILL_ENGINEER) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) repair_time += 5 SECONDS to_chat(user, SPAN_NOTICE("You start repairing [src] with [tool].")) diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm index 774153316baa..957f6c97eca3 100644 --- a/code/game/machinery/kitchen/smartfridge.dm +++ b/code/game/machinery/kitchen/smartfridge.dm @@ -350,7 +350,7 @@ if("cutwire") if(!panel_open) return FALSE - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't understand anything about this wiring...")) return FALSE var/obj/item/held_item = user.get_held_item() @@ -364,7 +364,7 @@ if("fixwire") if(!panel_open) return FALSE - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't understand anything about this wiring...")) return FALSE var/obj/item/held_item = user.get_held_item() @@ -377,7 +377,7 @@ if("pulsewire") if(!panel_open) return FALSE - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't understand anything about this wiring...")) return FALSE var/obj/item/held_item = user.get_held_item() diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index f835ecaa424c..f7244fb8ce0d 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -171,7 +171,7 @@ Class Procs: . += "It does not appear to be working." var/msg = get_repair_move_text(FALSE) - if(msg && skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(msg && skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) . += SPAN_WARNING("[msg]") /obj/structure/machinery/emp_act(severity) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 9bffa8ebe450..31cd2cf94d4e 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -22,7 +22,7 @@ attack_hand(user) else - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You stare at \the [src] cluelessly...")) return 0 @@ -103,7 +103,7 @@ // You need a multitool to use this, or be silicon if(!isSilicon(user)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You stare at \the [src] cluelessly...")) return // istype returns false if the value is null diff --git a/code/game/machinery/telecomms/portable_comms.dm b/code/game/machinery/telecomms/portable_comms.dm index c2a9bb1072ac..cf7ef1c1f2ef 100644 --- a/code/game/machinery/telecomms/portable_comms.dm +++ b/code/game/machinery/telecomms/portable_comms.dm @@ -3,7 +3,7 @@ desc = "A portable compact TC-4T telecommunications construction kit. Used to set up subspace communications lines between planetary and extra-planetary locations. Needs cabling." icon = 'icons/obj/structures/machinery/comm_tower2.dmi' icon_state = "construct_0_0" - required_skill = SKILL_ENGINEER_ENGI + required_skill = SKILL_ENGINEER_TRAINED required_dismantle_skill = 5 density = TRUE anchored = FALSE diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 0c9e875534da..de2491126c7c 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -122,7 +122,7 @@ return if(user.action_busy) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) to_chat(user, SPAN_WARNING("You're not trained to repair [src]...")) return var/obj/item/tool/weldingtool/WT = I diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index db173e7b1608..2d15d4c37da8 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -153,7 +153,7 @@ GLOBAL_LIST_EMPTY(vending_products) /obj/structure/machinery/cm_vending/get_examine_text(mob/living/carbon/human/user) . = ..() - if(skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI) && hackable) + if(skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) && hackable) . += SPAN_NOTICE("You believe you can hack this one to remove the access requirements.") /obj/structure/machinery/cm_vending/proc/hack_access(mob/user) @@ -678,7 +678,7 @@ GLOBAL_LIST_EMPTY(vending_products) to_chat(user, SPAN_WARNING("You need to set [src] back upright first.")) return if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src].")) return FALSE else if(stat & MAINT) @@ -705,7 +705,7 @@ GLOBAL_LIST_EMPTY(vending_products) to_chat(user, SPAN_WARNING("[msg]")) return FALSE else if(HAS_TRAIT(W, TRAIT_TOOL_WIRECUTTERS)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src].")) return FALSE else if(stat & REPAIR_STEP_ONE) @@ -722,7 +722,7 @@ GLOBAL_LIST_EMPTY(vending_products) to_chat(user, SPAN_WARNING("[msg]")) return FALSE else if(iswire(W)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src].")) return FALSE var/obj/item/stack/cable_coil/CC = W @@ -745,7 +745,7 @@ GLOBAL_LIST_EMPTY(vending_products) to_chat(user, SPAN_WARNING("[msg]")) return else if(istype(W, /obj/item/stack/sheet/metal)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src].")) return FALSE var/obj/item/stack/sheet/metal/M = W @@ -768,7 +768,7 @@ GLOBAL_LIST_EMPTY(vending_products) else if(HAS_TRAIT(W, TRAIT_TOOL_MULTITOOL)) var/obj/item/device/multitool/MT = W - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI) && !skillcheckexplicit(user, SKILL_ANTAG, SKILL_ANTAG_AGENT)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) && !skillcheckexplicit(user, SKILL_ANTAG, SKILL_ANTAG_AGENT)) to_chat(user, SPAN_WARNING("You do not understand how tweak access requirements in [src].")) return FALSE if(stat != WORKING) diff --git a/code/game/machinery/vending/vending.dm b/code/game/machinery/vending/vending.dm index a05245e4b185..c6ef6eb7a574 100644 --- a/code/game/machinery/vending/vending.dm +++ b/code/game/machinery/vending/vending.dm @@ -207,7 +207,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") update_icon() return TRUE - else if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + else if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name].")) return FALSE else if(stat & BROKEN) @@ -234,7 +234,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending to_chat(user, SPAN_WARNING("[msg]")) return FALSE else if(HAS_TRAIT(item, TRAIT_TOOL_WIRECUTTERS)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name].")) return FALSE else if(stat == WORKING && panel_open) @@ -254,7 +254,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending to_chat(user, SPAN_WARNING("[msg]")) return FALSE else if(istype(item, /obj/item/stack/cable_coil)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name].")) return FALSE var/obj/item/stack/cable_coil/CC = item @@ -277,7 +277,7 @@ GLOBAL_LIST_EMPTY_TYPED(total_vending_machines, /obj/structure/machinery/vending to_chat(user, SPAN_WARNING("[msg]")) return else if(istype(item, /obj/item/stack/sheet/metal)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not understand how to repair the broken [src.name].")) return FALSE var/obj/item/stack/sheet/metal/M = item diff --git a/code/game/machinery/vending/vendor_types/crew/medical.dm b/code/game/machinery/vending/vendor_types/crew/medical.dm index fe9b7b06648e..d8e60fdb0026 100644 --- a/code/game/machinery/vending/vendor_types/crew/medical.dm +++ b/code/game/machinery/vending/vendor_types/crew/medical.dm @@ -245,6 +245,9 @@ GLOBAL_LIST_INIT(cm_vending_clothing_researcher, list( /obj/item/tool/surgery/synthgraft, /obj/item/storage/syringe_case, /obj/item/storage/surgical_case/regular, + /obj/item/clothing/accessory/stethoscope, + /obj/item/device/flashlight/pen, + ) @@ -255,7 +258,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_researcher, list( /obj/item/device/healthanalyzer, /obj/item/tool/surgery/surgical_line, /obj/item/tool/surgery/synthgraft, - /obj/item/device/flashlight/pen, /obj/item/clothing/accessory/stethoscope, + /obj/item/device/flashlight/pen, /obj/item/storage/syringe_case, ) diff --git a/code/game/machinery/vending/vendor_types/crew/senior_officers.dm b/code/game/machinery/vending/vendor_types/crew/senior_officers.dm index b938db1d3db6..b63a73a90f06 100644 --- a/code/game/machinery/vending/vendor_types/crew/senior_officers.dm +++ b/code/game/machinery/vending/vendor_types/crew/senior_officers.dm @@ -329,19 +329,21 @@ GLOBAL_LIST_INIT(cm_vending_gear_xo, list( list("Shotgun Slugs", 20, /obj/item/ammo_magazine/shotgun/slugs, null, VENDOR_ITEM_REGULAR), list("Flechette Shells", 20, /obj/item/ammo_magazine/shotgun/flechette, null, VENDOR_ITEM_REGULAR), + list("SPECIALISATION KIT (CHOOSE 1)", 0, null, null, null), + list("Essential Engineer Set", 0, /obj/effect/essentials_set/engi, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_RECOMMENDED), + list("Essential Medical Set", 0, /obj/effect/essentials_set/medic, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_RECOMMENDED), + list("EXPLOSIVES", 0, null, null, null), list("HEDP Grenade Pack", 15, /obj/item/storage/box/packet/high_explosive, null, VENDOR_ITEM_REGULAR), list("HEFA Grenade Pack", 15, /obj/item/storage/box/packet/hefa, null, VENDOR_ITEM_REGULAR), list("WP Grenade Pack", 15, /obj/item/storage/box/packet/phosphorus, null, VENDOR_ITEM_REGULAR), list("RAIL ATTACHMENTS", 0, null, null, null), + list("Magnetic Harness", 12, /obj/item/attachable/magnetic_harness, null, VENDOR_ITEM_RECOMMENDED), list("Red-Dot Sight", 15, /obj/item/attachable/reddot, null, VENDOR_ITEM_REGULAR), list("Reflex Sight", 15, /obj/item/attachable/reflex, null, VENDOR_ITEM_REGULAR), list("S4 2x Telescopic Mini-Scope", 15, /obj/item/attachable/scope/mini, null, VENDOR_ITEM_REGULAR), - list("Helmet Visors", 0, null, null, null), - list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_RECOMMENDED), - list("UNDERBARREL ATTACHMENTS", 0, null, null, null), list("Laser Sight", 15, /obj/item/attachable/lasersight, null, VENDOR_ITEM_REGULAR), list("Angled Grip", 15, /obj/item/attachable/angledgrip, null, VENDOR_ITEM_REGULAR), @@ -355,6 +357,22 @@ GLOBAL_LIST_INIT(cm_vending_gear_xo, list( list("Extended Barrel", 15, /obj/item/attachable/extended_barrel, null, VENDOR_ITEM_REGULAR), list("Recoil Compensator", 15, /obj/item/attachable/compensator, null, VENDOR_ITEM_REGULAR), list("Suppressor", 15, /obj/item/attachable/suppressor, null, VENDOR_ITEM_REGULAR), + + list("OTHER SUPPLIES", 0, null, null, null), + list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR), + list("Insulated Gloves", 3, /obj/item/clothing/gloves/yellow, null, VENDOR_ITEM_REGULAR), + list("Entrenching Tool", 1, /obj/item/tool/shovel/etool, null, VENDOR_ITEM_REGULAR), + list("Magnetic Harness", 12, /obj/item/attachable/magnetic_harness, null, VENDOR_ITEM_RECOMMENDED), + list("Radio Telephone Pack", 15, /obj/item/storage/backpack/marine/satchel/rto, null, VENDOR_ITEM_RECOMMENDED), + list("Motion Detector", 5, /obj/item/device/motiondetector, null, VENDOR_ITEM_RECOMMENDED), + list("Machete Scabbard (Full)", 5, /obj/item/storage/large_holster/machete/full, null, VENDOR_ITEM_REGULAR), + list("Binoculars", 5,/obj/item/device/binoculars, null, VENDOR_ITEM_REGULAR), + list("Rangefinder", 8, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR), + list("Laser Designator", 12, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_RECOMMENDED), + list("Fulton Recovery Device", 5, /obj/item/stack/fulton, null, VENDOR_ITEM_REGULAR), + list("Space Cleaner", 2, /obj/item/reagent_container/spray/cleaner, null, VENDOR_ITEM_REGULAR), + list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR), + list("Flashlight", 1, /obj/item/device/flashlight, null, VENDOR_ITEM_REGULAR), )) /obj/effect/essentials_set/xo/shotgunpreset @@ -377,10 +395,16 @@ GLOBAL_LIST_INIT(cm_vending_gear_xo, list( //------------UNIFORM/GEAR VENDOR--------------- GLOBAL_LIST_INIT(cm_vending_clothing_xo, list( + list("COMBAT EQUIPMENT (TAKE ALL)", 0, null, null, null), + list("Officer M3 Armor", 0, /obj/item/clothing/suit/storage/marine/MP/SO, MARINE_CAN_BUY_COMBAT_ARMOR, VENDOR_ITEM_MANDATORY), + list("Officer M10 Helmet", 0, /obj/item/clothing/head/helmet/marine/MP/SO, MARINE_CAN_BUY_COMBAT_HELMET, VENDOR_ITEM_MANDATORY), + list("Marine Combat Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_COMBAT_SHOES, VENDOR_ITEM_MANDATORY), + list("Marine Combat Gloves", 0, /obj/item/clothing/gloves/marine, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null), list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom/cdrcom, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY), list("Satchel", 0, /obj/item/storage/backpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY), + list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), list("UNIFORM (CHOOSE ONE)", 0, null, null, null), list("Service Uniform", 0, /obj/item/clothing/under/marine/officer/bridge, MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_RECOMMENDED), @@ -393,53 +417,60 @@ GLOBAL_LIST_INIT(cm_vending_clothing_xo, list( list("Mod 88 Pistol", 0, /obj/item/storage/belt/gun/m4a3/mod88, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_REGULAR), list("M44 Revolver", 0, /obj/item/storage/belt/gun/m44/mp, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_REGULAR), - list("BELTS (CHOOSE 1)", 0, null, null, null), - list("G8-A General Utility Pouch", 0, /obj/item/storage/backpack/general_belt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("Military Police Belt", 0, /obj/item/storage/belt/security/MP/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("M276 Medical Storage Rig", 0, /obj/item/storage/belt/medical/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("M276 Ammo Load Rig", 0, /obj/item/storage/belt/marine, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("M276 Holster Toolrig", 0, /obj/item/storage/belt/gun/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("M276 M82F Holster Rig", 0, /obj/item/storage/belt/gun/flaregun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - - list("COMBAT EQUIPMENT (TAKE ALL)", 0, null, null, null), - list("Officer M3 Armor", 0, /obj/item/clothing/suit/storage/marine/MP/SO, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_MANDATORY), - list("Officer M10 Helmet", 0, /obj/item/clothing/head/helmet/marine/MP/SO, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY), - list("Marine Combat Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_SHOES, VENDOR_ITEM_MANDATORY), - list("Marine Combat Gloves", 0, /obj/item/clothing/gloves/marine, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), - list("EYEWEAR (CHOOSE 1)", 0, null, null, null), list("Medical HUD Glasses", 0, /obj/item/clothing/glasses/hud/health, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_RECOMMENDED), list("Security HUD Glasses", 0, /obj/item/clothing/glasses/sunglasses/sechud, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), list("Bimex Personal Shades", 0, /obj/item/clothing/glasses/sunglasses/big, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_RECOMMENDED), list("Aviator Shades", 0, /obj/item/clothing/glasses/sunglasses/aviator, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), + list("HATS (CHOOSE 1)", 0, null, null, null), + list("Officer Beret", 0, /obj/item/clothing/head/beret/marine/chiefofficer, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_REGULAR), + list("Service Peaked Cap", 0, /obj/item/clothing/head/marine/peaked/service, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_REGULAR), + list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_REGULAR), + list("Officer Cap", 0, /obj/item/clothing/head/cmcap/bridge, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_REGULAR), + list("PATCHES", 0, null, null, null), - list("Falling Falcons Shoulder Patch", 0, /obj/item/clothing/accessory/patch/falcon, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_MANDATORY), - list("USCM Shoulder Patch", 0, /obj/item/clothing/accessory/patch, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), + list("Falling Falcons Shoulder Patch", 1, /obj/item/clothing/accessory/patch/falcon, null, VENDOR_ITEM_REGULAR), + list("USCM Shoulder Patch", 1, /obj/item/clothing/accessory/patch, null, VENDOR_ITEM_REGULAR), + + + list("BELT (CHOOSE 1)", 0, null, null, null), + list("G8-A General Utility Pouch", 0, /obj/item/storage/backpack/general_belt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 Ammo Load Rig", 0, /obj/item/storage/belt/marine, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Shotgun Shell Loading Rig", 0, /obj/item/storage/belt/shotgun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Toolbelt Rig (Full)", 0, /obj/item/storage/belt/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Holster Toolrig (Full)", 0, /obj/item/storage/belt/gun/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 Lifesaver Bag (Full)", 0, /obj/item/storage/belt/medical/lifesaver/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Medical Storage Rig (Full)", 0, /obj/item/storage/belt/medical/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 M39 Holster Rig", 0, /obj/item/storage/belt/gun/m39, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 M82F Holster Rig", 0, /obj/item/storage/belt/gun/flaregun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 M40 Grenade Rig", 0, /obj/item/storage/belt/grenade, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("Military Police Belt", 0, /obj/item/storage/belt/security/MP/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), list("POUCHES (CHOOSE 2)", 0, null, null, null), - list("First-Aid Pouch (Refillable Injectors)", 0, /obj/item/storage/pouch/firstaid/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Autoinjector Pouch", 0, /obj/item/storage/pouch/autoinjector/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), list("First-Aid Pouch (Splints, Gauze, Ointment)", 0, /obj/item/storage/pouch/firstaid/full/alternate, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Pill Packets)", 0, /obj/item/storage/pouch/firstaid/full/pills, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), - list("Large General Pouch", 0, /obj/item/storage/pouch/general/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Sidearm Pouch", 0, /obj/item/storage/pouch/pistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("First-Aid Pouch (Pill Packets)", 0, /obj/item/storage/pouch/firstaid/full/pills, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Large General Pouch", 0, /obj/item/storage/pouch/general/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("Large Magazine Pouch", 0, /obj/item/storage/pouch/magazine/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("Large Shotgun Shell Pouch", 0, /obj/item/storage/pouch/shotgun/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), list("Large Pistol Magazine Pouch", 0, /obj/item/storage/pouch/magazine/pistol/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), list("Medical Pouch", 0, /obj/item/storage/pouch/medical, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Document Pouch", 0, /obj/item/storage/pouch/document, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Shotgun Shell Pouch", 0, /obj/item/storage/pouch/shotgun, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Medical Kit Pouch", 0, /obj/item/storage/pouch/medkit, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Pistol Pouch", 0, /obj/item/storage/pouch/pistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Sling Pouch", 0, /obj/item/storage/pouch/sling, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Tools Pouch (Full)", 0, /obj/item/storage/pouch/tools/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("Construction Pouch", 0, /obj/item/storage/pouch/construction, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Electronics Pouch (Full)", 0, /obj/item/storage/pouch/electronics/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Flare Pouch (Full)", 0, /obj/item/storage/pouch/flare/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Fuel Tank Strap Pouch", 0, /obj/item/storage/pouch/flamertank, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), list("ACCESSORIES (CHOOSE 1)", 0, null, null, null), - list("Shoulder Holster", 0, /obj/item/clothing/accessory/storage/holster, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), - list("Black Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), + list("Black Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_RECOMMENDED), list("Brown Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest/brown_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), - list("Webbing", 0, /obj/item/clothing/accessory/storage/webbing, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), list("Drop Pouch", 0, /obj/item/clothing/accessory/storage/droppouch, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), - - list("HATS (CHOOSE 1)", 0, null, null, null), - list("Officer Beret", 0, /obj/item/clothing/head/beret/marine/chiefofficer, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), - list("Service Peaked Cap", 0, /obj/item/clothing/head/marine/peaked/service, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), - list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), - list("Officer Cap", 0, /obj/item/clothing/head/cmcap/bridge, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), + list("Webbing", 0, /obj/item/clothing/accessory/storage/webbing, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), + list("Shoulder Holster", 0, /obj/item/clothing/accessory/storage/holster, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), )) diff --git a/code/game/machinery/vending/vendor_types/crew/staff_officer.dm b/code/game/machinery/vending/vendor_types/crew/staff_officer.dm index 50b83ccdc54f..65fbf2917699 100644 --- a/code/game/machinery/vending/vendor_types/crew/staff_officer.dm +++ b/code/game/machinery/vending/vendor_types/crew/staff_officer.dm @@ -7,11 +7,11 @@ /obj/structure/machinery/cm_vending/clothing/staff_officer/get_listed_products(mob/user) return GLOB.cm_vending_clothing_staff_officer -//------------GEAR--------------- +//------------CLOTHING--------------- GLOBAL_LIST_INIT(cm_vending_clothing_staff_officer, list( list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null), - list("Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_SHOES, VENDOR_ITEM_MANDATORY), + list("Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_COMBAT_SHOES, VENDOR_ITEM_MANDATORY), list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY), list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), @@ -31,12 +31,24 @@ GLOBAL_LIST_INIT(cm_vending_clothing_staff_officer, list( list("Officer Cap", 0, /obj/item/clothing/head/cmcap/bridge, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED), list("Service Peaked Cap", 0, /obj/item/clothing/head/marine/peaked/service, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED), + list("PATCHES", 0, null, null, null), + list("Falling Falcons Shoulder Patch", 1, /obj/item/clothing/accessory/patch/falcon, null, VENDOR_ITEM_REGULAR), + list("USCM Shoulder Patch", 1, /obj/item/clothing/accessory/patch, null, VENDOR_ITEM_REGULAR), + list("PERSONAL SIDEARM (CHOOSE 1)", 0, null, null, null), list("M44 Revolver", 0, /obj/item/storage/belt/gun/m44/mp, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED), + list("Mod 88 Pistol", 0, /obj/item/storage/belt/gun/m4a3/mod88, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED), list("M4A3 Pistol", 0, /obj/item/storage/belt/gun/m4a3/commander, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED), list("VP78 Pistol", 0, /obj/item/storage/belt/gun/m4a3/vp78, MARINE_CAN_BUY_SECONDARY, VENDOR_ITEM_RECOMMENDED), + list("ACCESSORIES (CHOOSE 1)", 0, null, null, null), + list("Black Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_RECOMMENDED), + list("Brown Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest/brown_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), + list("Drop Pouch", 0, /obj/item/clothing/accessory/storage/droppouch, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), + list("Webbing", 0, /obj/item/clothing/accessory/storage/webbing, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), + list("Shoulder Holster", 0, /obj/item/clothing/accessory/storage/holster, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), + list("BACKPACK (CHOOSE 1)", 0, null, null, null), list("Backpack", 0, /obj/item/storage/backpack/marine, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_REGULAR), list("Satchel", 0, /obj/item/storage/backpack/marine/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_REGULAR), @@ -46,8 +58,85 @@ GLOBAL_LIST_INIT(cm_vending_clothing_staff_officer, list( list("Binoculars", 5,/obj/item/device/binoculars, null, VENDOR_ITEM_REGULAR), list("Rangefinder", 8, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR), list("Laser Designator", 12, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_RECOMMENDED), - list("Flashlight", 1, /obj/item/device/flashlight, null, VENDOR_ITEM_RECOMMENDED), + list("Flashlight", 1, /obj/item/device/flashlight, null, VENDOR_ITEM_REGULAR), + list("Motion Detector", 5, /obj/item/device/motiondetector, null, VENDOR_ITEM_RECOMMENDED), + list("Space Cleaner", 2, /obj/item/reagent_container/spray/cleaner, null, VENDOR_ITEM_REGULAR), + list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR), + )) + +/obj/structure/machinery/cm_vending/gear/staff_officer_armory + name = "\improper ColMarTech Staff Officer Armory Equipment Rack" + desc = "An automated combat equipment vendor for Staff Officers." + req_access = list(ACCESS_MARINE_COMMAND) + icon_state = "mar_rack" + vendor_role = list(JOB_SO) + +/obj/structure/machinery/cm_vending/gear/staff_officer_armory/get_listed_products(mob/user) + return GLOB.cm_vending_gear_staff_officer_armory + +//------------ARMORY--------------- + +GLOBAL_LIST_INIT(cm_vending_gear_staff_officer_armory, list( + list("COMBAT EQUIPMENT (TAKE ALL)", 0, null, null, null), + list("Officer M3 Armor", 0, /obj/item/clothing/suit/storage/marine/MP/SO, MARINE_CAN_BUY_COMBAT_ARMOR, VENDOR_ITEM_MANDATORY), + list("Officer M10 Helmet", 0, /obj/item/clothing/head/helmet/marine/MP/SO, MARINE_CAN_BUY_COMBAT_HELMET, VENDOR_ITEM_MANDATORY), + list("Marine Combat Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_COMBAT_SHOES, VENDOR_ITEM_MANDATORY), + list("Marine Combat Gloves", 0, /obj/item/clothing/gloves/marine, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), + list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), + list("Aviator Shades", 0, /obj/item/clothing/glasses/sunglasses/aviator, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), + list("Bayonet", 0, /obj/item/attachable/bayonet, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), + + list("SPECIALISATION KIT (CHOOSE 1)", 0, null, null, null), + list("Essential Engineer Set", 0, /obj/effect/essentials_set/engi, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY), + list("Essential Medical Set", 0, /obj/effect/essentials_set/medic, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY), + + list("BELT (CHOOSE 1)", 0, null, null, null), + list("G8-A General Utility Pouch", 0, /obj/item/storage/backpack/general_belt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 Ammo Load Rig", 0, /obj/item/storage/belt/marine, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Shotgun Shell Loading Rig", 0, /obj/item/storage/belt/shotgun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Toolbelt Rig (Full)", 0, /obj/item/storage/belt/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Lifesaver Bag (Full)", 0, /obj/item/storage/belt/medical/lifesaver/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), + list("M276 Medical Storage Rig (Full)", 0, /obj/item/storage/belt/medical/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 M39 Holster Rig", 0, /obj/item/storage/belt/gun/m39, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 Holster Toolrig (Full)", 0, /obj/item/storage/belt/gun/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 M82F Holster Rig", 0, /obj/item/storage/belt/gun/flaregun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M276 M40 Grenade Rig", 0, /obj/item/storage/belt/grenade, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + + list("POUCHES (CHOOSE 2)", 0, null, null, null), + list("Autoinjector Pouch", 0, /obj/item/storage/pouch/autoinjector/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("First-Aid Pouch (Splints, Gauze, Ointment)", 0, /obj/item/storage/pouch/firstaid/full/alternate, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("First-Aid Pouch (Pill Packets)", 0, /obj/item/storage/pouch/firstaid/full/pills, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Large General Pouch", 0, /obj/item/storage/pouch/general/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("Large Magazine Pouch", 0, /obj/item/storage/pouch/magazine/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("Large Shotgun Shell Pouch", 0, /obj/item/storage/pouch/shotgun/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("Large Pistol Magazine Pouch", 0, /obj/item/storage/pouch/magazine/pistol/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Medical Pouch", 0, /obj/item/storage/pouch/medical, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Medical Kit Pouch", 0, /obj/item/storage/pouch/medkit, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Pistol Pouch", 0, /obj/item/storage/pouch/pistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Sling Pouch", 0, /obj/item/storage/pouch/sling, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Tools Pouch (Full)", 0, /obj/item/storage/pouch/tools/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), + list("Construction Pouch", 0, /obj/item/storage/pouch/construction, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Electronics Pouch (Full)", 0, /obj/item/storage/pouch/electronics/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Flare Pouch (Full)", 0, /obj/item/storage/pouch/flare/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Fuel Tank Strap Pouch", 0, /obj/item/storage/pouch/flamertank, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + + list("MASK (CHOOSE 1)", 0, null, null, null), + list("Gas Mask", 0, /obj/item/clothing/mask/gas, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), + list("Heat Absorbent Coif", 0, /obj/item/clothing/mask/rebreather/scarf, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), + + list("OTHER SUPPLIES", 0, null, null, null), + list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR), + list("Insulated Gloves", 3, /obj/item/clothing/gloves/yellow, null, VENDOR_ITEM_REGULAR), + list("Entrenching Tool", 1, /obj/item/tool/shovel/etool, null, VENDOR_ITEM_REGULAR), + list("Magnetic Harness", 12, /obj/item/attachable/magnetic_harness, null, VENDOR_ITEM_RECOMMENDED), + list("Radio Telephone Pack", 15, /obj/item/storage/backpack/marine/satchel/rto, null, VENDOR_ITEM_RECOMMENDED), list("Motion Detector", 5, /obj/item/device/motiondetector, null, VENDOR_ITEM_RECOMMENDED), + list("Machete Scabbard (Full)", 5, /obj/item/storage/large_holster/machete/full, null, VENDOR_ITEM_REGULAR), + list("Binoculars", 5,/obj/item/device/binoculars, null, VENDOR_ITEM_REGULAR), + list("Rangefinder", 8, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR), + list("Laser Designator", 12, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_RECOMMENDED), + list("Fulton Recovery Device", 5, /obj/item/stack/fulton, null, VENDOR_ITEM_REGULAR), list("Space Cleaner", 2, /obj/item/reagent_container/spray/cleaner, null, VENDOR_ITEM_REGULAR), list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR), + list("Flashlight", 1, /obj/item/device/flashlight, null, VENDOR_ITEM_REGULAR), )) diff --git a/code/game/machinery/vending/vendor_types/crew/staff_officer_armory.dm b/code/game/machinery/vending/vendor_types/crew/staff_officer_armory.dm deleted file mode 100644 index 46de6ed028d0..000000000000 --- a/code/game/machinery/vending/vendor_types/crew/staff_officer_armory.dm +++ /dev/null @@ -1,89 +0,0 @@ -/obj/structure/machinery/cm_vending/clothing/staff_officer_armory - name = "\improper ColMarTech Staff Officer Armory Equipment Rack" - desc = "An automated combat equipment vendor for Staff Officers." - req_access = list(ACCESS_MARINE_COMMAND) - icon_state = "mar_rack" - vendor_role = list(JOB_SO) - -/obj/structure/machinery/cm_vending/clothing/staff_officer_armory/get_listed_products(mob/user) - return GLOB.cm_vending_clothing_staff_officer_armory - -//------------GEAR--------------- - -GLOBAL_LIST_INIT(cm_vending_clothing_staff_officer_armory, list( - list("COMBAT EQUIPMENT (TAKE ALL)", 0, null, null, null), - list("Officer M3 Armor", 0, /obj/item/clothing/suit/storage/marine/MP/SO, MARINE_CAN_BUY_COMBAT_ARMOR, VENDOR_ITEM_MANDATORY), - list("Officer M10 Helmet", 0, /obj/item/clothing/head/helmet/marine/MP/SO, MARINE_CAN_BUY_COMBAT_HELMET, VENDOR_ITEM_MANDATORY), - list("Marine Combat Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_SHOES, VENDOR_ITEM_MANDATORY), - list("Marine Combat Gloves", 0, /obj/item/clothing/gloves/marine, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_MANDATORY), - list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY), - list("Aviator Shades", 0, /obj/item/clothing/glasses/sunglasses/aviator, MARINE_CAN_BUY_GLASSES, VENDOR_ITEM_REGULAR), - list("Bayonet", 0, /obj/item/attachable/bayonet, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), - - list("SPECIALISATION KIT (CHOOSE 1)", 0, null, null, null), - list("Essential Engineer Set", 0, /obj/effect/essentials_set/engi, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_RECOMMENDED), - list("Essential Medical Set", 0, /obj/effect/essentials_set/medic, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_RECOMMENDED), - - list("BELT (CHOOSE 1)", 0, null, null, null), - list("G8-A General Utility Pouch", 0, /obj/item/storage/backpack/general_belt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("M276 Ammo Load Rig", 0, /obj/item/storage/belt/marine, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("M276 Toolbelt Rig (Full)", 0, /obj/item/storage/belt/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), - list("M276 Lifesaver Bag (Full)", 0, /obj/item/storage/belt/medical/lifesaver/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - list("M276 Medical Storage Rig (Full)", 0, /obj/item/storage/belt/medical/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - list("M276 M39 Holster Rig", 0, /obj/item/storage/belt/gun/m39, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - list("M276 M82F Holster Rig", 0, /obj/item/storage/belt/gun/flaregun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - list("M276 Shotgun Shell Loading Rig", 0, /obj/item/storage/belt/shotgun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - list("M276 M40 Grenade Rig", 0, /obj/item/storage/belt/grenade, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), - - list("POUCHES (CHOOSE 2)", 0, null, null, null), - list("Autoinjector Pouch", 0, /obj/item/storage/pouch/autoinjector, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Construction Pouch", 0, /obj/item/storage/pouch/construction, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Document Pouch", 0, /obj/item/storage/pouch/document, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Electronics Pouch (Full)", 0, /obj/item/storage/pouch/electronics/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Refillable Injectors)", 0, /obj/item/storage/pouch/firstaid/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Splints, Gauze, Ointment)", 0, /obj/item/storage/pouch/firstaid/full/alternate, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("First-Aid Pouch (Pill Packets)", 0, /obj/item/storage/pouch/firstaid/full/pills, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("First Responder Pouch", 0, /obj/item/storage/pouch/first_responder, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Flare Pouch (Full)", 0, /obj/item/storage/pouch/flare/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Fuel Tank Strap Pouch", 0, /obj/item/storage/pouch/flamertank, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Large General Pouch", 0, /obj/item/storage/pouch/general/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), - list("Large Magazine Pouch", 0, /obj/item/storage/pouch/magazine/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Large Shotgun Shell Pouch", 0, /obj/item/storage/pouch/shotgun/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Large Pistol Magazine Pouch", 0, /obj/item/storage/pouch/magazine/pistol/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Medical Pouch", 0, /obj/item/storage/pouch/medical, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Medical Kit Pouch", 0, /obj/item/storage/pouch/medkit, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Pistol Pouch", 0, /obj/item/storage/pouch/pistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Sling Pouch", 0, /obj/item/storage/pouch/sling, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - list("Tools Pouch (Full)", 0, /obj/item/storage/pouch/tools/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), - - list("ACCESSORIES (CHOOSE 1)", 0, null, null, null), - list("Black Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), - list("Brown Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest/brown_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_RECOMMENDED), - list("Drop Pouch", 0, /obj/item/clothing/accessory/storage/droppouch, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), - list("Webbing", 0, /obj/item/clothing/accessory/storage/webbing, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), - list("Shoulder Holster", 0, /obj/item/clothing/accessory/storage/holster, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), - - list("MASK (CHOOSE 1)", 0, null, null, null), - list("Gas Mask", 0, /obj/item/clothing/mask/gas, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), - list("Heat Absorbent Coif", 0, /obj/item/clothing/mask/rebreather/scarf, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), - - list("OTHER SUPPLIES", 0, null, null, null), - list("Medical Helmet Optic", 5, /obj/item/device/helmet_visor/medical, null, VENDOR_ITEM_REGULAR), - list("Welding Visor", 5, /obj/item/device/helmet_visor/welding_visor, null, VENDOR_ITEM_REGULAR), - list("Magnetic Harness", 12, /obj/item/attachable/magnetic_harness, null, VENDOR_ITEM_REGULAR), - list("Radio Telephone Pack", 15, /obj/item/storage/backpack/marine/satchel/rto, null, VENDOR_ITEM_RECOMMENDED), - list("Binoculars", 5,/obj/item/device/binoculars, null, VENDOR_ITEM_REGULAR), - list("Rangefinder", 8, /obj/item/device/binoculars/range, null, VENDOR_ITEM_REGULAR), - list("Laser Designator", 12, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_RECOMMENDED), - list("Data Detector", 5, /obj/item/device/motiondetector/intel, null, VENDOR_ITEM_REGULAR), - list("Flashlight", 1, /obj/item/device/flashlight, null, VENDOR_ITEM_RECOMMENDED), - list("Fulton Recovery Device", 5, /obj/item/stack/fulton, null, VENDOR_ITEM_REGULAR), - list("Motion Detector", 5, /obj/item/device/motiondetector, null, VENDOR_ITEM_REGULAR), - list("Space Cleaner", 2, /obj/item/reagent_container/spray/cleaner, null, VENDOR_ITEM_REGULAR), - list("Blowtorch", 5, /obj/item/tool/weldingtool, null, VENDOR_ITEM_REGULAR), - list("Wrench", 1, /obj/item/tool/wrench, null, VENDOR_ITEM_REGULAR), - list("Crowbar", 1, /obj/item/tool/crowbar, null, VENDOR_ITEM_REGULAR), - list("Entrenching Tool", 1, /obj/item/tool/shovel/etool, null, VENDOR_ITEM_REGULAR), - list("Whistle", 5, /obj/item/device/whistle, null, VENDOR_ITEM_REGULAR), - list("Machete Scabbard (Full)", 5, /obj/item/storage/large_holster/machete/full, null, VENDOR_ITEM_REGULAR) - )) diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index fee0cde601aa..a4328bad5ea4 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -140,6 +140,7 @@ list("Powerloader Certification", 0.75, /obj/item/pamphlet/skill/powerloader, VENDOR_ITEM_REGULAR), list("Spare PDT/L Battle Buddy Kit", floor(scale * 4), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR), list("W-Y brand rechargeable mini-battery", floor(scale * 3), /obj/item/cell/crap, VENDOR_ITEM_REGULAR), + list("Nailgun Magazine (7x45mm)", floor(scale * 4), /obj/item/ammo_magazine/smg/nailgun, VENDOR_ITEM_REGULAR), list("EXPLOSIVES BOXES", -1, null, null), list("M15 Fragmentation Grenade Packet", 0, /obj/item/storage/box/packet/m15, VENDOR_ITEM_REGULAR), @@ -161,7 +162,8 @@ list("OTHER BOXES", -1, null, null), list("Box of M94 Marking Flare Packs", 0, /obj/item/ammo_box/magazine/misc/flares, VENDOR_ITEM_REGULAR), list("Box of M89 Signal Flare Packs", 0, /obj/item/ammo_box/magazine/misc/flares/signal, VENDOR_ITEM_REGULAR), - list("Box of High-Capacity Power Cells", 0, /obj/item/ammo_box/magazine/misc/power_cell, VENDOR_ITEM_REGULAR) + list("Box of High-Capacity Power Cells", 0, /obj/item/ammo_box/magazine/misc/power_cell, VENDOR_ITEM_REGULAR), + list("Nailgun Magazine Box (7x45mm)", floor(scale * 2), /obj/item/ammo_box/magazine/nailgun, VENDOR_ITEM_REGULAR) ) /obj/structure/machinery/cm_vending/sorted/cargo_guns/stock(obj/item/item_to_stock, mob/user) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm index 29299654899e..53ce7986f195 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm @@ -138,6 +138,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_engi, list( list("M276 Mortar Operator Belt", 0, /obj/item/storage/belt/gun/mortarbelt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), list("M276 Toolbelt Rig (Full)", 0, /obj/item/storage/belt/utility/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_MANDATORY), list("M276 M40 Grenade Rig", 0, /obj/item/storage/belt/grenade, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR), + list("M277 Pattern Construction Rig", 0, /obj/item/storage/belt/utility/construction, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED), list("POUCHES (CHOOSE 2)", 0, null, null, null), list("Construction Pouch", 0, /obj/item/storage/pouch/construction, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_RECOMMENDED), @@ -153,6 +154,8 @@ GLOBAL_LIST_INIT(cm_vending_clothing_engi, list( list("Medium General Pouch", 0, /obj/item/storage/pouch/general/medium, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), list("Pistol Pouch", 0, /obj/item/storage/pouch/pistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), list("Tools Pouch (Full)", 0, /obj/item/storage/pouch/tools/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("Engineer kit Pouch", 0, /obj/item/storage/pouch/engikit, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR), + list("ACCESSORIES (CHOOSE 1)", 0, null, null, null), list("Black Webbing Vest", 0, /obj/item/clothing/accessory/storage/black_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), @@ -160,6 +163,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_engi, list( list("Shoulder Holster", 0, /obj/item/clothing/accessory/storage/holster, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), list("Webbing", 0, /obj/item/clothing/accessory/storage/webbing, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), list("Drop Pouch", 0, /obj/item/clothing/accessory/storage/droppouch, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), + list("Small Tool Webbing (Full)", 0, /obj/item/clothing/accessory/storage/tool_webbing/small/equipped, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR), list("MASK (CHOOSE 1)", 0, null, null, null), list("Gas Mask", 0, /obj/item/clothing/mask/gas, MARINE_CAN_BUY_MASK, VENDOR_ITEM_REGULAR), @@ -211,4 +215,5 @@ GLOBAL_LIST_INIT(cm_vending_clothing_engi, list( /obj/item/cell/high, /obj/item/tool/shovel/etool/folded, /obj/item/device/lightreplacer, + /obj/item/weapon/gun/smg/nailgun/compact/tactical, ) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm index 45e63b36a5c8..917bf2850997 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_medic.dm @@ -237,4 +237,6 @@ GLOBAL_LIST_INIT(cm_vending_clothing_medic, list( /obj/item/storage/surgical_case/regular, /obj/item/reagent_container/blood/OMinus, /obj/item/reagent_container/blood/OMinus, + /obj/item/device/flashlight/pen, + /obj/item/clothing/accessory/stethoscope, ) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index a799ff25d051..ff43ca68657d 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -339,7 +339,8 @@ list("Binoculars", floor(scale * 1), /obj/item/device/binoculars, VENDOR_ITEM_REGULAR), list("MB-6 Folding Barricades (x3)", floor(scale * 2), /obj/item/stack/folding_barricade/three, VENDOR_ITEM_REGULAR), list("Spare PDT/L Battle Buddy Kit", floor(scale * 3), /obj/item/storage/box/pdt_kit, VENDOR_ITEM_REGULAR), - list("W-Y brand rechargeable mini-battery", floor(scale * 2.5), /obj/item/cell/crap, VENDOR_ITEM_REGULAR) + list("W-Y brand rechargeable mini-battery", floor(scale * 2.5), /obj/item/cell/crap, VENDOR_ITEM_REGULAR), + list("Nailgun Magazine (7x45mm)", floor(scale * 4), /obj/item/ammo_magazine/smg/nailgun, VENDOR_ITEM_REGULAR) ) //--------------SQUAD ATTACHMENTS VENDOR-------------- diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm index 60afed8b984d..bedffdec7f90 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm @@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_smartgun, list( list("SU-6 Smart Pistol", 15, /obj/item/storage/box/guncase/smartpistol, null, VENDOR_ITEM_REGULAR), list("CLOTHING ITEMS", 0, null, null, null), - list("Machete Scabbard (Full)", 6, /obj/item/storage/large_holster/machete/full, null, VENDOR_ITEM_REGULAR), + list("Smartgunner Machete Scabbard", 15, /obj/item/storage/large_holster/machete/smartgunner/full, null, VENDOR_ITEM_REGULAR), list("Fuel Tank Strap Pouch", 5, /obj/item/storage/pouch/flamertank, null, VENDOR_ITEM_REGULAR), list("Large General Pouch", 6, /obj/item/storage/pouch/general/large, null, VENDOR_ITEM_REGULAR), diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 34da5e3d2623..45fbd5d4ba2b 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -125,6 +125,10 @@ var/obj/vehicle/multitile/V = atm V.handle_acidic_environment(src) continue + if (istype(loc, /turf/open)) + var/turf/open/scorch_turf_target = loc + if(scorch_turf_target.scorchable) + scorch_turf_target.scorch(damage_amount) START_PROCESSING(SSobj, src) addtimer(CALLBACK(src, PROC_REF(die)), time_to_live) @@ -148,7 +152,7 @@ ..() if(AM == cause_data.resolve_mob()) return - + if(isliving(AM)) var/mob/living/living_mob = AM if(living_mob.ally_of_hivenumber(hivenumber)) diff --git a/code/game/objects/effects/effect_system/chemsmoke.dm b/code/game/objects/effects/effect_system/chemsmoke.dm index 1b22ed6054eb..41b58ba39e77 100644 --- a/code/game/objects/effects/effect_system/chemsmoke.dm +++ b/code/game/objects/effects/effect_system/chemsmoke.dm @@ -57,10 +57,11 @@ targetTurfs = new() //build affected area list - for(var/turf/T in view(range, location)) + FOR_DVIEW(var/turf/T, range, location, HIDE_INVISIBLE_OBSERVER) //cull turfs to circle if(cheap_pythag(T.x - location.x, T.y - location.y) <= range) targetTurfs += T + FOR_DVIEW_END //make secondary list for reagents that affect walls if(chemholder.reagents.has_reagent("thermite") || chemholder.reagents.has_reagent("plantbgone")) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 03e1f126e9d8..d8bf3d9d8f79 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -163,6 +163,9 @@ /// How much to offset the item randomly either way alongside Y visually var/ground_offset_y = 0 + /// Special storages this item prioritizes + var/list/preferred_storage + /obj/item/Initialize(mapload, ...) . = ..() diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 80044e2fab3e..f90e54ef7854 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -171,24 +171,24 @@ name = "corporate doctor badge" desc = "A corporate holo-badge. It is fingerprint locked with clearance level 3 access. It is commonly held by corporate doctors." icon_state = "clearance" - var/clearance_access = 3 + var/credits_to_give = 15 //gives the equivalent clearance access in credits /obj/item/card/id/silver/clearance_badge/scientist name = "corporate scientist badge" desc = "A corporate holo-badge. It is fingerprint locked with clearance level 4 access. It is commonly held by corporate scientists." - clearance_access = 4 + credits_to_give = 27 /obj/item/card/id/silver/clearance_badge/cl name = "corporate liaison badge" desc = "A corporate holo-badge in unique corporate orange and white. It is fingerprint locked with clearance level 5 access. It is commonly held by corporate liaisons." icon_state = "cl" - clearance_access = 5 + credits_to_give = 42 /obj/item/card/id/silver/clearance_badge/manager name = "corporate manager badge" desc = "A corporate holo-badge in standard corporate orange and white. It has a unique uncapped bottom. It is fingerprint locked with 5-X clearance level. Commonly held by corporate managers." icon_state = "pmc" - clearance_access = 6 + credits_to_give = 47 /obj/item/card/id/pizza name = "pizza guy badge" diff --git a/code/game/objects/items/circuitboards/computer.dm b/code/game/objects/items/circuitboards/computer.dm index 43215faf0fbb..58ff86130cd6 100644 --- a/code/game/objects/items/circuitboards/computer.dm +++ b/code/game/objects/items/circuitboards/computer.dm @@ -180,7 +180,7 @@ else if(HAS_TRAIT(tool, TRAIT_TOOL_BLACKMARKET_HACKER)) to_chat(user, SPAN_WARNING("You start messing around with the electronics of [src]...")) if(do_after(user, 8 SECONDS, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea what you're doing.")) return to_chat(user, SPAN_WARNING("Huh? You find a processor bus with the letters 'B.M.' written in white crayon over it. You start fiddling with it.")) diff --git a/code/game/objects/items/devices/cictablet.dm b/code/game/objects/items/devices/cictablet.dm index 597886a0cb85..c53301295fe3 100644 --- a/code/game/objects/items/devices/cictablet.dm +++ b/code/game/objects/items/devices/cictablet.dm @@ -104,7 +104,7 @@ return FALSE var/input = stripped_multiline_input(user, "Please write a message to announce to the [MAIN_SHIP_NAME]'s crew and all groundside personnel.", "Priority Announcement", "") - if(!input || !COOLDOWN_FINISHED(src, announcement_cooldown) || !(user in view(1, src))) + if(!input || !COOLDOWN_FINISHED(src, announcement_cooldown) || !(user in dview(1, src))) return FALSE var/signed = null diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index e506f51ce21c..de2a328de370 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -62,9 +62,9 @@ on = !on set_light_on(on) update_icon() - for(var/X in actions) - var/datum/action/A = X - A.update_button_icon() + for(var/xman in actions) + var/datum/action/active = xman + active.update_button_icon() return TRUE @@ -73,68 +73,71 @@ on = FALSE set_light_on(on) update_icon() - for(var/X in actions) - var/datum/action/A = X - A.update_button_icon() + for(var/xman in actions) + var/datum/action/active = xman + active.update_button_icon() return 1 return 0 -/obj/item/device/flashlight/attackby(obj/item/I as obj, mob/user as mob) - if(HAS_TRAIT(I, TRAIT_TOOL_SCREWDRIVER)) +/obj/item/device/flashlight/attackby(obj/item/item as obj, mob/user as mob) + if(HAS_TRAIT(item, TRAIT_TOOL_SCREWDRIVER)) if(!raillight_compatible) //No fancy messages, just no return if(on) to_chat(user, SPAN_WARNING("Turn off [src] first.")) return if(isstorage(loc)) - var/obj/item/storage/S = loc - S.remove_from_storage(src) + var/obj/item/storage/container = loc + container.remove_from_storage(src) if(loc == user) user.drop_inv_item_on_ground(src) //This part is important to make sure our light sources update, as it calls dropped() - var/obj/item/attachable/flashlight/F = new(src.loc) - user.put_in_hands(F) //This proc tries right, left, then drops it all-in-one. + var/obj/item/attachable/flashlight/flash = new(src.loc) + user.put_in_hands(flash) //This proc tries right, left, then drops it all-in-one. to_chat(user, SPAN_NOTICE("You modify [src]. It can now be mounted on a weapon.")) - to_chat(user, SPAN_NOTICE("Use a screwdriver on [F] to change it back.")) + to_chat(user, SPAN_NOTICE("Use a screwdriver on [flash] to change it back.")) qdel(src) //Delete da old flashlight return else ..() -/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/device/flashlight/attack(mob/living/carbon/human/being as mob, mob/living/user as mob) add_fingerprint(user) if(on && user.zone_selected == "eyes") if((user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head - if((!ishuman(user) || SSticker) && SSticker.mode.name != "monkey") //don't have dexterity + if (!(ishuman(user) || SSticker) && SSticker.mode.name != "monkey") //don't have dexterity to_chat(user, SPAN_NOTICE("You don't have the dexterity to do this!")) return - var/mob/living/carbon/human/H = M //mob has protective eyewear - if(ishuman(H) && ((H.head && H.head.flags_inventory & COVEREYES) || (H.wear_mask && H.wear_mask.flags_inventory & COVEREYES) || (H.glasses && H.glasses.flags_inventory & COVEREYES))) - to_chat(user, SPAN_NOTICE("You're going to need to remove that [(H.head && H.head.flags_inventory & COVEREYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_inventory & COVEREYES) ? "mask": "glasses"] first.")) + var/mob/living/carbon/human/beingB = being //mob has protective eyewear + if(ishuman(beingB) && ((beingB.head && beingB.head.flags_inventory & COVEREYES) || (beingB.wear_mask && beingB.wear_mask.flags_inventory & COVEREYES) || (beingB.glasses && beingB.glasses.flags_inventory & COVEREYES))) + to_chat(user, SPAN_NOTICE("You're going to need to remove [(beingB.head && beingB.head.flags_inventory & COVEREYES) ? "that helmet" : (beingB.wear_mask && beingB.wear_mask.flags_inventory & COVEREYES) ? "that mask": "those glasses"] first.")) return - if(M == user) //they're using it on themselves - M.flash_eyes() - M.visible_message(SPAN_NOTICE("[M] directs [src] to \his eyes."), \ - SPAN_NOTICE("You wave the light in front of your eyes! Trippy!")) + if(being == user) //they're using it on themselves + being.flash_eyes() + being.visible_message(SPAN_NOTICE("[being] directs [src] to [being.p_their()] eyes."), \ + SPAN_NOTICE("You wave the light in front of your eyes! Wow, that's trippy!")) return - user.visible_message(SPAN_NOTICE("[user] directs [src] to [M]'s eyes."), \ - SPAN_NOTICE("You direct [src] to [M]'s eyes.")) - - if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected - if(M.stat == DEAD || M.sdisabilities & DISABILITY_BLIND) //mob is dead or fully blind - to_chat(user, SPAN_NOTICE("[M] pupils does not react to the light!")) - else //they're okay! - M.flash_eyes() - to_chat(user, SPAN_NOTICE("[M]'s pupils narrow.")) + user.visible_message(SPAN_NOTICE("[user] directs [src] to [being]'s eyes."), \ + SPAN_NOTICE("You direct [src] to [being]'s eyes.")) + + if(ishuman_strict(being)) //robots and aliens are unaffected + var/datum/internal_organ/eyes/eyes = being.internal_organs_by_name["eyes"] + var/datum/internal_organ/brain/brain = being.internal_organs_by_name["brain"] + if(being.stat == DEAD || being.sdisabilities & DISABILITY_BLIND || eyes.organ_status == ORGAN_BROKEN || brain.organ_status == ORGAN_BROKEN) //mob is dead, fully blind, or their eyes are + to_chat(user, SPAN_NOTICE("[being]'s pupils do not react to the light!")) + else //they're okay! Well, probably + being.flash_eyes() + to_chat(user, SPAN_NOTICE("[being]'s pupils narrow.")) + return else return ..() -/obj/item/device/flashlight/attack_alien(mob/living/carbon/xenomorph/M) +/obj/item/device/flashlight/attack_alien(mob/living/carbon/xenomorph/being) . = ..() if(on && can_be_broken) @@ -147,14 +150,75 @@ /obj/item/device/flashlight/pen name = "penlight" - desc = "A pen-sized light, used by medical staff." + desc = "A pen-sized light, used by medical staff to check the condition of eyes, brain, and the overall awareness of patients." icon_state = "penlight" item_state = "" + flags_equip_slot = SLOT_WAIST|SLOT_EAR|SLOT_SUIT_STORE flags_atom = FPRINT|CONDUCT light_range = 2 w_class = SIZE_TINY + throw_speed = SPEED_VERY_FAST + throw_range = 15 + matter = list("metal" = 10,"glass" = 5) raillight_compatible = 0 +/obj/item/device/flashlight/pen/attack(mob/living/carbon/human/being as mob, mob/living/user as mob) + add_fingerprint(user) + if(user.a_intent == INTENT_HELP) + if(on && user.zone_selected == "eyes") + if(!ishuman_strict(being)) //robots and aliens are unaffected + return + var/reaction = null + if(isnull(being.internal_organs_by_name)) + reaction = "discover that indeed [being.p_they()] have nothing to be checked" + return // they have no organs somehow + if(being == user) //they're using it on themselves + being.flash_eyes() + being.visible_message(SPAN_NOTICE("[being] directs [src] to [being.p_their()] eyes."), \ + SPAN_NOTICE("You wave the light in front of your eyes! Wow, that's trippy!")) + return + if(being.stat == DEAD || (being.status_flags&FAKEDEATH)) + reaction = "conclude that [being.p_their()] eyes are completely lifeless, [being.p_they()] must have passed away" + else + var/datum/internal_organ/eyes/eyes = being.internal_organs_by_name["eyes"] + var/datum/internal_organ/brain/brain = being.internal_organs_by_name["brain"] + if(skillcheck(user, SKILL_MEDICAL, SKILL_MEDICAL_MEDIC)) + if(eyes) + switch(eyes.organ_status) + if(ORGAN_LITTLE_BRUISED) + being.flash_eyes() + reaction = "notice that [being.p_their()] eyes are reacting to the light, but [being.p_their()] pupils seen to react sluggishly and with small delays, [being.p_their()] vision is probably a little impaired" + if(ORGAN_BRUISED) + being.flash_eyes() + reaction = "observe that [being.p_their()] eyes are unrealiably reacting to the light, with [being.p_their()] pupils reacting very sluggishly and with noticeable delays, it is probable that [being.p_their()] vision is remarkably impaired" + if(ORGAN_BROKEN) + reaction = "notice that [being.p_their()] eyes are not reacting to the light, and the pupils of both eyes are not constricting with the light shine at all, [being.p_they()] is probably blind" + else + being.flash_eyes() + reaction = "perceive that [being.p_their()] eyes and pupils are normally reacting to the light, [being.p_they()] is probably seeing without problems" + if(brain) + if(reaction) + reaction += ". You also " + switch(brain.organ_status) + if(ORGAN_LITTLE_BRUISED) + being.flash_eyes() + reaction += "notice that the pupils are consensually constricting with a significant delay when light is separately applied to each eye, meaning that [being.p_they()] possibly have subtle brain damage" + if(ORGAN_BRUISED) + being.flash_eyes() + reaction += "notice that the pupils are not consensually constricting when light is separately applied to each eye, meaning possible brain damage" + if(ORGAN_BROKEN) + reaction += "notice that the pupils have different sizes and are assymmetric, [being.p_they()] possibly have severe brain damage" + else + being.flash_eyes() + reaction += "notice that the pupils are consensually and normally constricting when light is separately applied to each eye, [being.p_their()] brain is probably fine" + else + reaction = "can't see anything at all, weirdly enough" + else + being.flash_eyes() + reaction = "don't really know what you are looking for, you don't know anything about medicine" + user.visible_message("[user] directs [src] to [being]'s eyes.", "You point [src] to [being.p_their()] eyes to begin analysing them further and... you [reaction].") + return ..() + /obj/item/device/flashlight/drone name = "low-power flashlight" desc = "A miniature lamp, that might be used by small robots." @@ -364,9 +428,9 @@ user.visible_message(SPAN_NOTICE("[user] activates the flare."), SPAN_NOTICE("You pull the cord on the flare, activating it!")) playsound(src,'sound/handling/flare_activate_2.ogg', 50, 1) //cool guy sound turn_on() - var/mob/living/carbon/U = user - if(istype(U) && !U.throw_mode) - U.toggle_throw_mode(THROW_MODE_NORMAL) + var/mob/living/carbon/enjoyer = user + if(istype(enjoyer) && !enjoyer.throw_mode) + enjoyer.toggle_throw_mode(THROW_MODE_NORMAL) /obj/item/device/flashlight/flare/proc/activate_signal(mob/living/carbon/human/user) return diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index a92135b9d7ed..73e5b86a69eb 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -18,6 +18,7 @@ matter = list("metal" = 50,"glass" = 20) inherent_traits = list(TRAIT_TOOL_MULTITOOL) + preferred_storage = list(/obj/item/clothing/accessory/storage/tool_webbing = WEAR_ACCESSORY) var/hack_speed = 10 SECONDS // Only used for vendors right now var/next_scan @@ -46,7 +47,7 @@ /obj/item/device/multitool/attack_self(mob/user) ..() - if(world.time < next_scan || !ishuman(user) || !skillcheck(user,SKILL_ENGINEER,SKILL_ENGINEER_TRAINED)) + if(world.time < next_scan || !ishuman(user) || !skillcheck(user,SKILL_ENGINEER,SKILL_ENGINEER_NOVICE)) return next_scan = world.time + 15 diff --git a/code/game/objects/items/devices/pinpointer.dm b/code/game/objects/items/devices/pinpointer.dm index 2f5d9ffe9d5f..3dd9fdaf1253 100644 --- a/code/game/objects/items/devices/pinpointer.dm +++ b/code/game/objects/items/devices/pinpointer.dm @@ -126,10 +126,10 @@ mode = 1 var/locationx = tgui_input_real_number(usr, "Please input the x coordinate to search for.", "Location?") - if(!locationx || !(usr in view(1,src))) + if(!locationx || !(usr in dview(1, src))) return var/locationy = tgui_input_real_number(usr, "Please input the y coordinate to search for.", "Location?") - if(!locationy || !(usr in view(1,src))) + if(!locationy || !(usr in dview(1, src))) return var/turf/Z = get_turf(src) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 8c507dad18e3..0e7680cd2f7d 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -329,7 +329,7 @@ FORENSIC SCANNER if(!(istype(user, /mob/living/carbon/human) || SSticker) && SSticker.mode.name != "monkey") to_chat(user, SPAN_DANGER("You don't have the dexterity to do this!")) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not know how to use the [name].")) return if(!istype(O)) diff --git a/code/game/objects/items/devices/teleportation.dm b/code/game/objects/items/devices/teleportation.dm index d64e717a3095..003f3152800d 100644 --- a/code/game/objects/items/devices/teleportation.dm +++ b/code/game/objects/items/devices/teleportation.dm @@ -152,7 +152,7 @@ else L["[com.id] (Inactive)"] = com.locked var/list/turfs = list( ) - for(var/turf/T in orange(10)) + for(var/turf/T as anything in ORANGE_TURFS(10, src)) if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb if(T.y>world.maxy-8 || T.y<8) continue turfs += T diff --git a/code/game/objects/items/explosives/explosive.dm b/code/game/objects/items/explosives/explosive.dm index 1bd6985bc015..0be81ba8a0ed 100644 --- a/code/game/objects/items/explosives/explosive.dm +++ b/code/game/objects/items/explosives/explosive.dm @@ -259,7 +259,7 @@ to_chat(usr, SPAN_DANGER("This is beyond your understanding...")) return - if(!skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_DANGER("You have no idea how to use this...")) return diff --git a/code/game/objects/items/explosives/grenades/marines.dm b/code/game/objects/items/explosives/grenades/marines.dm index 09c0197cda7f..fef62ab6a835 100644 --- a/code/game/objects/items/explosives/grenades/marines.dm +++ b/code/game/objects/items/explosives/grenades/marines.dm @@ -97,6 +97,8 @@ falloff_mode = EXPLOSION_FALLOFF_SHAPE_LINEAR /obj/item/explosive/grenade/high_explosive/frag/toy + AUTOWIKI_SKIP(TRUE) + name = "toy HEFA grenade" desc = "High-Explosive Fragmenting-Antipersonnel. A small, but deceptively strong fragmentation grenade that has been phasing out the M15 fragmentation grenades alongside the M40 HEDP. Capable of being loaded in the M92 Launcher, or thrown by hand. Wait, the labeling on the side indicates this is a toy, what the hell?" explosion_power = 0 @@ -865,6 +867,8 @@ return /obj/item/explosive/grenade/high_explosive/holy_hand_grenade + AUTOWIKI_SKIP(TRUE) + name = "\improper Holy Hand Grenade of Antioch" desc = "And Saint Attila raised the hand grenade up on high, saying, \"O LORD, bless this Thy hand grenade that with it Thou mayest blow Thine enemies to tiny bits, in Thy mercy.\" And the LORD did grin and the people did feast upon the lambs and sloths and carp and anchovies... And the LORD spake, saying, \"First shalt thou take out the Holy Pin, then shalt thou count to three, no more, no less. Three shall be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out. Once the number three, being the third number, be reached, then lobbest thou thy Holy Hand Grenade of Antioch towards thy foe, who, being naughty in My sight, shall snuff it.\"" icon_state = "grenade_antioch" diff --git a/code/game/objects/items/explosives/plastic.dm b/code/game/objects/items/explosives/plastic.dm index 58cbca9a5ab3..c6a3dfaed5f9 100644 --- a/code/game/objects/items/explosives/plastic.dm +++ b/code/game/objects/items/explosives/plastic.dm @@ -25,7 +25,7 @@ antigrief_protection = TRUE //Should it be checked by antigrief? var/req_skill = SKILL_ENGINEER - var/req_skill_level = SKILL_ENGINEER_TRAINED + var/req_skill_level = SKILL_ENGINEER_NOVICE /obj/item/explosive/plastic/Destroy() disarm() @@ -46,7 +46,7 @@ . = ..() /obj/item/explosive/plastic/attack_self(mob/user) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) to_chat(user, SPAN_WARNING("You don't seem to know how to use [src]...")) return diff --git a/code/game/objects/items/props/helmetgarb.dm b/code/game/objects/items/props/helmetgarb.dm index 5b9b81804311..9da509d16c5a 100644 --- a/code/game/objects/items/props/helmetgarb.dm +++ b/code/game/objects/items/props/helmetgarb.dm @@ -176,12 +176,12 @@ if(src != user.get_inactive_hand()) to_chat(user, SPAN_WARNING("You need to hold \the [src] in hand in order to repair them.")) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) // level 2 is enough to repair damaged NVG + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) // level 2 is enough to repair damaged NVG to_chat(user, SPAN_WARNING("You are not trained to repair electronics...")) return if(shape == NVG_SHAPE_BROKEN) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) // level 3 is needed to repair broken NVG + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) // level 3 is needed to repair broken NVG to_chat(user, SPAN_WARNING("Repair of this complexity is too difficult for you, find someone more trained.")) return diff --git a/code/game/objects/items/reagent_containers/food/snacks/grown.dm b/code/game/objects/items/reagent_containers/food/snacks/grown.dm index 55ed8c8d34f0..7f05128c7e1b 100644 --- a/code/game/objects/items/reagent_containers/food/snacks/grown.dm +++ b/code/game/objects/items/reagent_containers/food/snacks/grown.dm @@ -584,19 +584,14 @@ src.visible_message(SPAN_NOTICE("The [src.name] has been squashed."),SPAN_MODERATE("You hear a smack.")) qdel(src) return - for(var/turf/T in orange(M,outer_teleport_radius)) - if(T in orange(M,inner_teleport_radius)) continue + for(var/turf/T as anything in (RANGE_TURFS(outer_teleport_radius, M) - RANGE_TURFS(inner_teleport_radius, M))) if(istype(T,/turf/open/space)) continue if(T.density) continue if(T.x>world.maxx-outer_teleport_radius || T.xworld.maxy-outer_teleport_radius || T.y world.time) return tool_cooldown = world.time + 10 - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You are not trained to assemble [src]...")) return @@ -112,7 +112,7 @@ return if(HAS_TRAIT(item, TRAIT_TOOL_CROWBAR)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You are not trained to modify [src]...")) return playsound(src.loc, 'sound/items/Crowbar.ogg', 25, 1) @@ -136,7 +136,7 @@ if(busy || tool_cooldown > world.time) return tool_cooldown = world.time + 10 - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You are not trained to assemble [src]...")) return if(!do_after(user, 10, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, src)) @@ -151,7 +151,7 @@ if(busy || tool_cooldown > world.time) return tool_cooldown = world.time + 10 - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You are not trained to assemble [src]...")) return if(!do_after(user, 10, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD, src)) @@ -169,7 +169,7 @@ if(busy || tool_cooldown > world.time) return tool_cooldown = world.time + 10 - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You are not trained to assemble [src]...")) return var/turf/open/T = loc @@ -190,7 +190,7 @@ if(busy || tool_cooldown > world.time) return tool_cooldown = world.time + 10 - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You are not trained to assemble [src]...")) return user.visible_message(SPAN_NOTICE("[user] starts unseating [src]'s panels."), diff --git a/code/game/objects/structures/barricade/non_folding.dm b/code/game/objects/structures/barricade/non_folding.dm index 9f13cd4645f5..575f1da738bf 100644 --- a/code/game/objects/structures/barricade/non_folding.dm +++ b/code/game/objects/structures/barricade/non_folding.dm @@ -48,7 +48,7 @@ if(!..()) return FALSE - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) if(!silent) to_chat(user, SPAN_WARNING("You're not trained to repair [src]...")) return FALSE diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 93fe78e63d98..77da397b7b0a 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -127,6 +127,8 @@ var/obj/item/explosive/plastic/P = I if(P.active) continue + if(istype(I, /obj/item/phone)) + continue var/item_size = ceil(I.w_class / 2) if(stored_units + item_size > storage_capacity) continue diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 8a10cd4d93ea..59e74100cb5c 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -90,6 +90,8 @@ var/obj/structure/bed/B = O if(B.buckled_mob) continue + if(istype(O, /obj/item/phone)) + continue O.forceMove(src) itemcount++ diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index 7c602c34380f..93d9d7727e5d 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -153,6 +153,10 @@ M.apply_damage(20) health -= 50 + M.attack_log += text("\[[time_stamp()]\] was slammed against [src] by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] slammed [key_name(M)] against [src]") + msg_admin_attack("[key_name(user)] slammed [key_name(M)] against [src] at [get_area_name(M)]", M.loc.x, M.loc.y, M.loc.z) + healthcheck(1, 1, M) //The person thrown into the window literally shattered it return diff --git a/code/game/objects/structures/pipes/standard/standard_misc.dm b/code/game/objects/structures/pipes/standard/standard_misc.dm index dc52da57c750..d0028ce862cb 100644 --- a/code/game/objects/structures/pipes/standard/standard_misc.dm +++ b/code/game/objects/structures/pipes/standard/standard_misc.dm @@ -120,6 +120,7 @@ dir = SOUTH valid_directions = list(SOUTH) density = TRUE + layer = OBJ_LAYER var/actual_icon_state = "air" /obj/structure/pipes/standard/tank/New() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index a1542f7baf75..760633348b81 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -385,9 +385,11 @@ to_chat(usr, SPAN_WARNING("You have moved a table too recently.")) return FALSE - for(var/mob/living/mob_behind_table in oview(src, 0)) + FOR_DOVIEW(var/mob/living/mob_behind_table, 0, src, HIDE_INVISIBLE_OBSERVER) to_chat(usr, SPAN_WARNING("[mob_behind_table] is in the way of [src].")) + FOR_DVIEW_END return FALSE + FOR_DVIEW_END var/list/directions = list() if(direction) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 154cc43d4af2..14e15de24691 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -247,6 +247,10 @@ if(!not_damageable) //Impossible to destroy health -= 50 + M.attack_log += text("\[[time_stamp()]\] was slammed against [src] by [key_name(user)]") + user.attack_log += text("\[[time_stamp()]\] slammed [key_name(M)] against [src]") + msg_admin_attack("[key_name(user)] slammed [key_name(M)] against [src] at [get_area_name(M)]", M.loc.x, M.loc.y, M.loc.z) + healthcheck(1, 1, 1, M) //The person thrown into the window literally shattered it return diff --git a/code/game/sound.dm b/code/game/sound.dm index e95279a37731..6f721d9725e5 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -13,6 +13,7 @@ var/falloff = 1 var/volume_cat = VOLUME_SFX var/range = 0 + var/list/echo = new /list(18) var/x //Map coordinates, not sound coordinates var/y var/z @@ -36,114 +37,127 @@ //status: the regular 4 sound flags //falloff: max range till sound volume starts dropping as distance increases -/proc/playsound(atom/source, soundin, vol = 100, vary = FALSE, sound_range, vol_cat = VOLUME_SFX, channel = 0, status , falloff = 1, y_s_offset,x_s_offset) +/proc/playsound(atom/source, sound/soundin, vol = 100, vary = FALSE, sound_range, vol_cat = VOLUME_SFX, channel = 0, status, falloff = 1, list/echo, y_s_offset, x_s_offset) if(isarea(source)) error("[source] is an area and is trying to make the sound: [soundin]") return FALSE - var/datum/sound_template/S = new() - var/sound/SD = soundin - if(istype(SD)) - S.file = SD.file - S.wait = SD.wait - S.repeat = SD.repeat + var/datum/sound_template/template = new() + if(istype(soundin)) + template.file = soundin.file + template.wait = soundin.wait + template.repeat = soundin.repeat else - S.file = get_sfx(soundin) - S.channel = channel ? channel : get_free_channel() - S.status = status - S.falloff = falloff - S.volume = vol - S.volume_cat = vol_cat - S.y_s_offset = y_s_offset - S.x_s_offset = x_s_offset + template.file = get_sfx(soundin) + template.channel = channel ? channel : get_free_channel() + template.status = status + template.falloff = falloff + template.volume = vol + template.volume_cat = vol_cat + for(var/pos = 1 to length(echo)) + if(!echo[pos]) + continue + template.echo[pos] = echo[pos] + template.y_s_offset = y_s_offset + template.x_s_offset = x_s_offset if(vary != FALSE) if(vary > 1) - S.frequency = vary + template.frequency = vary else - S.frequency = GET_RANDOM_FREQ // Same frequency for everybody + template.frequency = GET_RANDOM_FREQ // Same frequency for everybody if(!sound_range) sound_range = floor(0.25*vol) //if no specific range, the max range is equal to a quarter of the volume. - S.range = sound_range + template.range = sound_range var/turf/turf_source = get_turf(source) if(!turf_source || !turf_source.z) return FALSE - S.x = turf_source.x - S.y = turf_source.y - S.z = turf_source.z + template.x = turf_source.x + template.y = turf_source.y + template.z = turf_source.z if(!SSinterior) - SSsound.queue(S) - return S.channel + SSsound.queue(template) + return template.channel var/list/datum/interior/extra_interiors = list() // If we're in an interior, range the chunk, then adjust to do so from outside instead if(SSinterior.in_interior(turf_source)) - var/datum/interior/VI = SSinterior.get_interior_by_coords(turf_source.x, turf_source.y, turf_source.z) - if(VI?.ready) - extra_interiors |= VI - if(VI.exterior) - var/turf/new_turf_source = get_turf(VI.exterior) - S.x = new_turf_source.x - S.y = new_turf_source.y - S.z = new_turf_source.z + var/datum/interior/vehicle_interior = SSinterior.get_interior_by_coords(turf_source.x, turf_source.y, turf_source.z) + if(vehicle_interior?.ready) + extra_interiors |= vehicle_interior + if(vehicle_interior.exterior) + var/turf/new_turf_source = get_turf(vehicle_interior.exterior) + template.x = new_turf_source.x + template.y = new_turf_source.y + template.z = new_turf_source.z else sound_range = 0 // Range for 'nearby interiors' aswell - for(var/datum/interior/VI in SSinterior.interiors) - if(VI?.ready && VI.exterior?.z == turf_source.z && get_dist(VI.exterior, turf_source) <= sound_range) - extra_interiors |= VI + for(var/datum/interior/vehicle_interior in SSinterior.interiors) + if(vehicle_interior?.ready && vehicle_interior.exterior?.z == turf_source.z && get_dist(vehicle_interior.exterior, turf_source) <= sound_range) + extra_interiors |= vehicle_interior - SSsound.queue(S, null, extra_interiors) - return S.channel + SSsound.queue(template, null, extra_interiors) + return template.channel //This is the replacement for playsound_local. Use this for sending sounds directly to a client -/proc/playsound_client(client/client, soundin, atom/origin, vol = 100, random_freq, vol_cat = VOLUME_SFX, channel = 0, status, y_s_offset, x_s_offset) - if(!istype(client) || !client.soundOutput) return FALSE - var/datum/sound_template/S = new() +/proc/playsound_client(client/client, sound/soundin, atom/origin, vol = 100, random_freq, vol_cat = VOLUME_SFX, channel = 0, status, list/echo, y_s_offset, x_s_offset) + if(!istype(client) || !client.soundOutput) + return FALSE + + var/datum/sound_template/template = new() if(origin) var/turf/T = get_turf(origin) if(T) - S.x = T.x - S.y = T.y - S.z = T.z - var/sound/SD = soundin - if(istype(SD)) - S.file = SD.file - S.wait = SD.wait - S.repeat = SD.repeat + template.x = T.x + template.y = T.y + template.z = T.z + if(istype(soundin)) + template.file = soundin.file + template.wait = soundin.wait + template.repeat = soundin.repeat else - S.file = get_sfx(soundin) + template.file = get_sfx(soundin) if(random_freq) - S.frequency = GET_RANDOM_FREQ - S.volume = vol - S.volume_cat = vol_cat - S.channel = channel - S.status = status - S.y_s_offset = y_s_offset - S.x_s_offset = x_s_offset - SSsound.queue(S, list(client)) + template.frequency = GET_RANDOM_FREQ + template.volume = vol + template.volume_cat = vol_cat + template.channel = channel + template.status = status + for(var/pos = 1 to length(echo)) + if(!echo[pos]) + continue + template.echo[pos] = echo[pos] + template.y_s_offset = y_s_offset + template.x_s_offset = x_s_offset + SSsound.queue(template, list(client)) /// Plays sound to all mobs that are map-level contents of an area /proc/playsound_area(area/A, soundin, vol = 100, channel = 0, status, vol_cat = VOLUME_SFX, list/echo, y_s_offset, x_s_offset) if(!isarea(A)) return FALSE - var/datum/sound_template/S = new() - S.file = soundin - S.volume = vol - S.channel = channel - S.status = status - S.volume_cat = vol_cat + + var/datum/sound_template/template = new() + template.file = soundin + template.volume = vol + template.channel = channel + template.status = status + template.volume_cat = vol_cat + for(var/pos = 1 to length(echo)) + if(!echo[pos]) + continue + template.echo[pos] = echo[pos] var/list/hearers = list() for(var/mob/living/M in A.contents) if(!M || !M.client || !M.client.soundOutput) continue hearers += M.client - SSsound.queue(S, hearers) + SSsound.queue(template, hearers) /client/proc/playtitlemusic() if(!SSticker?.login_music) @@ -153,234 +167,238 @@ /// Play sound for all on-map clients on a given Z-level. Good for ambient sounds. -/proc/playsound_z(z, soundin, volume = 100, vol_cat = VOLUME_SFX, y_s_offset, x_s_offset) - var/datum/sound_template/S = new() - S.file = soundin - S.volume = volume - S.channel = SOUND_CHANNEL_Z - S.volume_cat = vol_cat - S.y_s_offset = y_s_offset - S.x_s_offset = x_s_offset +/proc/playsound_z(z, soundin, volume = 100, vol_cat = VOLUME_SFX, echo, y_s_offset, x_s_offset) + var/datum/sound_template/template = new() + template.file = soundin + template.volume = volume + template.channel = SOUND_CHANNEL_Z + template.volume_cat = vol_cat + for(var/pos = 1 to length(echo)) + if(!echo[pos]) + continue + template.echo[pos] = echo[pos] + template.y_s_offset = y_s_offset + template.x_s_offset = x_s_offset var/list/hearers = list() for(var/mob/M in GLOB.player_list) if((M.z in z) && M.client.soundOutput) hearers += M.client - SSsound.queue(S, hearers) + SSsound.queue(template, hearers) // The pick() proc has a built-in chance that can be added to any option by adding ,X; to the end of an option, where X is the % chance it will play. -/proc/get_sfx(S) - if(istext(S)) - switch(S) +/proc/get_sfx(sound) + if(istext(sound)) + switch(sound) // General effects if("shatter") - S = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg') + sound = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg') if("windowshatter") //meaty window shattering sound - S = pick('sound/effects/window_shatter1.ogg','sound/effects/window_shatter2.ogg','sound/effects/window_shatter3.ogg') + sound = pick('sound/effects/window_shatter1.ogg','sound/effects/window_shatter2.ogg','sound/effects/window_shatter3.ogg') if("glassbreak") //small breaks for bottles/etc. - S = pick('sound/effects/glassbreak1.ogg','sound/effects/glassbreak2.ogg','sound/effects/glassbreak3.ogg','sound/effects/glassbreak4.ogg') + sound = pick('sound/effects/glassbreak1.ogg','sound/effects/glassbreak2.ogg','sound/effects/glassbreak3.ogg','sound/effects/glassbreak4.ogg') if("explosion") - S = pick('sound/effects/explosion1.ogg','sound/effects/explosion2.ogg','sound/effects/explosion3.ogg','sound/effects/explosion4.ogg','sound/effects/explosion5.ogg') + sound = pick('sound/effects/explosion1.ogg','sound/effects/explosion2.ogg','sound/effects/explosion3.ogg','sound/effects/explosion4.ogg','sound/effects/explosion5.ogg') if("bigboom") - S = pick('sound/effects/bigboom1.ogg','sound/effects/bigboom2.ogg','sound/effects/bigboom3.ogg','sound/effects/bigboom4.ogg') + sound = pick('sound/effects/bigboom1.ogg','sound/effects/bigboom2.ogg','sound/effects/bigboom3.ogg','sound/effects/bigboom4.ogg') if("sparks") - S = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg') + sound = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg') if("rustle") - S = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg') + sound = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg') if("toolbox") - S = pick('sound/effects/toolbox.ogg') + sound = pick('sound/effects/toolbox.ogg') if("pillbottle") - S = pick('sound/effects/pillbottle.ogg') + sound = pick('sound/effects/pillbottle.ogg') if("rip") - S = pick('sound/effects/rip1.ogg','sound/effects/rip2.ogg') + sound = pick('sound/effects/rip1.ogg','sound/effects/rip2.ogg') if("lighter") - S = pick('sound/effects/lighter1.ogg','sound/effects/lighter2.ogg','sound/effects/lighter3.ogg') + sound = pick('sound/effects/lighter1.ogg','sound/effects/lighter2.ogg','sound/effects/lighter3.ogg') if("zippo_open") - S = pick('sound/effects/zippo_open.ogg') + sound = pick('sound/effects/zippo_open.ogg') if("zippo_close") - S = pick('sound/effects/zippo_close.ogg') + sound = pick('sound/effects/zippo_close.ogg') if("bonk") //somewhat quiet, increase volume - S = pick('sound/machines/bonk.ogg') + sound = pick('sound/machines/bonk.ogg') if("cane_step") - S = pick('sound/items/cane_step_1.ogg', 'sound/items/cane_step_2.ogg', 'sound/items/cane_step_3.ogg', 'sound/items/cane_step_4.ogg', 'sound/items/cane_step_5.ogg', ) + sound = pick('sound/items/cane_step_1.ogg', 'sound/items/cane_step_2.ogg', 'sound/items/cane_step_3.ogg', 'sound/items/cane_step_4.ogg', 'sound/items/cane_step_5.ogg', ) if("match") - S = pick('sound/effects/match.ogg') + sound = pick('sound/effects/match.ogg') if("throwing") - S = pick('sound/effects/throwing/swoosh1.ogg', 'sound/effects/throwing/swoosh2.ogg', 'sound/effects/throwing/swoosh3.ogg', 'sound/effects/throwing/swoosh4.ogg') + sound = pick('sound/effects/throwing/swoosh1.ogg', 'sound/effects/throwing/swoosh2.ogg', 'sound/effects/throwing/swoosh3.ogg', 'sound/effects/throwing/swoosh4.ogg') if("punch") - S = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg') + sound = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg') if("swing_hit") - S = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg') + sound = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg') if("clan_sword_hit") - S = pick('sound/weapons/clan_sword_hit_1.ogg', 'sound/weapons/clan_sword_hit_2.ogg') + sound = pick('sound/weapons/clan_sword_hit_1.ogg', 'sound/weapons/clan_sword_hit_2.ogg') if("slam") - S = pick('sound/effects/slam1.ogg','sound/effects/slam2.ogg','sound/effects/slam3.ogg', 0.1;'sound/effects/slam_rare_1.ogg') + sound = pick('sound/effects/slam1.ogg','sound/effects/slam2.ogg','sound/effects/slam3.ogg', 0.1;'sound/effects/slam_rare_1.ogg') if("pageturn") - S = pick('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg') + sound = pick('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg') if("terminal_button") - S = pick('sound/machines/terminal_button01.ogg', 'sound/machines/terminal_button02.ogg', 'sound/machines/terminal_button03.ogg','sound/machines/terminal_button04.ogg', 'sound/machines/terminal_button05.ogg', 'sound/machines/terminal_button06.ogg', 'sound/machines/terminal_button07.ogg', 'sound/machines/terminal_button08.ogg') + sound = pick('sound/machines/terminal_button01.ogg', 'sound/machines/terminal_button02.ogg', 'sound/machines/terminal_button03.ogg','sound/machines/terminal_button04.ogg', 'sound/machines/terminal_button05.ogg', 'sound/machines/terminal_button06.ogg', 'sound/machines/terminal_button07.ogg', 'sound/machines/terminal_button08.ogg') if("keyboard") - S = pick('sound/machines/keyboard1.ogg', 'sound/machines/keyboard2.ogg','sound/machines/keyboard3.ogg') + sound = pick('sound/machines/keyboard1.ogg', 'sound/machines/keyboard2.ogg','sound/machines/keyboard3.ogg') if("keyboard_alt") - S = pick('sound/machines/computer_typing4.ogg', 'sound/machines/computer_typing5.ogg', 'sound/machines/computer_typing6.ogg') + sound = pick('sound/machines/computer_typing4.ogg', 'sound/machines/computer_typing5.ogg', 'sound/machines/computer_typing6.ogg') if("gunrustle") - S = pick('sound/effects/gunrustle1.ogg', 'sound/effects/gunrustle2.ogg','sound/effects/gunrustle3.ogg') + sound = pick('sound/effects/gunrustle1.ogg', 'sound/effects/gunrustle2.ogg','sound/effects/gunrustle3.ogg') if("gunequip") - S = pick('sound/handling/gunequip1.ogg','sound/handling/gunequip2.ogg','sound/handling/gunequip3.ogg') + sound = pick('sound/handling/gunequip1.ogg','sound/handling/gunequip2.ogg','sound/handling/gunequip3.ogg') if("shotgunpump") - S = pick('sound/weapons/shotgunpump1.ogg','sound/weapons/shotgunpump2.ogg') + sound = pick('sound/weapons/shotgunpump1.ogg','sound/weapons/shotgunpump2.ogg') if("clothingrustle") - S = pick('sound/handling/clothingrustle1.ogg', 'sound/handling/clothingrustle2.ogg','sound/handling/clothingrustle3.ogg','sound/handling/clothingrustle4.ogg','sound/handling/clothingrustle5.ogg') + sound = pick('sound/handling/clothingrustle1.ogg', 'sound/handling/clothingrustle2.ogg','sound/handling/clothingrustle3.ogg','sound/handling/clothingrustle4.ogg','sound/handling/clothingrustle5.ogg') if("armorequip") - S = pick('sound/handling/armorequip_1.ogg','sound/handling/armorequip_2.ogg') + sound = pick('sound/handling/armorequip_1.ogg','sound/handling/armorequip_2.ogg') if("pry") - S = pick('sound/effects/pry1.ogg', 'sound/effects/pry2.ogg','sound/effects/pry3.ogg','sound/effects/pry4.ogg') + sound = pick('sound/effects/pry1.ogg', 'sound/effects/pry2.ogg','sound/effects/pry3.ogg','sound/effects/pry4.ogg') if("metalbang") - S = pick('sound/effects/thud1.ogg','sound/effects/thud2.ogg','sound/effects/thud3.ogg') + sound = pick('sound/effects/thud1.ogg','sound/effects/thud2.ogg','sound/effects/thud3.ogg') if("paper_writing") - S = pick('sound/items/writing_noises/paper_writing_1.wav', 'sound/items/writing_noises/paper_writing_2.wav', 'sound/items/writing_noises/paper_writing_3.wav', 'sound/items/writing_noises/paper_writing_4.ogg') + sound = pick('sound/items/writing_noises/paper_writing_1.wav', 'sound/items/writing_noises/paper_writing_2.wav', 'sound/items/writing_noises/paper_writing_3.wav', 'sound/items/writing_noises/paper_writing_4.ogg') // Weapons/bullets if("shell_load") - S = pick('sound/weapons/shell_load1.ogg','sound/weapons/shell_load2.ogg','sound/weapons/shell_load3.ogg','sound/weapons/shell_load4.ogg') + sound = pick('sound/weapons/shell_load1.ogg','sound/weapons/shell_load2.ogg','sound/weapons/shell_load3.ogg','sound/weapons/shell_load4.ogg') if("ballistic_hit") - S = pick('sound/bullets/bullet_impact1.ogg','sound/bullets/bullet_impact2.ogg','sound/bullets/bullet_impact1.ogg','sound/bullets/impact_flesh_1.ogg','sound/bullets/impact_flesh_2.ogg','sound/bullets/impact_flesh_3.ogg','sound/bullets/impact_flesh_4.ogg') + sound = pick('sound/bullets/bullet_impact1.ogg','sound/bullets/bullet_impact2.ogg','sound/bullets/bullet_impact1.ogg','sound/bullets/impact_flesh_1.ogg','sound/bullets/impact_flesh_2.ogg','sound/bullets/impact_flesh_3.ogg','sound/bullets/impact_flesh_4.ogg') if("ballistic_armor") - S = pick('sound/bullets/bullet_armor1.ogg','sound/bullets/bullet_armor2.ogg','sound/bullets/bullet_armor3.ogg','sound/bullets/bullet_armor4.ogg') + sound = pick('sound/bullets/bullet_armor1.ogg','sound/bullets/bullet_armor2.ogg','sound/bullets/bullet_armor3.ogg','sound/bullets/bullet_armor4.ogg') if("ballistic_miss") - S = pick('sound/bullets/bullet_miss1.ogg','sound/bullets/bullet_miss2.ogg','sound/bullets/bullet_miss3.ogg','sound/bullets/bullet_miss4.ogg') + sound = pick('sound/bullets/bullet_miss1.ogg','sound/bullets/bullet_miss2.ogg','sound/bullets/bullet_miss3.ogg','sound/bullets/bullet_miss4.ogg') if("ballistic_bounce") - S = pick('sound/bullets/bullet_ricochet1.ogg','sound/bullets/bullet_ricochet2.ogg','sound/bullets/bullet_ricochet3.ogg','sound/bullets/bullet_ricochet4.ogg','sound/bullets/bullet_ricochet5.ogg','sound/bullets/bullet_ricochet6.ogg','sound/bullets/bullet_ricochet7.ogg','sound/bullets/bullet_ricochet8.ogg') + sound = pick('sound/bullets/bullet_ricochet1.ogg','sound/bullets/bullet_ricochet2.ogg','sound/bullets/bullet_ricochet3.ogg','sound/bullets/bullet_ricochet4.ogg','sound/bullets/bullet_ricochet5.ogg','sound/bullets/bullet_ricochet6.ogg','sound/bullets/bullet_ricochet7.ogg','sound/bullets/bullet_ricochet8.ogg') if("ballistic_shield_hit") - S = pick('sound/bullets/shield_impact_c1.ogg','sound/bullets/shield_impact_c2.ogg','sound/bullets/shield_impact_c3.ogg','sound/bullets/shield_impact_c4.ogg') + sound = pick('sound/bullets/shield_impact_c1.ogg','sound/bullets/shield_impact_c2.ogg','sound/bullets/shield_impact_c3.ogg','sound/bullets/shield_impact_c4.ogg') if("shield_shatter") - S = pick('sound/bullets/shield_break_c1.ogg') + sound = pick('sound/bullets/shield_break_c1.ogg') if("rocket_bounce") - S = pick('sound/bullets/rocket_ricochet1.ogg','sound/bullets/rocket_ricochet2.ogg','sound/bullets/rocket_ricochet3.ogg') + sound = pick('sound/bullets/rocket_ricochet1.ogg','sound/bullets/rocket_ricochet2.ogg','sound/bullets/rocket_ricochet3.ogg') if("energy_hit") - S = pick('sound/bullets/energy_impact1.ogg') + sound = pick('sound/bullets/energy_impact1.ogg') if("energy_miss") - S = pick('sound/bullets/energy_miss1.ogg') + sound = pick('sound/bullets/energy_miss1.ogg') if("energy_bounce") - S = pick('sound/bullets/energy_ricochet1.ogg') + sound = pick('sound/bullets/energy_ricochet1.ogg') if("alloy_hit") - S = pick('sound/bullets/spear_impact1.ogg') + sound = pick('sound/bullets/spear_impact1.ogg') if("alloy_armor") - S = pick('sound/bullets/spear_armor1.ogg') + sound = pick('sound/bullets/spear_armor1.ogg') if("alloy_bounce") - S = pick('sound/bullets/spear_ricochet1.ogg','sound/bullets/spear_ricochet2.ogg') + sound = pick('sound/bullets/spear_ricochet1.ogg','sound/bullets/spear_ricochet2.ogg') if("gun_silenced") - S = pick('sound/weapons/gun_silenced_shot1.ogg','sound/weapons/gun_silenced_shot2.ogg') + sound = pick('sound/weapons/gun_silenced_shot1.ogg','sound/weapons/gun_silenced_shot2.ogg') if("gun_pulse") - S = pick('sound/weapons/gun_m41a_1.ogg','sound/weapons/gun_m41a_2.ogg','sound/weapons/gun_m41a_3.ogg','sound/weapons/gun_m41a_4.ogg','sound/weapons/gun_m41a_5.ogg','sound/weapons/gun_m41a_6.ogg') + sound = pick('sound/weapons/gun_m41a_1.ogg','sound/weapons/gun_m41a_2.ogg','sound/weapons/gun_m41a_3.ogg','sound/weapons/gun_m41a_4.ogg','sound/weapons/gun_m41a_5.ogg','sound/weapons/gun_m41a_6.ogg') if("gun_smartgun") - S = pick('sound/weapons/gun_smartgun1.ogg', 'sound/weapons/gun_smartgun2.ogg', 'sound/weapons/gun_smartgun3.ogg', 'sound/weapons/gun_smartgun4.ogg') + sound = pick('sound/weapons/gun_smartgun1.ogg', 'sound/weapons/gun_smartgun2.ogg', 'sound/weapons/gun_smartgun3.ogg', 'sound/weapons/gun_smartgun4.ogg') if("gun_smartgun_rattle") - S = pick('sound/weapons/gun_smartgun1_rattle.ogg', 'sound/weapons/gun_smartgun2_rattle.ogg', 'sound/weapons/gun_smartgun3_rattle.ogg', 'sound/weapons/gun_smartgun4_rattle.ogg') + sound = pick('sound/weapons/gun_smartgun1_rattle.ogg', 'sound/weapons/gun_smartgun2_rattle.ogg', 'sound/weapons/gun_smartgun3_rattle.ogg', 'sound/weapons/gun_smartgun4_rattle.ogg') if("gun_jam_rack") - S = pick('sound/weapons/handling/gun_jam_rack_1.ogg', 'sound/weapons/handling/gun_jam_rack_2.ogg', 'sound/weapons/handling/gun_jam_rack_3.ogg') + sound = pick('sound/weapons/handling/gun_jam_rack_1.ogg', 'sound/weapons/handling/gun_jam_rack_2.ogg', 'sound/weapons/handling/gun_jam_rack_3.ogg') //A:CM gun sounds if("gun_shotgun_tactical") - S = pick('sound/weapons/gun_shotgun_tactical_1.ogg','sound/weapons/gun_shotgun_tactical_2.ogg','sound/weapons/gun_shotgun_tactical_3.ogg','sound/weapons/gun_shotgun_tactical_4.ogg') + sound = pick('sound/weapons/gun_shotgun_tactical_1.ogg','sound/weapons/gun_shotgun_tactical_2.ogg','sound/weapons/gun_shotgun_tactical_3.ogg','sound/weapons/gun_shotgun_tactical_4.ogg') if("m4a3") - S = pick('sound/weapons/gun_m4a3_1.ogg','sound/weapons/gun_m4a3_2.ogg','sound/weapons/gun_m4a3_3.ogg','sound/weapons/gun_m4a3_4.ogg','sound/weapons/gun_m4a3_5.ogg') + sound = pick('sound/weapons/gun_m4a3_1.ogg','sound/weapons/gun_m4a3_2.ogg','sound/weapons/gun_m4a3_3.ogg','sound/weapons/gun_m4a3_4.ogg','sound/weapons/gun_m4a3_5.ogg') if("88m4") - S = pick('sound/weapons/gun_88m4_v7.ogg') + sound = pick('sound/weapons/gun_88m4_v7.ogg') if("gun_casing_shotgun") - S = pick ('sound/bullets/bulletcasing_shotgun_fall1.ogg') + sound = pick ('sound/bullets/bulletcasing_shotgun_fall1.ogg') if("gun_nsg23") - S = pick('sound/weapons/gun_nsg23_1.ogg','sound/weapons/gun_nsg23_2.ogg') + sound = pick('sound/weapons/gun_nsg23_1.ogg','sound/weapons/gun_nsg23_2.ogg') if("gun_pkd") - S = pick('sound/weapons/gun_pkd_fire01.ogg','sound/weapons/gun_pkd_fire02.ogg','sound/weapons/gun_pkd_fire03.ogg') + sound = pick('sound/weapons/gun_pkd_fire01.ogg','sound/weapons/gun_pkd_fire02.ogg','sound/weapons/gun_pkd_fire03.ogg') // Xeno if("acid_hit") - S = pick('sound/bullets/acid_impact1.ogg') + sound = pick('sound/bullets/acid_impact1.ogg') if("acid_strike") - S = pick('sound/weapons/alien_acidstrike1.ogg','sound/weapons/alien_acidstrike2.ogg') + sound = pick('sound/weapons/alien_acidstrike1.ogg','sound/weapons/alien_acidstrike2.ogg') if("acid_spit") - S = pick('sound/voice/alien_spitacid.ogg','sound/voice/alien_spitacid2.ogg') + sound = pick('sound/voice/alien_spitacid.ogg','sound/voice/alien_spitacid2.ogg') if("acid_sizzle") - S = pick('sound/effects/acid_sizzle1.ogg','sound/effects/acid_sizzle2.ogg','sound/effects/acid_sizzle3.ogg','sound/effects/acid_sizzle4.ogg') + sound = pick('sound/effects/acid_sizzle1.ogg','sound/effects/acid_sizzle2.ogg','sound/effects/acid_sizzle3.ogg','sound/effects/acid_sizzle4.ogg') if("alien_doorpry") - S = pick('sound/effects/alien_doorpry1.ogg','sound/effects/alien_doorpry2.ogg') + sound = pick('sound/effects/alien_doorpry1.ogg','sound/effects/alien_doorpry2.ogg') if("acid_bounce") - S = pick('sound/bullets/acid_impact1.ogg') + sound = pick('sound/bullets/acid_impact1.ogg') if("alien_claw_flesh") - S = pick('sound/weapons/alien_claw_flesh1.ogg','sound/weapons/alien_claw_flesh2.ogg','sound/weapons/alien_claw_flesh3.ogg','sound/weapons/alien_claw_flesh4.ogg','sound/weapons/alien_claw_flesh5.ogg','sound/weapons/alien_claw_flesh6.ogg') + sound = pick('sound/weapons/alien_claw_flesh1.ogg','sound/weapons/alien_claw_flesh2.ogg','sound/weapons/alien_claw_flesh3.ogg','sound/weapons/alien_claw_flesh4.ogg','sound/weapons/alien_claw_flesh5.ogg','sound/weapons/alien_claw_flesh6.ogg') if("alien_claw_metal") - S = pick('sound/weapons/alien_claw_metal1.ogg','sound/weapons/alien_claw_metal2.ogg','sound/weapons/alien_claw_metal3.ogg') + sound = pick('sound/weapons/alien_claw_metal1.ogg','sound/weapons/alien_claw_metal2.ogg','sound/weapons/alien_claw_metal3.ogg') if("alien_bite") - S = pick('sound/weapons/alien_bite1.ogg','sound/weapons/alien_bite2.ogg') + sound = pick('sound/weapons/alien_bite1.ogg','sound/weapons/alien_bite2.ogg') if("alien_footstep_large") - S = pick('sound/effects/alien_footstep_large1.ogg','sound/effects/alien_footstep_large2.ogg','sound/effects/alien_footstep_large3.ogg') + sound = pick('sound/effects/alien_footstep_large1.ogg','sound/effects/alien_footstep_large2.ogg','sound/effects/alien_footstep_large3.ogg') if("alien_footstep_medium") - S = pick('sound/effects/alien_footstep_medium1.ogg','sound/effects/alien_footstep_medium2.ogg','sound/effects/alien_footstep_medium3.ogg') + sound = pick('sound/effects/alien_footstep_medium1.ogg','sound/effects/alien_footstep_medium2.ogg','sound/effects/alien_footstep_medium3.ogg') if("alien_charge") - S = pick('sound/effects/alien_footstep_charge1.ogg','sound/effects/alien_footstep_charge2.ogg','sound/effects/alien_footstep_charge3.ogg') + sound = pick('sound/effects/alien_footstep_charge1.ogg','sound/effects/alien_footstep_charge2.ogg','sound/effects/alien_footstep_charge3.ogg') if("alien_resin_build") - S = pick('sound/effects/alien_resin_build1.ogg','sound/effects/alien_resin_build2.ogg','sound/effects/alien_resin_build3.ogg') + sound = pick('sound/effects/alien_resin_build1.ogg','sound/effects/alien_resin_build2.ogg','sound/effects/alien_resin_build3.ogg') if("alien_resin_break") - S = pick('sound/effects/alien_resin_break1.ogg','sound/effects/alien_resin_break2.ogg','sound/effects/alien_resin_break3.ogg') + sound = pick('sound/effects/alien_resin_break1.ogg','sound/effects/alien_resin_break2.ogg','sound/effects/alien_resin_break3.ogg') if("alien_resin_move") - S = pick('sound/effects/alien_resin_move1.ogg','sound/effects/alien_resin_move2.ogg') + sound = pick('sound/effects/alien_resin_move1.ogg','sound/effects/alien_resin_move2.ogg') if("alien_talk") - S = pick('sound/voice/alien_talk.ogg','sound/voice/alien_talk2.ogg','sound/voice/alien_talk3.ogg') + sound = pick('sound/voice/alien_talk.ogg','sound/voice/alien_talk2.ogg','sound/voice/alien_talk3.ogg') if("larva_talk") - S = pick('sound/voice/larva_talk1.ogg','sound/voice/larva_talk2.ogg','sound/voice/larva_talk3.ogg','sound/voice/larva_talk4.ogg') + sound = pick('sound/voice/larva_talk1.ogg','sound/voice/larva_talk2.ogg','sound/voice/larva_talk3.ogg','sound/voice/larva_talk4.ogg') if("hiss_talk") - S = pick('sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg') + sound = pick('sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg') if("alien_growl") - S = pick('sound/voice/alien_growl1.ogg','sound/voice/alien_growl2.ogg','sound/voice/alien_growl3.ogg') + sound = pick('sound/voice/alien_growl1.ogg','sound/voice/alien_growl2.ogg','sound/voice/alien_growl3.ogg') if("alien_hiss") - S = pick('sound/voice/alien_hiss1.ogg','sound/voice/alien_hiss2.ogg','sound/voice/alien_hiss3.ogg') + sound = pick('sound/voice/alien_hiss1.ogg','sound/voice/alien_hiss2.ogg','sound/voice/alien_hiss3.ogg') if("alien_tail_swipe") - S = pick('sound/effects/alien_tail_swipe1.ogg','sound/effects/alien_tail_swipe2.ogg','sound/effects/alien_tail_swipe3.ogg') + sound = pick('sound/effects/alien_tail_swipe1.ogg','sound/effects/alien_tail_swipe2.ogg','sound/effects/alien_tail_swipe3.ogg') if("alien_help") - S = pick('sound/voice/alien_help1.ogg','sound/voice/alien_help2.ogg','sound/voice/alien_help3.ogg') + sound = pick('sound/voice/alien_help1.ogg','sound/voice/alien_help2.ogg','sound/voice/alien_help3.ogg') if("alien_drool") - S = pick('sound/voice/alien_drool1.ogg','sound/voice/alien_drool2.ogg') + sound = pick('sound/voice/alien_drool1.ogg','sound/voice/alien_drool2.ogg') if("alien_roar") - S = pick('sound/voice/alien_roar1.ogg','sound/voice/alien_roar2.ogg','sound/voice/alien_roar3.ogg','sound/voice/alien_roar4.ogg','sound/voice/alien_roar5.ogg','sound/voice/alien_roar6.ogg') + sound = pick('sound/voice/alien_roar1.ogg','sound/voice/alien_roar2.ogg','sound/voice/alien_roar3.ogg','sound/voice/alien_roar4.ogg','sound/voice/alien_roar5.ogg','sound/voice/alien_roar6.ogg') if("alien_roar_larva") - S = pick('sound/voice/alien_roar_larva1.ogg','sound/voice/alien_roar_larva2.ogg') + sound = pick('sound/voice/alien_roar_larva1.ogg','sound/voice/alien_roar_larva2.ogg') if("queen") - S = pick('sound/voice/alien_queen_command.ogg','sound/voice/alien_queen_command2.ogg','sound/voice/alien_queen_command3.ogg') + sound = pick('sound/voice/alien_queen_command.ogg','sound/voice/alien_queen_command2.ogg','sound/voice/alien_queen_command3.ogg') // Human if("male_scream") - S = pick('sound/voice/human_male_scream_1.ogg','sound/voice/human_male_scream_2.ogg','sound/voice/human_male_scream_3.ogg','sound/voice/human_male_scream_4.ogg',5;'sound/voice/human_male_scream_5.ogg',5;'sound/voice/human_jackson_scream.ogg',5;'sound/voice/human_ack_scream.ogg','sound/voice/human_male_scream_6.ogg') + sound = pick('sound/voice/human_male_scream_1.ogg','sound/voice/human_male_scream_2.ogg','sound/voice/human_male_scream_3.ogg','sound/voice/human_male_scream_4.ogg',5;'sound/voice/human_male_scream_5.ogg',5;'sound/voice/human_jackson_scream.ogg',5;'sound/voice/human_ack_scream.ogg','sound/voice/human_male_scream_6.ogg') if("male_pain") - S = pick('sound/voice/human_male_pain_1.ogg','sound/voice/human_male_pain_2.ogg','sound/voice/human_male_pain_3.ogg',5;'sound/voice/tomscream.ogg',5;'sound/voice/human_bobby_pain.ogg',5;'sound/voice/human_tantrum_scream.ogg', 5;'sound/voice/human_male_pain_rare_1.ogg') + sound = pick('sound/voice/human_male_pain_1.ogg','sound/voice/human_male_pain_2.ogg','sound/voice/human_male_pain_3.ogg',5;'sound/voice/tomscream.ogg',5;'sound/voice/human_bobby_pain.ogg',5;'sound/voice/human_tantrum_scream.ogg', 5;'sound/voice/human_male_pain_rare_1.ogg') if("male_fragout") - S = pick('sound/voice/human_male_grenadethrow_1.ogg', 'sound/voice/human_male_grenadethrow_2.ogg', 'sound/voice/human_male_grenadethrow_3.ogg') + sound = pick('sound/voice/human_male_grenadethrow_1.ogg', 'sound/voice/human_male_grenadethrow_2.ogg', 'sound/voice/human_male_grenadethrow_3.ogg') if("male_warcry") - S = pick('sound/voice/warcry/male_go.ogg', 'sound/voice/warcry/male_attack.ogg', 'sound/voice/warcry/male_charge.ogg', 'sound/voice/warcry/male_charge2.ogg', 'sound/voice/warcry/warcry_male_1.ogg', 'sound/voice/warcry/warcry_male_2.ogg', 'sound/voice/warcry/warcry_male_3.ogg', 'sound/voice/warcry/warcry_male_4.ogg', 'sound/voice/warcry/warcry_male_5.ogg', 'sound/voice/warcry/warcry_male_6.ogg', 'sound/voice/warcry/warcry_male_7.ogg', 'sound/voice/warcry/warcry_male_8.ogg', 'sound/voice/warcry/warcry_male_9.ogg', 'sound/voice/warcry/warcry_male_10.ogg', 'sound/voice/warcry/warcry_male_11.ogg', 'sound/voice/warcry/warcry_male_12.ogg', 'sound/voice/warcry/warcry_male_13.ogg', 'sound/voice/warcry/warcry_male_14.ogg', 'sound/voice/warcry/warcry_male_15.ogg', 'sound/voice/warcry/warcry_male_16.ogg', 'sound/voice/warcry/warcry_male_17.ogg', 'sound/voice/warcry/warcry_male_18.ogg', 'sound/voice/warcry/warcry_male_19.ogg', 'sound/voice/warcry/warcry_male_20.ogg', 'sound/voice/warcry/warcry_male_21.ogg', 'sound/voice/warcry/warcry_male_22.ogg', 'sound/voice/warcry/warcry_male_23.ogg', 'sound/voice/warcry/warcry_male_24.ogg', 'sound/voice/warcry/warcry_male_25.ogg', 'sound/voice/warcry/warcry_male_26.ogg', 'sound/voice/warcry/warcry_male_27.ogg', 'sound/voice/warcry/warcry_male_28.ogg', 'sound/voice/warcry/warcry_male_29.ogg', 'sound/voice/warcry/warcry_male_30.ogg', 'sound/voice/warcry/warcry_male_31.ogg', 'sound/voice/warcry/warcry_male_32.ogg', 'sound/voice/warcry/warcry_male_33.ogg', 'sound/voice/warcry/warcry_male_34.ogg', 'sound/voice/warcry/warcry_male_35.ogg', 5;'sound/voice/warcry/warcry_male_rare_1.ogg', 5;'sound/voice/warcry/warcry_male_rare_2.ogg', 5;'sound/voice/warcry/warcry_male_rare_3.ogg', 5;'sound/voice/warcry/warcry_male_rare_4.ogg', 5;'sound/voice/warcry/warcry_male_rare_5.ogg') + sound = pick('sound/voice/warcry/male_go.ogg', 'sound/voice/warcry/male_attack.ogg', 'sound/voice/warcry/male_charge.ogg', 'sound/voice/warcry/male_charge2.ogg', 'sound/voice/warcry/warcry_male_1.ogg', 'sound/voice/warcry/warcry_male_2.ogg', 'sound/voice/warcry/warcry_male_3.ogg', 'sound/voice/warcry/warcry_male_4.ogg', 'sound/voice/warcry/warcry_male_5.ogg', 'sound/voice/warcry/warcry_male_6.ogg', 'sound/voice/warcry/warcry_male_7.ogg', 'sound/voice/warcry/warcry_male_8.ogg', 'sound/voice/warcry/warcry_male_9.ogg', 'sound/voice/warcry/warcry_male_10.ogg', 'sound/voice/warcry/warcry_male_11.ogg', 'sound/voice/warcry/warcry_male_12.ogg', 'sound/voice/warcry/warcry_male_13.ogg', 'sound/voice/warcry/warcry_male_14.ogg', 'sound/voice/warcry/warcry_male_15.ogg', 'sound/voice/warcry/warcry_male_16.ogg', 'sound/voice/warcry/warcry_male_17.ogg', 'sound/voice/warcry/warcry_male_18.ogg', 'sound/voice/warcry/warcry_male_19.ogg', 'sound/voice/warcry/warcry_male_20.ogg', 'sound/voice/warcry/warcry_male_21.ogg', 'sound/voice/warcry/warcry_male_22.ogg', 'sound/voice/warcry/warcry_male_23.ogg', 'sound/voice/warcry/warcry_male_24.ogg', 'sound/voice/warcry/warcry_male_25.ogg', 'sound/voice/warcry/warcry_male_26.ogg', 'sound/voice/warcry/warcry_male_27.ogg', 'sound/voice/warcry/warcry_male_28.ogg', 'sound/voice/warcry/warcry_male_29.ogg', 'sound/voice/warcry/warcry_male_30.ogg', 'sound/voice/warcry/warcry_male_31.ogg', 'sound/voice/warcry/warcry_male_32.ogg', 'sound/voice/warcry/warcry_male_33.ogg', 'sound/voice/warcry/warcry_male_34.ogg', 'sound/voice/warcry/warcry_male_35.ogg', 5;'sound/voice/warcry/warcry_male_rare_1.ogg', 5;'sound/voice/warcry/warcry_male_rare_2.ogg', 5;'sound/voice/warcry/warcry_male_rare_3.ogg', 5;'sound/voice/warcry/warcry_male_rare_4.ogg', 5;'sound/voice/warcry/warcry_male_rare_5.ogg') if("male_upp_warcry") - S = pick('sound/voice/upp_warcry/warcry_male_1.ogg', 'sound/voice/upp_warcry/warcry_male_2.ogg') + sound = pick('sound/voice/upp_warcry/warcry_male_1.ogg', 'sound/voice/upp_warcry/warcry_male_2.ogg') if("female_scream") - S = pick('sound/voice/human_female_scream_1.ogg','sound/voice/human_female_scream_2.ogg','sound/voice/human_female_scream_3.ogg','sound/voice/human_female_scream_4.ogg',5;'sound/voice/human_female_scream_5.ogg') + sound = pick('sound/voice/human_female_scream_1.ogg','sound/voice/human_female_scream_2.ogg','sound/voice/human_female_scream_3.ogg','sound/voice/human_female_scream_4.ogg',5;'sound/voice/human_female_scream_5.ogg') if("female_pain") - S = pick('sound/voice/human_female_pain_1.ogg','sound/voice/human_female_pain_2.ogg','sound/voice/human_female_pain_3.ogg') + sound = pick('sound/voice/human_female_pain_1.ogg','sound/voice/human_female_pain_2.ogg','sound/voice/human_female_pain_3.ogg') if("female_fragout") - S = pick("sound/voice/human_female_grenadethrow_1.ogg", 'sound/voice/human_female_grenadethrow_2.ogg', 'sound/voice/human_female_grenadethrow_3.ogg') + sound = pick("sound/voice/human_female_grenadethrow_1.ogg", 'sound/voice/human_female_grenadethrow_2.ogg', 'sound/voice/human_female_grenadethrow_3.ogg') if("female_warcry") - S = pick('sound/voice/warcry/female_charge.ogg', 'sound/voice/warcry/female_yell1.ogg', 'sound/voice/warcry/warcry_female_1.ogg', 'sound/voice/warcry/warcry_female_2.ogg', 'sound/voice/warcry/warcry_female_3.ogg', 'sound/voice/warcry/warcry_female_4.ogg', 'sound/voice/warcry/warcry_female_5.ogg', 'sound/voice/warcry/warcry_female_6.ogg', 'sound/voice/warcry/warcry_female_7.ogg', 'sound/voice/warcry/warcry_female_8.ogg', 'sound/voice/warcry/warcry_female_9.ogg', 'sound/voice/warcry/warcry_female_10.ogg', 'sound/voice/warcry/warcry_female_11.ogg', 'sound/voice/warcry/warcry_female_12.ogg', 'sound/voice/warcry/warcry_female_13.ogg', 'sound/voice/warcry/warcry_female_14.ogg', 'sound/voice/warcry/warcry_female_15.ogg', 'sound/voice/warcry/warcry_female_16.ogg', 'sound/voice/warcry/warcry_female_17.ogg', 'sound/voice/warcry/warcry_female_18.ogg', 'sound/voice/warcry/warcry_female_19.ogg', 'sound/voice/warcry/warcry_female_20.ogg') + sound = pick('sound/voice/warcry/female_charge.ogg', 'sound/voice/warcry/female_yell1.ogg', 'sound/voice/warcry/warcry_female_1.ogg', 'sound/voice/warcry/warcry_female_2.ogg', 'sound/voice/warcry/warcry_female_3.ogg', 'sound/voice/warcry/warcry_female_4.ogg', 'sound/voice/warcry/warcry_female_5.ogg', 'sound/voice/warcry/warcry_female_6.ogg', 'sound/voice/warcry/warcry_female_7.ogg', 'sound/voice/warcry/warcry_female_8.ogg', 'sound/voice/warcry/warcry_female_9.ogg', 'sound/voice/warcry/warcry_female_10.ogg', 'sound/voice/warcry/warcry_female_11.ogg', 'sound/voice/warcry/warcry_female_12.ogg', 'sound/voice/warcry/warcry_female_13.ogg', 'sound/voice/warcry/warcry_female_14.ogg', 'sound/voice/warcry/warcry_female_15.ogg', 'sound/voice/warcry/warcry_female_16.ogg', 'sound/voice/warcry/warcry_female_17.ogg', 'sound/voice/warcry/warcry_female_18.ogg', 'sound/voice/warcry/warcry_female_19.ogg', 'sound/voice/warcry/warcry_female_20.ogg') if("female_upp_warcry") - S = pick('sound/voice/upp_warcry/warcry_female_1.ogg', 'sound/voice/upp_warcry/warcry_female_2.ogg') + sound = pick('sound/voice/upp_warcry/warcry_female_1.ogg', 'sound/voice/upp_warcry/warcry_female_2.ogg') if("rtb_handset") - S = pick('sound/machines/telephone/rtb_handset_1.ogg', 'sound/machines/telephone/rtb_handset_2.ogg', 'sound/machines/telephone/rtb_handset_3.ogg', 'sound/machines/telephone/rtb_handset_4.ogg', 'sound/machines/telephone/rtb_handset_5.ogg') + sound = pick('sound/machines/telephone/rtb_handset_1.ogg', 'sound/machines/telephone/rtb_handset_2.ogg', 'sound/machines/telephone/rtb_handset_3.ogg', 'sound/machines/telephone/rtb_handset_4.ogg', 'sound/machines/telephone/rtb_handset_5.ogg') if("talk_phone") - S = pick('sound/machines/telephone/talk_phone1.ogg', 'sound/machines/telephone/talk_phone2.ogg', 'sound/machines/telephone/talk_phone3.ogg', 'sound/machines/telephone/talk_phone4.ogg', 'sound/machines/telephone/talk_phone5.ogg', 'sound/machines/telephone/talk_phone6.ogg', 'sound/machines/telephone/talk_phone7.ogg') + sound = pick('sound/machines/telephone/talk_phone1.ogg', 'sound/machines/telephone/talk_phone2.ogg', 'sound/machines/telephone/talk_phone3.ogg', 'sound/machines/telephone/talk_phone4.ogg', 'sound/machines/telephone/talk_phone5.ogg', 'sound/machines/telephone/talk_phone6.ogg', 'sound/machines/telephone/talk_phone7.ogg') if("bone_break") - S = pick('sound/effects/bone_break1.ogg','sound/effects/bone_break2.ogg','sound/effects/bone_break3.ogg','sound/effects/bone_break4.ogg','sound/effects/bone_break5.ogg','sound/effects/bone_break6.ogg','sound/effects/bone_break7.ogg') + sound = pick('sound/effects/bone_break1.ogg','sound/effects/bone_break2.ogg','sound/effects/bone_break3.ogg','sound/effects/bone_break4.ogg','sound/effects/bone_break5.ogg','sound/effects/bone_break6.ogg','sound/effects/bone_break7.ogg') if("plush") - S = pick('sound/items/plush1.ogg', 'sound/items/plush2.ogg', 'sound/items/plush3.ogg') + sound = pick('sound/items/plush1.ogg', 'sound/items/plush2.ogg', 'sound/items/plush3.ogg') //misc mobs if("cat_meow") - S = pick('sound/voice/cat_meow_1.ogg','sound/voice/cat_meow_2.ogg','sound/voice/cat_meow_3.ogg','sound/voice/cat_meow_4.ogg','sound/voice/cat_meow_5.ogg','sound/voice/cat_meow_6.ogg','sound/voice/cat_meow_7.ogg') + sound = pick('sound/voice/cat_meow_1.ogg','sound/voice/cat_meow_2.ogg','sound/voice/cat_meow_3.ogg','sound/voice/cat_meow_4.ogg','sound/voice/cat_meow_5.ogg','sound/voice/cat_meow_6.ogg','sound/voice/cat_meow_7.ogg') if("pred_pain") - S = pick('sound/voice/pred_pain1.ogg','sound/voice/pred_pain2.ogg','sound/voice/pred_pain3.ogg','sound/voice/pred_pain4.ogg','sound/voice/pred_pain5.ogg',5;'sound/voice/pred_pain_rare1.ogg') + sound = pick('sound/voice/pred_pain1.ogg','sound/voice/pred_pain2.ogg','sound/voice/pred_pain3.ogg','sound/voice/pred_pain4.ogg','sound/voice/pred_pain5.ogg',5;'sound/voice/pred_pain_rare1.ogg') if("clownstep") - S = pick('sound/effects/clownstep1.ogg', 'sound/effects/clownstep2.ogg') - return S + sound = pick('sound/effects/clownstep1.ogg', 'sound/effects/clownstep2.ogg') + return sound /client/proc/generate_sound_queues() set name = "Queue sounds" @@ -392,21 +410,21 @@ var/x = tgui_input_number(usr, "Center X") var/y = tgui_input_number(usr, "Center Y") var/z = tgui_input_number(usr, "Z level") - var/datum/sound_template/S + var/datum/sound_template/template for(var/i = 1, i <= ammount, i++) - S = new - S.file = get_sfx("male_warcry") // warcry has variable length, lots of variations - S.channel = get_free_channel() // i'm convinced this is bad, but it's here to mirror playsound() behaviour - S.range = range - S.x = x - S.y = y - S.z = z - SSsound.queue(S) + template = new + template.file = get_sfx("male_warcry") // warcry has variable length, lots of variations + template.channel = get_free_channel() // i'm convinced this is bad, but it's here to mirror playsound() behaviour + template.range = range + template.x = x + template.y = y + template.z = z + SSsound.queue(template) /client/proc/sound_debug_query() set name = "Dump Playing Client Sounds" set desc = "dumps info about locally, playing sounds" set category = "Debug" - for(var/sound/S in SoundQuery()) - UNLINT(to_chat(src, "channel#[S.channel]: [S.status] - [S.file] - len=[length(S)], wait=[S.wait], offset=[S.offset], repeat=[S.repeat]")) // unlint until spacemandmm suite-1.7 + for(var/sound/soundin in SoundQuery()) + UNLINT(to_chat(src, "channel#[soundin.channel]: [soundin.status] - [soundin.file] - len=[length(soundin)], wait=[soundin.wait], offset=[soundin.offset], repeat=[soundin.repeat]")) // unlint until spacemandmm suite-1.7 diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 59a9d6d69315..0082cb6ae0ae 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -478,18 +478,20 @@ /turf/proc/AdjacentTurfs() var/L[] = new() - for(var/turf/t in oview(src,1)) + FOR_DOVIEW(var/turf/t, 1, src, HIDE_INVISIBLE_OBSERVER) if(!t.density) if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t)) L.Add(t) + FOR_DOVIEW_END return L /turf/proc/AdjacentTurfsSpace() var/L[] = new() - for(var/turf/t in oview(src,1)) + FOR_DOVIEW(var/turf/t, 1, src, HIDE_INVISIBLE_OBSERVER) if(!t.density) if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t)) L.Add(t) + FOR_DOVIEW_END return L /turf/proc/Distance(turf/t) diff --git a/code/game/turfs/walls/walls.dm b/code/game/turfs/walls/walls.dm index bb1694359b98..f82ba6ddadaf 100644 --- a/code/game/turfs/walls/walls.dm +++ b/code/game/turfs/walls/walls.dm @@ -566,7 +566,7 @@ // Check again for presence of objects if(!material || (material != user.l_hand && material != user.r_hand) || material.amount <= 0) - to_chat(user, SPAN_WARNING("You seems to have misplaced the repair material!")) + to_chat(user, SPAN_WARNING("You seem to have misplaced the repair material!")) return FALSE if(!NG.in_chamber || !NG.current_mag || NG.current_mag.current_rounds < (4*amount_needed-1)) diff --git a/code/game/world.dm b/code/game/world.dm index bf9534e5f926..101066c21cdb 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -114,7 +114,7 @@ GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt")) GLOB.log_directory += "[replacetext(time_stamp(), ":", ".")]" runtime_logging_ready = TRUE // Setting up logging now, so disabling early logging - #ifndef UNIT_TESTS + #if !defined(UNIT_TESTS) && !defined(AUTOWIKI) world.log = file("[GLOB.log_directory]/dd.log") #endif backfill_runtime_log() diff --git a/code/modules/admin/verbs/adminpanelweapons.dm b/code/modules/admin/verbs/adminpanelweapons.dm index a8062e59eea8..26d6ca803b60 100644 --- a/code/modules/admin/verbs/adminpanelweapons.dm +++ b/code/modules/admin/verbs/adminpanelweapons.dm @@ -2,120 +2,68 @@ set name = "Weapons" set category = "Admin.Ship" - var/weapontype = tgui_alert(src, "What weapon?", "Choose wisely!", list("Missile", "Railgun"), 20 SECONDS) - if(!weapontype) - return - var/hiteta = tgui_input_number(src, "Give an ETA for the weapon to hit.", "Don't make them wait too long!", 10, 120, 10, 20 SECONDS) - if(!hiteta) - return - var/point_defense = tgui_alert(src, "Allow Point Defence of the ship to intercept, or for the weapon to miss?", "standard PD/miss chance is 30%.", list("Yes", "No"), 20 SECONDS) - if(!point_defense) - return - point_defense = point_defense == "Yes" - var/exactplace = tgui_alert(src, "Shoot it at random places, or where you're at?", "Choose wisely!", list("Random", "Where I am"), 20 SECONDS) - if(!exactplace) + var/list/datum/space_weapon/potential_weapons = list() + for(var/weapon_to_get in GLOB.space_weapons) + var/datum/space_weapon/weapon_to_set = GLOB.space_weapons[weapon_to_get] + LAZYSET(potential_weapons, weapon_to_set.name, weapon_to_set) + + var/weapon_type = tgui_input_list(src, "What weapon?", "Choose wisely!", potential_weapons) + if(!weapon_type) return - exactplace = exactplace == "Where I am" - var/salvo - var/quantity - if(exactplace == FALSE) - salvo = tgui_alert(src, "Make it a salvo or a single fire?", "Choose wisely!", list("Salvo", "Single"), 20 SECONDS) - if(!salvo) - return - salvo = salvo == "Salvo" - if(salvo == TRUE) - quantity = tgui_input_number(src, "How many?", "Don't go overboard. Please.", 2, 10, 2, 20 SECONDS) + var/list/ammo_type = list() + var/answer = tgui_alert(src, "Use all ammo types?", "Ammo selector", list("Yes", "No", "Cancel")) + if(answer == "Yes") + ammo_type = potential_weapons[weapon_type].possibly_ammunition + else if(answer == "No") + var/list/datum/space_weapon_ammo/potential_ammo = list() + for(var/ammo_to_get in potential_weapons[weapon_type].possibly_ammunition) + var/datum/space_weapon_ammo/ammo_to_set = GLOB.space_weapons_ammo[ammo_to_get] + LAZYSET(potential_ammo, ammo_to_set.name, ammo_to_get) - var/prompt = tgui_alert(src, "Are you sure you want to open fire at the USS Almayer with those parameters?", "Choose wisely!", list("Yes", "No"), 20 SECONDS) - if(prompt != "Yes") + while(length(potential_ammo)) + var/additional_ammo = tgui_input_list(src, "Choose ammo", "Ammo selector", potential_ammo, 20 SECONDS) + if(!additional_ammo) + break + ammo_type += potential_ammo[additional_ammo] + potential_ammo -= additional_ammo + else return - var/atom/picked_atom - var/list/targets = list() - switch(weapontype) - if("Missile") - if(exactplace == TRUE) - shipwide_ai_announcement("DANGER: MISSILE WARNING. LAUNCH DETECTED, BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS.", MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 1, mob.loc, point_defense), hiteta SECONDS) - message_admins("[key_name_admin(src)] Fired a Single Missile at the Almayer at their own location, [mob.loc], with point defense as [point_defense]") - if(point_defense == TRUE) - var/spoolup = hiteta - 4 - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "ATTENTION: TRACKING TARGET, SPOOLING UP POINT DEFENSE. ATTEMPTING TO INTERCEPT." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS) + if(!length(ammo_type)) + return - if(exactplace == FALSE) - if(salvo == TRUE) - shipwide_ai_announcement("DANGER: MISSILE SALVO DETECTED, BRACE, BRACE, BRACE. SALVO SIZE: [quantity], ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') - targets = shipside_random_turf_picker(quantity) - if(targets == null) - tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS) - return - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 1, targets, point_defense, salvo), hiteta SECONDS) - message_admins("[key_name_admin(src)] Fired a salvo of [quantity] Missiles at the Almayer at random places, with point defense as [point_defense]") - if(point_defense == TRUE) - var/spoolup = hiteta - 4 - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "ATTENTION: TRACKING TARGETS, SPOOLING UP POINT DEFENSE. ATTEMPTING TO INTERCEPT." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS) - else - shipwide_ai_announcement("DANGER: MISSILE WARNING. LAUNCH DETECTED, BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS.", MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') - picked_atom = shipside_random_turf_picker(1) - if(picked_atom == null) - tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS) - return - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 1, picked_atom, point_defense), hiteta SECONDS) - message_admins("[key_name_admin(src)] Fired a Single Missile at the Almayer at a random place, [picked_atom], with point defense as [point_defense]") - if(point_defense == TRUE) - var/spoolup = hiteta - 4 - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "ATTENTION: TRACKING TARGET, SPOOLING UP POINT DEFENSE. ATTEMPTING TO INTERCEPT." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), spoolup SECONDS) + var/hit_eta = tgui_input_number(src, "Give an ETA for the weapon to hit.", "Don't make them wait too long!", 10, 120, 10, 20 SECONDS) + if(!hit_eta) + return - if("Railgun") - if(exactplace == TRUE) - shipwide_ai_announcement("DANGER: RAILGUN EMISSIONS DETECTED, INCOMING SHOT. BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 2, mob.loc, point_defense), hiteta SECONDS) - message_admins("[key_name_admin(src)] Fired a single Railgun Slug at the Almayer at their location, [mob.loc], with the possibility of missing as [point_defense]") + var/intercept_chance = tgui_input_number(src, "Chance Point Defence of the ship to intercept, or for the weapon to miss?", "standard PD chance is 0%.", 0, 100, 0, 20 SECONDS) + var/targets + var/quantity = 1 + if(tgui_alert(src, "Shoot it at random places, or where you're at?", "Choose wisely!", list("Random", "Where I am"), 20 SECONDS) == "Where I am") + targets = list(get_turf(mob)) + else + quantity = tgui_input_number(src, "How many?", "Don't go overboard. Please.", 1, 256, 1, 20 SECONDS) + targets = shipside_random_turf_picker(quantity) + + var/delay = tgui_input_number(src, "Give delay between hits in diceseconds (1/10 of second). (0 async hits, can cause emotional damage)", "Don't make them wait too long!", 0, 600, 0, 20 SECONDS) - if(exactplace == FALSE) - if(salvo == TRUE) - shipwide_ai_announcement("DANGER: RAILGUN EMISSIONS DETECTED, SALVO INCOMING. BRACE, BRACE, BRACE. SALVO SIZE: [quantity], ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') - targets = shipside_random_turf_picker(quantity) - if(targets == null) - tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS) - return - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 2, targets, point_defense, salvo), hiteta SECONDS) - message_admins("[key_name_admin(src)] Fired a salvo of Railgun Slugs at the Almayer at random places, with the possibility of missing [point_defense]") - picked_atom = null - targets = null + if(tgui_alert(src, "Are you sure you want to open fire at the [MAIN_SHIP_NAME] with those parameters?", "Choose wisely!", list("Yes", "No")) != "Yes") + return - if(salvo == FALSE) - prompt = tgui_alert(src, "Are you sure you want to shoot a railgun slug at the USS Almayer at a random place?", "Choose wisely!", list("Yes", "No"), 20 SECONDS) - if(prompt == "Yes") - shipwide_ai_announcement("DANGER: RAILGUN EMISSIONS DETECTED, INCOMING SHOT. BRACE, BRACE, BRACE. ESTIMATED TIME: [hiteta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') - picked_atom = shipside_random_turf_picker(1) - if(picked_atom == null) - tgui_alert(src, "Uh oh! Something broke at this point! Contact the coders!", "Acknowledge!", list("ok."), 10 SECONDS) - return - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(weaponhits), 2, picked_atom, point_defense), hiteta SECONDS) - message_admins("[key_name_admin(src)] Fired a single Railgun Slug at the Almayer at a random location, [picked_atom], with the possibility of missing as [point_defense]") + potential_weapons[weapon_type].shot_message(length(targets), hit_eta) + addtimer(CALLBACK(potential_weapons[weapon_type], TYPE_PROC_REF(/datum/space_weapon, on_shot), targets, ammo_type, intercept_chance, delay), hit_eta SECONDS) + message_admins("[key_name_admin(src)] Fired [quantity] form [weapon_type] at the Almayer, with point defense as [intercept_chance]% with delay of [delay/10] seconds between hits") + if(intercept_chance) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(shipwide_ai_announcement), "ATTENTION: TRACKING TARGET[quantity > 1 ? "S" : ""], SPOOLING UP POINT DEFENSE. ATTEMPTING TO INTERCEPT." , MAIN_AI_SYSTEM, 'sound/effects/supercapacitors_charging.ogg'), (hit_eta - 4) SECONDS) /proc/shipside_random_turf_picker(turfquantity) - - var/picked_atom - var/picked_area var/list/targets = list() - var/list/turfs_of_area = list() - for(var/currentturf in 1 to turfquantity) - for(var/limiter in 1 to 120) - picked_area = pick(GLOB.ship_areas) - for(var/turf/my_turf in picked_area) + for(var/currentturf = 1 to turfquantity) + var/list/turfs_of_area = list() + for(var/area in GLOB.ship_areas) + for(var/turf/my_turf in area) turfs_of_area += my_turf - if(length(turfs_of_area) > 0) - picked_atom = pick(turfs_of_area) - if (picked_atom != null) - targets += picked_atom - break - - if(length(targets) < turfquantity) - return null - else - return targets - + targets += pick(turfs_of_area) + return targets diff --git a/code/modules/almayer/weaponhits.dm b/code/modules/almayer/weaponhits.dm index 1f3a566ebbda..428780a5aca5 100644 --- a/code/modules/almayer/weaponhits.dm +++ b/code/modules/almayer/weaponhits.dm @@ -1,123 +1,145 @@ -#define WEAPON_MISSILE 1 -#define WEAPON_RAILGUN 2 -#define HIT_CHANCE_CHEAT 100 -#define HIT_CHANCE_STANDARD 70 /** - * Proc called to hit the ship with weapons - * - * Hits the ship with the weapon of choice - * Calling Shakeship acoording to the weapon used - * All sounds that should happen when they hit are in here already. - * Probably doesn't work in other shipmaps. - * Arguments: - * * weaponused - chooses the weapon through a switchcase. 1 for missiles, 2 for railguns, 3 for particle cannons. - * * location - location in the ship where the explosion will be created. - * * point_defense - If you want the Almayer to attempt taking down the incoming fire - * * salvo - identifies it as a salvo or not. + * Space weapons it's self for ship to ship or PKO/Xeno PKO things */ -/proc/weaponhits(weaponused, location, point_defense = FALSE, salvo = FALSE) - - - switch(weaponused) - - if(WEAPON_MISSILE) - var/datum/cause_data/ashm_cause_data = create_cause_data("Anti-Ship missile") - if(point_defense == FALSE) - if(salvo == TRUE) - var/shotspacing - for(var/turf/picked_atom in location) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), picked_atom, 400, 10, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, ashm_cause_data), shotspacing SECONDS) - shotspacing += 1 - shakeship(10, 10, TRUE, FALSE) - weaponhits_effects(WEAPON_MISSILE) - else - cell_explosion(location, 350, 1, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, ashm_cause_data) - shakeship(10, 10, TRUE, FALSE) - weaponhits_effects(WEAPON_MISSILE) - if(point_defense == TRUE) - var/hitchance = HIT_CHANCE_STANDARD - if(salvo == TRUE) - var/confirmedhit - var/shotspacing - for(var/turf/picked_atom in location) - if(prob(hitchance)) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), picked_atom, 400, 10, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, ashm_cause_data), shotspacing SECONDS) - shakeship(10, 10, TRUE, FALSE) - confirmedhit += 1 - else - weaponhits_effects(WEAPON_MISSILE, TRUE, shotspacing) - - shotspacing += 1 - if(confirmedhit > 0) - weaponhits_effects(WEAPON_MISSILE, FALSE) - confirmedhit = 0 - else - if(prob(hitchance)) - cell_explosion(location, 400, 10, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, ashm_cause_data) - shakeship(10, 10, TRUE, FALSE) - weaponhits_effects(WEAPON_MISSILE, FALSE) - else - weaponhits_effects(WEAPON_MISSILE, TRUE) - - if(WEAPON_RAILGUN) - var/datum/cause_data/antishiprailgun_cause_data = create_cause_data("Railgun shot") - var/hitchance = HIT_CHANCE_CHEAT - if(point_defense == TRUE) - hitchance = HIT_CHANCE_STANDARD - if(salvo == TRUE) - var/confirmedhit - for(var/turf/picked_atom in location) - if(prob(hitchance)) - cell_explosion(picked_atom, 600, 600, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, antishiprailgun_cause_data) - shakeship(5, 5, FALSE, FALSE) - confirmedhit += 1 - if(confirmedhit > 0) - weaponhits_effects(WEAPON_RAILGUN) - if(confirmedhit < 1) - weaponhits_effects(WEAPON_RAILGUN, TRUE) - - else if(salvo == FALSE) - if(prob(hitchance)) - cell_explosion(location, 600, 600, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, antishiprailgun_cause_data) - shakeship(5, 5, FALSE, FALSE) - weaponhits_effects(WEAPON_RAILGUN) - else - weaponhits_effects(WEAPON_RAILGUN, TRUE) - -/proc/weaponhits_effects(weaponused, weaponmiss = FALSE, shotspacing = 0) - switch(weaponused) - if(WEAPON_MISSILE) - if(!weaponmiss) - for(var/mob/living/carbon/current_mob in GLOB.living_mob_list) - if(!is_mainship_level(current_mob.z)) - continue - playsound_client(current_mob.client, 'sound/effects/metal_crash.ogg', 100 ) - playsound_client(current_mob.client, 'sound/effects/bigboom3.ogg', 100) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), current_mob.client, 'sound/effects/pry2.ogg', 20), 1 SECONDS) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), current_mob.client, 'sound/effects/double_klaxon.ogg'), 2 SECONDS) - else - for(var/mob/living/carbon/current_mob in GLOB.living_mob_list) - if(!is_mainship_level(current_mob.z)) - continue - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), current_mob.client, 'sound/effects/laser_point_defence_success.ogg', 100), shotspacing SECONDS) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), current_mob.client, SPAN_DANGER("You hear the Point Defense systems shooting down a missile!")), shotspacing SECONDS) - - if(WEAPON_RAILGUN) - if(!weaponmiss) - for(var/mob/living/carbon/current_mob in GLOB.living_mob_list) - if(!is_mainship_level(current_mob.z)) - continue - playsound_client(current_mob.client, 'sound/effects/bigboom3.ogg', 50) - playsound_client(current_mob.client, 'sound/effects/railgunhit.ogg', 50) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), current_mob.client, 'sound/effects/double_klaxon.ogg'), 2 SECONDS) - else - for(var/mob/living/carbon/current_mob in GLOB.living_mob_list) - if(!is_mainship_level(current_mob.z)) - continue - playsound_client (current_mob.client, 'sound/effects/railgun_miss.ogg', 60) - to_chat(current_mob.client, SPAN_DANGER("You hear railgun shots barely missing the hull!")) -//REMOVE THIS WHEN WE USE THESE DEFS SOMEWHERE ELSE OR ELSE IT STRAIGHT UP WON'T WORK. -#undef WEAPON_MISSILE -#undef WEAPON_RAILGUN -#undef HIT_CHANCE_CHEAT -#undef HIT_CHANCE_STANDARD +/datum/space_weapon + var/name = "SMP" + var/list/possibly_ammunition = list() + //add some useful things here and make it object... later... skill issue. + +/datum/space_weapon/proc/on_shot(location, list/potential_ammo, intercept_chance, delay = 0) + var/intercepted = 0 + var/missed = 0 + var/hits = 0 + for(var/turf/picked_atom in location) + var/datum/space_weapon_ammo/ammo = GLOB.space_weapons_ammo[pick(potential_ammo)] + var/accuracy = rand(1, 100) + if(ammo.interceptable && intercept_chance > accuracy) + ammo.miss_target(picked_atom, TRUE) + intercepted++ + else if(ammo.base_miss_chance + intercept_chance > accuracy) + ammo.miss_target(picked_atom, FALSE) + missed++ + else + ammo.hit_target(picked_atom) + hits++ + sleep(delay) + shipwide_ai_announcement("WARNING, [hits] HIT SHIP HULL, [missed] MISSED AND [intercepted] INTERCEPTED!", MAIN_AI_SYSTEM, 'sound/effects/double_klaxon.ogg') + +/datum/space_weapon/proc/shot_message(quantity, hit_eta) + return + +/datum/space_weapon/rail_gun + name = "Railgun" + possibly_ammunition = list( + /datum/space_weapon_ammo/rail_gun, + /datum/space_weapon_ammo/rail_gun/stronk, + ) + +/datum/space_weapon/rail_gun/shot_message(quantity, hit_eta) + shipwide_ai_announcement("DANGER: RAILGUN EMISSIONS DETECTED, INCOMING PROJECTILE[quantity > 1 ? "S" : ""]. BRACE, BRACE, BRACE. [quantity > 1 ? "SALVO SIZE: [quantity]," : ""] ESTIMATED TIME: [hit_eta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') + +/datum/space_weapon/rocket_launcher + name = "Rocket Launcher" + possibly_ammunition = list( + /datum/space_weapon_ammo/rocket_launcher, + /datum/space_weapon_ammo/rocket_launcher/swing_rockets, + ) + +/datum/space_weapon/rocket_launcher/shot_message(quantity, hit_eta) + shipwide_ai_announcement("DANGER: MISSILE WARNING, LAUNCH DETECTED. BRACE, BRACE, BRACE. [quantity > 1 ? "SALVO SIZE: [quantity]," : ""] ESTIMATED TIME: [hit_eta] SECONDS." , MAIN_AI_SYSTEM, 'sound/effects/missile_warning.ogg') + +/** + * Ammo datum for space weapons + */ +/datum/space_weapon_ammo + var/name = "SMP" + var/base_miss_chance = 25 + var/list/miss_sound = list() + var/list/intercept_sound = list() + var/list/hit_sound = list() + var/interceptable = TRUE + +/datum/space_weapon_ammo/proc/miss_target(picked_atom, intercepted) + return + +/datum/space_weapon_ammo/proc/hit_target(picked_atom) + return + +/datum/space_weapon_ammo/rail_gun + name = "Piercing Near-Lightning Railgun Projectile" + base_miss_chance = 35 + miss_sound = list('sound/effects/railgun_miss.ogg') + intercept_sound = list('sound/effects/laser_point_defence_success.ogg') + hit_sound = list('sound/effects/railgunhit.ogg') + +/datum/space_weapon_ammo/rail_gun/miss_target(picked_atom, intercepted) + var/list/echo_list = new /list(18) + echo_list[ECHO_OBSTRUCTION] = -2500 + if(intercepted) + playsound(picked_atom, pick(intercept_sound), 100, 1, 100, echo = echo_list) + else + playsound(picked_atom, pick(miss_sound), 5, 1, 100, echo = echo_list) + shipwide_ai_announcement("[capitalize(name)] [intercepted ? "INTERCEPTED" : "MISSED"]!", MAIN_AI_SYSTEM, 'sound/effects/double_klaxon.ogg') + +/datum/space_weapon_ammo/rail_gun/hit_target(picked_atom) + var/list/echo_list = new /list(18) + echo_list[ECHO_OBSTRUCTION] = -500 + cell_explosion(picked_atom, 1000, 200, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, create_cause_data(name)) + shakeship(5, 5, FALSE, FALSE) + playsound(picked_atom, "bigboom", 50, 1, 200, echo = echo_list) + playsound(picked_atom, pick(hit_sound), 50, 1, 200, echo = echo_list) + shipwide_ai_announcement("WARNING, [capitalize(name)] HIT SHIP HULL, CAUSED MASSIVE DAMAGE!", MAIN_AI_SYSTEM, 'sound/effects/double_klaxon.ogg') + +/datum/space_weapon_ammo/rail_gun/stronk + name = "Piercing Near-Lightning Railgun Projectile of Increased Strength" + base_miss_chance = 50 + interceptable = FALSE + +/datum/space_weapon_ammo/rocket_launcher + name = "Anti-Ship missile" + base_miss_chance = 15 + miss_sound = list('sound/effects/metal_shatter.ogg') + intercept_sound = list('sound/effects/laser_point_defence_success.ogg') + hit_sound = list('sound/effects/metal_crash.ogg') + +/datum/space_weapon_ammo/rocket_launcher/miss_target(picked_atom, intercepted) + var/list/echo_list = new(18) + echo_list[ECHO_OBSTRUCTION] = -2500 + if(intercepted) + playsound(picked_atom, pick(intercept_sound), 100, 1, 100, echo = echo_list) + else + playsound(picked_atom, pick(miss_sound), 5, 1, 100, echo = echo_list) + shipwide_ai_announcement("[capitalize(name)] [intercepted ? "INTERCEPTED" : "MISSED"]!", MAIN_AI_SYSTEM, 'sound/effects/double_klaxon.ogg') + +/datum/space_weapon_ammo/rocket_launcher/hit_target(picked_atom) + var/list/echo_list = new(18) + echo_list[ECHO_OBSTRUCTION] = -500 + cell_explosion(picked_atom, 500, 10, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, create_cause_data(name)) + shakeship(5, 5, FALSE, FALSE) + playsound(picked_atom, "bigboom", 50, 1, 200, echo = echo_list) + playsound(picked_atom, pick(hit_sound), 50, 1, 200, echo = echo_list) + playsound(picked_atom, "pry", 25, 1, 200, echo = echo_list) + shipwide_ai_announcement("WARNING, [capitalize(name)] HIT SHIP HULL, CAUSED MASSIVE DAMAGE!", MAIN_AI_SYSTEM, 'sound/effects/double_klaxon.ogg') + +/datum/space_weapon_ammo/rocket_launcher/swing_rockets + name = "Swing High Pierce Shreder Rockets" + base_miss_chance = 0 + +/datum/space_weapon_ammo/rocket_launcher/swing_rockets/hit_target(picked_atom) + var/list/echo_list = new /list(18) + echo_list[ECHO_OBSTRUCTION] = -500 + var/list/turf_list = list() + for(var/turf/turf in range(7, picked_atom)) + turf_list += turf + + playsound(picked_atom, "pry", 25, 1, 200, echo = echo_list) + playsound(picked_atom, pick(hit_sound), 50, 1, 200, echo = echo_list) + playsound(picked_atom, "bigboom", 50, 1, 200, echo = echo_list) + for(var/i = 1 to 12) + var/turf/turf = pick(turf_list) + cell_explosion(turf, 100, 10, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, create_cause_data(name)) + playsound(turf, "bigboom", 40, 1, 20, echo = echo_list) + shakeship(2, 2, FALSE, FALSE) + sleep(1) + + shipwide_ai_announcement("WARNING, [capitalize(name)] HIT SHIP HULL, CAUSED MASSIVE DOT DAMAGE!", MAIN_AI_SYSTEM, 'sound/effects/double_klaxon.ogg') diff --git a/code/modules/autowiki/pages/_page.dm b/code/modules/autowiki/pages/_page.dm index 0e4091d0ccc5..7bd7b6dcf42c 100644 --- a/code/modules/autowiki/pages/_page.dm +++ b/code/modules/autowiki/pages/_page.dm @@ -27,6 +27,7 @@ /// something that looks like `{{ Autowiki_Circuit|name=Combiner|description=This combines }}` /// Lists, which must be array-like (no keys), will be turned into a flat list with their key and a number, /// such that list("food" = list("fruit", "candy")) -> food1=fruit|food2=candy +/// Your page should respect AUTOWIKI_SKIP, and check for this using IS_AUTOWIKI_SKIP /datum/autowiki/proc/include_template(name, parameters) var/template_text = "{{[name]" diff --git a/code/modules/autowiki/pages/guns.dm b/code/modules/autowiki/pages/guns.dm index 017c2535a5e1..4c276fb91b53 100644 --- a/code/modules/autowiki/pages/guns.dm +++ b/code/modules/autowiki/pages/guns.dm @@ -42,6 +42,9 @@ for(var/ammo_typepath in valid_mag_types) var/obj/item/ammo_magazine/generating_mag = new ammo_typepath() + if(IS_AUTOWIKI_SKIP(generating_mag)) + continue + var/ammo_filename = SANITIZE_FILENAME(escape_value(format_text(generating_mag.name))) if(!fexists("data/autowiki_files/[ammo_filename].png")) @@ -61,6 +64,8 @@ )) generating_gun.current_mag = generating_mag + generating_gun.ammo = current_ammo + generating_gun.in_chamber = null var/list/gun_ammo_data = generating_gun.ui_data() var/list/armor_data = list() @@ -68,18 +73,63 @@ var/iterator = 1 for(var/header in gun_ammo_data["damage_armor_profile_headers"]) var/damage = gun_ammo_data["damage_armor_profile_marine"][iterator] + if(!damage) + break armor_data["armor-[header]"] = damage iterator++ var/list/damage = list("ammo_name" = escape_value(generating_mag.name)) - damage += armor_data + if(length(armor_data)) + damage += armor_data damage_table += include_template("Autowiki/DamageVersusArmorRow", damage) qdel(generating_mag) + var/grenades = "" + if(istype(generating_gun, /obj/item/weapon/gun/launcher/grenade)) + var/obj/item/weapon/gun/launcher/grenade/generating_launcher = generating_gun + + var/list/permitted_grenades = list() + for(var/obj/item/explosive/grenade/type as anything in generating_launcher.valid_munitions) + permitted_grenades |= subtypesof(type) + + var/list/unique_grenades = list() + var/list/unique_grenade_names = list() + for(var/obj/item/explosive/grenade/grenade_type as anything in permitted_grenades) + if(initial(grenade_type.name) in unique_grenade_names) + continue + unique_grenade_names += initial(grenade_type.name) + unique_grenades += grenade_type + + var/list/denied_grenades = list() + for(var/type in generating_launcher.disallowed_grenade_types) + denied_grenades |= typesof(type) + + var/valid_grenades = unique_grenades.Copy() - denied_grenades.Copy() + + for(var/grenade_path in valid_grenades) + var/obj/item/explosive/grenade/generating_grenade = new grenade_path() + + if(IS_AUTOWIKI_SKIP(generating_grenade)) + continue + + var/grenade_filename = SANITIZE_FILENAME(escape_value(format_text(generating_grenade.name))) + + if(!fexists("data/autowiki_files/[grenade_filename].png")) + upload_icon(getFlatIcon(generating_grenade, no_anim = TRUE), grenade_filename) + + grenades += include_template("Autowiki/Grenade", list( + "icon" = escape_value(grenade_filename), + "name" = escape_value(generating_grenade.name), + "description" = escape_value(generating_grenade.desc) + )) + + qdel(generating_grenade) + gun_data["ammo_types"] = ammo gun_data["damage_table"] = damage_table + gun_data["grenades"] = grenades var/list/attachments_by_slot = list() for(var/obj/item/attachable/attachment_typepath as anything in generating_gun.attachable_allowed) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 463a4b16f7ec..845ce2a6eb6e 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -379,8 +379,8 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list( ) var/obj/item/storage/internal/headgear/pockets - var/storage_slots = 2 // keep in mind, one slot is reserved for garb items - var/storage_slots_reserved_for_garb = 2 + var/storage_slots = 2 // Small items like injectors, bandages, etc + var/storage_slots_reserved_for_garb = 2 // Cosmetic items & now cigarettes and lighters for RP var/storage_max_w_class = SIZE_TINY // can hold tiny items only, EXCEPT for glasses & metal flask. var/storage_max_storage_space = 4 diff --git a/code/modules/clothing/suits/marine_armor/_marine_armor.dm b/code/modules/clothing/suits/marine_armor/_marine_armor.dm index 8a8d5934b506..3d89ecb7cabb 100644 --- a/code/modules/clothing/suits/marine_armor/_marine_armor.dm +++ b/code/modules/clothing/suits/marine_armor/_marine_armor.dm @@ -254,7 +254,7 @@ desc = "A standard Colonial Marines M2 Pattern Chestplate. Protects the chest from ballistic rounds, bladed objects and accidents. It has a small leather pouch strapped to it for limited storage." icon_state = "mp_armor" armor_melee = CLOTHING_ARMOR_MEDIUMHIGH - armor_bullet = CLOTHING_ARMOR_LOW + armor_bullet = CLOTHING_ARMOR_MEDIUM armor_laser = CLOTHING_ARMOR_LOW armor_energy = CLOTHING_ARMOR_LOW armor_bomb = CLOTHING_ARMOR_MEDIUM @@ -287,19 +287,17 @@ black_market_value = 20 /obj/item/clothing/suit/storage/marine/MP/warden - icon_state = "warden" name = "\improper M3 pattern warden MP armor" desc = "A well-crafted suit of M3 Pattern Armor typically distributed to Wardens. Useful for letting your men know who is in charge." - armor_bio = CLOTHING_ARMOR_MEDIUMLOW - armor_rad = CLOTHING_ARMOR_MEDIUMLOW + icon_state = "warden" uniform_restricted = list(/obj/item/clothing/under/marine/warden) specialty = "M3 pattern warden MP" item_state_slots = list(WEAR_JACKET = "warden") /obj/item/clothing/suit/storage/marine/MP/WO - icon_state = "warrant_officer" name = "\improper M3 pattern chief MP armor" desc = "A well-crafted suit of M3 Pattern Armor typically distributed to Chief MPs. Useful for letting your men know who is in charge." + icon_state = "warrant_officer" uniform_restricted = list(/obj/item/clothing/under/marine/officer/warrant) specialty = "M3 pattern chief MP" item_state_slots = list(WEAR_JACKET = "warrant_officer") diff --git a/code/modules/clothing/suits/marine_armor/smartgunner.dm b/code/modules/clothing/suits/marine_armor/smartgunner.dm index 8f39ef83045c..f52956edd97d 100644 --- a/code/modules/clothing/suits/marine_armor/smartgunner.dm +++ b/code/modules/clothing/suits/marine_armor/smartgunner.dm @@ -33,7 +33,8 @@ . = ..() if(equipping_mob.back && !(equipping_mob.back.flags_item & SMARTGUNNER_BACKPACK_OVERRIDE)) - to_chat(equipping_mob, SPAN_WARNING("You can't equip [src] while wearing a backpack.")) + if(!disable_warning) + to_chat(equipping_mob, SPAN_WARNING("You can't equip [src] while wearing a backpack.")) return FALSE /obj/item/clothing/suit/storage/marine/smartgunner/equipped(mob/user, slot, silent) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index d78c0faeeca8..4e4041971807 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -102,42 +102,60 @@ /obj/item/clothing/accessory/stethoscope name = "stethoscope" - desc = "An outdated medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing." + desc = "An outdated, but still useful, medical apparatus for listening to the sounds of the human body. It also makes you look like you know what you're doing." icon_state = "stethoscope" -/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) - if(ishuman(M) && isliving(user)) +/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/being, mob/living/user) + if(ishuman(being) && isliving(user)) if(user.a_intent == INTENT_HELP) var/body_part = parse_zone(user.zone_selected) if(body_part) - var/their = "their" - switch(M.gender) - if(MALE) their = "his" - if(FEMALE) their = "her" - - var/sound = "pulse" - var/sound_strength - - if(M.stat == DEAD || (M.status_flags&FAKEDEATH)) - sound_strength = "cannot hear" - sound = "anything" + var/sound = null + if(being.stat == DEAD || (being.status_flags&FAKEDEATH)) + sound = "can't hear anything at all, they must have kicked the bucket" else - sound_strength = "hear a weak" switch(body_part) if("chest") - if(M.oxyloss < 50) - sound_strength = "hear a healthy" - sound = "pulse and respiration" + if(skillcheck(user, SKILL_MEDICAL, SKILL_MEDICAL_MEDIC)) // only medical personnel can take advantage of it + if(!ishuman(being)) + return // not a human; only humans have the variable internal_organs_by_name // "cast" it a human type since we confirmed it is one + if(isnull(being.internal_organs_by_name)) + return // they have no organs somehow + var/datum/internal_organ/heart/heart = being.internal_organs_by_name["heart"] + if(heart) + switch(heart.organ_status) + if(ORGAN_LITTLE_BRUISED) + sound = "hear small murmurs with each heart beat, it is possible that [being.p_their()] heart is subtly damaged" + if(ORGAN_BRUISED) + sound = "hear deviant heart beating patterns, result of probable heart damage" + if(ORGAN_BROKEN) + sound = "hear irregular and additional heart beating patterns, probably caused by impaired blood pumping, [being.p_their()] heart is certainly failing" + else + sound = "hear normal heart beating patterns, [being.p_their()] heart is surely healthy" + var/datum/internal_organ/lungs/lungs = being.internal_organs_by_name["lungs"] + if(lungs) + if(sound) + sound += ". You also " + switch(lungs.organ_status) + if(ORGAN_LITTLE_BRUISED) + sound += "hear some crackles when [being.p_they()] breath, [being.p_they()] is possibly suffering from a small damage to the lungs" + if(ORGAN_BRUISED) + sound += "hear unusual respiration sounds and noticeable difficulty to breath, possibly signalling ruptured lungs" + if(ORGAN_BROKEN) + sound += "barely hear any respiration sounds and a lot of difficulty to breath, [being.p_their()] lungs are heavily failing" + else + sound += "hear normal respiration sounds aswell, that means [being.p_their()] lungs are healthy, probably" + else + sound = "can't hear. Really, anything at all, how weird" + else + sound = "hear a lot of sounds... it's quite hard to distinguish, really" if("eyes","mouth") - sound_strength = "cannot hear" - sound = "anything" + sound = "can't hear anything. Maybe that isn't the smartest idea" else - sound_strength = "hear a weak" - - user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].") + sound = "hear a sound here and there, but none of them give you any good information" + user.visible_message("[user] places [src] against [being]'s [body_part] and listens attentively.", "You place [src] against [being.p_their()] [body_part] and... you [sound].") return - return ..(M,user) - + return ..(being,user) //Medals /obj/item/clothing/accessory/medal @@ -584,6 +602,11 @@ desc = "A brown synthcotton webbing that is similar in function to civilian tool aprons, but is more durable for field usage." hold = /obj/item/storage/internal/accessory/tool_webbing +/obj/item/clothing/accessory/storage/tool_webbing/small + name = "Small Tool Webbing" + desc = "A brown synthcotton webbing that is similar in function to civilian tool aprons, but is more durable for field usage. This is the small low-budget version." + hold = /obj/item/storage/internal/accessory/tool_webbing/small + /obj/item/storage/internal/accessory/tool_webbing storage_slots = 7 can_hold = list( @@ -594,8 +617,24 @@ /obj/item/tool/wirecutters, /obj/item/stack/cable_coil, /obj/item/device/multitool, + /obj/item/tool/shovel/etool, + /obj/item/weapon/gun/smg/nailgun/compact, ) +/obj/item/storage/internal/accessory/tool_webbing/small + storage_slots = 6 + +/obj/item/clothing/accessory/storage/tool_webbing/small/equipped + hold = /obj/item/storage/internal/accessory/tool_webbing/small/equipped + +/obj/item/storage/internal/accessory/tool_webbing/small/equipped/fill_preset_inventory() + new /obj/item/tool/screwdriver(src) + new /obj/item/tool/wrench(src) + new /obj/item/tool/weldingtool(src) + new /obj/item/tool/crowbar(src) + new /obj/item/tool/wirecutters(src) + new /obj/item/device/multitool(src) + /obj/item/clothing/accessory/storage/tool_webbing/equipped hold = /obj/item/storage/internal/accessory/tool_webbing/equipped diff --git a/code/modules/cm_aliens/structures/special/pylon_core.dm b/code/modules/cm_aliens/structures/special/pylon_core.dm index 71211d67e23c..6276215cf025 100644 --- a/code/modules/cm_aliens/structures/special/pylon_core.dm +++ b/code/modules/cm_aliens/structures/special/pylon_core.dm @@ -32,7 +32,7 @@ . = ..() node = place_node() - for(var/turf/A in range(floor(cover_range*PYLON_COVERAGE_MULT), loc)) + for(var/turf/A as anything in RANGE_TURFS(floor(cover_range*PYLON_COVERAGE_MULT), loc)) LAZYADD(A.linked_pylons, src) linked_turfs += A diff --git a/code/modules/cm_marines/anti_air.dm b/code/modules/cm_marines/anti_air.dm index e867c0d64083..3c69a0fe241a 100644 --- a/code/modules/cm_marines/anti_air.dm +++ b/code/modules/cm_marines/anti_air.dm @@ -131,7 +131,7 @@ GLOBAL_DATUM(almayer_aa_cannon, /obj/structure/anti_air_cannon) if(..()) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea how to use that console.")) return TRUE diff --git a/code/modules/cm_marines/dropship_ammo.dm b/code/modules/cm_marines/dropship_ammo.dm index b2c9aa530888..d439ecdadf22 100644 --- a/code/modules/cm_marines/dropship_ammo.dm +++ b/code/modules/cm_marines/dropship_ammo.dm @@ -161,9 +161,7 @@ /obj/structure/ship_ammo/heavygun/detonate_on(turf/impact, obj/structure/dropship_equipment/weapon/fired_from) set waitfor = 0 - var/list/turf_list = list() - for(var/turf/T in range(bullet_spread_range, impact)) - turf_list += T + var/list/turf_list = RANGE_TURFS(bullet_spread_range, impact) var/soundplaycooldown = 0 var/debriscooldown = 0 @@ -243,9 +241,7 @@ /obj/structure/ship_ammo/laser_battery/detonate_on(turf/impact, obj/structure/dropship_equipment/weapon/fired_from) set waitfor = 0 - var/list/turf_list = list() - for(var/turf/T in range(3, impact)) //This is its area of effect - turf_list += T + var/list/turf_list = RANGE_TURFS(3, impact) //This is its area of effect playsound(impact, 'sound/effects/pred_vision.ogg', 20, 1) for(var/i=1 to 16) //This is how many tiles within that area of effect will be randomly ignited var/turf/U = pick(turf_list) diff --git a/code/modules/cm_marines/dropship_equipment.dm b/code/modules/cm_marines/dropship_equipment.dm index c4ac1ac98cad..9203a493c587 100644 --- a/code/modules/cm_marines/dropship_equipment.dm +++ b/code/modules/cm_marines/dropship_equipment.dm @@ -721,9 +721,7 @@ ammo_accuracy_range /= 2 //buff for basically pointblanking the ground - var/list/possible_turfs = list() - for(var/turf/TU in range(ammo_accuracy_range, target_turf)) - possible_turfs += TU + var/list/possible_turfs = RANGE_TURFS(ammo_accuracy_range, target_turf) var/turf/impact = pick(possible_turfs) sleep(3) SA.source_mob = user @@ -1328,9 +1326,7 @@ ammo_accuracy_range /= 2 //buff for basically pointblanking the ground - var/list/possible_turfs = list() - for(var/turf/TU in range(ammo_accuracy_range, target_turf)) - possible_turfs += TU + var/list/possible_turfs = RANGE_TURFS(ammo_accuracy_range, target_turf) var/turf/impact = pick(possible_turfs) sleep(3) SA.source_mob = user diff --git a/code/modules/cm_marines/equipment/kit_boxes.dm b/code/modules/cm_marines/equipment/kit_boxes.dm index 2a2c2d450523..c1621baa9b5d 100644 --- a/code/modules/cm_marines/equipment/kit_boxes.dm +++ b/code/modules/cm_marines/equipment/kit_boxes.dm @@ -283,15 +283,15 @@ specialist_assignment = "Scout" user.skills.set_skill(SKILL_SPEC_WEAPONS, SKILL_SPEC_SCOUT) //this is to be able to use C4s that are coming with the kit - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) - user.skills.set_skill(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) + user.skills.set_skill(SKILL_ENGINEER, SKILL_ENGINEER_NOVICE) if("Demo") spec_box = new /obj/item/storage/box/spec/demolitionist(T) specialist_assignment = "Demo" user.skills.set_skill(SKILL_SPEC_WEAPONS, SKILL_SPEC_ROCKET) //this is to be able to use C4s that are coming with the kit - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) - user.skills.set_skill(SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) + user.skills.set_skill(SKILL_ENGINEER, SKILL_ENGINEER_NOVICE) if(specialist_assignment) user.put_in_hands(spec_box) card.set_assignment((user.assigned_squad && squad_assignment_update ? (user.assigned_squad.name + " ") : "") + card.assignment + " ([specialist_assignment])") diff --git a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm index 1cb93c6a809e..1d6cb3be0a3c 100644 --- a/code/modules/cm_marines/equipment/mortar/mortar_shells.dm +++ b/code/modules/cm_marines/equipment/mortar/mortar_shells.dm @@ -112,7 +112,7 @@ icon_state = initial(icon_state) /obj/item/mortar_shell/custom/attackby(obj/item/W as obj, mob/user) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not know how to tinker with [name].")) return if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER)) diff --git a/code/modules/cm_marines/equipment/mortar/mortars.dm b/code/modules/cm_marines/equipment/mortar/mortars.dm index 018bd7b9e11c..e7e258494e52 100644 --- a/code/modules/cm_marines/equipment/mortar/mortars.dm +++ b/code/modules/cm_marines/equipment/mortar/mortars.dm @@ -91,7 +91,7 @@ if(isyautja(user)) to_chat(user, SPAN_WARNING("You kick [src] but nothing happens.")) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) to_chat(user, SPAN_WARNING("You don't have the training to use [src].")) return if(busy) @@ -213,7 +213,7 @@ var/obj/item/mortar_shell/mortar_shell = item var/turf/target_turf = locate(targ_x + dial_x + offset_x, targ_y + dial_y + offset_y, z) var/area/target_area = get_area(target_turf) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) to_chat(user, SPAN_WARNING("You don't have the training to fire [src].")) return if(busy) @@ -277,7 +277,7 @@ addtimer(CALLBACK(src, PROC_REF(handle_shell), target_turf, mortar_shell), travel_time) if(HAS_TRAIT(item, TRAIT_TOOL_WRENCH)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) to_chat(user, SPAN_WARNING("You don't have the training to undeploy [src].")) return if(fixed) @@ -410,7 +410,7 @@ var/turf/deploy_turf = get_turf(user) if(!deploy_turf) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) to_chat(user, SPAN_WARNING("You don't have the training to deploy [src].")) return var/area/area = get_area(deploy_turf) diff --git a/code/modules/cm_marines/orbital_cannon.dm b/code/modules/cm_marines/orbital_cannon.dm index a4286b043eba..b2e0e014b358 100644 --- a/code/modules/cm_marines/orbital_cannon.dm +++ b/code/modules/cm_marines/orbital_cannon.dm @@ -554,10 +554,7 @@ GLOBAL_LIST_EMPTY(orbital_cannon_cancellation) set waitfor = 0 var/range_num = 12 - var/list/turf_list = list() - - for(var/turf/T in range(range_num, target)) - turf_list += T + var/list/turf_list = RANGE_TURFS(range_num, target) for(var/i = 1 to total_amount) for(var/k = 1 to instant_amount) @@ -681,7 +678,7 @@ GLOBAL_LIST_EMPTY(orbital_cannon_cancellation) if(..()) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea how to use that console.")) return TRUE diff --git a/code/modules/cm_tech/droppod/droppod.dm b/code/modules/cm_tech/droppod/droppod.dm index 030dd11474ec..0dfa8d12aa9f 100644 --- a/code/modules/cm_tech/droppod/droppod.dm +++ b/code/modules/cm_tech/droppod/droppod.dm @@ -168,8 +168,9 @@ for(var/obj/structure/machinery/defenses/def in loc) qdel(def) - for(var/mob/mob in view(7, loc)) + FOR_DVIEW(var/mob/mob, 7, loc, HIDE_INVISIBLE_OBSERVER) shake_camera(mob, 4, 5) + FOR_DVIEW_END addtimer(CALLBACK(src, PROC_REF(open)), open_time) diff --git a/code/modules/cm_tech/implements/xeno_handler.dm b/code/modules/cm_tech/implements/xeno_handler.dm index cbafec7499ee..d3340ffcdff8 100644 --- a/code/modules/cm_tech/implements/xeno_handler.dm +++ b/code/modules/cm_tech/implements/xeno_handler.dm @@ -53,7 +53,7 @@ SKILL_FIREARMS = SKILL_FIREARMS_EXPERT, SKILL_POLICE = SKILL_POLICE_SKILLED, SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI, - SKILL_ENGINEER = SKILL_ENGINEER_ENGI, + SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, SKILL_LEADERSHIP = SKILL_LEAD_MASTER, SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED, SKILL_ENDURANCE = SKILL_ENDURANCE_EXPERT, diff --git a/code/modules/defenses/defenses.dm b/code/modules/defenses/defenses.dm index af4e497862fa..fef8498f802a 100644 --- a/code/modules/defenses/defenses.dm +++ b/code/modules/defenses/defenses.dm @@ -185,7 +185,7 @@ additional_shock++ if(prob(50)) var/mob/living/carbon/human/H = user - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) if(turned_on) additional_shock++ H.electrocute_act(40, src, additional_shock)//god damn Hans... @@ -204,7 +204,7 @@ to_chat(user, SPAN_WARNING("You've hacked \the [src], it's now ours!")) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) to_chat(user, SPAN_WARNING("You don't have the training to do this.")) return // if the sentry can have key interacted with @@ -368,7 +368,7 @@ to_chat(user, SPAN_WARNING("It must be anchored to the ground before you can activate it.")) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) if(locked) to_chat(user, SPAN_WARNING("The control panel on [src] is locked to non-engineers.")) return @@ -490,7 +490,7 @@ return if(!friendly_faction(usr.faction)) return - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You don't have the training to do this.")) return diff --git a/code/modules/defenses/handheld.dm b/code/modules/defenses/handheld.dm index 5b5831c9bb15..242d902cbd13 100644 --- a/code/modules/defenses/handheld.dm +++ b/code/modules/defenses/handheld.dm @@ -114,7 +114,8 @@ . += list("DMR Upgrade" = image(icon = 'icons/obj/structures/machinery/defenses/sentry.dmi', icon_state = "DMR uac_sentry_handheld")) . += list( "Shotgun Upgrade" = image(icon = 'icons/obj/structures/machinery/defenses/sentry.dmi', icon_state = "Shotgun uac_sentry_handheld"), - "Mini-Sentry Upgrade" = image(icon = 'icons/obj/structures/machinery/defenses/sentry.dmi', icon_state = "Mini uac_sentry_handheld") + "Mini-Sentry Upgrade" = image(icon = 'icons/obj/structures/machinery/defenses/sentry.dmi', icon_state = "Mini uac_sentry_handheld"), + "Omni-Sentry Upgrade" = image(icon = 'icons/obj/structures/machinery/defenses/sentry.dmi', icon_state="Normal uac_sentry_handheld") ) /obj/item/defenses/handheld/sentry/upgrade_string_to_type(upgrade_string) @@ -125,6 +126,8 @@ return /obj/item/defenses/handheld/sentry/shotgun if("Mini-Sentry Upgrade") return /obj/item/defenses/handheld/sentry/mini + if("Omni-Sentry Upgrade") + return /obj/item/defenses/handheld/sentry/omni /obj/item/defenses/handheld/sentry/dmr name = "handheld UA 725-D sniper sentry" @@ -143,6 +146,12 @@ defense_type = /obj/structure/machinery/defenses/sentry/mini deployment_time = 0.75 SECONDS +/obj/item/defenses/handheld/sentry/omni + name = "handheld UA 571-D omnidirectional sentry gun" + icon = 'icons/obj/structures/machinery/defenses/sentry.dmi' + icon_state = "Normal uac_sentry_handheld" + defense_type = /obj/structure/machinery/defenses/sentry/omni + /obj/item/defenses/handheld/sentry/wy name = "handheld WY 202-GMA1 smart sentry" desc = "A compact version of the Weyland-Yutani defenses. Designed for deployment in the field." diff --git a/code/modules/defenses/sentry.dm b/code/modules/defenses/sentry.dm index 8ad4cd407e75..6c9c5ad68fea 100644 --- a/code/modules/defenses/sentry.dm +++ b/code/modules/defenses/sentry.dm @@ -223,7 +223,7 @@ if(istype(O, ammo)) var/obj/item/ammo_magazine/M = O - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI) || user.action_busy) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) || user.action_busy) return if(ammo.current_rounds) @@ -900,5 +900,11 @@ omni_directional = TRUE handheld_type = /obj/item/defenses/handheld/sentry/upp/light +/obj/structure/machinery/defenses/sentry/omni + name = "\improper UA 571-D omnidirectional sentry gun" + omni_directional = TRUE + damage_mult = 0.7 + sentry_range = 4 + #undef SENTRY_FIREANGLE #undef SENTRY_RANGE diff --git a/code/modules/defenses/sentry_computer.dm b/code/modules/defenses/sentry_computer.dm index 639a74e6ba30..3c278a6c06b2 100644 --- a/code/modules/defenses/sentry_computer.dm +++ b/code/modules/defenses/sentry_computer.dm @@ -308,7 +308,7 @@ . = ..() if(!on) return UI_CLOSE - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) return UI_UPDATE @@ -383,7 +383,7 @@ . = ..() if(.) return - if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(usr, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(usr, SPAN_WARNING("You are not authorised to configure the sentry.")) return if(params["index"]) diff --git a/code/modules/defenses/tesla_coil.dm b/code/modules/defenses/tesla_coil.dm index 0eab59e7d7c4..0f7a0090300a 100644 --- a/code/modules/defenses/tesla_coil.dm +++ b/code/modules/defenses/tesla_coil.dm @@ -70,7 +70,7 @@ /obj/structure/machinery/defenses/tesla_coil/proc/get_target() targets = list() - for(var/mob/living/M in oview(tesla_range, src)) + FOR_DOVIEW(var/mob/living/M, tesla_range, src, HIDE_INVISIBLE_OBSERVER) if(M.stat == DEAD) continue if(HAS_TRAIT(M, TRAIT_CHARGING)) @@ -81,10 +81,12 @@ continue targets += M + FOR_DOVIEW_END - for(var/obj/structure/machinery/defenses/D in oview(tesla_range, src)) + FOR_DOVIEW(var/obj/structure/machinery/defenses/D, tesla_range, src, HIDE_INVISIBLE_OBSERVER) if(D.turned_on) targets += D + FOR_DOVIEW_END /obj/structure/machinery/defenses/tesla_coil/proc/fire(atoms) if(!(world.time - last_fired >= fire_delay) || !turned_on) diff --git a/code/modules/desert_dam/motion_sensor/sensortower.dm b/code/modules/desert_dam/motion_sensor/sensortower.dm index a3f33d4da078..41859167458f 100644 --- a/code/modules/desert_dam/motion_sensor/sensortower.dm +++ b/code/modules/desert_dam/motion_sensor/sensortower.dm @@ -101,7 +101,7 @@ add_fingerprint(user) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how this thing works...")) return FALSE @@ -135,7 +135,7 @@ to_chat(user, SPAN_WARNING("You need a stronger blowtorch!")) return if(buildstate == SENSORTOWER_BUILDSTATE_BLOWTORCH && !is_on) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair this thing.")) return FALSE var/obj/item/tool/weldingtool/WT = O @@ -159,7 +159,7 @@ else if(HAS_TRAIT(O, TRAIT_TOOL_WIRECUTTERS)) if(buildstate == SENSORTOWER_BUILDSTATE_WIRECUTTERS && !is_on) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair this thing.")) return FALSE playsound(loc, 'sound/items/Wirecutter.ogg', 25, 1) @@ -176,7 +176,7 @@ return TRUE else if(HAS_TRAIT(O, TRAIT_TOOL_WRENCH)) if(buildstate == SENSORTOWER_BUILDSTATE_WRENCH && !is_on) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no clue how to repair this thing.")) return FALSE playsound(loc, 'sound/items/Ratchet.ogg', 25, 1) diff --git a/code/modules/gear_presets/_select_equipment.dm b/code/modules/gear_presets/_select_equipment.dm index 09f20161e18c..1a61aa39efe8 100644 --- a/code/modules/gear_presets/_select_equipment.dm +++ b/code/modules/gear_presets/_select_equipment.dm @@ -115,7 +115,7 @@ if(GLOB.data_core.leveled_riflemen > GLOB.data_core.leveled_riflemen_max) return PAY_SHORT_ME2 else - GLOB.data_core.leveled_riflemen_max++ + GLOB.data_core.leveled_riflemen++ return final_paygrade if(!final_paygrade) . = "???" diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index 76b0ea2c9341..ba4a8a684321 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -546,7 +546,6 @@ new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/almayer/mcom(new_human), WEAR_L_EAR) new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/officer/bridge(new_human), WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/dress(new_human), WEAR_FEET) - new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/m4a3/mod88(new_human), WEAR_WAIST) new_human.equip_to_slot_or_del(new /obj/item/clothing/head/cmcap/bridge(new_human), WEAR_HEAD) new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large(new_human), WEAR_L_STORE) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index e1c3bf49af8a..286645fc7001 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -164,8 +164,7 @@ if(pickup_recent_item_on_turf(user_turf)) return - var/range_list = orange(1, src) - for(var/turf/nearby_turf in range_list) + for(var/turf/nearby_turf in orange(1, src)) if(pickup_recent_item_on_turf(nearby_turf)) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 5d0ce8be586f..629d9b0427f3 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -379,7 +379,7 @@ if(!lastarea) lastarea = get_area(src.loc) - if((istype(loc, /turf/open/space)) || !lastarea.has_gravity) + if(istype(loc, /turf/open/space)) inertia_dir = get_dir(target, src) step(src, inertia_dir) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 3f419333d218..733f330b051f 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -109,6 +109,8 @@ if(I == wear_suit) if(s_store && !(s_store.flags_equip_slot & SLOT_SUIT_STORE)) drop_inv_item_on_ground(s_store) + if(back && (back.flags_item & SMARTGUNNER_BACKPACK_OVERRIDE)) // Technically some items don't need to be unequipped though + drop_inv_item_on_ground(back) wear_suit = null if(I.flags_inv_hide & HIDESHOES) update_inv_shoes() @@ -412,6 +414,8 @@ /mob/living/carbon/human/get_item_by_slot(slot_id) switch(slot_id) + if(WEAR_ACCESSORY) + return w_uniform.accessories if(WEAR_BACK) return back if(WEAR_FACE) diff --git a/code/modules/mob/living/carbon/human/life/handle_grabbed.dm b/code/modules/mob/living/carbon/human/life/handle_grabbed.dm index 14d22557417f..0c588da7ca4b 100644 --- a/code/modules/mob/living/carbon/human/life/handle_grabbed.dm +++ b/code/modules/mob/living/carbon/human/life/handle_grabbed.dm @@ -9,3 +9,7 @@ if(pulledby.grab_level >= GRAB_CHOKE) apply_damage(3, OXY) apply_stamina_damage(5) + + log_attack("[key_name(pulledby)] choked [key_name(src)] at [get_area_name(src)]") + attack_log += text("\[[time_stamp()]\] was choked by [key_name(pulledby)]") + pulledby.attack_log += text("\[[time_stamp()]\] choked [key_name(src)]") diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index c95efd8a2995..c0083181fcf2 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -134,9 +134,10 @@ return if(RADIO_CHANNEL_INTERCOM) message_mode = null - for(var/obj/item/device/radio/intercom/I in view(1)) + FOR_DVIEW(var/obj/item/device/radio/intercom/I, 1, src, HIDE_INVISIBLE_OBSERVER) used_radios += I break // remove this if we EVER have two different intercomms with DIFFERENT frequencies IN ONE ROOM + FOR_DVIEW_END else if(message_mode != MESSAGE_MODE_LOCAL) var/earpiece = get_type_in_ears(/obj/item/device/radio) diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index eb5ec949cece..cd4a08aefef7 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -79,10 +79,11 @@ listening += C //pass on the message to objects that can hear us. - for (var/obj/O in view(message_range, src)) + FOR_DVIEW(var/obj/O, message_range, src, HIDE_INVISIBLE_OBSERVER) spawn (0) if (O) O.hear_talk(src, message) //O.hear_talk(src, message, verb, speaking) + FOR_DVIEW_END var/list/eavesdropping = hearers(eavesdropping_range, src) eavesdropping -= src diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index 09b99871e936..6c220f41ad45 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -37,6 +37,10 @@ to_chat(X, SPAN_XENOWARNING("There already is a tunnel here.")) return + if(locate(/obj/structure/machinery/sentry_holder/landing_zone) in X.loc) + to_chat(X, SPAN_XENOWARNING("We can't dig a tunnel with this object in the way.")) + return + if(X.tunnel_delay) to_chat(X, SPAN_XENOWARNING("We are not ready to dig a tunnel again.")) return @@ -140,16 +144,18 @@ xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits an ear-splitting guttural roar!")) xeno.create_shriekwave(14) //Adds the visual effect. Wom wom wom, 14 shriekwaves - for(var/mob/mob in view()) + FOR_DVIEW(var/mob/mob, world.view, owner, HIDE_INVISIBLE_OBSERVER) if(mob && mob.client) if(isxeno(mob)) shake_camera(mob, 10, 1) else shake_camera(mob, 30, 1) //50 deciseconds, SORRY 5 seconds was way too long. 3 seconds now + FOR_DVIEW_END var/list/mobs_in_view = list() - for(var/mob/living/carbon/M in oview(7, xeno)) + FOR_DOVIEW(var/mob/living/carbon/M, 7, xeno, HIDE_INVISIBLE_OBSERVER) mobs_in_view += M + FOR_DOVIEW_END for(var/mob/living/carbon/M in orange(10, xeno)) if(SEND_SIGNAL(M, COMSIG_MOB_SCREECH_ACT, xeno) & COMPONENT_SCREECH_ACT_CANCEL) continue @@ -243,7 +249,7 @@ var/whisper = strip_html(input("Message:", "Psychic Radiance") as text|null) if(!whisper || !xeno_player.check_state(TRUE)) return - for(var/mob/living/possible_target in view(12, xeno_player)) + FOR_DVIEW(var/mob/living/possible_target, 12, xeno_player, HIDE_INVISIBLE_OBSERVER) if(possible_target == xeno_player || !possible_target.client) continue target_list += possible_target @@ -251,6 +257,7 @@ to_chat(possible_target, SPAN_XENOQUEEN("You hear a strange, alien voice in your head. \"[whisper]\"")) else to_chat(possible_target, SPAN_XENOQUEEN("You hear the voice of [xeno_player] resonate in your head. \"[whisper]\"")) + FOR_DVIEW_END if(!length(target_list)) return var/targetstring = english_list(target_list) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm index 87657af5ce7a..7e9504260209 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm @@ -21,9 +21,9 @@ var/wait_time = 10 - var/turf/T = get_turf(O) + var/turf/turf = get_turf(O) - for(var/obj/effect/xenomorph/acid/A in T) + for(var/obj/effect/xenomorph/acid/A in turf) if(acid_type == A.type && A.acid_t == O) to_chat(src, SPAN_WARNING("[A] is already drenched in acid.")) return @@ -47,22 +47,22 @@ to_chat(src, SPAN_WARNING("[O] is already weakened.")) return - var/dissolvability = T.can_be_dissolved() + var/dissolvability = turf.can_be_dissolved() switch(dissolvability) if(0) - to_chat(src, SPAN_WARNING("We cannot dissolve [T].")) + to_chat(src, SPAN_WARNING("We cannot dissolve [turf].")) return if(1) wait_time = 50 if(2) if(acid_type != /obj/effect/xenomorph/acid/strong) - to_chat(src, SPAN_WARNING("This [T.name] is too tough to be melted by our weak acid.")) + to_chat(src, SPAN_WARNING("This [turf.name] is too tough to be melted by our weak acid.")) return wait_time = 100 else return - if(istype(T, /turf/closed/wall)) - var/turf/closed/wall/W = T + if(istype(turf, /turf/closed/wall)) + var/turf/closed/wall/W = turf // Direction from wall to the mob generating acid on the wall turf var/ambiguous_dir_msg = SPAN_XENOWARNING("We are unsure which direction to melt through [W]. Face it directly and try again.") @@ -92,7 +92,7 @@ var/acided_hole_type = W.acided_hole_dir & (EAST|WEST) ? "a hole horizontally" : "a hole vertically" to_chat(src, SPAN_XENOWARNING("We begin generating enough acid to melt [acided_hole_type] through [W].")) else - to_chat(src, SPAN_XENOWARNING("We begin generating enough acid to melt through [T].")) + to_chat(src, SPAN_XENOWARNING("We begin generating enough acid to melt through [turf].")) else to_chat(src, SPAN_WARNING("You cannot dissolve [O].")) return @@ -101,7 +101,7 @@ return // AGAIN BECAUSE SOMETHING COULD'VE ACIDED THE PLACE - for(var/obj/effect/xenomorph/acid/A in T) + for(var/obj/effect/xenomorph/acid/A in turf) if(acid_type == A.type && A.acid_t == O) to_chat(src, SPAN_WARNING("[A] is already drenched in acid.")) return @@ -131,7 +131,7 @@ use_plasma(plasma_cost) - var/obj/effect/xenomorph/acid/A = new acid_type(T, O) + var/obj/effect/xenomorph/acid/A = new acid_type(turf, O) if(istype(O, /obj/vehicle/multitile)) var/obj/vehicle/multitile/R = O @@ -167,8 +167,8 @@ REMOVE_TRAIT(H, TRAIT_IMMOBILIZED, trait_source) if(ishuman(H)) - var/mob/living/carbon/human/T = H - T.update_xeno_hostile_hud() + var/mob/living/carbon/human/turf = H + turf.update_xeno_hostile_hud() to_chat(H, SPAN_XENOHIGHDANGER("We can move again!")) /mob/living/carbon/xenomorph/proc/zoom_in() @@ -215,28 +215,28 @@ action.on_zoom_out() return -/mob/living/carbon/xenomorph/proc/do_acid_spray_cone(turf/T, spray_type = /obj/effect/xenomorph/spray, range = 3) +/mob/living/carbon/xenomorph/proc/do_acid_spray_cone(turf/turf, spray_type = /obj/effect/xenomorph/spray, range = 3) set waitfor = FALSE - var/facing = get_cardinal_dir(src, T) + var/facing = get_cardinal_dir(src, turf) setDir(facing) - T = loc + turf = loc for(var/i in 0 to range - 1) - var/turf/next_turf = get_step(T, facing) + var/turf/next_turf = get_step(turf, facing) var/atom/movable/temp = new/obj/effect/xenomorph/spray() - var/atom/movable/AM = LinkBlocked(temp, T, next_turf) + var/atom/movable/AM = LinkBlocked(temp, turf, next_turf) qdel(temp) if(AM) AM.acid_spray_act(src) return - T = next_turf - var/obj/effect/xenomorph/spray/S = new spray_type(T, create_cause_data(initial( caste_type), src), hivenumber) - do_acid_spray_cone_normal(T, i, facing, S, spray_type) + turf = next_turf + var/obj/effect/xenomorph/spray/S = new spray_type(turf, create_cause_data(initial( caste_type), src), hivenumber) + do_acid_spray_cone_normal(turf, i, facing, S, spray_type) sleep(2) // Normal refers to the mathematical normal -/mob/living/carbon/xenomorph/proc/do_acid_spray_cone_normal(turf/T, distance, facing, obj/effect/xenomorph/spray/source_spray, spray_type = /obj/effect/xenomorph/spray) +/mob/living/carbon/xenomorph/proc/do_acid_spray_cone_normal(turf/turf, distance, facing, obj/effect/xenomorph/spray/source_spray, spray_type = /obj/effect/xenomorph/spray) if(!distance) return @@ -246,8 +246,8 @@ var/normal_dir = turn(facing, 90) var/inverse_normal_dir = turn(facing, -90) - var/turf/normal_turf = T - var/turf/inverse_normal_turf = T + var/turf/normal_turf = turf + var/turf/inverse_normal_turf = turf var/normal_density_flag = FALSE var/inverse_normal_density_flag = FALSE @@ -286,27 +286,26 @@ var/turf/prev_turf = loc var/distance = 0 - for(var/turf/T in turflist) + for(var/turf/turf in turflist) distance++ if(!prev_turf && length(turflist) > 1) prev_turf = get_turf(src) continue //So we don't burn the tile we be standin on - if(T.density || istype(T, /turf/open/space)) + if(turf.density || istype(turf, /turf/open/space)) break if(distance > distance_max) break - var/atom/movable/temp = new spray_path() - var/atom/movable/AM = LinkBlocked(temp, prev_turf, T) + var/atom/movable/blocker = LinkBlocked(temp, prev_turf, turf) qdel(temp) - if(AM) - AM.acid_spray_act(src) + if(blocker) + blocker.acid_spray_act(src) break - prev_turf = T - new spray_path(T, create_cause_data(initial(caste_type), src), hivenumber) + prev_turf = turf + new spray_path(turf, create_cause_data(initial(caste_type), src), hivenumber) sleep(2) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm index a240c3928a3c..10bf45eabcc9 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/predalien/predalien_powers.dm @@ -13,7 +13,7 @@ playsound(xeno.loc, pick(predalien_roar), 75, 0, status = 0) xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits a guttural roar!")) xeno.create_shriekwave(7) //Adds the visual effect. Wom wom wom, 7 shriekwaves - for(var/mob/living/carbon/carbon in view(7, xeno)) + FOR_DVIEW(var/mob/living/carbon/carbon, 7, xeno, HIDE_INVISIBLE_OBSERVER) if(ishuman(carbon)) var/mob/living/carbon/human/human = carbon human.disable_special_items() @@ -29,6 +29,7 @@ if(!istype(behavior)) continue new /datum/effects/xeno_buff(carbon, xeno, ttl = (0.25 SECONDS * behavior.kills + 3 SECONDS), bonus_damage = bonus_damage_scale * behavior.kills, bonus_speed = (bonus_speed_scale * behavior.kills)) + FOR_DVIEW_END apply_cooldown() return ..() diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm index 7ceaf2fed75e..1914b2c24b2b 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm @@ -58,10 +58,14 @@ macro_path = /datum/action/xeno_action/verb/verb_apply_salve action_type = XENO_ACTION_CLICK ability_primacy = XENO_PRIMARY_ACTION_3 + xeno_cooldown = 0.5 SECONDS /datum/action/xeno_action/activable/apply_salve/use_ability(atom/target_atom) + if(!action_cooldown_check()) + return var/mob/living/carbon/xenomorph/xeno = owner xeno.xeno_apply_salve(target_atom, health_transfer_amount, max_range, damage_taken_mod) + apply_cooldown() return ..() /datum/action/xeno_action/verb/verb_apply_salve() @@ -124,9 +128,9 @@ adjustBruteLoss(amount * damage_taken_mod) use_plasma(amount * 2) updatehealth() - new /datum/effects/heal_over_time(target_xeno, amount, 10, 1) + new /datum/effects/heal_over_time(target_xeno, heal_amount = amount) target_xeno.xeno_jitter(1 SECONDS) - target_xeno.flick_heal_overlay(10 SECONDS, "#00be6f") + target_xeno.flick_heal_overlay(5 SECONDS, "#00be6f") to_chat(target_xeno, SPAN_XENOWARNING("[src] covers our wounds with a regenerative resin salve. We feel reinvigorated!")) to_chat(src, SPAN_XENOWARNING("We regurgitate our vital fluids and some plasma to create a regenerative resin salve and apply it to [target_xeno]'s wounds. We feel weakened...")) playsound(src, "alien_drool", 25) @@ -135,7 +139,7 @@ if(!target_is_healer && !isfacehugger(target_xeno)) // no cheap grinding healer_delegate.modify_transferred(amount * damage_taken_mod) update_icons() - addtimer(CALLBACK(healer_delegate, /datum/behavior_delegate/drone_healer/proc/un_salve), 10 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE) + addtimer(CALLBACK(healer_delegate, /datum/behavior_delegate/drone_healer/proc/un_salve), 5 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE) /datum/behavior_delegate/drone_healer name = "Healer Drone Behavior Delegate" @@ -257,6 +261,9 @@ xeno.say(";MY LIFE FOR THE QUEEN!!!") + if(target.health < 0) + target.gain_health(abs(target.health)) // gets them out of crit first + target.gain_health(xeno.health * transfer_mod) target.updatehealth() diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm index 0fdaa264bd99..0fb4a17190a1 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/runner/acid.dm @@ -120,7 +120,7 @@ var/max_burn_damage = acid_amount / caboom_burn_damage_ratio var/burn_range = acid_amount / caboom_burn_range_ratio - for(var/barricades in view(bound_xeno, acid_range)) + for(var/barricades in dview(acid_range, bound_xeno)) if(istype(barricades, /obj/structure/barricade)) new caboom_struct_acid_type(get_turf(barricades), barricades) continue @@ -129,7 +129,7 @@ continue var/x = bound_xeno.x var/y = bound_xeno.y - for(var/mob/living/target_living in view(bound_xeno, burn_range)) + FOR_DVIEW(var/mob/living/target_living, burn_range, bound_xeno, HIDE_INVISIBLE_OBSERVER) if (!isxeno_human(target_living) || bound_xeno.can_not_harm(target_living)) continue var/dist = 0 @@ -145,8 +145,10 @@ damage *= XVX_ACID_DAMAGEMULT target_living.apply_damage(damage, BURN) - for(var/turf/T in view(bound_xeno, acid_range)) + FOR_DVIEW_END + FOR_DVIEW(var/turf/T, acid_range, bound_xeno, HIDE_INVISIBLE_OBSERVER) new /obj/effect/particle_effect/smoke/acid_runner_harmless(T) + FOR_DVIEW_END playsound(bound_xeno, 'sound/effects/blobattack.ogg', 75) if(bound_xeno.client && bound_xeno.hive) var/datum/hive_status/hive_status = bound_xeno.hive diff --git a/code/modules/mob/living/living_health_procs.dm b/code/modules/mob/living/living_health_procs.dm index ffe1a56b59f8..4486c20360e3 100644 --- a/code/modules/mob/living/living_health_procs.dm +++ b/code/modules/mob/living/living_health_procs.dm @@ -446,7 +446,7 @@ /mob/living/proc/AdjustEarDeafness(amount) var/prev_deaf = ear_deaf - ear_deaf = max(ear_deaf + amount, 0) + ear_deaf = clamp(ear_deaf + amount, 0, 30) //roughly 1 minute if(prev_deaf) if(ear_deaf == 0) on_deafness_loss() diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 182bc2525c17..03f1b97c3fc7 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -32,8 +32,9 @@ /mob/living/simple_animal/mouse/Life(delta_time) ..() if(!stat && prob(speak_chance)) - for(var/mob/M in view()) + FOR_DVIEW(var/mob/M, world.view, src, HIDE_INVISIBLE_OBSERVER) M << 'sound/effects/mousesqueek.ogg' + FOR_DVIEW_END if(!ckey && stat == CONSCIOUS && prob(0.5)) set_stat(UNCONSCIOUS) diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 2971a3581876..5ee60239db64 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -84,7 +84,7 @@ //1% chance to skitter madly away if(!busy && prob(1)) /*var/list/move_targets = list() - for(var/turf/T in orange(20, src)) + for(var/turf/T as anything in ORANGE_TURFS(20, src)) move_targets.Add(T)*/ stop_automated_movement = 1 walk_to(src, pick(orange(20, src)), 1, move_to_delay) 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 b7c091d564d6..84c5d13f7862 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -175,44 +175,45 @@ spark.holder = null var/obj/loot + var/list/reachable_atoms = dview(7, src) //shards loot = new /obj/item/shard(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(75)) loot = new /obj/item/shard(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(50)) loot = new /obj/item/shard(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(25)) loot = new /obj/item/shard(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) //rods loot = new /obj/item/stack/rods(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(75)) loot = new /obj/item/stack/rods(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(50)) loot = new /obj/item/stack/rods(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(25)) loot = new /obj/item/stack/rods(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) //plasteel loot = new /obj/item/stack/sheet/plasteel(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(75)) loot = new /obj/item/stack/sheet/plasteel(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(50)) loot = new /obj/item/stack/sheet/plasteel(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) if(prob(25)) loot = new /obj/item/stack/sheet/plasteel(loc) - step_to(loot, get_turf(pick(view(7, src)))) + step_to(loot, get_turf(pick(reachable_atoms))) return ..() diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 9dcdae3635cb..10480eb38f6b 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -97,8 +97,9 @@ /obj/item/grab/proc/progress_aggressive(mob/living/carbon/human/user, mob/living/victim) user.grab_level = GRAB_CHOKE - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7) user.visible_message(SPAN_WARNING("[user] holds [victim] by the neck and starts choking them!"), null, null, 5) + msg_admin_attack("[key_name(user)] started to choke [key_name(victim)] at [get_area_name(victim)]", victim.loc.x, victim.loc.y, victim.loc.z) victim.Move(user.loc, get_dir(victim.loc, user.loc)) victim.update_transform(TRUE) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 37a6c46c23cc..058f8ae4aabc 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -420,8 +420,10 @@ GLOBAL_LIST_INIT(limb_types_by_name, list( if(skillcheck(src, SKILL_ENGINEER, SKILL_ENGINEER_MASTER)) return DURATION_MULTIPLIER_TIER_3 else if(skillcheck(src, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) - return DURATION_MULTIPLIER_TIER_2 + return (DURATION_MULTIPLIER_TIER_3 + DURATION_MULTIPLIER_TIER_2) / 2 else if(skillcheck(src, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) + return DURATION_MULTIPLIER_TIER_2 + else if(skillcheck(src, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE)) return DURATION_MULTIPLIER_TIER_1 // Construction if(SKILL_CONSTRUCTION) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index e326ce9e45b3..06e7fe401e16 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -261,12 +261,12 @@ if(istype(src,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to. var/mob/living/carbon/human/H = src - if((istype(turf,/turf/open/floor)) && (src.lastarea.has_gravity == 0) && !(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags_inventory & NOSLIPPING))) + if((istype(turf,/turf/open/floor)) && !(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags_inventory & NOSLIPPING))) continue else - if((istype(turf,/turf/open/floor)) && (src.lastarea && src.lastarea.has_gravity == 0)) // No one else gets a chance. + if(istype(turf,/turf/open/floor)) // No one else gets a chance. continue diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 7e259711a20e..1fee0d5f3bce 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -167,7 +167,7 @@ nanoui is used to open and update nano browser uis else if (allowed_user_stat == -1 || user == src_object) set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) else if (isSilicon(user)) - if (src_object in view(7, user)) // robots can see and interact with things they can see within 7 tiles + if (src_object in dview(7, user)) // robots can see and interact with things they can see within 7 tiles set_status(STATUS_INTERACTIVE, push_update) // interactive (green visibility) else set_status(STATUS_DISABLED, push_update) // no updates, completely disabled (red visibility) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index dd37ac5a8af1..9d4a450852bb 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -10,6 +10,7 @@ var/mob/living/carbon/human/owner = null var/vital //Lose a vital limb, die immediately. var/damage = 0 // amount of damage to the organ + var/min_little_bruised_damage = 1 //to make sure the stethoscope/penlight will not lie to the player var/min_bruised_damage = 10 var/min_broken_damage = 30 var/parent_limb = "chest" @@ -36,16 +37,21 @@ /// Set the correct organ state /datum/internal_organ/proc/set_organ_status() - if(damage > min_broken_damage || cut_away) + if(damage >= min_broken_damage || cut_away) if(organ_status != ORGAN_BROKEN) organ_status = ORGAN_BROKEN return TRUE return FALSE - if(damage > min_bruised_damage) + if(damage >= min_bruised_damage) if(organ_status != ORGAN_BRUISED) organ_status = ORGAN_BRUISED return TRUE return FALSE + if(damage >= min_little_bruised_damage) // Only for the stethoscopes and penlights, smaller damage check for extra precision + if(organ_status != ORGAN_LITTLE_BRUISED) + organ_status = ORGAN_LITTLE_BRUISED + return TRUE + return FALSE if(organ_status != ORGAN_HEALTHY) organ_status = ORGAN_HEALTHY return TRUE diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index df39248e343a..38eb0f93f072 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -353,6 +353,8 @@ desc = "Actively document everything you see, from the mundanity of shipside to the brutal battlefields below. Has a built-in printer for action shots." icon_state = "broadcastingcamera" item_state = "broadcastingcamera" + unacidable = TRUE + indestructible = TRUE pictures_left = 20 pictures_max = 20 w_class = SIZE_HUGE diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 6c1c234eaadd..7183ce8bf660 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -373,7 +373,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( . = list(desc) if(stat & BROKEN) - . += SPAN_INFO("It appears to be completely broken. It's hard to see what else is wrong with it.") + . += SPAN_INFO("It appears to be completely broken. Bash it open with any tool.") return if(opened) if(has_electronics && terminal) @@ -559,7 +559,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( if(HAS_TRAIT(W, TRAIT_TOOL_CROWBAR) && opened) if(has_electronics == 1) if(user.action_busy) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea how to deconstruct [src].")) return if(terminal) @@ -591,7 +591,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( opened = APC_COVER_OPEN update_icon() else if(istype(W, /obj/item/cell) && opened) //Trying to put a cell inside - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea how to fit [W] into [src].")) return if(cell) @@ -609,7 +609,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( update_icon() else if(HAS_TRAIT(W, TRAIT_TOOL_SCREWDRIVER)) //Haxing if(opened) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("\The [src]'s wiring confuses you.")) return if(cell) @@ -643,7 +643,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( tgui_interact(user) //then close them and open up the new ones (wires/panel) else if(istype(W, /obj/item/card/id)) //Trying to unlock the interface with an ID card - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You're not sure where to swipe \the [W] on [src].")) return if(opened) @@ -661,7 +661,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( else to_chat(user, SPAN_WARNING("Access denied.")) else if(iswire(W) && !terminal && opened && has_electronics != 2) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea what to do with [src].")) return if(loc:intact_tile) @@ -688,7 +688,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( make_terminal() terminal.connect_to_network() else if(HAS_TRAIT(W, TRAIT_TOOL_WIRECUTTERS) && terminal && opened && has_electronics != 2) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea what to do with [W].")) return if(loc:intact_tile) @@ -712,7 +712,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( qdel(terminal) terminal = null else if(istype(W, /obj/item/circuitboard/apc) && opened && has_electronics == 0 && !(stat & BROKEN)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea what to do with [W].")) return user.visible_message(SPAN_NOTICE("[user] starts inserting the power control board into [src]."), @@ -724,7 +724,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( SPAN_NOTICE("You insert the power control board into [src].")) qdel(W) else if(istype(W, /obj/item/circuitboard/apc) && opened && has_electronics == 0 && (stat & BROKEN)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea what to do with [W].")) return to_chat(user, SPAN_WARNING("You cannot put the board inside, the frame is damaged.")) @@ -733,7 +733,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( if(!HAS_TRAIT(W, TRAIT_TOOL_BLOWTORCH)) to_chat(user, SPAN_WARNING("You need a stronger blowtorch!")) return - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea what to do with [W].")) return var/obj/item/tool/weldingtool/WT = W @@ -750,7 +750,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( deconstruct() return else if(istype(W, /obj/item/frame/apc) && opened && (stat & BROKEN)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea what to do with [W].")) return if(has_electronics) @@ -908,7 +908,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( if(usr == user && opened && (!isRemoteControlling(user))) if(cell) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You have no idea how to remove the power cell from [src].")) return user.put_in_hands(cell) @@ -1043,7 +1043,7 @@ GLOBAL_LIST_INIT(apc_wire_descriptions, list( else if(prob(H.getBrainLoss())) to_chat(user, SPAN_WARNING("You momentarily forget how to use [src].")) return 0 - if(!skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(H, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(H, SPAN_WARNING("You don't know how to use \the [src]'s interface.")) return return 1 diff --git a/code/modules/projectiles/ammo_boxes/misc_boxes.dm b/code/modules/projectiles/ammo_boxes/misc_boxes.dm index 0634c76270da..defb82cf670d 100644 --- a/code/modules/projectiles/ammo_boxes/misc_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/misc_boxes.dm @@ -110,9 +110,7 @@ if(flare_amount > 0) handle_side_effects(host_box, TRUE) - var/list/turf_list = list() - for(var/turf/T in range(5, (host_box ? host_box : src))) - turf_list += T + var/list/turf_list = RANGE_TURFS(5, (host_box ? host_box : src)) for(var/i = 1, i <= flare_amount, i++) addtimer(CALLBACK(src, PROC_REF(explode), (host_box ? host_box : src), turf_list), rand(1, 6) SECONDS) return diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 5db904869973..e032d3ebbe55 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -233,6 +233,8 @@ bullets/shells. ~N */ /obj/item/ammo_magazine/handful + AUTOWIKI_SKIP(TRUE) + name = "generic handful" desc = "A handful of rounds to reload on the go." icon = 'icons/obj/items/weapons/guns/handful.dmi' diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm index efc7abf3aa20..51a5988f2fd0 100644 --- a/code/modules/projectiles/gun_helpers.dm +++ b/code/modules/projectiles/gun_helpers.dm @@ -536,6 +536,33 @@ DEFINES in setup.dm, referenced here. var/obj/item/active_hand = get_active_hand() if(active_hand) + if(active_hand.preferred_storage) + for(var/storage in active_hand.preferred_storage) + var/list/items_in_slot + if(islist(get_item_by_slot(active_hand.preferred_storage[storage]))) + items_in_slot = get_item_by_slot(active_hand.preferred_storage[storage]) + else + items_in_slot = list(get_item_by_slot(active_hand.preferred_storage[storage])) + + for(var/item_in_slot in items_in_slot) + if(istype(item_in_slot, storage)) + var/slot = active_hand.preferred_storage[storage] + switch(slot) + if(WEAR_ACCESSORY) + slot = WEAR_IN_ACCESSORY + if(WEAR_WAIST) + slot = WEAR_IN_BELT + if(WEAR_BACK) + slot = WEAR_IN_BACK + if(WEAR_J_STORE) + slot = WEAR_IN_J_STORE + if(WEAR_HEAD) + slot = WEAR_IN_HELMET + if(WEAR_FEET) + slot = WEAR_IN_SHOES + + if(equip_to_slot_if_possible(active_hand, slot, ignore_delay = TRUE, del_on_fail = FALSE, disable_warning = TRUE, redraw_mob = TRUE)) + return TRUE if(w_uniform) for(var/obj/accessory in w_uniform.accessories) var/obj/item/storage/internal/accessory/holster/holster = accessory diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index 466a09612c54..6d125e6915c3 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -665,6 +665,7 @@ start_automatic = FALSE var/nailing_speed = 2 SECONDS //Time to apply a sheet for patching. Also haha name. Try to keep sync with soundbyte duration var/repair_sound = 'sound/weapons/nailgun_repair_long.ogg' + var/material_per_repair = 1 /obj/item/weapon/gun/smg/nailgun/set_gun_config_values() ..() @@ -689,9 +690,16 @@ icon_state = "cnailgun" item_state = "nailgun" w_class = SIZE_SMALL + flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_NO_DESCRIPTION /obj/item/weapon/gun/smg/nailgun/compact/able_to_fire(mob/living/user) . = ..() - if(.) - click_empty(user) return FALSE + +/obj/item/weapon/gun/smg/nailgun/compact/tactical + name = "tactical compact nailgun" + desc = "A carpentry tool, used to drive nails into tough surfaces. This one is military grade, it's olive drab and tacticool. Cannot fire nails as a projectile." + icon_state = "tnailgun" + item_state = "tnailgun" + w_class = SIZE_SMALL + material_per_repair = 2 diff --git a/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm index 06ac5428bfc6..40a145e1f77c 100644 --- a/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/specialist/launcher/grenade_launcher.dm @@ -25,7 +25,13 @@ ///Does it launch its grenades in a low arc or a high? Do they strike people in their path, or fly beyond? var/is_lobbing = FALSE ///Verboten munitions. This is a blacklist. Anything in this list isn't loadable. - var/disallowed_grenade_types = list(/obj/item/explosive/grenade/spawnergrenade, /obj/item/explosive/grenade/alien, /obj/item/explosive/grenade/incendiary/molotov, /obj/item/explosive/grenade/flashbang) + var/disallowed_grenade_types = list(/obj/item/explosive/grenade/spawnergrenade, + /obj/item/explosive/grenade/alien, + /obj/item/explosive/grenade/nerve_gas, + /obj/item/explosive/grenade/incendiary/bursting_pipe, + /obj/item/explosive/grenade/xeno_acid_grenade, + /obj/item/explosive/grenade/incendiary/molotov, + /obj/item/explosive/grenade/flashbang) ///What is this weapon permitted to fire? This is a whitelist. Anything in this list can be fired. Anything. var/valid_munitions = list(/obj/item/explosive/grenade) diff --git a/code/modules/projectiles/magazines/misc.dm b/code/modules/projectiles/magazines/misc.dm index 87568c953211..251b863535e7 100644 --- a/code/modules/projectiles/magazines/misc.dm +++ b/code/modules/projectiles/magazines/misc.dm @@ -47,12 +47,16 @@ //rocket launchers /obj/item/ammo_magazine/rifle/grenadespawner + AUTOWIKI_SKIP(TRUE) + name = "\improper GRENADE SPAWNER AMMO" desc = "OH GOD OH FUCK" default_ammo = /datum/ammo/grenade_container/rifle ammo_band_color = AMMO_BAND_COLOR_LIGHT_EXPLOSIVE /obj/item/ammo_magazine/rifle/huggerspawner + AUTOWIKI_SKIP(TRUE) + name = "\improper HUGGER SPAWNER AMMO" desc = "OH GOD OH FUCK" default_ammo = /datum/ammo/hugger_container diff --git a/code/modules/projectiles/magazines/specialist.dm b/code/modules/projectiles/magazines/specialist.dm index 547d231e1c69..38b9137be54f 100644 --- a/code/modules/projectiles/magazines/specialist.dm +++ b/code/modules/projectiles/magazines/specialist.dm @@ -265,7 +265,7 @@ . += SPAN_NOTICE("Contains a warhead.") /obj/item/ammo_magazine/rocket/custom/attackby(obj/item/W as obj, mob/user as mob) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You do not know how to tinker with [name].")) return if(current_rounds <= 0) diff --git a/code/modules/reagents/chemical_research/Chemical-Research.dm b/code/modules/reagents/chemical_research/Chemical-Research.dm index a05bc132734d..d368e94b2c1c 100644 --- a/code/modules/reagents/chemical_research/Chemical-Research.dm +++ b/code/modules/reagents/chemical_research/Chemical-Research.dm @@ -3,6 +3,8 @@ GLOBAL_DATUM_INIT(chemical_data, /datum/chemical_data, new) /datum/chemical_data var/rsc_credits = 0 var/clearance_level = 1 + ///credits gained from survivor clearance cards + var/credits_gained = 0 var/clearance_x_access = FALSE var/reached_x_access = FALSE var/has_new_properties = FALSE diff --git a/code/modules/reagents/chemistry_machinery/chem_master.dm b/code/modules/reagents/chemistry_machinery/chem_master.dm index 6f6d45b6712e..9ab8d81066e0 100644 --- a/code/modules/reagents/chemistry_machinery/chem_master.dm +++ b/code/modules/reagents/chemistry_machinery/chem_master.dm @@ -291,17 +291,15 @@ if(!Adjacent(usr) || !usr.put_in_hands(P)) P.forceMove(loc) else if(href_list["change_pill"]) - #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites var/dat = "" - for(var/i = 1 to MAX_PILL_SPRITE) + for(var/i = 1 to PILL_ICON_CHOICES) dat += "" dat += "
    " show_browser(user, dat, "Change Pill Type", "chem_master") return else if(href_list["change_bottle"]) - #define MAX_BOTTLE_SPRITE 4 //max icon state of the bottle sprites var/dat = "" - for(var/i = 1 to MAX_BOTTLE_SPRITE) + for(var/i = 1 to BOTTLE_ICON_CHOICES) dat += "" dat += "
    " show_browser(user, dat, "Change Bottle Type", "chem_master") @@ -345,9 +343,9 @@ if(!(user.client in has_sprites)) spawn() has_sprites += user.client - for(var/i = 1 to MAX_PILL_SPRITE) + for(var/i = 1 to PILL_ICON_CHOICES) user << browse_rsc(icon('icons/obj/items/chemistry.dmi', "pill" + num2text(i)), "pill[i].png") - for(var/i = 1 to MAX_BOTTLE_SPRITE) + for(var/i = 1 to BOTTLE_ICON_CHOICES) user << browse_rsc(icon('icons/obj/items/chemistry.dmi', "bottle-" + num2text(i)), "bottle-[i].png") var/dat = "" if(!beaker) @@ -434,7 +432,7 @@ icon_state = "industry_mixer0" base_state = "industry_mixer" req_skill = SKILL_ENGINEER - req_skill_level = SKILL_ENGINEER_ENGI + req_skill_level = SKILL_ENGINEER_TRAINED pill_maker = FALSE vial_maker = TRUE max_pill_count = 0 diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index a28f65ce475d..87487239452e 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -28,6 +28,8 @@ // linked lz id (lz1, lz2 or null) var/linked_lz + var/can_change_shuttle = FALSE + /obj/structure/machinery/computer/shuttle/dropship/flight/Initialize(mapload, ...) . = ..() compatible_landing_zones = get_landing_zones() @@ -91,7 +93,10 @@ ui = SStgui.try_update_ui(user, src, ui) if (!ui) var/obj/docking_port/mobile/shuttle = SSshuttle.getShuttle(shuttleId) - ui = new(user, src, "DropshipFlightControl", "[shuttle.name] Flight Computer") + var/name = shuttle?.name + if(can_change_shuttle) + name = "Remote" + ui = new(user, src, "DropshipFlightControl", "[name] Flight Computer") ui.open() /obj/structure/machinery/computer/shuttle/dropship/flight/ui_status(mob/user, datum/ui_state/state) @@ -114,7 +119,7 @@ /obj/structure/machinery/computer/shuttle/dropship/flight/ui_state(mob/user) var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttleId) - if(shuttle.is_hijacked) + if(shuttle?.is_hijacked) return GLOB.never_state return GLOB.not_incapacitated_and_adjacent_strict_state @@ -123,11 +128,24 @@ compatible_landing_zones = get_landing_zones() var/obj/docking_port/mobile/shuttle = SSshuttle.getShuttle(shuttleId) // we convert the time to seconds for rendering to ui - .["max_flight_duration"] = shuttle.callTime / 10 - .["max_pre_arrival_duration"] = shuttle.prearrivalTime / 10 - .["max_refuel_duration"] = shuttle.rechargeTime / 10 - .["max_engine_start_duration"] = shuttle.ignitionTime / 10 - .["door_data"] = list("port", "starboard", "aft") + if(shuttle) + .["max_flight_duration"] = shuttle.callTime / 10 + .["max_pre_arrival_duration"] = shuttle.prearrivalTime / 10 + .["max_refuel_duration"] = shuttle.rechargeTime / 10 + .["max_engine_start_duration"] = shuttle.ignitionTime / 10 + .["door_data"] = list("port", "starboard", "aft") + .["alternative_shuttles"] = list() + if(can_change_shuttle) + .["alternative_shuttles"] = alternative_shuttles() + +/obj/structure/machinery/computer/shuttle/dropship/flight/proc/alternative_shuttles() + . = list() + for(var/obj/docking_port/mobile/marine_dropship/shuttle in SSshuttle.mobile) + . += list( + list( + "id" = shuttle.id, "name" = shuttle) + ) + /obj/structure/machinery/computer/shuttle/dropship/flight/attack_hand(mob/user) . = ..(user) @@ -140,6 +158,10 @@ // if the dropship has crashed don't allow more interactions var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttleId) + if(!shuttle) + tgui_interact(user) + return + if(shuttle.mode == SHUTTLE_CRASHED) to_chat(user, SPAN_NOTICE("[src] is unresponsive.")) return @@ -188,6 +210,23 @@ var/obj/docking_port/mobile/shuttle = SSshuttle.getShuttle(shuttleId) if(linked_lz) + var/obj/docking_port/stationary/landing_zone = SSshuttle.getDock(linked_lz) + var/obj/docking_port/mobile/maybe_dropship = landing_zone.get_docked() + + if(maybe_dropship) + to_chat(xeno, SPAN_NOTICE("A metal bird already is here.")) + return + + var/conflicting_transit = FALSE + for(var/obj/docking_port/mobile/other_shuttle in SSshuttle.mobile) + if(landing_zone == other_shuttle.destination) + conflicting_transit = TRUE + break + + if(conflicting_transit) + to_chat(xeno, SPAN_NOTICE("A metal bird is already coming.")) + return + playsound(loc, 'sound/machines/terminal_success.ogg', KEYBOARD_SOUND_VOLUME, 1) if(shuttle.mode == SHUTTLE_IDLE && !is_ground_level(shuttle.z)) var/result = SSshuttle.moveShuttle(shuttleId, linked_lz, TRUE) @@ -199,7 +238,7 @@ log_ares_flight("Unknown", "Remote launch signal for [shuttle.name] received. Authentication garbled.") log_ares_security("Security Alert", "Remote launch signal for [shuttle.name] received. Authentication garbled.") return - if(shuttle.destination.id != linked_lz) + if(shuttle.destination && shuttle.destination.id != linked_lz) to_chat(xeno, "The shuttle not ready. The screen reads T-[shuttle.timeLeft(10)]. Have patience.") return if(shuttle.mode == SHUTTLE_CALL) @@ -214,6 +253,11 @@ /obj/structure/machinery/computer/shuttle/dropship/flight/attack_alien(mob/living/carbon/xenomorph/xeno) + // if the shuttleid is null or the shuttleid references a shuttle that has been removed from play, pick one + if(!shuttleId || !SSshuttle.getShuttle(shuttleId, FALSE)) + var/list/alternatives = alternative_shuttles() + shuttleId = pick(alternatives)["id"] + var/obj/docking_port/mobile/marine_dropship/dropship = SSshuttle.getShuttle(shuttleId) // If the attacking xeno isn't the queen. @@ -339,37 +383,41 @@ /obj/structure/machinery/computer/shuttle/dropship/flight/ui_data(mob/user) var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttleId) . = list() - .["shuttle_mode"] = shuttle.mode - .["flight_time"] = shuttle.timeLeft(0) - .["is_disabled"] = disabled || shuttle.is_hijacked + .["shuttle_id"] = shuttle?.id + .["shuttle_mode"] = shuttle?.mode + .["flight_time"] = shuttle?.timeLeft(0) + .["is_disabled"] = disabled + if(shuttle?.is_hijacked) + .["is_disabled"] = TRUE .["locked_down"] = FALSE .["can_fly_by"] = !is_remote .["can_set_automated"] = is_remote .["automated_control"] = list( - "is_automated" = shuttle.automated_hangar_id != null || shuttle.automated_lz_id != null, - "hangar_lz" = shuttle.automated_hangar_id, - "ground_lz" = shuttle.automated_lz_id + "is_automated" = shuttle?.automated_hangar_id != null || shuttle?.automated_lz_id != null, + "hangar_lz" = shuttle?.automated_hangar_id, + "ground_lz" = shuttle?.automated_lz_id ) .["primary_lz"] = SSticker.mode.active_lz?.linked_lz - if(shuttle.destination) - .["target_destination"] = shuttle.in_flyby? "Flyby" : shuttle.destination.name + if(shuttle?.destination) + .["target_destination"] = shuttle?.in_flyby? "Flyby" : shuttle?.destination.name - .["door_status"] = is_remote ? list() : shuttle.get_door_data() + .["door_status"] = is_remote ? list() : shuttle?.get_door_data() .["has_flyby_skill"] = skillcheck(user, SKILL_PILOT, SKILL_PILOT_EXPERT) // Launch Alarm Variables - .["playing_launch_announcement_alarm"] = shuttle.playing_launch_announcement_alarm + .["playing_launch_announcement_alarm"] = shuttle?.playing_launch_announcement_alarm .["destinations"] = list() // add flight - .["destinations"] += list( - list( - "id" = DROPSHIP_FLYBY_ID, - "name" = "Flyby", - "available" = TRUE, - "error" = FALSE + if(!is_remote) + .["destinations"] += list( + list( + "id" = DROPSHIP_FLYBY_ID, + "name" = "Flyby", + "available" = TRUE, + "error" = FALSE + ) ) - ) for(var/obj/docking_port/stationary/dock in compatible_landing_zones) var/dock_reserved = FALSE @@ -377,7 +425,7 @@ if(dock == other_shuttle.destination) dock_reserved = TRUE break - var/can_dock = shuttle.canDock(dock) + var/can_dock = shuttle?.canDock(dock) var/list/dockinfo = list( "id" = dock.id, "name" = dock.name, @@ -391,16 +439,23 @@ if(.) return var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttleId) - if(disabled || shuttle.is_hijacked) + if(disabled || (shuttle && shuttle.is_hijacked)) + switch(action) + if ("change_shuttle") + var/new_shuttle = params["new_shuttle"] + return set_shuttle(new_shuttle) return var/mob/user = usr - var/obj/structure/machinery/computer/shuttle/dropship/flight/comp = shuttle.getControlConsole() - if(comp.dropship_control_lost) - to_chat(user, SPAN_WARNING("The dropship isn't responding to controls.")) - return + if (shuttle) + var/obj/structure/machinery/computer/shuttle/dropship/flight/comp = shuttle.getControlConsole() + if(comp.dropship_control_lost) + to_chat(user, SPAN_WARNING("The dropship isn't responding to controls.")) + return switch(action) if("move") + if(!shuttle) + return FALSE if(shuttle.mode != SHUTTLE_IDLE && (shuttle.mode != SHUTTLE_CALL && !shuttle.destination)) to_chat(usr, SPAN_WARNING("You can't move to a new destination right now.")) return TRUE @@ -458,6 +513,8 @@ playsound(loc, get_sfx("terminal_button"), KEYBOARD_SOUND_VOLUME, 1) return FALSE if("door-control") + if(!shuttle) + return FALSE if(shuttle.mode == SHUTTLE_CALL || shuttle.mode == SHUTTLE_RECALL) return TRUE var/interaction = params["interaction"] @@ -468,6 +525,8 @@ playsound(loc, 'sound/machines/terminal_error.ogg', KEYBOARD_SOUND_VOLUME, 1) to_chat(user, SPAN_WARNING("Door controls have been overridden. Please call technical support.")) if("set-automate") + if(!shuttle) + return FALSE var/almayer_lz = params["hangar_id"] var/ground_lz = params["ground_id"] var/delay = clamp(params["delay"] SECONDS, DROPSHIP_MIN_AUTO_DELAY, DROPSHIP_MAX_AUTO_DELAY) @@ -491,14 +550,9 @@ message_admins(log) log_interact(user, msg = "[log]") return - /* TODO - if(!dropship.automated_launch) //If we're toggling it on... - var/auto_delay - auto_delay = tgui_input_number(usr, "Set the delay for automated departure after recharging (seconds)", "Automated Departure Settings", DROPSHIP_MIN_AUTO_DELAY/10, DROPSHIP_MAX_AUTO_DELAY/10, DROPSHIP_MIN_AUTO_DELAY/10) - dropship.automated_launch_delay = Clamp(auto_delay SECONDS, DROPSHIP_MIN_AUTO_DELAY, DROPSHIP_MAX_AUTO_DELAY) - dropship.set_automated_launch(!dropship.automated_launch) - */ if("disable-automate") + if(!shuttle) + return FALSE shuttle.automated_hangar_id = null shuttle.automated_lz_id = null shuttle.automated_delay = null @@ -510,18 +564,43 @@ return if("cancel-flyby") + if(!shuttle) + return FALSE if(shuttle.in_flyby && shuttle.timer && shuttle.timeLeft(1) >= DROPSHIP_WARMUP_TIME) shuttle.setTimer(DROPSHIP_WARMUP_TIME) if("play_launch_announcement_alarm") + if(!shuttle) + return FALSE if (shuttle.mode != SHUTTLE_IDLE && shuttle.mode != SHUTTLE_RECHARGING) to_chat(usr, SPAN_WARNING("The Launch Announcement Alarm is designed to tell people that you're going to take off soon.")) - return + return TRUE shuttle.alarm_sound_loop.start() shuttle.playing_launch_announcement_alarm = TRUE - return + return TRUE if ("stop_playing_launch_announcement_alarm") + if(!shuttle) + return FALSE stop_playing_launch_announcement_alarm() - return + return TRUE + if ("change_shuttle") + var/new_shuttle = params["new_shuttle"] + return set_shuttle(new_shuttle) + +/obj/structure/machinery/computer/shuttle/dropship/flight/proc/set_shuttle(new_shuttle) + var/mob/user = usr + if(!new_shuttle || shuttleId == new_shuttle) + return FALSE + var/found = FALSE + var/list/alternatives = alternative_shuttles() + for(var/alt_shuttle in alternatives) + if(alt_shuttle["id"] == new_shuttle) + found = TRUE + if(found) + shuttleId = new_shuttle + update_static_data(user) + else + log_admin("Player [user] attempted to change shuttle illegally.") + return TRUE /obj/structure/machinery/computer/shuttle/dropship/flight/proc/stop_playing_launch_announcement_alarm() var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttleId) @@ -534,18 +613,19 @@ icon = 'icons/obj/structures/machinery/computer.dmi' icon_state = "shuttle" linked_lz = DROPSHIP_LZ1 - shuttleId = DROPSHIP_ALAMO is_remote = TRUE + can_change_shuttle = TRUE /obj/structure/machinery/computer/shuttle/dropship/flight/lz2 icon = 'icons/obj/structures/machinery/computer.dmi' icon_state = "shuttle" linked_lz = DROPSHIP_LZ2 - shuttleId = DROPSHIP_NORMANDY is_remote = TRUE + can_change_shuttle = TRUE /obj/structure/machinery/computer/shuttle/dropship/flight/remote_control icon = 'icons/obj/structures/machinery/computer.dmi' icon_state = "shuttle" is_remote = TRUE needs_power = TRUE + can_change_shuttle = TRUE diff --git a/code/modules/surgery/chestburster.dm b/code/modules/surgery/chestburster.dm index a840bd026c40..e387978fb8ee 100644 --- a/code/modules/surgery/chestburster.dm +++ b/code/modules/surgery/chestburster.dm @@ -111,12 +111,12 @@ name = "Remove Larva" desc = "extract the xenomorph larva" accept_hand = TRUE - /*Similar to PINCH, but balanced around 100 = using bare hands. Haemostat is faster and better, - other tools are slower but don't burn the surgeon.*/ + /*Using the hands to forcefully rip out the larva will be faster at the cost of damaging both the doctor and the patient, with the addition of organ damage. + Unlike before, the hemostat is now the best tool for removing removing the larva, as opposed to wirecutters and the fork.*/ tools = list( - /obj/item/tool/surgery/hemostat = 1.5, - /obj/item/tool/wirecutters = SURGERY_TOOL_MULT_SUBOPTIMAL, - /obj/item/tool/kitchen/utensil/fork = SURGERY_TOOL_MULT_SUBSTITUTE + /obj/item/tool/surgery/hemostat = 1.5 * SURGERY_TOOL_MULT_IDEAL, + /obj/item/tool/wirecutters = 1.5 * SURGERY_TOOL_MULT_SUBOPTIMAL, + /obj/item/tool/kitchen/utensil/fork = 1.5 * SURGERY_TOOL_MULT_SUBSTITUTE ) time = 6 SECONDS preop_sound = 'sound/surgery/hemostat1.ogg' @@ -131,9 +131,9 @@ SPAN_NOTICE("[user] tries to extract the larva from [target]'s chest with \the [tool].")) else user.affected_message(target, - SPAN_NOTICE("You try to extract the larva from [target]'s chest."), - SPAN_NOTICE("[user] tries to extract the larva from your chest."), - SPAN_NOTICE("[user] tries to extract the larva from [target]'s chest.")) + SPAN_NOTICE("You try to forcefully rip the larva from [target]'s chest with your bare hand."), + SPAN_NOTICE("[user] tries to forcefully rip the larva from your chest."), + SPAN_NOTICE("[user] tries to forcefully rip the larva from [target]'s chest.")) target.custom_pain("Something hurts horribly in your chest!",1) log_interact(user, target, "[key_name(user)] started to remove an embryo from [key_name(target)]'s ribcage.") @@ -148,10 +148,16 @@ SPAN_WARNING("[user] pulls a wriggling parasite out of [target]'s ribcage!")) else user.affected_message(target, - SPAN_WARNING("Your hands are burned by acid as you pull a wriggling parasite out of [target]'s ribcage!"), - SPAN_WARNING("[user]'s hands are burned by acid as \he pulls a wriggling parasite out of your ribcage!"), - SPAN_WARNING("[user]'s hands are burned by acid as \he pulls a wriggling parasite out of [target]'s ribcage!")) - + SPAN_WARNING("Your hands and your patient's insides are burned by acid as you forcefully rip a wriggling parasite out of [target]'s ribcage!"), + SPAN_WARNING("[user]'s hands are burned by acid as \he rips a wriggling parasite out of your ribcage!"), + SPAN_WARNING("[user]'s hands are burned by acid as \he rips a wriggling parasite out of [target]'s ribcage!")) + var/datum/internal_organ/impacted_organ = pick(surgery.affected_limb.internal_organs) + impacted_organ.take_damage(5, FALSE) + if(target.stat == CONSCIOUS) + target.emote("scream") + target.apply_damage(15, BURN, target_zone) + + play_failure_sound(user, target, target_zone, tool, surgery) user.emote("pain") if(user.hand) diff --git a/code/modules/vehicles/hardpoints/hardpoint.dm b/code/modules/vehicles/hardpoints/hardpoint.dm index f94d0dc6b373..f0b519759727 100644 --- a/code/modules/vehicles/hardpoints/hardpoint.dm +++ b/code/modules/vehicles/hardpoints/hardpoint.dm @@ -336,7 +336,7 @@ . = ..() if(health <= 0) . += "It's busted!" - else if(isobserver(user) || (ishuman(user) && (skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) || skillcheck(user, SKILL_VEHICLE, SKILL_VEHICLE_CREWMAN)))) + else if(isobserver(user) || (ishuman(user) && (skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE) || skillcheck(user, SKILL_VEHICLE, SKILL_VEHICLE_CREWMAN)))) . += "It's at [round(get_integrity_percent(), 1)]% integrity!" //reloading hardpoint - take mag from backup clips and replace current ammo with it. Will change in future. Called via weapons loader diff --git a/code/modules/vehicles/hardpoints/holder/holder.dm b/code/modules/vehicles/hardpoints/holder/holder.dm index df91cbc51b65..948142383cca 100644 --- a/code/modules/vehicles/hardpoints/holder/holder.dm +++ b/code/modules/vehicles/hardpoints/holder/holder.dm @@ -23,7 +23,7 @@ . = ..() if(health <= 0) . += "It's busted!" - else if(isobserver(user) || (ishuman(user) && (skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED) || skillcheck(user, SKILL_VEHICLE, SKILL_VEHICLE_CREWMAN)))) + else if(isobserver(user) || (ishuman(user) && (skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_NOVICE) || skillcheck(user, SKILL_VEHICLE, SKILL_VEHICLE_CREWMAN)))) . += "It's at [round(get_integrity_percent(), 1)]% integrity!" for(var/obj/item/hardpoint/H in hardpoints) . += "There is \a [H] module installed on [src]." @@ -100,7 +100,7 @@ /obj/item/hardpoint/holder/attackby(obj/item/O, mob/user) if(HAS_TRAIT(O, TRAIT_TOOL_CROWBAR)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You don't know what to do with \the [O] on \the [src].")) return @@ -113,7 +113,7 @@ return if(istype(O, /obj/item/hardpoint)) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You don't know what to do with \the [O] on \the [src].")) return diff --git a/code/modules/vehicles/multitile/multitile_hardpoints.dm b/code/modules/vehicles/multitile/multitile_hardpoints.dm index b94b8459890f..5d1612852f8c 100644 --- a/code/modules/vehicles/multitile/multitile_hardpoints.dm +++ b/code/modules/vehicles/multitile/multitile_hardpoints.dm @@ -63,7 +63,7 @@ //Putting on hardpoints //Similar to repairing stuff, down to the time delay /obj/vehicle/multitile/proc/install_hardpoint(obj/item/O, mob/user) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You don't know what to do with [O] on \the [src].")) return @@ -132,7 +132,7 @@ //User-orientated proc for taking of hardpoints //Again, similar to the above ones /obj/vehicle/multitile/proc/uninstall_hardpoint(obj/item/O, mob/user) - if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI)) + if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_TRAINED)) to_chat(user, SPAN_WARNING("You don't know what to do with \the [O] on \the [src].")) return diff --git a/colonialmarines.dme b/colonialmarines.dme index 3fa6fb100079..87f42d5eb28d 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -37,6 +37,7 @@ #include "code\__DEFINES\atmospherics.dm" #include "code\__DEFINES\autofire.dm" #include "code\__DEFINES\autolathe.dm" +#include "code\__DEFINES\autowiki.dm" #include "code\__DEFINES\blood.dm" #include "code\__DEFINES\bsql.config.dm" #include "code\__DEFINES\bullet_traits.dm" @@ -1003,7 +1004,6 @@ #include "code\game\machinery\vending\vendor_types\crew\sea.dm" #include "code\game\machinery\vending\vendor_types\crew\senior_officers.dm" #include "code\game\machinery\vending\vendor_types\crew\staff_officer.dm" -#include "code\game\machinery\vending\vendor_types\crew\staff_officer_armory.dm" #include "code\game\machinery\vending\vendor_types\crew\synthetic.dm" #include "code\game\machinery\vending\vendor_types\crew\vehicle_crew.dm" #include "code\game\machinery\vending\vendor_types\squad_prep\squad_engineer.dm" diff --git a/html/changelogs/AutoChangeLog-pr-6786.yml b/html/changelogs/AutoChangeLog-pr-6786.yml new file mode 100644 index 000000000000..a97e2ad15be0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-6786.yml @@ -0,0 +1,4 @@ +author: "BlackCrystalic" +delete-after: True +changes: + - bugfix: "No more admin data sended to normal players in who/staff who" \ No newline at end of file diff --git a/html/changelogs/archive/2024-08.yml b/html/changelogs/archive/2024-08.yml index 841b74672ff1..8541bfbd26e4 100644 --- a/html/changelogs/archive/2024-08.yml +++ b/html/changelogs/archive/2024-08.yml @@ -30,3 +30,138 @@ kiVts: - rscadd: Players will not get picked at certain ERT beacons if they dont have enough playtime in relevant area. +2024-08-03: + hislittlecuzingames: + - qol: Can roleplay easier with cigarettes, cigars, lighters counting as cosmetic + for helmet storage purposes. +2024-08-04: + Diegoflores31: + - balance: Healer drone apply salve now has a 1 second cooldown. + - balance: Salve wound now heals slightly quicker. + MistChristmas: + - balance: Buffed MP and Officer Armor's Bullet Armour. + Nivrak, NervanCatos: + - balance: Modified engineering skill levels, Combat technicians now do everything + engineering related slightly faster. This does not affect any other roles or + skillchecks. + - rscadd: Adds the tactical compact nailgun to the Combat Technician's vendor essential + engineering kit, It cannot fire and uses 2 metal instead of 1 to repair. Credit + to NervanCatos. + - rscadd: Added the M277 pattern construction rig, It comes with 6 slots instead + of 10 in the M276 but can carry metal and plasteel stacks. Available in the + CT vendor. + - rscadd: Added the Engineer Kit pouch, basically and engineer kit - in a pouch. + Restricted by engineering skill. Available in the CT vendor. + - rscadd: Added the Small Tool Webbing, A smaller variant of the tool webbing with + 6 slots instead of 7. Available in the CT vendor. + - qol: Screwdriver, Crowbar, Blowtorch, Multitool, Wrench and Wirecutters will now + prioritize the tool webbing when quick equipping. + - code_imp: Added a new variable for items, preferred_storage which allows to replicate + the above behavior for other items and storages. + - rscadd: Added a new sentry upgrade, The omni-sentry. As the name suggests it is + omni-directional but has 30% reduces damage and a shorter range by 1. + - qol: Made APC examine-text a bit more clear about what you should be doing next. + SpypigDev: + - refactor: SO armory vendor code refactored into the main SO gear vendor code + - balance: XO weapon and clothing vendors fitted with a more modernized equipment + set + - balance: XO weapon vendor now offers Medic or Engineer essentials sets + - bugfix: Vending an autoinjector pouch as SO or XO now produces a full pouch, rather + than empty + - balance: SO's mod88 removed from cryo spawn and moved to their vendor instead + Steelpoint: + - balance: The VP78 pistol will now deal maximum damage up to 6 tiles from the shooters + position before experiencing gradual damage falloff. This is up from a previous + maximum range of 3 tiles. + VileBeggar: + - code_imp: removed an unneeded var in mob_hud.dm + Zonespace27: + - balance: Barricades are now far better at blocking bullets from the front. They + will not block most bullets if the shooter is within 2 tiles, however. + ihatethisengine2: + - balance: sacrifice ability now guarantees to get the target out of crit on top + of the heal +2024-08-05: + Lagomorphica: + - balance: The combat correspondents camera is no longer meltable or explodable. + VileBeggar: + - qol: Deafness is now limited to being 1 minute in length. + - bugfix: Phones can no longer be stored in closets/crates, which prevents players + from dragging crates with their phones and other weird issues that can occur. +2024-08-06: + BlackCrystalic: + - rscadd: Byond backed function of sound ECHO ported + - refactor: refactor of weaponhits hardcode + Blundir: + - bugfix: research chute is now connected to req chute and works properly + Drathek: + - rscadd: Added note of who deletes a comment in a medical record + - bugfix: Fixed Delete Entry button showing for deleted medical notes + - bugfix: Fixed medical record prints not showing who printed it + - bugfix: Fixed initial gender capitalization in records + - code_imp: Improved some record checks + - admin: Added mostly niche logging for all record changes + Drathek iloveloopers: + - rscdel: Removed ability to buy clearance papers. + - balance: Clearance cards now give their equivalent clearance in credits. + - balance: Clearance cards no longer lose their value when scanned by the wrong + person. + MarpleJones: + - bugfix: Using the hemostat on the final larva surgery step is now better than + using wirecutters or the fork. + - rscadd: The final larva surgery step will now apply organ damage when done barehanded. + Barehanded is faster than using tools by a couple of seconds, at the cost of + the doctor's and the patient's health. + - rscadd: Adds an acidsplash sound effect to doing the barehanded step. + MistChristmas: + - bugfix: Prevents tunnels under LZ Sentries + VileBeggar: + - bugfix: butcher's knife inhands now display properly + cuberound: + - bugfix: weeds do not cover preshure tanks + - rscadd: acid spray scorches grass and melts snow + - rscdel: Removes gravity :) + mullenpaul: + - ui: added section in dropship flight computer for some terminals to select which + dropship to control + - maptweak: reworked CIC remote terminals + - refactor: some remote terminals can control different dropships + - balance: queen will randomly select a dropship to call down to the lz on hijack + - balance: when dropship exists on primary landing pad, the queen can't call down + another dropship + - balance: when a dropship is enroute to the primary landing pad, the queen can't + call another dropship + realforest2001: + - bugfix: Fixes the cap on rifleman Lance Corporals. +2024-08-07: + Contrabang: + - rscadd: Smartgunner Machete Scabbard, which smartgunners can wear on their back + when their harness is equipped. + - balance: SG's vendor has replaced the 6P Machete Scabbard with a 15P Smartgunner + Machete Scabbard. + LC4492: + - rscadd: Adds penlights and stethoscopes to nurses and corpsmen, they can use them + to reliably check if someone have specific types of organ damage and how much, + without the need of other apparatus. Adds a new organ.status called "LITTLE_BRUISED", + used by the stethoscope and penlight to not give false positives when diagnosticating + someone (saying that they are healthy, when they actually have 9 heart damage). + - bugfix: Fixed an outdated check that made the entire "flash eyes with flashlight" + mechanic don't work at all. Also updated it to check some other things for ease + of logic. + - spellcheck: Fixed typos on the abandoned "flash eyes with flashlight" code. + - code_imp: 'Added new functionalities for both the stethoscope and penlight: The + stethoscopes can now be used to check the condition of both heart and lungs + individually by aiming the chest, letting you be able to check if the organs + are LITTLE_BRUISED (Have a damage equal or above 1), BRUISED (Have a damage + equal or above 10), BROKEN (have a damage equal or above 30) or "HEALTHY" (any + damage below 1). And the penlight, that can be used the same way to check the + condition of brain and eyes by aiming the eyes of the person you are interacting + with. Also with the fixing mentioned above, you can now flash people''s eyes + again! Everytime you check the condition of someone''s eyes, you will also flash + them. Replaced one letter vars in the flashlight code and on the stethoscope + section of the ties code.' + - imageadd: Adds new "in_hand" icons for penlights and stethoscopes, both will now + appear on your hands when used. Penlights have both "off" and "on" icons, fancy + stuff! + LTNTS: + - imageadd: port tgsprites for pills (including a new variation) diff --git a/icons/mob/humans/onmob/back.dmi b/icons/mob/humans/onmob/back.dmi index 128b05455d6e..84bdbb6ff26a 100644 Binary files a/icons/mob/humans/onmob/back.dmi and b/icons/mob/humans/onmob/back.dmi differ diff --git a/icons/mob/humans/onmob/items_lefthand_0.dmi b/icons/mob/humans/onmob/items_lefthand_0.dmi index a4396aeb93de..d9535b796dda 100644 Binary files a/icons/mob/humans/onmob/items_lefthand_0.dmi and b/icons/mob/humans/onmob/items_lefthand_0.dmi differ diff --git a/icons/mob/humans/onmob/items_lefthand_1.dmi b/icons/mob/humans/onmob/items_lefthand_1.dmi index cb80cb6cc10c..45a3b51ecdf2 100644 Binary files a/icons/mob/humans/onmob/items_lefthand_1.dmi and b/icons/mob/humans/onmob/items_lefthand_1.dmi differ diff --git a/icons/mob/humans/onmob/items_righthand_0.dmi b/icons/mob/humans/onmob/items_righthand_0.dmi index 582262e88289..a245e89b6c48 100644 Binary files a/icons/mob/humans/onmob/items_righthand_0.dmi and b/icons/mob/humans/onmob/items_righthand_0.dmi differ diff --git a/icons/mob/humans/onmob/items_righthand_1.dmi b/icons/mob/humans/onmob/items_righthand_1.dmi index 7bad7eb2c583..a2e7e96bac13 100644 Binary files a/icons/mob/humans/onmob/items_righthand_1.dmi and b/icons/mob/humans/onmob/items_righthand_1.dmi differ diff --git a/icons/mob/humans/onmob/ties.dmi b/icons/mob/humans/onmob/ties.dmi index ac563deffbac..b4dc3d6ad9e8 100644 Binary files a/icons/mob/humans/onmob/ties.dmi and b/icons/mob/humans/onmob/ties.dmi differ diff --git a/icons/obj/items/chemistry.dmi b/icons/obj/items/chemistry.dmi index e540af809714..ed1898313a24 100644 Binary files a/icons/obj/items/chemistry.dmi and b/icons/obj/items/chemistry.dmi differ diff --git a/icons/obj/items/clothing/belts.dmi b/icons/obj/items/clothing/belts.dmi index ecbc5fb84969..e26ee644d638 100644 Binary files a/icons/obj/items/clothing/belts.dmi and b/icons/obj/items/clothing/belts.dmi differ diff --git a/icons/obj/items/storage.dmi b/icons/obj/items/storage.dmi index 44dfac1c246e..ff702586e16b 100644 Binary files a/icons/obj/items/storage.dmi and b/icons/obj/items/storage.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_faction/colony.dmi b/icons/obj/items/weapons/guns/guns_by_faction/colony.dmi index 17e7e6f221ae..24f9f9b63871 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_faction/colony.dmi and b/icons/obj/items/weapons/guns/guns_by_faction/colony.dmi differ diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index c1d18d4f9483..705f141d4c9b 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -229,15 +229,6 @@ }, /turf/open/floor/wood/ship, /area/almayer/living/basketball) -"abQ" = ( -/obj/item/device/radio/intercom{ - freerange = 1; - name = "General Listening Channel"; - pixel_y = 28 - }, -/obj/structure/machinery/cm_vending/clothing/staff_officer_armory, -/turf/open/floor/almayer/redfull, -/area/almayer/command/cic) "abR" = ( /obj/item/tank/phoron, /turf/open/floor/almayer/redfull, @@ -3941,36 +3932,12 @@ }, /turf/open/floor/almayer/mono, /area/almayer/lifeboat_pumps/north2) -"azV" = ( -/obj/structure/surface/table/reinforced/almayer_B, -/obj/structure/window/reinforced/toughened{ - dir = 8 - }, -/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ - dir = 4; - name = "Normandy Remote Control Console"; - shuttleId = "dropship_normandy" - }, -/turf/open/floor/almayer/plate, -/area/almayer/command/cic) "azW" = ( /obj/structure/machinery/door/window/westright{ dir = 2 }, /turf/open/floor/plating/plating_catwalk, /area/almayer/command/cic) -"azX" = ( -/obj/structure/surface/table/reinforced/almayer_B, -/obj/structure/window/reinforced/toughened{ - dir = 4 - }, -/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ - dir = 8; - name = "Alamo Remote Control Console"; - shuttleId = "dropship_alamo" - }, -/turf/open/floor/almayer/plate, -/area/almayer/command/cic) "azZ" = ( /obj/structure/machinery/keycard_auth, /obj/structure/surface/table/reinforced/black, @@ -16871,6 +16838,10 @@ }, /turf/open/floor/almayer/green/northwest, /area/almayer/living/offices) +"cWw" = ( +/obj/structure/machinery/cm_vending/gear/staff_officer_armory, +/turf/open/floor/almayer/redfull, +/area/almayer/command/cic) "cWy" = ( /obj/structure/closet/secure_closet/freezer/fridge, /obj/item/reagent_container/food/snacks/packaged_burger, @@ -21791,6 +21762,13 @@ }, /turf/open/floor/almayer/orangecorner/east, /area/almayer/engineering/upper_engineering/port) +"eYU" = ( +/obj/structure/disposalpipe/up/almayer{ + dir = 8; + id = "almayerlink_med_req" + }, +/turf/closed/wall/almayer/white/reinforced, +/area/almayer/medical/hydroponics) "eZm" = ( /turf/closed/wall/almayer, /area/almayer/maint/hull/upper/p_stern) @@ -24163,20 +24141,6 @@ }, /turf/open/floor/plating, /area/almayer/engineering/laundry) -"geg" = ( -/obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/hangar{ - dir = 4; - pixel_y = 12 - }, -/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ - dir = 4; - name = "Normandy Remote Control Console"; - pixel_y = -12; - shuttleId = "dropship_normandy" - }, -/turf/open/floor/almayer/redfull, -/area/almayer/living/offices/flight) "gei" = ( /obj/structure/sign/safety/ref_bio_storage{ pixel_x = -17; @@ -27432,6 +27396,17 @@ }, /turf/open/floor/almayer/greenfull, /area/almayer/living/offices) +"huw" = ( +/obj/structure/surface/table/reinforced/almayer_B, +/obj/structure/window/reinforced/toughened{ + dir = 8 + }, +/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ + dir = 4; + name = "Dropship Remote Control Console" + }, +/turf/open/floor/almayer/plate, +/area/almayer/command/cic) "huD" = ( /obj/structure/machinery/light{ dir = 1 @@ -33235,6 +33210,15 @@ }, /turf/open/floor/almayer/plate, /area/almayer/hallways/hangar) +"jSc" = ( +/obj/item/device/radio/intercom{ + freerange = 1; + name = "General Listening Channel"; + pixel_y = 28 + }, +/obj/structure/machinery/cm_vending/gear/staff_officer_armory, +/turf/open/floor/almayer/redfull, +/area/almayer/command/cic) "jSo" = ( /obj/item/tool/warning_cone, /turf/open/floor/almayer/plate, @@ -39810,6 +39794,13 @@ "mGu" = ( /turf/open/floor/almayer/silver/east, /area/almayer/command/securestorage) +"mGM" = ( +/obj/structure/disposalpipe/down/almayer{ + dir = 4; + id = "almayerlink_med_req" + }, +/turf/open/floor/almayer, +/area/almayer/lifeboat_pumps/south1) "mGT" = ( /obj/structure/machinery/status_display{ pixel_y = 30 @@ -42168,6 +42159,19 @@ /obj/effect/landmark/late_join/charlie, /turf/open/floor/plating/plating_catwalk, /area/almayer/squads/charlie) +"nCj" = ( +/obj/structure/surface/table/almayer, +/obj/structure/machinery/computer/cameras/hangar{ + dir = 4; + pixel_y = 12 + }, +/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ + dir = 4; + pixel_y = -12; + name = "Remote dropship navigation computer" + }, +/turf/open/floor/almayer/redfull, +/area/almayer/living/offices/flight) "nCn" = ( /obj/structure/pipes/vents/pump/on, /turf/open/floor/almayer/plate, @@ -43324,7 +43328,7 @@ "obo" = ( /obj/structure/disposalpipe/up/almayer{ dir = 8; - id = "almayerlink_med_req" + id = "almayerlink_med1_req" }, /turf/closed/wall/almayer, /area/almayer/squads/req) @@ -49458,6 +49462,13 @@ }, /turf/open/floor/almayer/orange/north, /area/almayer/engineering/lower) +"qAE" = ( +/obj/structure/disposalpipe/segment{ + dir = 4; + icon_state = "pipe-c" + }, +/turf/closed/wall/almayer/white/reinforced, +/area/almayer/medical/medical_science) "qAG" = ( /obj/structure/platform{ dir = 1 @@ -51900,10 +51911,6 @@ }, /turf/open/floor/almayer/test_floor4, /area/almayer/maint/upper/u_a_p) -"ryR" = ( -/obj/structure/machinery/cm_vending/clothing/staff_officer_armory, -/turf/open/floor/almayer/redfull, -/area/almayer/command/cic) "ryY" = ( /obj/effect/step_trigger/clone_cleaner, /obj/structure/disposalpipe/down/almayer{ @@ -53195,6 +53202,13 @@ }, /turf/open/floor/almayer/test_floor4, /area/almayer/command/corporateliaison) +"saX" = ( +/obj/structure/disposalpipe/down/almayer{ + dir = 8; + id = "almayerlink_med1_req" + }, +/turf/open/floor/almayer, +/area/almayer/lifeboat_pumps/south1) "sbq" = ( /obj/structure/machinery/door/poddoor/almayer/locked{ icon_state = "almayer_pdoor"; @@ -53587,20 +53601,6 @@ }, /turf/open/floor/almayer/green/northeast, /area/almayer/hallways/lower/port_midship_hallway) -"siz" = ( -/obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/hangar{ - dir = 8; - pixel_y = -12 - }, -/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ - dir = 8; - name = "Alamo Remote Control Console"; - pixel_y = 12; - shuttleId = "dropship_alamo" - }, -/turf/open/floor/almayer/redfull, -/area/almayer/living/offices/flight) "siC" = ( /turf/open/floor/almayer/red/northwest, /area/almayer/hallways/lower/port_fore_hallway) @@ -54862,6 +54862,13 @@ }, /turf/open/floor/almayer/orange/north, /area/almayer/engineering/lower) +"sKI" = ( +/obj/structure/surface/table/reinforced/almayer_B, +/obj/structure/window/reinforced/toughened{ + dir = 4 + }, +/turf/open/floor/almayer/plate, +/area/almayer/command/cic) "sKM" = ( /obj/structure/pipes/standard/simple/hidden/supply{ dir = 10 @@ -66374,6 +66381,20 @@ }, /turf/open/floor/almayer/plate, /area/almayer/maint/upper/u_a_s) +"xnZ" = ( +/obj/structure/surface/table/almayer, +/obj/structure/machinery/computer/cameras/hangar{ + dir = 8; + pixel_y = -12 + }, +/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ + dir = 8; + pixel_y = 12; + shuttleId = "dropship_alamo"; + name = "Remote dropship navigation computer" + }, +/turf/open/floor/almayer/redfull, +/area/almayer/living/offices/flight) "xoe" = ( /obj/structure/pipes/standard/simple/hidden/supply{ dir = 4 @@ -88725,7 +88746,7 @@ aqN alX asc abk -azV +huw aAB aBZ avY @@ -89022,7 +89043,7 @@ bHB xyw aho vWc -geg +nCj aEj aho aYt @@ -89131,7 +89152,7 @@ wVW wVW rOC soX -azX +sKI vHt aCb aDv @@ -89531,7 +89552,7 @@ agj aic sxW wVW -abQ +jSc atN cEl sOi @@ -89834,7 +89855,7 @@ bHB xyw aho dkj -siz +xnZ gYt aho aYt @@ -90355,7 +90376,7 @@ alX aIf aED wVW -ryR +cWw jvX iaa wVW @@ -98294,7 +98315,7 @@ iKy iKy iKy wAE -baw +mGM baw qYC kwo @@ -98497,7 +98518,7 @@ qQu qQu qQu wAE -baw +ley vbB ley kwo @@ -98700,7 +98721,7 @@ dME bRO llo wAE -baw +saX dBp gVA tQV @@ -100090,7 +100111,7 @@ iYf bIM wPz iUo -vOy +qAE xqp lzA vkp @@ -100293,7 +100314,7 @@ mTp wiW wPz jeq -rQy +eYU wWR vti vkp diff --git a/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx b/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx index 4e21b8223660..ee99db7f15a5 100644 --- a/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx +++ b/tgui/packages/tgui/interfaces/DropshipFlightControl.tsx @@ -1,3 +1,5 @@ +import { useEffect, useState } from 'react'; + import { useBackend, useSharedState } from '../backend'; import { Box, @@ -39,7 +41,13 @@ interface AutomatedControl { ground_lz: null | string; } +type ShuttleRef = { + name: string; + id: string; +}; + interface DropshipNavigationProps extends NavigationProps { + shuttle_id: string; door_status: Array; has_flight_optimisation?: 0 | 1; is_flight_optimised?: 0 | 1; @@ -48,8 +56,9 @@ interface DropshipNavigationProps extends NavigationProps { primary_lz?: string; automated_control: AutomatedControl; has_flyby_skill: 0 | 1; - playing_launch_announcement_alarm: boolean; + can_change_shuttle: 0 | 1; + alternative_shuttles: Array; } const DropshipDoorControl = () => { @@ -248,7 +257,7 @@ export const TouchdownCooldown = () => { ); }; -const AutopilotConfig = (props) => { +const AutopilotConfig = () => { const { data, act } = useBackend(); const [automatedHangar, setAutomatedHangar] = useSharedState< string | undefined @@ -327,6 +336,7 @@ const StopLaunchAnnouncementAlarm = () => { icon="ban" onClick={() => { act('stop_playing_launch_announcement_alarm'); + act('button-push'); }} > Stop Alarm @@ -341,6 +351,7 @@ const PlayLaunchAnnouncementAlarm = () => { icon="rocket" onClick={() => { act('play_launch_announcement_alarm'); + act('button-push'); }} > Start Alarm @@ -349,11 +360,7 @@ const PlayLaunchAnnouncementAlarm = () => { }; const LaunchAnnouncementAlarm = () => { - const { data, act } = useBackend(); - const [siteselection, setSiteSelection] = useSharedState( - 'target_site', - undefined, - ); + const { data } = useBackend(); return (
    { ); }; -const RenderScreen = (props) => { +const DropshipButton = (props: { + readonly shipId: string; + readonly shipName: string; + readonly disable: boolean; + readonly onClick: () => void; +}) => { + const { act, data } = useBackend(); + const match = props.shipId === data.shuttle_id; + + return ( + + ); +}; + +const DropshipSelector = () => { + const { data } = useBackend(); + const [refreshTimeout, setRefreshTimeout] = useState< + NodeJS.Timeout | undefined + >(undefined); + + useEffect(() => { + if (refreshTimeout) { + return () => clearTimeout(refreshTimeout); + } + return () => {}; + }, [refreshTimeout]); + + return ( +
    + + {data.alternative_shuttles + .sort((a, b) => a.id.localeCompare(b.id)) + .map((x) => ( + { + const freeze = setTimeout( + () => setRefreshTimeout(undefined), + 2000, + ); + setRefreshTimeout(freeze); + }} + /> + ))} + +
    + ); +}; + +const RenderScreen = () => { const { data } = useBackend(); return ( <> - {data.can_set_automated === 1 && } + {data.alternative_shuttles.length > 0 && } {data.shuttle_mode === 'idle' && } + {data.shuttle_mode === 'idle' && data.can_set_automated === 1 && ( + + )} {data.shuttle_mode === 'igniting' && } {data.shuttle_mode === 'pre-arrival' && } {data.shuttle_mode === 'recharging' && } @@ -384,18 +457,27 @@ const RenderScreen = (props) => { )} {data.door_status.length > 0 && } - {} + {data.alternative_shuttles.length === 0 && } + + ); +}; + +const DropshipDisabledScreen = () => { + const { data } = useBackend(); + return ( + <> + {data.alternative_shuttles.length > 0 && } + ); }; -export const DropshipFlightControl = (props) => { +export const DropshipFlightControl = () => { const { data } = useBackend(); return ( - - {data.is_disabled === 1 && } - {data.is_disabled === 0 && } + + {data.is_disabled === 0 ? : } ); diff --git a/tgui/packages/tgui/interfaces/NavigationShuttle.tsx b/tgui/packages/tgui/interfaces/NavigationShuttle.tsx index 239ce8f2601d..91f831137f1c 100644 --- a/tgui/packages/tgui/interfaces/NavigationShuttle.tsx +++ b/tgui/packages/tgui/interfaces/NavigationShuttle.tsx @@ -261,7 +261,7 @@ const DoorControls = () => { }; export const DisabledScreen = (props) => { - const { data, act } = useBackend(); + const { data } = useBackend(); const disabled_text = data.mission_accomplished ? 'Auto-navigation protocol completed - return home complete. Shuttle disabled.' diff --git a/tgui/packages/tgui/interfaces/ResearchTerminal.tsx b/tgui/packages/tgui/interfaces/ResearchTerminal.tsx index 11389bbeeeb9..6ba24d96bea9 100644 --- a/tgui/packages/tgui/interfaces/ResearchTerminal.tsx +++ b/tgui/packages/tgui/interfaces/ResearchTerminal.tsx @@ -1,6 +1,5 @@ import { useState } from 'react'; -import { classes } from '../../common/react'; import { useBackend } from '../backend'; import { Box, Button, Flex, Section, Stack, Tabs } from '../components'; import { BoxProps } from '../components/Box'; @@ -32,69 +31,6 @@ interface TerminalProps { printer_toner: number; } -const PurchaseDocs = () => { - const { data, act } = useBackend(); - const [purchaseSelection, setPurchaseSelection] = useState('0'); - const clearance_level = data.clearance_level; - const all_levels = ['1', '2', '3', '4', '5']; - const costs = { '1': 7, '2': 9, '3': 11, '4': 13, '5': 15 }; - const available_levels = Array.from(Array(clearance_level).keys()).map((x) => - (x + 1).toString(), - ); - - return ( - - - Purchase Reports -
    -
    - - - - {all_levels.map((x) => { - const isDisabled = - !available_levels.includes(x) || costs[x] > data.rsc_credits; - return ( - - - - ); - })} - - -
    - {purchaseSelection !== '0' && ( - - { - act('purchase_document', { - purchase_document: purchaseSelection, - }); - setPurchaseSelection('0'); - }} - onCancel={() => setPurchaseSelection('0')} - > - - Are you sure you want to purchase a level{' '} - {purchaseSelection} document? -
    - It will cost {costs[purchaseSelection]} credits. -
    -
    -
    - )} -
    - ); -}; - interface ConfirmationProps extends BoxProps { readonly onConfirm: () => any; readonly onCancel: () => any; @@ -486,7 +422,6 @@ const ResearchManager = (props: {
    - { - const { data } = useBackend(context); - const { admin, administrators } = data; + const { data } = useBackend(); + const { base_data, admin_additional, admin_stealthed_additional } = data; + + const total_admins = mergeArrays( + base_data.total_admins, + admin_additional?.total_admins, + admin_stealthed_additional?.total_admins, + ); return ( - {administrators !== undefined ? ( + {base_data ? ( - {administrators.map((x, index) => ( - - {x.admins.map((x, index) => ( - - ))} - - ))} + ) : null} @@ -37,6 +30,23 @@ export const StaffWho = (props, context) => { ); }; +const FilterCategories = (props, context) => { + const { categories, total_admins } = props; + + return categories.map((category) => { + const category_admins = total_admins.filter((adminObj) => + isMatch(adminObj, category.category), + ); + return ( + + ); + }); +}; + const StaffWhoCollapsible = (props, context) => { const { title, color, children } = props; return ( @@ -46,33 +56,113 @@ const StaffWhoCollapsible = (props, context) => { ); }; +const CategoryDropDown = (props, context) => { + const { category, category_admins } = props; + return ( + + + + ); +}; + +const FilterAdmins = (props, context) => { + const { category_admins } = props; + + return category_admins.map((adminObj) => { + const ckey = Object.keys(adminObj)[0]; + return ; + }); +}; + const GetAdminInfo = (props, context) => { - const { admin, content, color, text } = props; - return admin ? ( + const { ckey, special_color, special_text, text, color } = props; + return ( - ) : ( - ); }; + +const isMatch = (adminObj, search) => { + if (!search) { + return true; + } + + let found = false; + const adminKey = Object.keys(adminObj)[0]; + const params = adminObj[adminKey]; + params.forEach((param) => { + if (found) { + return; + } + Object.keys(param).forEach((key) => { + if (param[key] === search) { + found = true; + return; + } + }); + }); + return found; +}; + +// Krill me please +const mergeArrays = (...arrays) => { + const mergedObject = {}; + + arrays.forEach((array) => { + if (!array) return; + + array.forEach((item) => { + if (!item) return; + + const key = Object.keys(item)[0]; + const value = item[key]; + + if (!mergedObject[key]) { + mergedObject[key] = []; + } + + value.forEach((subItem) => { + if (typeof subItem !== 'object' || subItem === null) return; + + const existingItemIndex = mergedObject[key].findIndex( + (existingSubItem) => + Object.keys(existingSubItem).some((subKey) => + Object.prototype.hasOwnProperty.call(subItem, subKey), + ), + ); + + if (existingItemIndex !== -1) { + mergedObject[key][existingItemIndex] = { + ...mergedObject[key][existingItemIndex], + ...subItem, + }; + } else { + mergedObject[key].push(subItem); + } + }); + }); + }); + + return Object.keys(mergedObject).map((key) => ({ [key]: mergedObject[key] })); +}; diff --git a/tgui/packages/tgui/interfaces/Who.jsx b/tgui/packages/tgui/interfaces/Who.jsx index dccf3d1e39f0..5be9dc134b07 100644 --- a/tgui/packages/tgui/interfaces/Who.jsx +++ b/tgui/packages/tgui/interfaces/Who.jsx @@ -1,4 +1,6 @@ -import { useBackend, useLocalState } from '../backend'; +import { useState } from 'react'; + +import { useBackend } from '../backend'; import { Box, Button, @@ -11,20 +13,24 @@ import { import { Window } from '../layouts'; export const Who = (props, context) => { - const { act, data } = useBackend(context); + const { act, data } = useBackend(); const { - admin, - all_clients, - total_players = [], - additional_info = [], - factions = [], - xenomorphs = [], + base_data, + player_additional, + player_stealthed_additional, + factions_additional, } = data; - const [searchQuery, setSearchQuery] = useLocalState('searchQuery', ''); + const total_players = mergeArrays( + base_data?.total_players, + player_additional?.total_players, + player_stealthed_additional?.total_players, + ); + + const [searchQuery, setSearchQuery] = useState(''); const searchPlayers = () => - total_players.filter((player) => isMatch(player, searchQuery)); + total_players.filter((playerObj) => isMatch(playerObj, searchQuery)); const filteredTotalPlayers = searchPlayers(); @@ -42,11 +48,13 @@ export const Who = (props, context) => { + onEnter={(e, value) => { + const clientObj = searchPlayers()?.[0]; + if (!clientObj) return; act('get_player_panel', { - ckey: searchPlayers()?.[0].ckey, - }) - } + ckey: Object.keys(clientObj)[0], + }); + }} onInput={(e) => setSearchQuery(e.target.value)} placeholder="Search..." value={searchQuery} @@ -56,55 +64,34 @@ export const Who = (props, context) => {
    -
    - - {filteredTotalPlayers.length ? ( + {filteredTotalPlayers && ( +
    + - {filteredTotalPlayers.map((x) => ( - - ))} + - ) : null} - -
    - {admin !== 0 ? ( +
    +
    + )} + {factions_additional && (
    - {additional_info.length - ? additional_info.map((x, index) => ( - - )) - : null} - {factions.length - ? factions.map((x, index) => ( - - )) - : null} - {xenomorphs.length - ? xenomorphs.map((x, index) => ( - - )) - : null} + {factions_additional.map((x, index) => ( + + ))}
    - ) : null} + )}
    @@ -122,16 +109,15 @@ const WhoCollapsible = (props, context) => { }; const GetAddInfo = (props, context) => { - const { act } = useBackend(context); const { content, color, text } = props; return ( - ) : ( - ); }; -const isMatch = (player, searchQuery) => { +const isMatch = (playerObj, searchQuery) => { if (!searchQuery) { return true; } - return ( - player.ckey.toLowerCase().includes(searchQuery?.toLowerCase()) || false - ); + const key = Object.keys(playerObj)[0]; + return key.toLowerCase().includes(searchQuery?.toLowerCase()) || false; +}; + +// Krill me please +const mergeArrays = (...arrays) => { + const mergedObject = {}; + + arrays.forEach((array) => { + if (!array) return; + + array.forEach((item) => { + if (!item) return; + + const key = Object.keys(item)[0]; + const value = item[key]; + + if (!mergedObject[key]) { + mergedObject[key] = []; + } + + value.forEach((subItem) => { + if (typeof subItem !== 'object' || subItem === null) return; + + const existingItemIndex = mergedObject[key].findIndex( + (existingSubItem) => + Object.keys(existingSubItem).some((subKey) => + Object.prototype.hasOwnProperty.call(subItem, subKey), + ), + ); + + if (existingItemIndex !== -1) { + mergedObject[key][existingItemIndex] = { + ...mergedObject[key][existingItemIndex], + ...subItem, + }; + } else { + mergedObject[key].push(subItem); + } + }); + }); + }); + + return Object.keys(mergedObject).map((key) => ({ [key]: mergedObject[key] })); };