Skip to content

Commit

Permalink
Merge branch 'master' into SquadBriefings(ACTUAL)
Browse files Browse the repository at this point in the history
  • Loading branch information
Warfan1815 authored Oct 3, 2023
2 parents fd5b748 + 0e220d2 commit d9589ca
Show file tree
Hide file tree
Showing 369 changed files with 337 additions and 132 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
#define FACTION_MONKEY "Monkey" // Nanu

#define FACTION_LIST_MARINE list(FACTION_MARINE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_MARSHAL, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_MARSHAL, FACTION_TWE)
#define FACTION_LIST_WY list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_WY list(FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,11 @@
var/mob/dead/observer/cur_obs = candidates[i]

// Generate the messages
var/cached_message = SPAN_XENONOTICE("You are currently [i-dequeued]\th in the larva queue.")
var/cached_message = "You are currently [i-dequeued]\th in the larva queue."
cur_obs.larva_queue_cached_message = cached_message
if(!cache_only)
var/chat_message = dequeued ? replacetext(cached_message, "currently", "now") : cached_message
to_chat(candidates[i], chat_message)
to_chat(candidates[i], SPAN_XENONOTICE(chat_message))

/proc/convert_k2c(temp)
return ((temp - T0C))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

/datum/game_mode/whiskey_outpost/activate_distress()
var/datum/emergency_call/em_call = /datum/emergency_call/wo
em_call.activate(FALSE)
em_call.activate(TRUE, FALSE)
return

/datum/emergency_call/wo/platoon
Expand Down
10 changes: 5 additions & 5 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ Additional game mode variables.
var/mob/dead/observer/candidate_observer = xeno_candidate
if(istype(candidate_observer))
if(candidate_observer.larva_queue_cached_message)
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

// No cache, lets check now then
Expand All @@ -393,14 +393,14 @@ Additional game mode variables.
cur_hive = GLOB.hive_datum[hive_num]
for(var/mob_name in cur_hive.banished_ckeys)
if(cur_hive.banished_ckeys[mob_name] == xeno_candidate.ckey)
candidate_observer.larva_queue_cached_message += "\n" + SPAN_WARNING("NOTE: You are banished from the [cur_hive] and you may not rejoin unless the Queen re-admits you or dies. Your queue number won't update until there is a hive you aren't banished from.")
candidate_observer.larva_queue_cached_message += "\nNOTE: You are banished from the [cur_hive] and you may not rejoin unless the Queen re-admits you or dies. Your queue number won't update until there is a hive you aren't banished from."
break
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

// We aren't in queue yet, lets teach them about the queue then
candidate_observer.larva_queue_cached_message = SPAN_XENONOTICE("You are currently awaiting assignment in the larva queue. The ordering is based on your time of death or the time you joined. When you have been dead long enough and are not inactive, you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. Your current position will shift as others change their preferences or go inactive, but your relative position compared to all observers is the same. Note: Playing as a facehugger or in the thunderdome will not alter your time of death. This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome.")
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
candidate_observer.larva_queue_cached_message = "You are currently awaiting assignment in the larva queue. The ordering is based on your time of death or the time you joined. When you have been dead long enough and are not inactive, you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. Your current position will shift as others change their preferences or go inactive, but your relative position compared to all observers is the same. Note: Playing as a facehugger or in the thunderdome will not alter your time of death. This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome."
to_chat(xeno_candidate, SPAN_XENONOTICE(candidate_observer.larva_queue_cached_message))
return FALSE

var/mob/living/carbon/xenomorph/new_xeno
Expand Down
144 changes: 72 additions & 72 deletions code/game/machinery/kitchen/microwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@
if (!(R.id in acceptable_reagents))
to_chat(user, SPAN_DANGER("Your [O] contains components unsuitable for cookery."))
return 1
//G.reagents.trans_to(src,G.amount_per_transfer_from_this)
else if(istype(O,/obj/item/grab))
return 1
else
Expand All @@ -152,74 +151,78 @@

/obj/structure/machinery/microwave/attack_hand(mob/user as mob)
user.set_interaction(src)
interact(user)
tgui_interact(user)

/obj/structure/machinery/microwave/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "Microwave", "Microwave Controls")
ui.open()

//*******************
//* Microwave Menu
//********************/

