service borg cookin fixin update (#76590)

## About The Pull Request
PR done for bounty:
https://tgstation13.org/phpBB/viewtopic.php?f=5&t=33988
borgs can now turn on stoves and griddles
borg click code has been reworked a bit to be closer to base mob, you
are now able to click on stuff within reach rather than just Adjacent
(might be buggy to introduce this? hopefully not. if anything we can
testmerge this), which lets us make the apparatus work to pick up stoves
on the range and such
Adds the Codex Cibus Mechanicus as an upgrade you can research in RnD
with the other service borg ones. When you use it it shows you the
cooking menu!

![image](https://github.com/tgstation/tgstation/assets/23585223/5f881387-e0ba-4bb8-a9d6-ddc9d8fa9272)

## Why It's Good For The Game
The service borg has the tools to prepare ingredients, but it can't
actually do anything with them, which severely limits it, only being
able to do slapcrafted foods.
The apparatus not working on items that are on top of stoves/griddles
seems to be just a bug with how cyborg click code is handled.

## Changelog
🆑 Fikou
fix: service borg apparatus now works on stoves and griddles and ovens
qol: borgs can now activate stoves and griddles
add: rnd can research a cookbook for service borgs
/🆑
This commit is contained in:
Fikou
2023-07-09 15:17:39 +02:00
committed by GitHub
parent 69775ea1fe
commit 8ca2a0bb35
11 changed files with 155 additions and 64 deletions
@@ -233,3 +233,29 @@
#undef THROW_LOLLIPOP_MODE
#undef THROW_GUMBALL_MODE
#undef DISPENSE_ICECREAM_MODE
/obj/item/borg/cookbook
name = "Codex Cibus Mechanicus"
desc = "It's a robot cookbook!"
icon = 'icons/obj/library.dmi'
icon_state = "cooked_book"
item_flags = NOBLUDGEON
var/datum/component/personal_crafting/cooking
/obj/item/borg/cookbook/Initialize(mapload)
. = ..()
cooking = AddComponent(/datum/component/personal_crafting)
cooking.forced_mode = TRUE
cooking.mode = TRUE
/obj/item/borg/cookbook/attack_self(mob/user, modifiers)
. = ..()
cooking.ui_interact(user)
/obj/item/borg/cookbook/dropped(mob/user, silent)
SStgui.close_uis(cooking)
return ..()
/obj/item/borg/cookbook/cyborg_unequip(mob/user)
SStgui.close_uis(cooking)
return ..()
@@ -68,10 +68,10 @@
stored = item
RegisterSignal(stored, COMSIG_ATOM_UPDATED_ICON, PROC_REF(on_stored_updated_icon))
update_appearance()
return
return TRUE
else
stored.melee_attack_chain(user, atom, params)
return
return TRUE
return ..()
/**
@@ -307,7 +307,7 @@
return ..()
/obj/item/borg/apparatus/service
name = "Service apparatus"
name = "service apparatus"
desc = "A special apparatus for carrying food, bowls, plates, oven trays, soup pots and paper."
icon_state = "borg_service_apparatus"
storable = list(
@@ -861,6 +861,34 @@
if (rtable)
install.model.remove_module(rtable, TRUE)
/obj/item/borg/upgrade/service_cookbook
name = "Service Cyborg Cookbook"
desc = "An upgrade to the service model cyborg, that lets them create more foods."
icon_state = "cyborg_upgrade3"
require_model = TRUE
model_type = list(/obj/item/robot_model/service)
model_flags = BORG_MODEL_SERVICE
/obj/item/borg/upgrade/service_cookbook/action(mob/living/silicon/robot/install, user = usr)
. = ..()
if(!.)
return FALSE
var/obj/item/borg/cookbook/book = locate() in install.model.modules
if(book)
install.balloon_alert_to_viewers("already installed!")
return FALSE
book = new(install.model)
install.model.basic_modules += book
install.model.add_module(book, FALSE, TRUE)
/obj/item/borg/upgrade/service_cookbook/deactivate(mob/living/silicon/robot/install, user = usr)
. = ..()
if (!.)
return FALSE
var/obj/item/borg/cookbook/book = locate() in install.model.modules
if(book)
install.model.remove_module(book, TRUE)
///This isn't an upgrade or part of the same path, but I'm gonna just stick it here because it's a tool used on cyborgs.
//A reusable tool that can bring borgs back to life. They gotta be repaired first, though.
/obj/item/borg_restart_board