Skip to content

Commit

Permalink
merge upstream (#845)
Browse files Browse the repository at this point in the history
<!-- Пишите **НИЖЕ** заголовков и **ВЫШЕ** комментариев, иначе что то
может пойти не так. -->
<!-- Вы можете прочитать Contributing.MD, если хотите узнать больше. -->

## Что этот PR делает
Мержим оффов
<!-- Вкратце опишите изменения, которые вносите. -->
<!-- Опишите **все** изменения, так как противное может сказаться на
рассмотрении этого PR'а! -->
<!-- Если вы исправляете Issue, добавьте "Fixes #1234" (где 1234 - номер
Issue) где-нибудь в описании PR'а. Это автоматически закроет Issue после
принятия PR'а. -->

## Почему это хорошо для игры

<!-- Опишите, почему, по вашему, следует добавить эти изменения в игру.
-->

## Изображения изменений
<!-- Если вы не меняли карту или спрайты, можете опустить эту секцию.
Если хотите, можете вставить видео. -->

## Тестирование
<!-- Как вы тестировали свой PR, если делали это вовсе? -->

## Changelog

:cl:
imageadd: Добавили спрайты наушника для киданов
del: Убран ящик за 200 тк из аплинка
tweak: Изменены цены за особые патроны для стечкина
fix: Мертвые культисты больше не идут в счет культа
add: Добавлен поиск по имени в окне эволюции генокрада
/:cl:

<!-- Оба :cl:'а должны быть на месте, что-бы чейнджлог работал! Вы
можете написать свой ник справа от первого :cl:, если хотите. Иначе
будет использован ваш ник на ГитХабе. -->
<!-- Вы можете использовать несколько записей с одинаковым префиксом
(Они используются только для иконки в игре) и удалить ненужные. Помните,
что чейнджлог должен быть понятен обычным игроком. -->
<!-- Если чейнджлог не влияет на игроков(например, это рефактор), вы
можете исключить всю секцию. -->
  • Loading branch information
Legendaxe authored Dec 11, 2023
2 parents 2365468 + 85ce83e commit 77f6581
Show file tree
Hide file tree
Showing 132 changed files with 547 additions and 331 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
run_linters:
name: Run Linters
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Cache
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

odlint:
name: Lint with OpenDream
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup OD
Expand All @@ -59,7 +59,7 @@ jobs:
compile_all_maps:
name: Compile All Maps
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Cache
Expand All @@ -76,7 +76,7 @@ jobs:
unit_tests_and_sql:
name: Unit Tests + SQL Validation
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false # Let all map tests run to completion
matrix:
Expand Down Expand Up @@ -106,8 +106,9 @@ jobs:
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install libssl1.1:i386
ldd librust_g.so
sudo apt install lib32z1 git pkg-config libssl-dev:i386 libssl-dev zlib1g-dev:i386 curl gcc libdbus-1-dev
sudo apt install gcc:i386
tools/ci/install_rustg.sh
- name: Compile & Run Unit Tests
run: |
tools/ci/install_byond.sh '${{ matrix.byondtype }}'
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,12 @@ __pycache__/
dmm-tools.exe
OpenDream
paradise.json

# Misc windows shenanigans
$RECYCLE.BIN

# Linux libs
/*.so

# SS220 EDIT
sound/tts_cache/*
10 changes: 6 additions & 4 deletions .tgs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This file is stolen from tg
# This file is used by TGS (https://github.com/tgstation/tgstation-server) clients to quickly initialize a server instance for the codebase
# The format isn't documented anywhere but hopefully we never have to change it. If there are questions, contact the TGS maintainer Cyberboss/@Dominion#0444
version: 1
byond: "515.1619"
# The BYOND version to use
# Must be interpreted as a string, keep quoted
byond: "515.1620"
# Folders to create in "<instance_path>/Configuration/GameStaticFiles/"
static_files:
# Config directory should be static
Expand All @@ -9,8 +12,7 @@ static_files:
populate: true
# Data directory must be static
- name: data
# String dictionary. The value is the location of the file in the repo to upload to TGS. The key is the name of the file to upload to "<instance_path>/Configuration/EventScripts/"
# This one is for Linux hosted servers
# Scripts linux needs
linux_scripts:
PreCompile.sh: tools/tgs_scripts/PreCompile.sh
WatchdogLaunch.sh: tools/tgs_scripts/WatchdogLaunch.sh
Expand Down
6 changes: 4 additions & 2 deletions _build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ export NODE_VERSION=18
# Stable Byond Major
export STABLE_BYOND_MAJOR=515
# Stable Byond Minor
export STABLE_BYOND_MINOR=1619
export STABLE_BYOND_MINOR=1620
# Beta Byond Major
export BETA_BYOND_MAJOR=515
# Beta Byond Minor
export BETA_BYOND_MINOR=1619
export BETA_BYOND_MINOR=1620
# Python version for mapmerge and other tools
export PYTHON_VERSION=3.11.6
# RUSTG version
export RUSTG_VERSION=v3.0.0-P
2 changes: 1 addition & 1 deletion code/__DEFINES/_versions.dm
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/// Version of RUST-G that this codebase wants
#define RUST_G_VERSION "1.2.0-P2"
#define RUST_G_VERSION "3.0.0-P"
50 changes: 49 additions & 1 deletion code/__DEFINES/rust_g.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@
#define rustg_dmi_strip_metadata(fname) RUSTG_CALL(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) RUSTG_CALL(RUST_G, "dmi_create_png")(path, width, height, data)
#define rustg_dmi_resize_png(path, width, height, resizetype) RUSTG_CALL(RUST_G, "dmi_resize_png")(path, width, height, resizetype)
/**
* input: must be a path, not an /icon; you have to do your own handling if it is one, as icon objects can't be directly passed to rustg.
*
* output: json_encode'd list. json_decode to get a flat list with icon states in the order they're in inside the .dmi
*/
#define rustg_dmi_icon_states(fname) RUSTG_CALL(RUST_G, "dmi_icon_states")(fname)

// File Operations //

Expand Down Expand Up @@ -250,6 +256,45 @@
/proc/rustg_redis_get_messages() return RUSTG_CALL(RUST_G, "redis_get_messages")()
#define rustg_redis_publish(channel, message) RUSTG_CALL(RUST_G, "redis_publish")(channel, message)

/**
* Connects to a given redis server.
*
* Arguments:
* * addr - The address of the server, for example "redis://127.0.0.1/"
*/
#define rustg_redis_connect_rq(addr) RUSTG_CALL(RUST_G, "redis_connect_rq")(addr)
/**
* Disconnects from a previously connected redis server
*/
/proc/rustg_redis_disconnect_rq() return RUSTG_CALL(RUST_G, "redis_disconnect_rq")()
/**
* https://redis.io/commands/lpush/
*
* Arguments
* * key (string) - The key to use
* * elements (list) - The elements to push, use a list even if there's only one element.
*/
#define rustg_redis_lpush(key, elements) RUSTG_CALL(RUST_G, "redis_lpush")(key, json_encode(elements))
/**
* https://redis.io/commands/lrange/
*
* Arguments
* * key (string) - The key to use
* * start (string) - The zero-based index to start retrieving at
* * stop (string) - The zero-based index to stop retrieving at (inclusive)
*/
#define rustg_redis_lrange(key, start, stop) RUSTG_CALL(RUST_G, "redis_lrange")(key, start, stop)
/**
* https://redis.io/commands/lpop/
*
* Arguments
* * key (string) - The key to use
* * count (string|null) - The amount to pop off the list, pass null to omit (thus just 1)
*
* Note: `count` was added in Redis version 6.2.0
*/
#define rustg_redis_lpop(key, count) RUSTG_CALL(RUST_G, "redis_lpop")(key, count)

// SQL Operations //

#define rustg_sql_connect_pool(options) RUSTG_CALL(RUST_G, "sql_connect_pool")(options)
Expand All @@ -265,8 +310,9 @@
#define rustg_time_milliseconds(id) text2num(RUSTG_CALL(RUST_G, "time_milliseconds")(id))
#define rustg_time_reset(id) RUSTG_CALL(RUST_G, "time_reset")(id)

/// Returns the timestamp as a string
/proc/rustg_unix_timestamp()
return text2num(RUSTG_CALL(RUST_G, "unix_timestamp")())
return RUSTG_CALL(RUST_G, "unix_timestamp")()

// Toast Operations //

Expand Down Expand Up @@ -324,3 +370,5 @@
*/
#define rustg_worley_generate(region_size, threshold, node_per_region_chance, size, node_min, node_max) \
RUSTG_CALL(RUST_G, "worley_generate")(region_size, threshold, node_per_region_chance, size, node_min, node_max)


3 changes: 3 additions & 0 deletions code/__HELPERS/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@

/proc/cmp_login_processor_priority(datum/client_login_processor/A, datum/client_login_processor/B)
return A.priority - B.priority

/proc/cmp_changeling_power_category_asc(datum/changeling_power_category/a, datum/changeling_power_category/b)
return initial(a.priority) - initial(b.priority)
2 changes: 2 additions & 0 deletions code/__HELPERS/type2type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@
return 'icons/mob/screen_operative.dmi'
if("White")
return 'icons/mob/screen_white.dmi'
if("Midnight")
return 'icons/mob/screen_midnight.dmi'
// SS220 ADDITION START
if("Vaporwave")
return 'modular_ss220/aesthetics/skin/icons/screen_vaporwave.dmi'
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/ai_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/obj/screen/ai/camera_list/Click()
var/mob/living/silicon/ai/AI = usr
var/camera = input(AI, "Choose which camera you want to view", "Cameras") as null|anything in AI.get_camera_list()
var/camera = tgui_input_list(AI, "Choose which camera you want to view", "Cameras", AI.get_camera_list())
AI.ai_camera_list(camera)

/obj/screen/ai/camera_track
Expand All @@ -26,7 +26,7 @@
/obj/screen/ai/camera_track/Click()
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
var/target_name = input(AI) as null|anything in AI.trackable_mobs()
var/target_name = tgui_input_list(AI, "Choose a target you want to track", "Tracking", AI.trackable_mobs())
if(target_name)
AI.ai_camera_track(target_name)

Expand Down
10 changes: 6 additions & 4 deletions code/_onclick/hud/radial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ GLOBAL_LIST_EMPTY(radial_menus)
/datum/radial_menu/proc/update_screen_objects()
var/list/page_choices = page_data[current_page]
var/angle_per_element = round(zone / page_choices.len)
pixel_x_difference = ((world.icon_size * anchor.x) + anchor.step_x + anchor.pixel_x) - ((world.icon_size * current_user.mob.x) + current_user.mob.step_x + current_user.mob.pixel_x)
pixel_y_difference = ((world.icon_size * anchor.y) + anchor.step_y + anchor.pixel_y) - ((world.icon_size * current_user.mob.y) + current_user.mob.step_y + current_user.mob.pixel_y)
if(current_user.mob.z && anchor.z)
pixel_x_difference = ((world.icon_size * anchor.x) + anchor.step_x + anchor.pixel_x) - ((world.icon_size * current_user.mob.x) + current_user.mob.step_x + current_user.mob.pixel_x)
pixel_y_difference = ((world.icon_size * anchor.y) + anchor.step_y + anchor.pixel_y) - ((world.icon_size * current_user.mob.y) + current_user.mob.step_y + current_user.mob.pixel_y)
for(var/i in 1 to elements.len)
var/obj/screen/radial/E = elements[i]
var/angle = WRAP(starting_angle + (i - 1) * angle_per_element, 0, 360)
Expand Down Expand Up @@ -225,7 +226,8 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/last_location = user.loc
while(current_user && !finished && !selected_choice)
if(require_near)
if(!user.Adjacent(get_turf(anchor)))
var/turf/our_turf = get_turf(user)
if(!our_turf.Adjacent(get_turf(anchor)))
return
if(last_location != user.loc)
update_screen_objects()
Expand Down Expand Up @@ -298,7 +300,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
if(!istype(possible_atom))
stack_trace("radial_menu_helper was passed a non-atom (\"[possible_atom]\", [possible_atom.type]) as a choice")
continue
var/mutable_appearance/atom_appearance = mutable_appearance(possible_atom.icon, possible_atom.icon_state, possible_atom.layer, filters = possible_atom.filters)
var/mutable_appearance/atom_appearance = mutable_appearance(possible_atom.icon, possible_atom.icon_state, possible_atom.layer)

var/hover_outline_index = possible_atom.get_filter("hover_outline")
if(!isnull(hover_outline_index))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/surgery_initiator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
procedure = S
break
else
procedure = input("Begin which procedure?", "Surgery", null, null) as null|anything in available_surgeries
procedure = tgui_input_list(user, "Begin which procedure?", "Surgery", available_surgeries)

if(!procedure)
return
Expand Down
3 changes: 1 addition & 2 deletions code/datums/mutable_appearance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var

// Helper similar to image()
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color, filters)
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color)
var/mutable_appearance/MA = new()
MA.icon = icon
MA.icon_state = icon_state
Expand All @@ -20,7 +20,6 @@
MA.appearance_flags |= appearance_flags
if(color)
MA.color = color
MA.filters = filters
return MA