/obj/structure/machinery/microwave/interact(mob/user as mob) // The microwave Menu
var/dat = ""
if(src.broken > 0)
dat = {"<TT>Bzzzzttttt</TT>"}
else if(src.operating)
dat = {"<TT>Microwaving in progress!<BR>Please wait...!</TT>"}
else if(src.dirty==100)
dat = {"<TT>This microwave is dirty!<BR>Please clean it before use!</TT>"}
else
var/list/items_counts = new
var/list/items_measures = new
var/list/items_measures_p = new
for (var/obj/O in contents)
var/display_name = O.name
if (istype(O,/obj/item/reagent_container/food/snacks/egg))
items_measures[display_name] = "egg"
items_measures_p[display_name] = "eggs"
if (istype(O,/obj/item/reagent_container/food/snacks/tofu))
items_measures[display_name] = "tofu chunk"
items_measures_p[display_name] = "tofu chunks"
if (istype(O,/obj/item/reagent_container/food/snacks/meat)) //any meat
items_measures[display_name] = "slab of meat"
items_measures_p[display_name] = "slabs of meat"
if (istype(O,/obj/item/reagent_container/food/snacks/donkpocket))
display_name = "Turnovers"
items_measures[display_name] = "turnover"
items_measures_p[display_name] = "turnovers"
if (istype(O,/obj/item/reagent_container/food/snacks/carpmeat))
items_measures[display_name] = "fillet of meat"
items_measures_p[display_name] = "fillets of meat"
items_counts[display_name]++
for (var/O in items_counts)
var/N = items_counts[O]
if (!(O in items_measures))
dat += {"<B>[capitalize(O)]:</B> [N] [lowertext(O)]\s<BR>"}
else
if (N==1)
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures[O]]<BR>"}
else
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures_p[O]]<BR>"}

for (var/datum/reagent/R in reagents.reagent_list)
var/display_name = R.name
if (R.id == "hotsauce")
display_name = "Hotsauce"
if (R.id == "frostoil")
display_name = "Coldsauce"
dat += {"<B>[display_name]:</B> [R.volume] unit\s<BR>"}

if (items_counts.len==0 && reagents.reagent_list.len==0)
dat = {"<B>The microwave is empty</B><BR>"}
/obj/structure/machinery/microwave/ui_data(mob/user)
var/list/data = list()

data["operating"] = operating
data["broken"] = (broken > 0)
data["dirty"] = (dirty == 100)

var/list/ingredients = list()
var/list/items_counts = list()
var/list/items_measures = list()
var/list/items_measures_p = list()

for (var/obj/contents_item as anything in contents)
var/display_name = contents_item.name

if (istype(contents_item, /obj/item/reagent_container/food/snacks/tofu))
items_measures[display_name] = "tofu chunk"
items_measures_p[display_name] = "tofu chunks"
if (istype(contents_item, /obj/item/reagent_container/food/snacks/meat)) //any meat
items_measures[display_name] = "slab of meat"
items_measures_p[display_name] = "slabs of meat"
if (istype(contents_item, /obj/item/reagent_container/food/snacks/donkpocket))
display_name = "Turnovers"
items_measures[display_name] = "turnover"
items_measures_p[display_name] = "turnovers"
if (istype(contents_item, /obj/item/reagent_container/food/snacks/carpmeat))
items_measures[display_name] = "fillet of meat"
items_measures_p[display_name] = "fillets of meat"
items_counts[display_name]++

for (var/contents_item in items_counts)
var/list/item = list()

item["name"] = capitalize(contents_item)
item["count"] = items_counts[contents_item]

if (!(contents_item in items_measures))
item["measure"] = "[lowertext(contents_item)][items_counts[contents_item] > 1 ? "s" : ""]" // Adds 's' for plurals.
else if (items_counts[contents_item] == 1)
item["measure"] = items_measures[contents_item]
else
dat = {"<b>Ingredients:</b><br>[dat]"}
dat += {"<HR><BR>\
<A href='?src=\ref[src];action=cook'>Turn on!<BR>\
<A href='?src=\ref[src];action=dispose'>Eject ingredients!<BR>\
"}
item["measure"] = items_measures_p[contents_item]

ingredients += list(item)

for (var/datum/reagent/contents_reagent as anything in reagents.reagent_list)
var/list/reagent = list()

show_browser(user, dat, "Microwave Controls", "microwave")
return
reagent["count"] = contents_reagent.volume
reagent["measure"] = contents_reagent.volume > 1 ? "units" : "unit"

reagent["name"] = contents_reagent.name
if (contents_reagent.id == "hotsauce")
reagent["name"] = "Hotsauce"
if (contents_reagent.id == "frostoil")
reagent["name"] = "Coldsauce"

ingredients += list(reagent)

data["ingredients"] = ingredients
return data

