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

add support to add genders to runames #676

Merged
merged 7 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 3 deletions code/__DEFINES/bandastation/pronouns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
#define INSTRUMENTAL "творительный"
/// Предложный: Прохладная история о ком? О клоуне и об ассистухе.
#define PREPOSITIONAL "предложный"

/// Макрос для упрощения создания листа падежей для объекта
#define RU_NAMES_LIST(base, nominative, genitive, dative, accusative, instrumental, prepositional) (list("base" = base, NOMINATIVE = nominative, GENITIVE = genitive, DATIVE = dative, ACCUSATIVE = accusative, INSTRUMENTAL = instrumental, PREPOSITIONAL = prepositional))
2 changes: 1 addition & 1 deletion code/datums/components/food/edible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ Behavior that's still missing from this component that original food items had t
original_atom.reagents.copy_to(this_food, original_atom.reagents.total_volume / chosen_processing_option[TOOL_PROCESSING_AMOUNT], 1)

if(original_atom.name != initial(original_atom.name))
this_food.ru_names_rename(RU_NAMES_LIST("slice of [original_atom.name]", "кусочек [original_atom.declent_ru(GENITIVE)]", "кусочка [original_atom.declent_ru(GENITIVE)]", "кусочку [original_atom.declent_ru(GENITIVE)]", "кусочек [original_atom.declent_ru(GENITIVE)]", "кусочком [original_atom.declent_ru(GENITIVE)]", "кусочке [original_atom.declent_ru(GENITIVE)]"))
this_food.ru_names_rename(ru_names_toml("slice of", suffix = " [original_atom.declent_ru(GENITIVE)]", override_base = "slice of [original_atom.name]"))
this_food.name = "slice of [original_atom.name]"
if(original_atom.desc != initial(original_atom.desc))
this_food.desc = "[original_atom.desc]"
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/camera/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,17 @@
return

if(name == initial(name))
ru_names_rename(ru_names_toml("motion-sensitive security camera"))
name = "motion-sensitive security camera"
ru_names_rename(ru_names_toml(name))
if(!proximity_monitor)
proximity_monitor = new(src)
camera_upgrade_bitflags |= CAMERA_UPGRADE_MOTION
create_prox_monitor()

/obj/machinery/camera/proc/removeMotion()
if(name == "motion-sensitive security camera")
ru_names_rename(ru_names_toml("security camera"))
name = "security camera"
ru_names_rename(ru_names_toml(name))
camera_upgrade_bitflags &= ~CAMERA_UPGRADE_MOTION
if(!area_motion)
QDEL_NULL(proximity_monitor)
6 changes: 3 additions & 3 deletions code/game/machinery/hologram.dm
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ Possible to do for anyone motivated enough:
hologram.layer = FLY_LAYER //Above all the other objects/mobs. Or the vast majority of them.
SET_PLANE_EXPLICIT(hologram, ABOVE_GAME_PLANE, src)
hologram.set_anchored(TRUE)//So space wind cannot drag it.
hologram.ru_names_rename(RU_NAMES_LIST("[user.name] (Hologram)", "голограмма [user.declent_ru(GENITIVE)]", "голограммы [user.declent_ru(GENITIVE)]", "голограмме [user.declent_ru(GENITIVE)]", "голограмму [user.declent_ru(GENITIVE)]", "голограммой [user.declent_ru(GENITIVE)]", "голограмме [user.declent_ru(GENITIVE)]"))
hologram.ru_names_rename(ru_names_toml("hologram", suffix = " [user.declent_ru(GENITIVE)]", override_base = "[user.name] (Hologram)"))
hologram.name = "[user.name] (Hologram)"//If someone decides to right click.
set_holo(user, hologram)

