Skip to content

Commit

Permalink
Ice Cream Rework Part 2: I can't think of a funny name (yogstation13#…
Browse files Browse the repository at this point in the history
…22490)

* Started groundwork for new vat

* forgot a space

* Started on TGUI code

* Continued work on TGUI code and ui_data

* I do not like TGUI

* Borrowed code from food cart

* Getting there

* More tweaking

* Fixed amount problem

* UI is dead

* Fixed TGUI list stuff

* Image fixed

* Messed with UI layout

* Finished base UI and gave thanks

* Added comments and general code improvements

* Fixed typos and changed actions in UI

* ui_act for selecting and dispencing items

* Improved dispensing and selecting code

* Added alt click interaction and extra examines

* Deselecting and attackby for adding to vat

* Now stores items rather than type paths

* Added carton interaction with vat

* Selected item's select ui button now becomes green

* lets you scoop cones with right click

* Start with new cones

* Finish cone crafting and started with tabs

* Attempt #2 at getting tabs to work

* Vat tab now works as intended

* Messed with info tab layout

* Finished work on tabs

* Replaced original vat code and improved code

* Removed ice cream from borg dispencers

* Removed creamatorium ;[

* Removed duplicate item from black list

* Finishing touches

* Fixes for Lint tests

* More fixes for Lints test

* Shortens info tab text
  • Loading branch information
Scrambledeggs00 authored Aug 14, 2024
1 parent d0d2b07 commit e12cf57
Show file tree
Hide file tree
Showing 11 changed files with 739 additions and 319 deletions.
4 changes: 3 additions & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,9 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
/obj/item/reagent_containers/food/snacks/donkpocket/warm/gondola, //same thing
/obj/item/reagent_containers/food/snacks/fish, // debug fish
/obj/item/reagent_containers/food/snacks/powercrepe, //obscenely strong for a food item and shouldn't just be randomly spawned
/obj/item/reagent_containers/food/snacks/grown/banana/bombanana //They were made in a factory. A bomb factory. They're bombs.
/obj/item/reagent_containers/food/snacks/grown/banana/bombanana, //They were made in a factory. A bomb factory. They're bombs.
/obj/item/reagent_containers/food/snacks/ice_cream_cone, //base cone
/obj/item/reagent_containers/food/snacks/raw_cone //base raw cone
)
blocked |= typesof(/obj/item/reagent_containers/food/snacks/customizable)

Expand Down
28 changes: 28 additions & 0 deletions code/datums/info_tab.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//Meant to store information for dynamicly adding stuff to TGUI
//How to do: Make a child of info_tab. Every child of that child is a section of the TGUI info tab
//Then use subtypesof() on the original child to get all the information of its children
/datum/info_tab
var/section = null
var/section_text = null

/datum/info_tab/icecream_vat

/datum/info_tab/icecream_vat/vat_instructions
section = "Vat Instructions"
section_text = "The ice cream vat allows you to select and dispense both ice cream scoops and cones, along with scooping ice cream scoops onto cones. The selected scoop will be scooped into cones, while the selected cone is what is dispensed by alt-clicking the vat. To scoop a cone, select a scoop type and then right-click the vat with an empty cone. Cones can only have one scoop of ice cream."

/datum/info_tab/icecream_vat/restocking
section = "Restocking"
section_text = "The ice cream vat can be restocked with new ice cream scoops and cones by left-clicking on the vat with said item. The vat can also be restocked by left-clicking on the vat with an ice cream carton with scoops. Doing so will transfer the scoops into the vat."

/datum/info_tab/icecream_vat/storage_capacity
section = "Storage Capacity"
section_text = "The ice cream vat has a storage capacity of 120 scoops and cones combined."

/datum/info_tab/icecream_vat/new_scoops
section = "Creating New Scoops"
section_text = "Scoops are made by mixing 10u of any ice cream reagent with 2u of ice. To make ice cream reagents, you will need to start with plain ice cream, which is made by mixing 5u of cream, 3u of sugar, 2u of salt, and then cooling the mixture to 272 Kelvin. To make the reagents of flavored ice cream, just mix 10u of plain ice cream with 2u of a valid flavor reagent such as vanilla."

