Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging update from stable #4539

Merged
merged 24 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
87a025b
Cleans up Swiss Army knife tool quality reporting.
MistakeNot4892 Oct 9, 2024
c97692a
Merge pull request #4514 from MistakeNot4892/fix/scavs
out-of-phaze Oct 11, 2024
53716c9
Fix insufficient fuel warning not working
out-of-phaze Jan 16, 2023
f152ff8
Make random_multi spawners work on map templates
out-of-phaze Jan 20, 2023
5186f4c
Remove black bar from NanoUI style
out-of-phaze Feb 21, 2023
6a74eda
Make several mob stat sets use the helper
out-of-phaze Jun 20, 2023
2b377eb
Fix food replicator circuit and add unit test
out-of-phaze Feb 15, 2023
ee0184d
Fix signs runtiming from no material
out-of-phaze Jan 15, 2024
facd0c3
Fix action buttons missing backgrounds
out-of-phaze Jan 28, 2024
b8bc76c
Remove psionics' target zone requirement
out-of-phaze Oct 25, 2023
6884245
Fix ethanol inhalation being hyperlethal
out-of-phaze Jul 9, 2024
3349450
Premium drinks and ration water bottles will no longer freeze en masse.
MistakeNot4892 Oct 17, 2024
22f1d60
Fix runtime from map with no spawnpoints
out-of-phaze Jul 9, 2024
dbd79c3
Fix var setter and proc caller landmarks for turfs
out-of-phaze Jul 9, 2024
041317b
Fix the replicator needing ceramic to make fries
out-of-phaze Jul 9, 2024
ecee295
Remove blank theme from exoplanets
out-of-phaze Jul 9, 2024
a6634f9
Fix modpack maps when using separate GITDIR in server.sh
out-of-phaze Jul 9, 2024
016e1a9
Fix server.sh being stuck in inconsistent state when closing early
out-of-phaze Jul 9, 2024
e693cef
Add heat exchange pipe color to pipe color whitelist
out-of-phaze Jul 9, 2024
6364d60
Fix robotic brains overwriting bodytype
out-of-phaze Jul 10, 2024
7596fb8
Fix long-range relay having a normal relay circuitboard
out-of-phaze Oct 16, 2024
04adf1c
Merge pull request #4535 from MistakeNot4892/fix/booze
out-of-phaze Oct 19, 2024
c69d3d0
Merge pull request #4530 from out-of-phaze/fix/spacefarers-fixes-10-1…
MistakeNot4892 Oct 20, 2024
00f0b8f
Merge branch 'stable' of https://github.com/NebulaSS13/Nebula into st…
out-of-phaze Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/_onclick/hud/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@
var/obj/screen/action_button/button = null
var/button_icon = 'icons/obj/action_buttons/actions.dmi'
var/button_icon_state = "default"
/// The icon to use for the background icon state. Defaults to button_icon if unset.
var/background_icon = 'icons/obj/action_buttons/actions.dmi'
var/background_icon_state = "bg_default"
var/mob/living/owner

/datum/action/New(var/Target)
target = Target
background_icon ||= button_icon

/datum/action/Destroy()
if(owner)
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/screen/screen_action_button.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/obj/screen/action_button/on_update_icon()
if(!action)
return
icon = action.button_icon
icon = action.background_icon
icon_state = action.background_icon_state

cut_overlays()
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/screen/screen_maneuver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var/mob/living/user_living = user
user_living.prepare_maneuver()

/obj/screen/maneuver/examine(mob/user)
/obj/screen/maneuver/examine(mob/user, distance)
. = ..()
if(!isliving(user))
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/supplypacks/galley.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
/obj/item/chems/drinks/bottle/premiumvodka = 3,
/obj/item/chems/drinks/bottle/whiskey = 3
)
containertype = /obj/structure/closet/crate/freezer
containertype = /obj/structure/closet/crate/plastic
containername = "premium drinks crate"