Expand Down Expand Up @@ -745,7 +745,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
SET_PLANE_EXPLICIT(hologram, ABOVE_GAME_PLANE, src)
hologram.set_anchored(TRUE)//So space wind cannot drag it.
hologram.ru_names_rename(RU_NAMES_LIST("[record.caller_name] (Hologram)", "голограмма [record.caller_name]", "голограммы [record.caller_name]", "голограмме [record.caller_name]", "голограмму [record.caller_name]", "голограммой [record.caller_name]", "голограмме [record.caller_name]"))
hologram.ru_names_rename(ru_names_toml("hologram", suffix = " [record.caller_name]", override_base = "[record.caller_name] (Hologram)"))
hologram.name = "[record.caller_name] (Hologram)"//If someone decides to right click.
set_holo(record, hologram)

Expand Down Expand Up @@ -837,7 +837,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
replay_holo.icon_state = work_off.icon_state
replay_holo.copy_overlays(work_off, TRUE)
if(HOLORECORD_RENAME)
replay_holo.ru_names_rename(RU_NAMES_LIST(entry[2] + " (Hologram)", "голограмма [entry[2]]", "голограммы [entry[2]]", "голограмме [entry[2]]", "голограмму [entry[2]]", "голограммой [entry[2]]", "голограмме [entry[2]]"))
replay_holo.ru_names_rename(ru_names_toml("hologram", suffix = " [entry[2]]", override_base = entry[2] + " (Hologram)"))
replay_holo.name = entry[2] + " (Hologram)"
.(entry_number+1)

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/beds_chairs/chair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/obj/structure/chair/Initialize(mapload)
. = ..()
if(prob(0.2))
ru_names_rename(RU_NAMES_LIST("tactical [name]", "тактический стул", "тактического стула", "тактическому стулу", "тактический стул", "тактическим стулом", "тактическом стуле"))
ru_names_rename(ru_names_list("tactical [name]", "тактический [declent_ru(NOMINATIVE)]", "тактического [declent_ru(GENITIVE)]", "тактическому [declent_ru(DATIVE)]", "тактический [declent_ru(ACCUSATIVE)]", "тактическим [declent_ru(INSTRUMENTAL)]", "тактическом [declent_ru(PREPOSITIONAL)]", gender = declent_ru("gender")))
name = "tactical [name]"
fishing_modifier -= 8
MakeRotate()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/atmospherics/machinery/air_alarm/_air_alarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)
set_panel_open(TRUE)

if(name == initial(name))
ru_names_rename(RU_NAMES_LIST("[get_area_name(src)] Air Alarm", "воздушная сигнализация [get_area_name(src)]", "воздушной сигнализации [get_area_name(src)]", "воздушной сигнализации [get_area_name(src)]", "воздушную сигнализацию [get_area_name(src)]", "воздушной сигнализацией [get_area_name(src)]", "воздушной сигнализации [get_area_name(src)]"))
ru_names_rename(ru_names_toml("air alarm", suffix = " ([get_area_name(src)])", override_base = "[get_area_name(src)] Air Alarm"))
name = "[get_area_name(src)] Air Alarm"

tlv_collection = list()
Expand Down Expand Up @@ -175,7 +175,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)

/obj/machinery/airalarm/update_name(updates)
. = ..()
ru_names_rename(RU_NAMES_LIST("[get_area_name(my_area)] Air Alarm", "воздушная сигнализация [get_area_name(src)]", "воздушной сигнализации [get_area_name(src)]", "воздушной сигнализации [get_area_name(src)]", "воздушную сигнализацию [get_area_name(src)]", "воздушной сигнализацией [get_area_name(src)]", "воздушной сигнализации [get_area_name(src)]"))
ru_names_rename(ru_names_toml("air alarm", suffix = " ([get_area_name(my_area)])", override_base = "[get_area_name(my_area)] Air Alarm"))
name = "[get_area_name(my_area)] Air Alarm"

/obj/machinery/airalarm/on_exit_area(datum/source, area/area_to_unregister)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/chameleon/_chameleon_action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
PROTECTED_PROC(TRUE) // Call update_look, not this!