/mutable_appearance/clean/New()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spell_targeting/matter_eater_targeting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
continue
possible_targets += O

var/atom/movable/target = input("Choose the target of your hunger.", "Targeting") as null|anything in possible_targets
var/atom/movable/target = tgui_input_list(user, "Choose the target of your hunger", "Targeting", possible_targets)

if(QDELETED(target))
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spell_targeting/remoteview_targeting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if(!length(remoteviewers))
return

var/mob/target = input("Choose the target to spy on.", "Targeting") as null|anything in remoteviewers
var/mob/target = tgui_input_list(user, "Choose the target to spy on", "Targeting", remoteviewers)

if(QDELETED(target))
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spell_targeting/targeted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
else if(max_targets == 1) // Only one target
var/atom/target
if(!random_target)
target = input("Choose the target for the spell.", "Targeting") as anything in possible_targets
target = tgui_input_list(user, "Choose the target for the spell", "Targeting", possible_targets)
//Adds a safety check post-input to make sure those targets are actually in range.
if(target in view_or_range(range, spell_location, selection_type))
targets += target
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spell_targeting/telepathic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
if(!length(valid_targets))
return

var/target_name = input("Choose the target to listen to.", "Targeting") as null|anything in valid_targets
var/target_name = tgui_input_list(user, "Choose the target to listen to", "Targeting", valid_targets)

