Skip to content

Commit

Permalink
Merge pull request #4706 from MistakeNot4892/devupdate
Browse files Browse the repository at this point in the history
Updating dev from staging
  • Loading branch information
MistakeNot4892 authored Jan 8, 2025
2 parents c2daacc + 5485975 commit e3e4908
Show file tree
Hide file tree
Showing 55 changed files with 282 additions and 203 deletions.
40 changes: 20 additions & 20 deletions code/_onclick/hud/ai_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,70 +11,70 @@
screen_loc = ui_ai_core
name = "AI Core"
icon_state = "ai_core"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, core)
proc_path = /mob/living/silicon/ai/proc/core

/decl/ai_hud/ai_announcement
screen_loc = ui_ai_announcement
name = "AI Announcement"
icon_state = "announcement"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_announcement)
proc_path = /mob/living/silicon/ai/proc/ai_announcement

/decl/ai_hud/ai_cam_track
screen_loc = ui_ai_cam_track
name = "Track With Camera"
icon_state = "track"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_camera_track)
proc_path = /mob/living/silicon/ai/proc/ai_camera_track
input_procs = list(/mob/living/silicon/ai/proc/trackable_mobs = (AI_BUTTON_PROC_BELONGS_TO_CALLER|AI_BUTTON_INPUT_REQUIRES_SELECTION))

/decl/ai_hud/ai_cam_light
screen_loc = ui_ai_cam_light
name = "Toggle Camera Lights"
icon_state = "camera_light"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, toggle_camera_light)
proc_path = /mob/living/silicon/ai/proc/toggle_camera_light

/decl/ai_hud/ai_cam_change_channel
screen_loc = ui_ai_cam_change_channel
name = "Jump to Camera Channel"
icon_state = "camera"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_channel_change)
proc_path = /mob/living/silicon/ai/proc/ai_channel_change
input_procs = list(/mob/living/silicon/ai/proc/get_camera_channel_list = (AI_BUTTON_PROC_BELONGS_TO_CALLER|AI_BUTTON_INPUT_REQUIRES_SELECTION))

/decl/ai_hud/ai_sensor
screen_loc = ui_ai_sensor
name = "Set Sensor Mode"
icon_state = "ai_sensor"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, sensor_mode)
proc_path = /mob/living/silicon/ai/proc/sensor_mode

/decl/ai_hud/ai_manifest
screen_loc = ui_ai_crew_manifest
name = "Show Crew Manifest"
icon_state = "manifest"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, run_program)
proc_path = /mob/living/silicon/ai/proc/run_program
input_args = list("crewmanifest")

/decl/ai_hud/ai_take_image
screen_loc = ui_ai_take_image
name = "Toggle Camera Mode"
icon_state = "take_picture"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_take_image)
proc_path = /mob/living/silicon/ai/proc/ai_take_image

/decl/ai_hud/ai_view_images
screen_loc = ui_ai_view_images
name = "View Images"
icon_state = "view_images"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_view_images)
proc_path = /mob/living/silicon/ai/proc/ai_view_images

/decl/ai_hud/ai_laws
screen_loc = ui_ai_state_laws
name = "State Laws"
icon_state = "state_laws"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_checklaws)
proc_path = /mob/living/silicon/ai/proc/ai_checklaws

/decl/ai_hud/ai_call_shuttle
screen_loc = ui_ai_call_shuttle
name = "Call Shuttle"
icon_state = "call_shuttle"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_call_shuttle)
proc_path = /mob/living/silicon/ai/proc/ai_call_shuttle

/decl/ai_hud/ai_up
screen_loc = ui_ai_up
Expand All @@ -92,53 +92,53 @@
screen_loc = ui_ai_color
name = "Change Floor Color"
icon_state = "ai_floor"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, change_floor)
proc_path = /mob/living/silicon/ai/proc/change_floor

/decl/ai_hud/ai_hologram
screen_loc = ui_ai_holo_change
name = "Change Hologram"
icon_state = "ai_holo_change"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_hologram_change)
proc_path = /mob/living/silicon/ai/proc/ai_hologram_change

/decl/ai_hud/ai_crew_monitor
screen_loc = ui_ai_crew_mon
name = "Crew Monitor"
icon_state = "crew_monitor"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, run_program)
proc_path = /mob/living/silicon/ai/proc/run_program
input_args = list("sensormonitor")