/decl/hierarchy/supply_pack/galley/barsupplies
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/flame/_flame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
/obj/item/flame/proc/get_sconce_overlay()
return null

/obj/item/flame/get_tool_quality(archetype, property)
/obj/item/flame/get_tool_quality(archetype)
return (!lit && archetype == TOOL_CAUTERY) ? TOOL_QUALITY_NONE : ..()

/obj/item/flame/proc/has_fuel(amount)
Expand Down
37 changes: 17 additions & 20 deletions code/game/objects/items/weapons/material/swiss.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME

var/active_tool = SWISSKNF_CLOSED
var/can_use_tools = FALSE
var/list/tools = list(SWISSKNF_LBLADE, SWISSKNF_CLIFTER, SWISSKNF_COPENER)
var/static/list/sharp_tools = list(SWISSKNF_LBLADE, SWISSKNF_SBLADE, SWISSKNF_GBLADE, SWISSKNF_WBLADE)

/obj/item/knife/folding/swiss/Initialize(ml, material_key)
set_extension(src, /datum/extension/tool/variable/simple, list(
// Variable tool qualities are handled by proc below.
set_extension(src, /datum/extension/tool, list(
TOOL_CROWBAR = TOOL_QUALITY_MEDIOCRE,
TOOL_SCREWDRIVER = TOOL_QUALITY_MEDIOCRE,
TOOL_WIRECUTTERS = TOOL_QUALITY_MEDIOCRE,
Expand All @@ -33,23 +33,26 @@
. = ..()

/obj/item/knife/folding/swiss/proc/get_tool_archetype()
if(can_use_tools)
if(active_tool == SWISSKNF_CROWBAR)
return TOOL_CROWBAR
if(active_tool == SWISSKNF_CLIFTER || active_tool == SWISSKNF_COPENER)
return TOOL_SCREWDRIVER
if(active_tool == SWISSKNF_WCUTTER)
return TOOL_WIRECUTTERS
if(active_tool == SWISSKNF_CROWBAR)
return TOOL_CROWBAR
if(active_tool == SWISSKNF_CLIFTER || active_tool == SWISSKNF_COPENER)
return TOOL_SCREWDRIVER
if(active_tool == SWISSKNF_WCUTTER)
return TOOL_WIRECUTTERS
if(active_tool == SWISSKNF_WBLADE)
return TOOL_HATCHET

/obj/item/knife/folding/swiss/get_tool_property(archetype, property)
. = (archetype == get_tool_archetype()) ? ..() : null

/obj/item/knife/folding/swiss/get_tool_speed(archetype)
. = (archetype == get_tool_archetype()) ? ..() : 0

/obj/item/knife/folding/swiss/get_tool_quality(archetype)
. = (archetype == get_tool_archetype()) ? ..() : 0

/obj/item/knife/folding/swiss/attack_self(mob/user)

var/choice
if(user.a_intent != I_HELP && ((SWISSKNF_LBLADE in tools) || (SWISSKNF_SBLADE in tools)) && active_tool == SWISSKNF_CLOSED)
open = TRUE
Expand All @@ -65,7 +68,8 @@
open = FALSE

if(!choice || !CanPhysicallyInteract(user))
return
return TRUE

if(choice == SWISSKNF_CLOSED)
open = FALSE
user.visible_message("<span class='notice'>\The [user] closes the [name].</span>")
Expand All @@ -81,6 +85,7 @@
update_force()
update_icon()
add_fingerprint(user)
return TRUE

/obj/item/knife/folding/swiss/examine(mob/user)
. = ..()
Expand Down Expand Up @@ -115,16 +120,8 @@
/obj/item/knife/folding/swiss/resolve_attackby(obj/target, mob/user)
if((istype(target, /obj/structure/window) || istype(target, /obj/structure/grille)) && active_tool == SWISSKNF_GBLADE)
force = force * 8
. = ..()
update_force()
return
if(istype(target, /obj/item))
if(target.w_class <= ITEM_SIZE_NORMAL)
can_use_tools = TRUE
. = ..()
can_use_tools = FALSE
return
return ..()
. = ..()
update_force()

/obj/item/knife/folding/swiss/officer
name = "officer's combi-knife"
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/random/random_multi.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
var/id // Group id
var/weight // Probability weight for this spawn point

/obj/random_multi/modify_mapped_vars(map_hash)
. = ..()
ADJUST_TAG_VAR(id, map_hash)

/obj/random_multi/Initialize()
. = ..()
weight = max(1, round(weight))
Expand Down
14 changes: 10 additions & 4 deletions code/game/objects/random/subtypes/multi.dm
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
/hook/roundstart/proc/generate_multi_spawn_items()
/hook/roundstart/proc/roundstart_multi_spawn()
generate_multi_spawn_items()
return TRUE

/proc/generate_multi_spawn_items()
for(var/id in multi_point_spawns)
var/list/spawn_points = multi_point_spawns[id]
var/obj/random_multi/rm = pickweight(spawn_points)
rm.generate_items()
for(var/entry in spawn_points)
qdel(entry)
return 1
QDEL_LIST(spawn_points)
LAZYCLEARLIST(multi_point_spawns)

/obj/random_multi/single_item
var/item_path // Item type to spawn
var/spawn_nothing_chance = 0 /// Chance to spawn nothing.

/obj/random_multi/single_item/generate_items()
if(prob(spawn_nothing_chance))
return
new item_path(loc)

/obj/random_multi/single_item/captains_spare_id
Expand Down
17 changes: 10 additions & 7 deletions code/game/objects/structures/crates_lockers/crates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@
desc = "A rectangular plastic crate."
closet_appearance = /decl/closet_appearance/crate/plastic

/obj/structure/closet/crate/plastic/rations //For use in the escape shuttle
name = "emergency rations"
desc = "A crate of emergency rations."

/obj/structure/closet/crate/plastic/rations/WillContain()
return list(
/obj/random/mre = 6,
/obj/item/chems/drinks/cans/waterbottle = 12
)

/obj/structure/closet/crate/internals
name = "internals crate"
desc = "A internals crate."
Expand Down Expand Up @@ -151,13 +161,6 @@
/obj/structure/closet/crate/freezer/ProcessAtomTemperature()
return PROCESS_KILL

/obj/structure/closet/crate/freezer/rations //For use in the escape shuttle
name = "emergency rations"
desc = "A crate of emergency rations."

/obj/structure/closet/crate/freezer/rations/WillContain()
return list(/obj/random/mre = 6, /obj/item/chems/drinks/cans/waterbottle = 12)

/obj/structure/closet/crate/freezer/meat
name = "meat crate"
desc = "A crate of meat."
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/structures/signs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
abstract_type = /obj/structure/sign
parts_type = /obj/item/sign
parts_amount = 1
material = /decl/material/solid/organic/plastic

/obj/structure/sign/Initialize(ml, _mat, _reinf_mat)
. = ..()
Expand Down
3 changes: 2 additions & 1 deletion code/modules/atmospherics/_atmos_setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ var/global/list/pipe_colors = list(
"yellow" = PIPE_COLOR_YELLOW,
"black" = PIPE_COLOR_BLACK,
"orange" = PIPE_COLOR_ORANGE,
"white" = PIPE_COLOR_WHITE)
"white" = PIPE_COLOR_WHITE,
"dark gray" = COLOR_DARK_GRAY)

/proc/pipe_color_check(var/color)
if(!color)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/client/preference_setup/general/01_basic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
W.write("real_name", pref.real_name)
W.write("name_is_always_random", pref.be_random_name)
var/decl/spawnpoint/spawnpoint = GET_DECL(pref.spawnpoint)
W.write("spawnpoint", spawnpoint.uid)
if(spawnpoint)
W.write("spawnpoint", spawnpoint.uid)

/datum/category_item/player_setup_item/physical/basic/sanitize_character()

Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/masks/smokable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
var/smoke_effect = 0
var/smoke_amount = 1

/obj/item/clothing/mask/smokable/get_tool_quality(archetype, property)
/obj/item/clothing/mask/smokable/get_tool_quality(archetype)
return (!lit && archetype == TOOL_CAUTERY) ? TOOL_QUALITY_NONE : ..()

/obj/item/clothing/mask/smokable/dropped(mob/user)
Expand Down
22 changes: 22 additions & 0 deletions code/modules/fabrication/designs/replicator/designs_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
fabricator_types = list(FABRICATOR_CLASS_FOOD)
path = /obj/item/chems/food/tofurkey

// Remove matter from plates from the recipe, since we don't print food with plates.
/datum/fabricator_recipe/food/get_resources()
. = ..()
var/obj/item/chems/food/food_result = path
if(!ispath(food_result, /obj/item/chems/food))
return // why?? why would this not be food??
var/plate_path = initial(food_result.plate)
if(ispath(plate_path))
var/list/plate_matter = atom_info_repository.get_matter_for(plate_path)
for(var/key in plate_matter)
resources[key] -= (plate_matter[key] * FABRICATOR_EXTRA_COST_FACTOR)
if(resources[key] <= 0)
resources -= key

// Print the resulting food without a plate.
/datum/fabricator_recipe/food/build(turf/location, datum/fabricator_build_order/order)
// TODO: On dev, we can just spawn it with skip_plate = TRUE instead. Without that we need a workaround.
. = ..()
for(var/obj/item/chems/food/food in .)
if(istype(food.plate))
QDEL_NULL(food.plate)

/datum/fabricator_recipe/food/soylentviridians
path = /obj/item/chems/food/soylenviridians

Expand Down
1 change: 1 addition & 0 deletions code/modules/fabrication/fabricator_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
icon_state = "replicator"
base_icon_state = "replicator"
base_storage_capacity_mult = 5
base_type = /obj/machinery/fabricator/replicator

/obj/machinery/fabricator/replicator/hear_talk(var/mob/M, var/text, var/verb, var/decl/language/speaking)
if(speaking && !speaking.machine_understands)
Expand Down
1 change: 1 addition & 0 deletions code/modules/maps/_map_template.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@
if(!QDELETED(mark))
qdel(mark)
subtemplates_to_spawn = null
generate_multi_spawn_items()

/datum/map_template/proc/extend_bounds_if_needed(var/list/existing_bounds, var/list/new_bounds)
var/list/bounds_to_combine = existing_bounds
Expand Down
9 changes: 8 additions & 1 deletion code/modules/maps/helper_landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ INITIALIZE_IMMEDIATE(/obj/abstract/landmark/map_load_mark)
. = ..()
if(!prob(probability))
return // Do nothing.
var/turf/our_turf = get_turf(src)
if(ispath(type_to_find, /turf) && istype(our_turf, type_to_find) && try_set_variable(our_turf))
return INITIALIZE_HINT_QDEL
for(var/atom/candidate_atom in get_turf(src))
if(!istype(candidate_atom, type_to_find))
continue
Expand Down Expand Up @@ -167,6 +170,10 @@ INITIALIZE_IMMEDIATE(/obj/abstract/landmark/map_load_mark)
. = ..()
if(!prob(probability))
return // Do nothing.
// turf is not in turf contents, oops
var/turf/our_turf = get_turf(src)
if(ispath(type_to_find, /turf) && istype(our_turf, type_to_find) && try_call_proc(our_turf))
return INITIALIZE_HINT_QDEL
// we don't use locate in case try_call_proc returns false on our first attempt
for(var/atom/candidate_atom in get_turf(src))
if(!istype(candidate_atom, type_to_find))
Expand All @@ -187,7 +194,7 @@ INITIALIZE_IMMEDIATE(/obj/abstract/landmark/map_load_mark)

/obj/abstract/landmark/proc_caller/floor_burner
type_to_find = /turf/floor
proc_to_call = /turf/floor/proc/burn_tile
proc_to_call = TYPE_PROC_REF(/turf/floor, burn_tile)
arguments_to_pass = null

/// Used to tell pipe leak unit tests that a leak is intentional. Placed over the pipe that leaks, not the tile missing a pipe.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@
/datum/level_data/planetoid/exoplanet/underground
)
possible_themes = list(
/datum/exoplanet_theme/mountains = 100,
/datum/exoplanet_theme = 90,
/datum/exoplanet_theme/mountains = 190,
/datum/exoplanet_theme/robotic_guardians = 10
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
/datum/level_data/planetoid/exoplanet,
)
possible_themes = list(
/datum/exoplanet_theme = 30,
/datum/exoplanet_theme/mountains = 100,
/datum/exoplanet_theme/mountains = 130,
/datum/exoplanet_theme/radiation_bombing = 10,
/datum/exoplanet_theme/ruined_city = 5,
/datum/exoplanet_theme/robotic_guardians = 10
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ default behaviour is:
switch_from_dead_to_living_mob_list()
timeofdeath = 0

stat = CONSCIOUS
set_stat(CONSCIOUS)
update_icon()

BITSET(hud_updateflag, HEALTH_HUD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
add_language(/decl/language/machine, 1)
default_language = controlling_ai.default_language

stat = CONSCIOUS
set_stat(CONSCIOUS)
if(user.mind)
user.mind.transfer_to(src)
else
Expand Down
3 changes: 2 additions & 1 deletion code/modules/modular_computers/networking/machinery/relay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
name = "long-ranged network relay"
icon = 'icons/obj/machines/tcomms/relay.dmi'
icon_state = "relay"
network_device_type = /datum/extension/network_device/broadcaster/relay/long_range
network_device_type = /datum/extension/network_device/broadcaster/relay/long_range
base_type = /obj/machinery/network/relay/long_range
2 changes: 1 addition & 1 deletion code/modules/organs/internal/brain_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/decl/material/solid/metal/gold = MATTER_AMOUNT_TRACE,
/decl/material/solid/gemstone/diamond = MATTER_AMOUNT_TRACE
)
bodytype = /decl/bodytype/prosthetic/basic_human
can_use_brain_interface = FALSE
var/searching = FALSE
var/brain_name
Expand All @@ -23,7 +24,6 @@

/obj/item/organ/internal/brain/robotic/Initialize()
. = ..()
set_bodytype(/decl/bodytype/prosthetic/basic_human)
update_icon()
brain_name = "[pick(list("ADA","DOS","GNU","MAC","WIN"))]-[random_id(type,1000,9999)]"
SetName("[name] ([brain_name])")
Expand Down
12 changes: 6 additions & 6 deletions code/modules/overmap/overmap_shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
fuel_ports += fuel_port_in_area

/datum/shuttle/autodock/overmap/fuel_check()
if(!src.try_consume_fuel()) //insufficient fuel
for(var/area/A in shuttle_area)
for(var/mob/living/M in A)
M.show_message(SPAN_WARNING("You hear the shuttle engines sputter... perhaps it doesn't have enough fuel?"), AUDIBLE_MESSAGE,
if(!try_consume_fuel()) //insufficient fuel
for(var/mob/hearer in global.living_mob_list_ + global.ghost_mob_list)
if(is_type_in_list(get_area(hearer), shuttle_area))
hearer.show_message(SPAN_WARNING("You hear the shuttle engines sputter... perhaps it doesn't have enough fuel?"), AUDIBLE_MESSAGE,
SPAN_WARNING("The shuttle shakes but fails to take off."), VISIBLE_MESSAGE)
return 0 //failure!
return 1 //sucess, continue with launch
return FALSE //failure
return TRUE //sucess, continue with launch

/datum/shuttle/autodock/overmap/proc/can_go()
if(!next_location)
Expand Down
Loading
Loading