Skip to content

Commit

Permalink
Improve fancy food and move vulpix vendors (#1479)
Browse files Browse the repository at this point in the history
## Что этот PR делает
Улучшил `fancy` еду, теперь она более гибкая и читабельная (наверное),
так же добавил подсказки при шифт-клике как её открыть

Плюс передвинул автоматы с вульпиксами и добавил букву L на рекламный
постер.
Это правки по баунти если что

## Почему это хорошо для игры
Чуть меньше хардкода в fancy жратве, разделил всё по прокам, как
завещала крыса :ratge:

## Изображения изменений
Мапдифф и икондифф

## Тестирование
Открых вульпиксы, открыл бургер, достал бургер, сожрал

## Changelog

🆑
tweak: Еда в упаковках теперь открывается на Alt+Клик (Вульпиксы, дошик,
вульпикс-бургер)
tweak: Автоматы с вульпиксами передвинуты в более проходимые места
fix: MacVulpix теперь можно сделать с помощью платы
/🆑
  • Loading branch information
AyIong authored Sep 8, 2024
1 parent f6dcc82 commit d69ef13
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 25 deletions.
4 changes: 2 additions & 2 deletions _maps/map_files220/stations/boxstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -17657,7 +17657,7 @@
/turf/simulated/floor/plasteel,
/area/station/public/locker)
"bnB" = (
/obj/machinery/economy/vending/cola,
/obj/machinery/economy/vending/vulpix,
/obj/machinery/light/directional/north,
/turf/simulated/floor/plasteel,
/area/station/public/locker)
Expand Down Expand Up @@ -48003,7 +48003,7 @@
/area/station/medical/reception)
"ewV" = (
/obj/effect/turf_decal/delivery/hollow,
/obj/machinery/economy/vending/vulpix,
/obj/machinery/economy/vending/snack,
/obj/structure/sign/poster/random/north,
/turf/simulated/floor/plasteel{
icon_state = "neutralfull"
Expand Down
4 changes: 2 additions & 2 deletions _maps/map_files220/stations/deltastation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -73221,7 +73221,7 @@
/turf/simulated/floor/engine,
/area/station/science/test_chamber)
"liC" = (
/obj/machinery/economy/vending/snack,
/obj/machinery/economy/vending/vulpix,
/obj/effect/turf_decal/delivery,
/turf/simulated/floor/plasteel{
icon_state = "neutralfull"
Expand Down Expand Up @@ -102270,7 +102270,7 @@
dir = 1
},
/obj/machinery/alarm/directional/west,
/obj/machinery/economy/vending/vulpix,
/obj/machinery/economy/vending/snack,
/turf/simulated/floor/plasteel/dark,
/area/station/public/locker)
"tIF" = (
Expand Down
4 changes: 2 additions & 2 deletions _maps/map_files220/stations/metastation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -12686,7 +12686,7 @@
/turf/simulated/wall,
/area/station/public/locker)
"bbB" = (
/obj/machinery/economy/vending/snack,
/obj/machinery/economy/vending/vulpix,
/turf/simulated/floor/plasteel{
icon_state = "darkneutralfull"
},
Expand Down Expand Up @@ -49586,7 +49586,7 @@
/turf/simulated/floor/plasteel,
/area/station/science/toxins/mixing)
"fJF" = (
/obj/machinery/economy/vending/vulpix,
/obj/machinery/economy/vending/snack,
/turf/simulated/floor/plasteel{
icon_state = "darkneutralfull"
},
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ to destroy them and players will be able to make replacements.
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
var/choice = tgui_input_list(user, "Choose a new brand", "Select an Item", station_vendors)
var/choice = tgui_input_list(user, "Choose a new brand", "Select an Item", station_vendors + ss220_vendors) // SS220 ADDITION - ss220_vendors
if(!choice)
return
set_type(choice)
Expand Down
70 changes: 52 additions & 18 deletions modular_ss220/food_and_drinks/code/food/fancy_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,50 @@

icon_state = "[initial(icon_state)]_open"

/obj/item/food/fancy/attack_self(mob/user)
if(opened)
/obj/item/food/fancy/attack(mob/M, mob/user, def_zone)
if(!opened)
to_chat(user, span_warning("[src] сначала нужно открыть!"))
return FALSE
return ..()

/obj/item/food/fancy/examine(mob/user)
. = ..()
if(!opened)
. += span_notice("Нажмите <b>Alt-Click</b> чтобы открыть.")

/obj/item/food/fancy/AltClick(mob/user)
if(!try_open(user))
return

if(opened && !opened_act(user))
to_chat(user, span_warning("[src] уже открыт!"))
return

open(user)
update_icon(UPDATE_ICON_STATE)

/**
* Try to open food box
* Returns TRUE if it can be opened
*/
/obj/item/food/fancy/proc/try_open(mob/user)
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || user.restrained())
to_chat(user, span_warning("У вас нет возможности открыть [src]!"))
return FALSE

if(!COOLDOWN_FINISHED(src, try_open))
return
return FALSE

return TRUE

/**
* Opens food box
*/
/obj/item/food/fancy/proc/open(mob/user)
COOLDOWN_START(src, try_open, 2 SECONDS) // Prevent sound spamming
if(src.loc != user)
return

playsound(loc, open_sound, 50)
if(!do_after(user, 1 SECONDS, target = src, allow_moving = TRUE, must_be_held = TRUE))
return
Expand All @@ -31,13 +66,12 @@
if(desc_open)
desc = desc_open

update_icon(UPDATE_ICON_STATE)

/obj/item/food/fancy/attack(mob/M, mob/user, def_zone)
if(!opened)
to_chat(user, span_warning("[src] сначала нужно открыть!"))
return FALSE
return ..()
/**
* Second action on Alt+Click
* Called only when food is opened
*/
/obj/item/food/fancy/proc/opened_act(mob/user)
return FALSE

// MARK: Doshik
/obj/item/food/fancy/doshik
Expand Down Expand Up @@ -118,21 +152,21 @@
return FALSE
return ..()

// But we can eject it from the box and eat it
/obj/item/food/fancy/macvulpburger/AltClick(mob/user)
if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || user.restrained())
to_chat(user, span_warning("У вас нет возможности взять [burger.name]!"))
return

if(!opened)
return
/obj/item/food/fancy/macvulpburger/examine(mob/user)
. = ..()
if(opened)
. += span_notice("Нажмите <b>Alt-Click</b> чтобы достать бургер.")

// But we can eject it from the box and eat it
/obj/item/food/fancy/macvulpburger/opened_act(mob/user)
user.drop_item()
if(!user.get_active_hand() && Adjacent(user))
user.put_in_hands(burger)
else
burger.forceMove(get_turf(user))

qdel(src)
return TRUE

/obj/item/food/burger/macvulp
name = "\improper MacVulpBurger Gourmet"
Expand Down
2 changes: 2 additions & 0 deletions modular_ss220/objects/code/plushies/macvulpix.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@
. = ..()
if(glasses)
. += span_notice("Нажмите <b>Alt-Click</b> на игрушку, чтобы снять очки.")
else
. += span_notice("На эту игрушку можно надеть солнцезащитные очки.")
Binary file modified modular_ss220/objects/icons/posters.dmi
Binary file not shown.

0 comments on commit d69ef13

Please sign in to comment.