/decl/ai_hud/ai_power_override
screen_loc = ui_ai_power_override
name = "Toggle Power Override"
icon_state = "ai_p_override"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_power_override)
proc_path = /mob/living/silicon/ai/proc/ai_power_override

/decl/ai_hud/ai_shutdown
screen_loc = ui_ai_shutdown
name = "Shutdown"
icon_state = "ai_shutdown"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_shutdown)
proc_path = /mob/living/silicon/ai/proc/ai_shutdown

/decl/ai_hud/ai_move_hologram
screen_loc = ui_ai_holo_mov
name = "Toggle Hologram Movement"
icon_state = "ai_holo_mov"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, toggle_hologram_movement)
proc_path = /mob/living/silicon/ai/proc/toggle_hologram_movement

/decl/ai_hud/ai_core_icon
screen_loc = ui_ai_core_icon
name = "Pick Icon"
icon_state = "ai_core_pick"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, pick_icon)
proc_path = /mob/living/silicon/ai/proc/pick_icon

/decl/ai_hud/ai_status
screen_loc = ui_ai_status
name = "Pick Status"
icon_state = "ai_status"
proc_path = TYPE_PROC_REF(/mob/living/silicon/ai, ai_statuschange)
proc_path = /mob/living/silicon/ai/proc/ai_statuschange

/decl/ai_hud/ai_inbuilt_comp
screen_loc = ui_ai_crew_rec
name = "Inbuilt Computer"
icon_state = "ai_crew_rec"
proc_path = TYPE_PROC_REF(/mob/living/silicon, access_computer)
proc_path = /mob/living/silicon/proc/access_computer
9 changes: 5 additions & 4 deletions code/_onclick/hud/screen/screen_ai_button.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
/obj/screen/ai_button
icon = 'icons/mob/screen/ai.dmi'
requires_ui_style = FALSE
var/mob/living/silicon/ai/ai_verb
var/ai_verb
var/list/input_procs
var/list/input_args
var/list/template_icon = list(null, "template")
var/image/template_undelay

/obj/screen/ai_button/handle_click(mob/user, params)
if(!isAI(user))
return TRUE

var/mob/living/silicon/ai/A = user
if(!istype(A))
return TRUE

if(!(ai_verb in A.verbs))
return TRUE

Expand All @@ -30,7 +32,6 @@

if(!(ai_verb in A.verbs) || A.incapacitated())
return

input_arguments += input_arg

if(length(input_args))
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/overlays.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ SUBSYSTEM_DEF(overlays)
if(cut_old)
our_overlays = cached_other.Copy()
else
our_overlays |= cached_other
LAZYDISTINCTADD(our_overlays, cached_other)
if(NOT_QUEUED_ALREADY)
QUEUE_FOR_COMPILE
else if(cut_old)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ SUBSYSTEM_DEF(ticker)
Master.SetRunLevel(RUNLEVEL_POSTGAME)
end_game_state = END_GAME_READY_TO_END
INVOKE_ASYNC(src, PROC_REF(declare_completion))
if(get_config_value(/decl/config/toggle/allow_map_switching) && get_config_value(/decl/config/toggle/auto_map_vote) && global.all_maps.len > 1)
if(get_config_value(/decl/config/toggle/allow_map_switching) && get_config_value(/decl/config/toggle/auto_map_vote) && length(global.votable_maps) > 1)
SSvote.initiate_vote(/datum/vote/map/end_game, automatic = 1)

else if(mode_finished && (end_game_state <= END_GAME_NOT_OVER))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/ai/aggressive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
if(!obstacle.can_open(1))
return
body.face_atom(obstacle)
body.pry_door(obstacle, (obstacle.pry_mod * body.get_door_pry_time()))
body.pry_door((obstacle.pry_mod * body.get_door_pry_time()), obstacle)
return

/datum/mob_controller/aggressive/retaliate(atom/source)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/vote/map.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
return ..()

/datum/vote/map/setup_vote()
for(var/name in global.all_maps)
for(var/name in global.votable_maps)
choices += name
..()