//***********************************
//* Microwave Menu Handling/Cooking
Expand Down Expand Up @@ -322,7 +325,7 @@
if (src.reagents.total_volume)
src.dirty++
src.reagents.clear_reagents()
to_chat(usr, SPAN_NOTICE(" You dispose of the microwave contents."))
to_chat(usr, SPAN_NOTICE("You dispose of the microwave contents."))
src.updateUsrDialog()

/obj/structure/machinery/microwave/proc/muck_start()
Expand Down Expand Up @@ -365,19 +368,16 @@
ffuu.reagents.add_reagent("toxin", amount/10)
return ffuu

/obj/structure/machinery/microwave/Topic(href, href_list)
if(..())
return

usr.set_interaction(src)
if(src.operating)
src.updateUsrDialog()
/obj/structure/machinery/microwave/ui_act(action, params)
. = ..()
if(.)
return

switch(href_list["action"])
switch (action)
if ("cook")
cook(usr.get_skill_duration_multiplier(SKILL_DOMESTIC)) // picking the right microwave setting for the right food. when's the last time you used the special setting on the microwave? i bet you just slam the 30 second increment. Do you know how much programming went into putting the Pizza setting into a microwave emitter?

if ("dispose")
if ("eject_all")
dispose()
return

return TRUE
3 changes: 3 additions & 0 deletions code/game/machinery/vending/vendor_types/crew/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth, list(
list("Webbing", 0, /obj/item/clothing/accessory/storage/webbing, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Surgical Webbing Vest", 0, /obj/item/clothing/accessory/storage/surg_vest, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Surgical Webbing Vest (Blue)", 0, /obj/item/clothing/accessory/storage/surg_vest/blue, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Surgical Drop Pouch", 0, /obj/item/clothing/accessory/storage/surg_vest/drop_green, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Surgical Drop Pouch (Blue)", 0, /obj/item/clothing/accessory/storage/surg_vest/drop_blue, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Surgical Drop Pouch (Black)", 0, /obj/item/clothing/accessory/storage/surg_vest/drop_black, MARINE_CAN_BUY_ACCESSORY, VENDOR_ITEM_REGULAR),
list("Tool Webbing", 0, /obj/item/clothing/accessory/storage/black_vest/tool_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),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list(
list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
list("Sandbags x25", 10, /obj/item/stack/sandbags_empty/half, null, VENDOR_ITEM_RECOMMENDED),
list("Super-Capacity Power Cell", 10, /obj/item/cell/super, null, VENDOR_ITEM_REGULAR),
list("Welding Goggles", 5, /obj/item/clothing/glasses/welding, null, VENDOR_ITEM_REGULAR),
list("ES-11 Mobile Fuel Canister", 4, /obj/item/tool/weldpack/minitank, null, VENDOR_ITEM_REGULAR),

list("EXPLOSIVES", 0, null, null, null),
Expand Down Expand Up @@ -62,7 +61,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list(
list("Machete Pouch (Full)", 8, /obj/item/storage/pouch/machete/full, null, VENDOR_ITEM_REGULAR),
list("USCM Radio Telephone Pack", 15, /obj/item/storage/backpack/marine/satchel/rto, null, VENDOR_ITEM_REGULAR),
list("Fuel Tank Strap Pouch", 4, /obj/item/storage/pouch/flamertank, null, VENDOR_ITEM_REGULAR),
list("Welding Goggles", 3, /obj/item/clothing/glasses/welding, null, VENDOR_ITEM_REGULAR),
list("Sling Pouch", 6, /obj/item/storage/pouch/sling, null, VENDOR_ITEM_REGULAR),
list("Large General Pouch", 6, /obj/item/storage/pouch/general/large, null, VENDOR_ITEM_REGULAR),
list("M276 Pattern Combat Toolbelt Rig", 15, /obj/item/storage/belt/gun/utility, null, VENDOR_ITEM_REGULAR),
Expand Down
28 changes: 21 additions & 7 deletions code/game/objects/items/storage/pouch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1172,23 +1172,37 @@

/obj/item/storage/pouch/tools
name = "tools pouch"
desc = "It's designed to hold maintenance tools - screwdriver, wrench, cable coil, etc. It also has a hook for an entrenching tool."
desc = "It's designed to hold maintenance tools - screwdriver, wrench, cable coil, etc. It also has a hook for an entrenching tool or light replacer."
storage_slots = 4
max_w_class = SIZE_MEDIUM
icon_state = "tools"
can_hold = list(
/obj/item/tool/wirecutters,
/obj/item/tool/shovel/etool,
/obj/item/tool/screwdriver,
/obj/item/tool/crowbar,
/obj/item/tool/screwdriver,
/obj/item/tool/weldingtool,
/obj/item/device/multitool,
/obj/item/tool/wirecutters,
/obj/item/tool/wrench,
/obj/item/stack/cable_coil,
/obj/item/tool/extinguisher/mini,
/obj/item/tool/shovel/etool,
/obj/item/stack/cable_coil,
/obj/item/weapon/gun/smg/nailgun/compact,
/obj/item/cell,
/obj/item/circuitboard,
/obj/item/stock_parts,
/obj/item/device/demo_scanner,
/obj/item/device/reagent_scanner,
/obj/item/device/assembly,
/obj/item/device/multitool,
/obj/item/device/flashlight,
/obj/item/device/t_scanner,
/obj/item/device/analyzer,
/obj/item/explosive/plastic,
/obj/item/device/lightreplacer,
)
bypass_w_limit = list(
/obj/item/tool/shovel/etool,
/obj/item/device/lightreplacer,
)
bypass_w_limit = list(/obj/item/tool/shovel/etool)

/obj/item/storage/pouch/tools/tactical
name = "tactical tools pouch"
Expand Down
10 changes: 10 additions & 0 deletions code/game/smoothwall.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,23 @@
setDir(NORTH)

/obj/structure/window/framed/handle_icon_junction(jun_1, jun_2)
if(!icon_exists(icon, "[basestate][jun_2 ? jun_2 : jun_1]")) //Missing states for 5, 6, 7, 9, 10, 11, 13, 14, 15 for the vast majority of /obj/structure/window/framed
icon_state = "[basestate]0"
junction = 0
return

icon_state = "[basestate][jun_2 ? jun_2 : jun_1]" //Use junction 2 if possible, junction 1 otherwise.
if(jun_2)
junction = jun_2
else
junction = jun_1

/obj/structure/window_frame/handle_icon_junction(jun_1, jun_2)
if(!icon_exists(icon, "[basestate][jun_2 ? jun_2 : jun_1]_frame")) //Missing states for 5, 6, 7, 9, 10, 11, 13, 14, 15 for the vast majority of /obj/structure/window_frame
icon_state = "[basestate]0_frame"
junction = 0
return

icon_state = "[basestate][jun_2 ? jun_2 : jun_1]_frame" //Use junction 2 if possible, junction 1 otherwise.
if(jun_2)
junction = jun_2
Expand Down
4 changes: 4 additions & 0 deletions code/game/turfs/walls/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,10 @@ INITIALIZE_IMMEDIATE(/turf/closed/wall/indestructible/splashscreen)
if(src in P.permutated)
return

//Ineffective if someone is sitting on the wall
if(locate(/mob) in contents)
return ..()

if(!prob(chance_to_reflect))
if(P.ammo.damage_type == BRUTE)
P.damage *= brute_multiplier
Expand Down
14 changes: 7 additions & 7 deletions code/modules/admin/tabs/event_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@
if(!istype(chosen_ert))
return

var/is_announcing = tgui_alert(usr, "Would you like to announce the distress beacon to the server population? This will reveal the distress beacon to all players.", "Announce distress beacon?", list("Yes", "No"), 20 SECONDS)
if(!is_announcing)
var/quiet_launch = tgui_alert(usr, "Would you like to announce the distress beacon to the server population? This will reveal the distress beacon to all players.", "Announce distress beacon?", list("Yes", "No"), 20 SECONDS)
if(!quiet_launch)
qdel(chosen_ert)
return
if(is_announcing == "No")
is_announcing = FALSE
if (is_announcing == "Yes")
is_announcing = TRUE
if(quiet_launch == "No")
quiet_launch = TRUE
if (quiet_launch == "Yes")
quiet_launch = FALSE

var/turf/override_spawn_loc
var/prompt = tgui_alert(usr, "Spawn at their assigned spawn, or at your location?", "Spawnpoint Selection", list("Spawn", "Current Location"), 0)
Expand All @@ -235,7 +235,7 @@
if(prompt == "Current Location")
override_spawn_loc = get_turf(usr)

chosen_ert.activate(is_announcing, override_spawn_loc)
chosen_ert.activate(quiet_launch = quiet_launch, announce = !quiet_launch, override_spawn_loc = override_spawn_loc)

message_admins("[key_name_admin(usr)] admin-called a [choice == "Randomize" ? "randomized ":""]distress beacon: [chosen_ert.name]")

Expand Down
Loading

0 comments on commit d9589ca

Please sign in to comment.