var/mob/living/target = valid_targets[target_name]
if(QDELETED(target))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spells/mimic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
forms += "Original Form"

forms += available_forms.Copy()
var/what = input(user, "Which form do you want to become?", "Mimic") as null|anything in forms
var/what = tgui_input_list(user, "Which form do you want to become?", "Mimic", forms)
if(!what)
to_chat(user, "<span class='notice'>You decide against changing forms.</span>")
revert_cast(user)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spells/shapeshift.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
for(var/path in possible_shapes)
var/mob/living/simple_animal/A = path
animal_list[initial(A.name)] = path
shapeshift_type = input(M, "Choose Your Animal Form!", "It's Morphing Time!", null) as anything in animal_list
shapeshift_type = tgui_input_list(M, "Choose Your Animal Form!", "It's Morphing Time!", animal_list)
if(!shapeshift_type) //If you aren't gonna decide I am!
shapeshift_type = pick(animal_list)
shapeshift_type = animal_list[shapeshift_type]
Expand Down
4 changes: 2 additions & 2 deletions code/datums/uplink_items/uplink_general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
desc = "An additional 8-round 10mm magazine for use in the syndicate pistol, loaded with incendiary rounds which ignite the target."
reference = "10MMFIRE"
item = /obj/item/ammo_box/magazine/m10mm/fire
cost = 6
cost = 9
surplus = 0 // Miserable