/datum/vote/map/report_result()
if(..())
return 1
var/datum/map/M = global.all_maps[result[1]]
var/datum/map/M = global.votable_maps[result[1]]
fdel("use_map")
text2file(M.path, "use_map")

Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/effects/dirty_floor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
alpha = 0
var/dirt_amount = 0

// 'the dirt falls through the x' is pretty silly, dirt is generated by people walking.
/obj/effect/decal/cleanable/dirt/begin_falling(lastloc, below)
SHOULD_CALL_PARENT(FALSE)
qdel(src)
return TRUE

/obj/effect/decal/cleanable/dirt/visible
dirt_amount = 60
persistent = FALSE // This is a subtype for mapping.
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/_item_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
return TRUE

var/had_liquids = length(reagents.liquid_volumes)
var/trans = reagents.trans_to(target, amount)
var/transferred_amount = reagents.trans_to(target, amount)

if(had_liquids)
playsound(src, 'sound/effects/pour.ogg', 25, 1)
else
// Sounds more like pouring small pellets or dust.
playsound(src, 'sound/effects/refill.ogg', 25, 1)
to_chat(user, SPAN_NOTICE("You transfer [trans] unit\s of the solution to \the [target]. \The [src] now contains [src.reagents.total_volume] units."))
to_chat(user, SPAN_NOTICE("You transfer [transferred_amount] unit\s of the solution to \the [target]. \The [src] now contains [reagents.total_volume] unit\s."))
return TRUE
16 changes: 11 additions & 5 deletions code/game/objects/items/weapons/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@
. = ..()
set_extension(src, /datum/extension/holster, storage, sound_in, sound_out, can_holster)

/obj/item/belt/holster/attackby(obj/item/W, mob/user)
var/datum/extension/holster/H = get_extension(src, /datum/extension/holster)
if(H.holster(W, user))
/obj/item/belt/holster/get_stored_inventory()
. = ..()
if(length(.))
var/datum/extension/holster/holster = get_extension(src, /datum/extension/holster)
if(holster.holstered)
. -= holster.holstered

/obj/item/belt/holster/attackby(obj/item/used_item, mob/user)
var/datum/extension/holster/holster = get_extension(src, /datum/extension/holster)
if(holster?.holster(used_item, user))
return TRUE
else
. = ..(W, user)
return ..(used_item, user)

/obj/item/belt/holster/attack_hand(mob/user)
if(!user.check_dexterity(DEXTERITY_HOLD_ITEM, TRUE))
Expand Down
7 changes: 0 additions & 7 deletions code/game/objects/structures/well.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@
if(!is_processing && auto_refill)
START_PROCESSING(SSobj, src)

/obj/structure/reagent_dispensers/well/attackby(obj/item/W, mob/user)
. = ..()
if(!. && user.check_intent(I_FLAG_HELP) && reagents?.total_volume > FLUID_PUDDLE)
user.visible_message(SPAN_NOTICE("\The [user] dips \the [W] into \the [reagents.get_primary_reagent_name()]."))
W.fluid_act(reagents)
return TRUE

/obj/structure/reagent_dispensers/well/Process()
if(!reagents || !auto_refill) // if we're full, we only stop at the end of the proc; we need to check for contaminants first
return PROCESS_KILL
Expand Down
8 changes: 4 additions & 4 deletions code/game/turfs/floors/floor_attackby.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
if((istype(flooring) && flooring.constructed) || !istype(used_item) || !istype(user))
return FALSE

flooring = get_base_flooring()
if(istype(flooring) && flooring.constructed)
var/decl/flooring/base_flooring = get_base_flooring()
if(istype(base_flooring) && base_flooring.constructed)
return FALSE

if(!istype(used_item, /obj/item/stack/material/ore) && !istype(used_item, /obj/item/stack/material/lump))
Expand All @@ -84,11 +84,11 @@
to_chat(user, SPAN_WARNING("\The [src] is flush with ground level and cannot be backfilled."))
return TRUE

if(!used_item.material?.can_backfill_turf_type)
if(!used_item.material?.can_backfill_floor_type)
to_chat(user, SPAN_WARNING("You cannot use \the [used_item] to backfill \the [src]."))
return TRUE