/datum/info_tab/icecream_vat/new_cones
section = "Creating New Cones"
section_text = "Cones are made in the crafting menu in the misc. food tab. They require a raw pastry base and 2u of their flavor reagent. Once you have made the raw cone, process it with a food processor to turn it into a finished cone."
25 changes: 3 additions & 22 deletions code/game/objects/items/robot/robot_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,7 @@
/obj/item/reagent_containers/food/snacks/cookie/bacon,
/obj/item/reagent_containers/food/snacks/cookie/cloth,
/obj/item/reagent_containers/food/snacks/lollipop,
/obj/item/reagent_containers/food/snacks/gumball,
/obj/item/reagent_containers/food/snacks/icecream // Becomes vanilla icecream down the line.
/obj/item/reagent_containers/food/snacks/gumball
)
// A list of surfaces that we are allowed to place things on.
var/list/allowed_surfaces = list(/obj/structure/table, /turf/open/floor)
Expand All @@ -398,10 +397,7 @@
/obj/item/borg_snack_dispenser/attack_self(mob/user, modifiers)
var/list/choices = list()
for(var/atom/snack as anything in valid_snacks)
if(snack == /obj/item/reagent_containers/food/snacks/icecream)
choices["vanilla icecream"] = snack // Would be "ice cream cone" in the menu otherwise.
else
choices[initial(snack.name)] = snack
choices[initial(snack.name)] = snack
if(!length(choices))
to_chat(user, span_warning("No valid snacks in database."))
if(length(choices) == 1)
Expand Down Expand Up @@ -441,13 +437,6 @@
patron.put_in_hand(snack, empty_hand)
user.do_item_attack_animation(patron, null, snack)
playsound(loc, 'sound/machines/click.ogg', 10, TRUE)

// Vanilla Icecream & Setting 'snack.name' Early
if(istype(snack, /obj/item/reagent_containers/food/snacks/icecream))
var/obj/item/reagent_containers/food/snacks/icecream/icecream = snack
icecream.add_ice_cream("vanilla")
icecream.desc = "Eat the ice cream."

to_chat(patron, span_notice("[user] dispenses a [snack.name] into your empty hand and you reflexively grasp it."))
to_chat(user, span_notice("You dispense a [snack.name] into the hand of [patron]."))

Expand Down Expand Up @@ -479,20 +468,12 @@
RegisterSignal(snack, COMSIG_MOVABLE_THROW_LANDED, PROC_REF(post_throw))
snack.throw_at(target, 7, 2, user, TRUE, FALSE)
playsound(loc, 'sound/machines/click.ogg', 10, TRUE)
if(istype(snack, /obj/item/reagent_containers/food/snacks/icecream))
var/obj/item/reagent_containers/food/snacks/icecream/icecream = snack
icecream.add_ice_cream("vanilla")
icecream.desc = "Eat the ice cream."
user.visible_message(span_notice("[src] launches a [snack.name] at [target]!"))
user.newtonian_move(get_dir(target, user)) // For no gravity.
else if(user.Adjacent(target) && is_allowed(target, user))
COOLDOWN_START(src, last_snack_disp, cooldown)
snack = new selected_snack(get_turf(target))
playsound(loc, 'sound/machines/click.ogg', 10, TRUE)
if(istype(snack, /obj/item/reagent_containers/food/snacks/icecream))
var/obj/item/reagent_containers/food/snacks/icecream/icecream = snack
icecream.add_ice_cream("vanilla")
icecream.desc = "Eat the ice cream."
user.visible_message(span_notice("[user] dispenses a [snack.name]."))

if(snack && user.emagged && istype(snack, /obj/item/reagent_containers/food/snacks/cookie))
Expand All @@ -517,7 +498,7 @@
/obj/item/borg_snack_dispenser/medical
name = "\improper Treat Borg Snack Dispenser" // Not calling this "Medical Borg Snack Dispenser" since Service & Clown Cyborgs use this too.
desc = "A dispenser that dispenses treats such as lollipops and gumballs!"
valid_snacks = list(/obj/item/reagent_containers/food/snacks/lollipop, /obj/item/reagent_containers/food/snacks/gumball, /obj/item/reagent_containers/food/snacks/icecream)
valid_snacks = list(/obj/item/reagent_containers/food/snacks/lollipop, /obj/item/reagent_containers/food/snacks/gumball)

#define PKBORG_DAMPEN_CYCLE_DELAY 20

Expand Down
18 changes: 0 additions & 18 deletions code/game/objects/structures/morgue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
RemoveElement(/datum/element/update_icon_blocker)
connected = new /obj/structure/tray/cremator(src)
connected.connected = src
if(mapload && prob(1))
new /obj/structure/bodycontainer/crematorium/creamatorium(get_turf(src))
qdel(src)

/obj/structure/bodycontainer/crematorium/update_icon_state()
. = ..()
Expand Down Expand Up @@ -432,21 +429,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
update_appearance(UPDATE_ICON)
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people

/obj/structure/bodycontainer/crematorium/creamatorium
name = "crematorium"
desc = "A human incinerator. Works well during ice cream socials."

/obj/structure/bodycontainer/crematorium/creamatorium/finish_cremate(mob/user)
var/list/icecreams = new()
for(var/i_scream in get_all_contents(/mob/living))
var/obj/item/reagent_containers/food/snacks/icecream/IC = new()
IC.set_cone_type("waffle")
IC.add_mob_flavor(i_scream)
icecreams += IC
. = ..()
for(var/obj/IC in icecreams)
IC.forceMove(src)

/*
* Generic Tray
* Parent class for morguetray and crematoriumtray
Expand Down
Loading

0 comments on commit e12cf57

Please sign in to comment.