Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Metis
2024-10-24 01:19:47 -04:00
7 changed files with 57 additions and 8 deletions

View File

@@ -6,10 +6,12 @@
can_unwrench = TRUE
construction_type = /obj/item/pipe/binary
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
pipe_state = "relief_valve-t"
shift_underlay_only = FALSE
var/opened = FALSE
var/open_pressure = ONE_ATMOSPHERE * 3
var/close_pressure = ONE_ATMOSPHERE
pipe_state = "relief_valve-t"
/obj/machinery/atmospherics/components/binary/relief_valve/layer1
piping_layer = PIPING_LAYER_MIN

View File

@@ -24,11 +24,13 @@
return ..()
/obj/machinery/atmospherics/components/unary/portables_connector/update_icon_nopipes()
icon_state = "connector"
cut_overlays()
if(showpipe)
var/image/cap = getpipeimage(icon, "connector_cap", initialize_directions, piping_layer = piping_layer)
add_overlay(cap)
icon_state = "connector"
/obj/machinery/atmospherics/components/unary/portables_connector/process_atmos()
if(!connected_device)
return
@@ -37,7 +39,7 @@
/obj/machinery/atmospherics/components/unary/portables_connector/can_unwrench(mob/user)
. = ..()
if(. && connected_device)
to_chat(user, "<span class='warning'>You cannot unwrench [src], detach [connected_device] first!</span>")
to_chat(user, span_warning("You cannot unwrench [src], detach [connected_device] first!"))
return FALSE
/obj/machinery/atmospherics/components/unary/portables_connector/portableConnectorReturnAir()

View File

@@ -189,3 +189,7 @@
/// AFK tracking
var/last_activity = 0
/// The next point in time at which the client is allowed to send a mousemove() or mousedrag()
COOLDOWN_DECLARE(next_mousemove)
COOLDOWN_DECLARE(next_mousedrag)

View File

@@ -230,7 +230,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
///loadout stuff
var/gear_points = 10
var/list/gear_categories
var/list/loadout_data = list()
var/list/loadout_data
var/list/unlockable_loadout_data = list()
var/loadout_slot = 1 //goes from 1 to MAXIMUM_LOADOUT_SAVES
var/gear_category
@@ -406,7 +406,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//calculate your gear points from the chosen item
gear_points = CONFIG_GET(number/initial_gear_points)
var/list/chosen_gear = loadout_data["SAVE_[loadout_slot]"]
if(chosen_gear)
if(islist(chosen_gear))
loadout_errors = 0
for(var/loadout_item in chosen_gear)
var/loadout_item_path = loadout_item[LOADOUT_ITEM]
@@ -994,6 +994,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</tr></table>"
if(LOADOUT_CHAR_TAB)
dat += "<table align='center' width='100%'>"
dat += "<tr><td colspan=4><center><b>Loadout slot</b></center></td></tr>"
dat += "<tr><td colspan=4><center>"
for(var/iteration in 1 to MAXIMUM_LOADOUT_SAVES)
dat += "<a [loadout_slot == iteration ? "class='linkOn'" : "href='?_src_=prefs;preference=gear;select_slot=[iteration]'"]>[iteration]</a>"
dat += "</center></td></tr>"
dat += "<tr><td colspan=4><center><i style=\"color: grey;\">You can only choose one item per category, unless it's an item that spawns in your backpack or hands.</center></td></tr>"
dat += "<tr><td colspan=4><center><b>"
@@ -3502,6 +3507,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
preferences_tab = text2num(href_list["tab"])
if(href_list["preference"] == "gear")
if(href_list["select_slot"])
var/chosen = text2num(href_list["select_slot"])
if(!chosen)
return
chosen = floor(chosen)
if(chosen > MAXIMUM_LOADOUT_SAVES || chosen < 1)
return
loadout_slot = chosen
if(href_list["clear_loadout"])
loadout_data["SAVE_[loadout_slot]"] = list()
save_preferences()

View File

@@ -953,10 +953,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_breasts_fluid"] >> features["breasts_fluid"]
//gear loadout
if(S["loadout"])
if(istext(S["loadout"]))
loadout_data = safe_json_decode(S["loadout"])
else
loadout_data = list()
//let's remember their last used slot, i'm sure "oops i brought the wrong stuff" will be an issue now
S["loadout_slot"] >> loadout_slot
//try to fix any outdated data if necessary
//preference updating will handle saving the updated data for us.
@@ -1137,6 +1139,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
vore_smell = copytext(vore_smell, 1, MAX_TASTE_LEN)
belly_prefs = SANITIZE_LIST(belly_prefs)
loadout_slot = sanitize_num_clamp(loadout_slot, 1, MAXIMUM_LOADOUT_SAVES, 1, TRUE)
cit_character_pref_load(S)
return TRUE
@@ -1360,10 +1364,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//gear loadout
if(length(loadout_data))
if(islist(loadout_data))
S["loadout"] << safe_json_encode(loadout_data)
else
S["loadout"] << safe_json_encode(list())
WRITE_FILE(S["loadout_slot"], loadout_slot)
if(length(tcg_cards))
S["tcg_cards"] << safe_json_encode(tcg_cards)

View File

@@ -13,28 +13,40 @@
. = ..()
AddComponent(/datum/component/plumbing/simple_supply, bolt)
/obj/machinery/plumbing/grinder_chemical/can_be_rotated(mob/user,rotation_type)
/obj/machinery/plumbing/grinder_chemical/examine(mob/user)
. = ..()
. += span_notice("The input direction for this item can be rotated by using CTRL+SHIFT+CLICK")
/obj/machinery/plumbing/grinder_chemical/CtrlShiftClick(mob/user)
if(anchored)
to_chat(user, "<span class='warning'>It is fastened to the floor!</span>")
return FALSE
switch(eat_dir)
if(WEST)
balloon_alert(user, "set to north")
eat_dir = NORTH
return TRUE
if(EAST)
balloon_alert(user, "set to south")
eat_dir = SOUTH
return TRUE
if(NORTH)
balloon_alert(user, "set to east")
eat_dir = EAST
return TRUE
if(SOUTH)
balloon_alert(user, "set to west")
eat_dir = WEST
return TRUE
return TRUE
/obj/machinery/plumbing/grinder_chemical/CanAllowThrough(atom/movable/AM)
. = ..()
if(!anchored)
return
var/move_dir = get_dir(loc, AM.loc)
if(move_dir == eat_dir)
return TRUE
@@ -61,4 +73,8 @@
return
I.on_grind()
reagents.add_reagent_list(I.grind_results)
if(I.reagents) //If the thing has any reagents inside of it, grind them up.
I.reagents.trans_to(reagents, I.reagents.total_volume)
qdel(I)