/datum/uplink_item/ammo/pistolhp
name = "Stechkin - 10mm Hollow Point Magazine"
desc = "An additional 8-round 10mm magazine for use in the syndicate pistol, loaded with rounds which are more damaging but ineffective against armour."
reference = "10MMHP"
item = /obj/item/ammo_box/magazine/m10mm/hp
cost = 6
cost = 7
surplus = 0 // Miserable

/datum/uplink_item/ammo/revolver
Expand Down
7 changes: 0 additions & 7 deletions code/datums/uplink_items/uplink_traitor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,6 @@
var/crate_value = 250
uses_special_spawn = TRUE

/datum/uplink_item/bundles_TC/surplus_crate/super
name = "Syndicate Super Surplus Crate"
desc = "A crate containing 625 telecrystals worth of random syndicate leftovers."
reference = "SYSS"
cost = 200
crate_value = 625

/datum/uplink_item/bundles_TC/surplus_crate/spawn_item(turf/loc, obj/item/uplink/U)
if(..() != UPLINK_SPECIAL_SPAWNING)
return FALSE
Expand Down
8 changes: 4 additions & 4 deletions code/game/gamemodes/cult/blood_magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
possible_spells[cult_name] = J
if(length(spells))
possible_spells += "(REMOVE SPELL)"
entered_spell_name = input(owner, "Pick a blood spell to prepare...", "Spell Choices") as null|anything in possible_spells
entered_spell_name = tgui_input_list(owner, "Pick a blood spell to prepare...", "Spell Choices", possible_spells)
if(entered_spell_name == "(REMOVE SPELL)")
remove_spell()
return
Expand Down Expand Up @@ -80,8 +80,8 @@
SSblackbox.record_feedback("tally", "cult_spells_prepared", 1, "[new_spell.name]")
channeling = FALSE