var/atom/atom_target = target
atom_target.ru_names_rename(RU_NAMES_LIST(picked_item::name, declent_ru_initial(picked_item::name, NOMINATIVE), declent_ru_initial(picked_item::name, GENITIVE), declent_ru_initial(picked_item::name, DATIVE), declent_ru_initial(picked_item::name, ACCUSATIVE), declent_ru_initial(picked_item::name, INSTRUMENTAL), declent_ru_initial(picked_item::name, PREPOSITIONAL)))
atom_target.ru_names_rename(ru_names_toml(picked_item::name))
atom_target.name = initial(picked_item.name)
atom_target.desc = initial(picked_item.desc)
atom_target.icon_state = initial(picked_item.icon_state)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/alien/adult/queen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
continue
if(Q.client)
var/number = rand(1, 999) // BANDASTATION EDIT
ru_names_rename(RU_NAMES_LIST("alien princess ([number])", "принцесса Чужих ([number])", "принцессы Чужих ([number])", "принцессе Чужих ([number])", "принцессу Чужих ([number])", "принцессой Чужих ([number])", "принцессе Чужих ([number])"))
ru_names_rename(ru_names_toml("alien princess", suffix = " ([number])", override_base = "alien princess ([number])"))
name = "alien princess ([number])" //if this is too cutesy feel free to change it/remove it.
break

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/alien/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ Des: Removes all infected images from the alien.

if(old_identifier != 0)
identifier = old_identifier
ru_names_rename(ru_names_toml(src::name))
name = initial(name) // prevent chicanery like two different numerical identifiers tied to the same mob
ru_names_rename(ru_names_toml(name))

set_name()

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 @@ -1963,7 +1963,7 @@ GLOBAL_LIST_EMPTY(fire_appearances)
/mob/living/proc/set_name()
if(identifier == 0)
identifier = rand(1, 999)
ru_names_rename(RU_NAMES_LIST("[name] ([identifier])", "[declent_ru(NOMINATIVE)] ([identifier])", "[declent_ru(GENITIVE)] ([identifier])", "[declent_ru(DATIVE)] ([identifier])", "[declent_ru(ACCUSATIVE)] ([identifier])", "[declent_ru(INSTRUMENTAL)] ([identifier])", "[declent_ru(PREPOSITIONAL)] ([identifier])"))
ru_names_rename(ru_names_toml(name, suffix = " ([identifier])", override_base = "[name] ([identifier])"))
name = "[name] ([identifier])"
real_name = declent_ru(NOMINATIVE)

