mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 07:20:09 +01:00
Adds the ability to rename food (#5174)
This commit is contained in:
@@ -160,6 +160,8 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
if(name != initial(name))
|
||||
user << "<span class='notice'>You know the item as [initial(name)], however a little piece of propped up paper indicates it's \a [name].</span>"
|
||||
if (coating)
|
||||
user << "<span class='notice'>It's coated in [coating.name]!</span>"
|
||||
if (bitecount==0)
|
||||
@@ -172,6 +174,26 @@
|
||||
user << "<span class='notice'>\The [src] was bitten multiple times!</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/weapon/pen))
|
||||
|
||||
var/selection = alert(user,"Which attribute do you wish to edit?","Food Editor","Name","Description","Cancel")
|
||||
if(selection == "Name")
|
||||
var/input_clean_name = sanitize(input(user,"What is the name of this food?", "Set Food Name") as text|null)
|
||||
if(input_clean_name)
|
||||
user.visible_message("<span class='notice'>\The [user] labels \the [name] as \"[input_clean_name]\".</span>")
|
||||
name = input_clean_name
|
||||
else
|
||||
name = initial(name)
|
||||
else if(selection == "Description")
|
||||
var/input_clean_desc = sanitize(input(user,"What is the description of this food?", "Set Food Description") as text|null)
|
||||
if(input_clean_desc)
|
||||
user.visible_message("<span class='notice'>\The [user] adds a note to \the [name].</span>")
|
||||
desc = input_clean_desc
|
||||
else
|
||||
desc = initial(desc)
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/storage))
|
||||
..() // -> item/attackby()
|
||||
return
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: BurgerBB
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Added the ability to rename food and edit its description with a pen. Please don't make me regret this."
|
||||
|
||||
Reference in New Issue
Block a user