Skip to content

Commit

Permalink
Fix rat and mouse appearance (#1688)
Browse files Browse the repository at this point in the history
## Что этот PR делает
Исправляет невидимых грызунов на станции. Описание теперь должно
соответствовать цвету.
Заменяет мышедемона на подтип.

## Почему это хорошо для игры
Спросите чего попроще.

## Тестирование
Не нашел невидимых грызунов на коробке. Цвета и описания соответствуют,
именные грызуны со своим описанием.

## Changelog

:cl: Maxiemar
fix: Исправлена невидимость некоторых грызунов.
fix: Описание грызунов теперь соответствует их цвету.
/:cl:
  • Loading branch information
m-dzianishchyts authored Dec 8, 2024
1 parent 8469390 commit 1ac0d91
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 26 deletions.
5 changes: 1 addition & 4 deletions _maps/map_files220/generic/centcomm.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -19668,10 +19668,7 @@
/turf/simulated/floor/indestructible/grass,
/area/syndicate_mothership/outside)
"lCD" = (
/mob/living/simple_animal/mouse/brown{
desc = "Секретная разработка синдиката. Сидит тут потому, что сам хочет";
name = "Мышедемон"
},
/mob/living/simple_animal/mouse/brown/demon,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
Expand Down
25 changes: 15 additions & 10 deletions modular_ss220/mobs/code/simple_animal/friendly/hamster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,29 @@
#define MAX_HAMSTER 20
GLOBAL_VAR_INIT(hamster_count, 0)

/mob/living/simple_animal/mouse/hamster/color_pick()
reinitial()
return

/mob/living/simple_animal/mouse/hamster/New()
/mob/living/simple_animal/mouse/hamster/Initialize(mapload)
. = ..()
gender = prob(80) ? MALE : FEMALE
desc += MALE ? " Самец!" : " Самочка! Ох... Нет... "

icon_state = initial(icon_state)
icon_living = initial(icon_living)
icon_dead = initial(icon_dead)
icon_resting = initial(icon_resting)

update_appearance(UPDATE_ICON_STATE, UPDATE_DESC)
GLOB.hamster_count++
. = ..()

/mob/living/simple_animal/mouse/hamster/Destroy()
GLOB.hamster_count--
. = ..()

/mob/living/simple_animal/mouse/hamster/death(gibbed)
if(!gibbed)
GLOB.hamster_count--
/mob/living/simple_animal/mouse/hamster/color_pick()
return

/mob/living/simple_animal/mouse/hamster/update_desc()
. = ..()
desc = initial(desc)
desc += MALE ? " Самец!" : " Самочка! Ох... Нет... "

/mob/living/simple_animal/mouse/hamster/pull_constraint(atom/movable/AM, show_message = FALSE)
return TRUE
Expand Down
14 changes: 2 additions & 12 deletions modular_ss220/mobs/code/simple_animal/friendly/mouse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@
/mob/living/simple_animal/mouse/Initialize(mapload)
. = ..()
AddComponent(/datum/component/squeak, list("[squeak_sound]" = 1), 100, extrarange = SHORT_RANGE_SOUND_EXTRARANGE) //as quiet as a mouse or whatever

/mob/living/simple_animal/mouse/New()
..()

pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)

mouse_color = initial(mouse_color) // сбрасываем из-за наследования чтобы своим проком переписать
color_pick()
update_appearance(UPDATE_ICON_STATE|UPDATE_DESC)

/mob/living/simple_animal/mouse/proc/color_pick()
if(!mouse_color)
Expand All @@ -26,15 +25,6 @@
icon_living = "mouse_[mouse_color]"
icon_dead = "mouse_[mouse_color]_dead"
icon_resting = "mouse_[mouse_color]_sleep"
update_appearance(UPDATE_DESC)

/mob/living/simple_animal/mouse/proc/reinitial()
desc = initial(desc)
mouse_color = initial(mouse_color)
icon_state = initial(icon_state)
icon_living = initial(icon_living)
icon_dead = initial(icon_dead)
icon_resting = initial(icon_resting)

/mob/living/simple_animal/mouse/splat(obj/item/item = null, mob/living/user = null)
if(non_standard)
Expand Down
10 changes: 10 additions & 0 deletions modular_ss220/mobs/code/simple_animal/friendly/rat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
mob_size = MOB_SIZE_SMALL
butcher_results = list(/obj/item/food/meat/mouse = 2)

/mob/living/simple_animal/mouse/rat/update_desc()
. = ..()
switch(mouse_color)
if("white")
desc = /mob/living/simple_animal/mouse/rat/white::desc
if("irish")
desc = /mob/living/simple_animal/mouse/rat/irish::desc
else
desc = /mob/living/simple_animal/mouse/rat::desc

/mob/living/simple_animal/mouse/rat/white
name = "white rat"
real_name = "white rat"
Expand Down
24 changes: 24 additions & 0 deletions modular_ss220/mobs/code/simple_animal/named_animals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@
desc = "Крокодил обожающий музыкальные инструменты и плюшевые игрушки. Пожевать."
faction = list("neutral")

/mob/living/simple_animal/mouse/brown/demon
name = "Мышедемон"
desc = "Секретная разработка синдиката. Сидит тут потому, что сам хочет"
unique_pet = TRUE
gold_core_spawnable = NO_SPAWN
maxHealth = 20
health = 20

/mob/living/simple_animal/mouse/brown/demon/update_desc()
. = ..()
desc = initial(desc)

// rats
/mob/living/simple_animal/mouse/rat/ratatui
name = "Рататуй"
Expand All @@ -84,6 +96,10 @@
maxHealth = 20
health = 20

/mob/living/simple_animal/mouse/rat/ratatui/update_desc()
. = ..()
desc = initial(desc)

/mob/living/simple_animal/mouse/rat/irish/remi
name = "Реми"
real_name = "Реми"
Expand All @@ -94,6 +110,10 @@
health = 25
transform = matrix(1.250, 0, 0, 0, 1, 0) // Толстячок на +2 пикселя

/mob/living/simple_animal/mouse/rat/irish/remi/update_desc()
. = ..()
desc = initial(desc)

/mob/living/simple_animal/mouse/rat/white/brain
name = "Брейн"
real_name = "Брейн"
Expand All @@ -105,6 +125,10 @@
universal_speak = 1
resting = TRUE

/mob/living/simple_animal/mouse/rat/white/brain/update_desc()
. = ..()
desc = initial(desc)

/obj/effect/decal/remains/mouse/pinkie
name = "Пинки"
desc = "Когда-то это был напарник самой сообразительной крысы в мире. К сожалению он таковым не являлся..."
Expand Down

0 comments on commit 1ac0d91

Please sign in to comment.