Expand Down
4 changes: 2 additions & 2 deletions code/modules/power/apc/apc_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
if(!req_access)
req_access = list(ACCESS_ENGINE_EQUIP)
if(auto_name)
ru_names_rename(RU_NAMES_LIST("\improper [get_area_name(area, TRUE)] APC", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]"))
ru_names_rename(ru_names_toml("area power controller", suffix = " ([get_area_name(area, TRUE)])", override_base = "\improper [get_area_name(area, TRUE)] APC"))
name = "\improper [get_area_name(area, TRUE)] APC"

//Initialize its electronics
Expand Down Expand Up @@ -267,7 +267,7 @@
/obj/machinery/power/apc/update_name(updates)
. = ..()
if(auto_name)
ru_names_rename(RU_NAMES_LIST("\improper [get_area_name(area, TRUE)] APC", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]", "ЛКП [get_area_name(area, TRUE)]"))
ru_names_rename(ru_names_toml("area power controller", suffix = " ([get_area_name(area, TRUE)])", override_base = "\improper [get_area_name(area, TRUE)] APC"))
name = "\improper [get_area_name(area, TRUE)] APC"

/obj/machinery/power/apc/proc/assign_to_area(area/target_area = get_area(src))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/ballistic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
SEND_SIGNAL(src, COMSIG_GUN_SAWN_OFF)
if(!handle_modifications)
return TRUE
ru_names_rename(RU_NAMES_LIST("sawn-off [src.name]", "обрез [declent_ru(GENITIVE)]", "обреза [declent_ru(GENITIVE)]", "обрезу [declent_ru(GENITIVE)]", "обрез [declent_ru(GENITIVE)]", "обрезом [declent_ru(GENITIVE)]", "обрезе [declent_ru(GENITIVE)]"))
ru_names_rename(ru_names_toml("sawn-off", suffix = " [declent_ru(GENITIVE)]", override_base = "sawn-off [src.name]"))
name = "sawn-off [src.name]"
desc = sawn_desc
update_weight_class(WEIGHT_CLASS_NORMAL)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/bodyparts/_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
if(!IS_ORGANIC_LIMB(src))
grind_results = null

ru_names_rename(RU_NAMES_LIST("[limb_id] [parse_zone(body_zone)]", "[ru_parse_zone(body_zone, declent = NOMINATIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = GENITIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = DATIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = ACCUSATIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = INSTRUMENTAL)] ([limb_id])", "[ru_parse_zone(body_zone, declent = PREPOSITIONAL)] ([limb_id])"))
ru_names_rename(ru_names_list("[limb_id] [parse_zone(body_zone)]", "[ru_parse_zone(body_zone, declent = NOMINATIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = GENITIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = DATIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = ACCUSATIVE)] ([limb_id])", "[ru_parse_zone(body_zone, declent = INSTRUMENTAL)] ([limb_id])", "[ru_parse_zone(body_zone, declent = PREPOSITIONAL)] ([limb_id])", gender = FEMALE))
name = "[limb_id] [parse_zone(body_zone)]"
update_icon_dropped()
refresh_bleed_rate()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/surgery/bodyparts/dismemberment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
if(pill)
pill.forceMove(src)

ru_names_rename(RU_NAMES_LIST("[owner.real_name]'s head", "голова [owner.real_name]", "головы [owner.real_name]", "голове [owner.real_name]", "голову [owner.real_name]", "головой [owner.real_name]", "голове [owner.real_name]"))
ru_names_rename(ru_names_toml("head", suffix = " [owner.real_name]", override_base = "[owner.real_name]'s head"))
name = "[owner.real_name]'s head"
return ..()

Expand Down
74 changes: 40 additions & 34 deletions modular_bandastation/translations/code/bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,64 @@
/obj/item/bodypart
var/list/ru_plaintext_zone = list()

/obj/item/bodypart/head
ru_plaintext_zone = RU_NAMES_LIST("head", "голова", "головы", "голове", "голову", "головой", "голове")
/obj/item/bodypart/head/Initialize(mapload)
. = ..()
ru_plaintext_zone = ru_names_toml("head")

/obj/item/bodypart/chest
ru_plaintext_zone = RU_NAMES_LIST("chest", "грудь", "груди", "груди", "грудь", "грудью", "груди")
/obj/item/bodypart/chest/Initialize(mapload)
. = ..()
ru_plaintext_zone = ru_names_toml("chest")

/obj/item/bodypart/arm/left
ru_plaintext_zone = RU_NAMES_LIST("left arm", "левая рука", "левой руки", "левой руке", "левую руку", "левой рукой", "левой руке")
/obj/item/bodypart/arm/left/Initialize(mapload)
. = ..()
ru_plaintext_zone = ru_names_toml("left arm")

/obj/item/bodypart/arm/right
ru_plaintext_zone = RU_NAMES_LIST("right arm", "правая рука", "правой руки", "правой руке", "правую руку", "правой рукой", "правой руке")
/obj/item/bodypart/arm/right/Initialize(mapload)
. = ..()
ru_plaintext_zone = ru_names_toml("right arm")

/obj/item/bodypart/leg/left
ru_plaintext_zone = RU_NAMES_LIST("left leg", "левая нога", "левой ноги", "левой ноге", "левую ногу", "левой ногой", "левой ноге")
/obj/item/bodypart/leg/left/Initialize(mapload)
. = ..()
ru_plaintext_zone = ru_names_toml("left leg")

/obj/item/bodypart/leg/right
ru_plaintext_zone = RU_NAMES_LIST("right leg", "правая нога", "правой ноги", "правой ноге", "правую ногу", "правой ногой", "правой ноге")
/obj/item/bodypart/leg/right/Initialize(mapload)
. = ..()
ru_plaintext_zone = ru_names_toml("right leg")

/proc/ru_parse_zone(zone, declent = NOMINATIVE)
var/static/list/chest = RU_NAMES_LIST("chest", "грудь", "груди", "груди", "грудь", "грудью", "груди")
var/static/list/head = RU_NAMES_LIST("head", "голова", "головы", "голове", "голову", "головой", "голове")
var/static/list/right_hand = RU_NAMES_LIST("right hand", "правое запястье", "правого запястья", "правому запястью", "правое запястье", "правым запястьем", "правом запястье")
var/static/list/left_hand = RU_NAMES_LIST("left hand", "левое запястье", "левое запястье", "левой руке", "левую руку", "левой рукой", "левой руке")
var/static/list/left_arm = RU_NAMES_LIST("left arm", "левая рука", "левой руки", "левой руке", "левую руку", "левой рукой", "левой руке")
var/static/list/right_arm = RU_NAMES_LIST("right arm", "правая рука", "правой руки", "правой руке", "правую руку", "правой рукой", "правой руке")
var/static/list/left_leg = RU_NAMES_LIST("left leg", "левая нога", "левой ноги", "левой ноге", "левую ногу", "левой ногой", "левой ноге")
var/static/list/right_leg = RU_NAMES_LIST("right leg", "правая нога", "правой ноги", "правой ноге", "правую ногу", "правой ногой", "правой ноге")
var/static/list/left_foot = RU_NAMES_LIST("left leg", "левая стопа", "левой стопы", "левой стопе", "левую стопу", "левой стопой", "левой стопе")
var/static/list/right_foot = RU_NAMES_LIST("left leg", "правая стопа", "правой стопы", "правой стопе", "правую стопу", "правой стопой", "правой стопе")
var/static/list/groin = RU_NAMES_LIST("groin", "паховая область", "паховой области", "паховой области", "паховую область", "паховой областью", "паховой области")
var/static/list/chest = ru_names_toml("chest")
var/static/list/head = ru_names_toml("head")
var/static/list/right_hand = ru_names_toml("right hand")
var/static/list/left_hand = ru_names_toml("left hand")
var/static/list/left_arm = ru_names_toml("left arm")
var/static/list/right_arm = ru_names_toml("right arm")
var/static/list/left_leg =ru_names_toml("left leg")
var/static/list/right_leg = ru_names_toml("right leg")
var/static/list/left_foot = ru_names_toml("left leg")
var/static/list/right_foot = ru_names_toml("left leg")
var/static/list/groin = ru_names_toml("groin")
switch(zone)
if(BODY_ZONE_CHEST)
return chest[declent]
return chest[declent] || zone
if(BODY_ZONE_HEAD)
return head[declent]
return head[declent] || zone
if(BODY_ZONE_PRECISE_R_HAND)
return right_hand[declent]
return right_hand[declent] || zone
if(BODY_ZONE_PRECISE_L_HAND)
return left_hand[declent]
return left_hand[declent] || zone
if(BODY_ZONE_L_ARM)
return left_arm[declent]
return left_arm[declent] || zone
if(BODY_ZONE_R_ARM)
return right_arm[declent]
return right_arm[declent] || zone
if(BODY_ZONE_L_LEG)
return left_leg[declent]
return left_leg[declent] || zone
if(BODY_ZONE_R_LEG)
return right_leg[declent]
return right_leg[declent] || zone
if(BODY_ZONE_PRECISE_L_FOOT)
return left_foot[declent]
return left_foot[declent] || zone
if(BODY_ZONE_PRECISE_R_FOOT)
return right_foot[declent]
return right_foot[declent] || zone
if(BODY_ZONE_PRECISE_GROIN)
return groin[declent]
return groin[declent] || zone
else
return zone
Loading
Loading