var/can_backfill = islist(used_item.material.can_backfill_turf_type) ? is_type_in_list(src, used_item.material.can_backfill_turf_type) : istype(src, used_item.material.can_backfill_turf_type)
var/can_backfill = islist(used_item.material.can_backfill_floor_type) ? is_type_in_list(flooring, used_item.material.can_backfill_floor_type) : istype(flooring, used_item.material.can_backfill_floor_type)
if(!can_backfill)
to_chat(user, SPAN_WARNING("You cannot use \the [used_item] to backfill \the [src]."))
return TRUE
Expand Down
10 changes: 7 additions & 3 deletions code/game/turfs/floors/floor_icon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@
layer = initial(layer)

if(istype(flooring) && !flooring.render_trenches) // TODO: Update pool tiles/edges to behave properly with this new system.
default_pixel_z = initial(default_pixel_z)
pixel_z = default_pixel_z
return FALSE

var/my_height = get_physical_height()
if(my_height < 0)

if(my_height >= 0)
default_pixel_z = initial(default_pixel_z)
else
var/height_ratio = clamp(abs(my_height) / FLUID_DEEP, 0, 1)
default_pixel_z = -(min(HEIGHT_OFFSET_RANGE, round(HEIGHT_OFFSET_RANGE * height_ratio)))
pixel_z = default_pixel_z
Expand All @@ -76,7 +79,7 @@
var/trench_icon = (istype(neighbor) && neighbor.get_trench_icon()) || get_trench_icon()
if(trench_icon)
// cache the trench image, keyed by icon and color
var/trench_color = isatom(neighbor) ? neighbor.color : color
var/trench_color = isatom(neighbor) ? neighbor.get_color() : get_color()
var/trench_icon_key = "[ref(trench_icon)][trench_color]"
I = _trench_image_cache[trench_icon_key]
if(!I)
Expand All @@ -97,6 +100,7 @@
I.appearance_flags |= RESET_COLOR | RESET_ALPHA
_height_north_shadow_cache[shadow_alpha_key] = I
add_overlay(I)
pixel_z = default_pixel_z

/turf/floor/on_update_icon(var/update_neighbors)
. = ..()
Expand Down
16 changes: 3 additions & 13 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -284,19 +284,6 @@
if(IS_COIL(W) && try_build_cable(W, user))
return TRUE

if(reagents?.total_volume >= FLUID_PUDDLE)
if(ATOM_IS_OPEN_CONTAINER(W) && W.reagents)
var/taking = min(reagents.total_volume, REAGENTS_FREE_SPACE(W.reagents))
if(taking > 0)
to_chat(user, SPAN_NOTICE("You fill \the [W] with [reagents.get_primary_reagent_name()] from \the [src]."))
reagents.trans_to(W, taking)
return TRUE

if(user.check_intent(I_FLAG_HELP))
user.visible_message(SPAN_NOTICE("\The [user] dips \the [W] into \the [reagents.get_primary_reagent_name()]."))
W.fluid_act(reagents)
return TRUE

return ..()

/turf/Enter(atom/movable/mover, atom/forget)
Expand Down Expand Up @@ -802,6 +789,9 @@
/turf/get_affecting_weather()
return weather

/turf/can_be_poured_into(atom/source)
return !density

/turf/get_alt_interactions(mob/user)
. = ..()
LAZYADD(., /decl/interaction_handler/show_turf_contents)
Expand Down
3 changes: 3 additions & 0 deletions code/game/turfs/turf_fluids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@
var/decl/material/primary_reagent = reagents.get_primary_reagent_decl()
if(primary_reagent && (REAGENT_VOLUME(reagents, primary_reagent.type) >= primary_reagent.slippery_amount))
last_slipperiness = primary_reagent.slipperiness
else
last_slipperiness = 0
if(!fluid_overlay)
fluid_overlay = new(src, TRUE)
fluid_overlay.update_icon()
Expand All @@ -190,6 +192,7 @@
SSfluids.pending_flows -= src
if(last_slipperiness > 0)
wet_floor(last_slipperiness)
last_slipperiness = 0

for(var/checkdir in global.cardinal)
var/turf/neighbor = get_step_resolving_mimic(src, checkdir)
Expand Down
Loading

0 comments on commit e3e4908

Please sign in to comment.