/datum/action/innate/cult/blood_magic/proc/remove_spell(message = "Pick a spell to remove.")
var/nullify_spell = input(owner, message, "Current Spells") as null|anything in spells
/datum/action/innate/cult/blood_magic/proc/remove_spell()
var/nullify_spell = tgui_input_list(owner, "Pick a spell to remove", "Current Spells", spells)
if(nullify_spell)
qdel(nullify_spell)

Expand Down Expand Up @@ -518,7 +518,7 @@
log_game("Teleport spell failed - user in away mission")
return

var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked
var/input_rune_key = tgui_input_list(user, "Choose a rune to teleport to", "Rune to Teleport to", potential_runes) //we know what key they picked
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
if(QDELETED(src) || !user || user.l_hand != src && user.r_hand != src || user.incapacitated() || !actual_selected_rune)
return
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cult/cult_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@
to_chat(user, "<span class='cultitalic'>You are not in the right dimension!</span>")
return

var/input_rune_key = input(user, "Choose a rune to make a portal to.", "Rune to make a portal to") as null|anything in potential_runes //we know what key they picked
var/input_rune_key = tgui_input_list(user, "Choose a rune to make a portal to", "Rune to make a portal to", potential_runes) //we know what key they picked
var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to?
if(QDELETED(R) || QDELETED(actual_selected_rune) || !Adjacent(user) || user.incapacitated())
return
Expand Down
Loading

0 comments on commit 77f6581

Please sign in to comment.