Merge remote-tracking branch 'citadel/master' into respawn_system_2

This commit is contained in:
silicons
2020-12-13 22:54:16 -07:00
54 changed files with 899 additions and 479 deletions
+37 -6
View File
@@ -17,9 +17,6 @@
/obj/item/storage/fancy
icon = 'icons/obj/food/containers.dmi'
icon_state = "donutbox6"
name = "donut box"
desc = "Mmm. Donuts."
resistance_flags = FLAMMABLE
var/icon_type = "donut"
var/spawn_type = null
@@ -59,18 +56,22 @@
fancy_open = TRUE
update_icon()
#define DONUT_INBOX_SPRITE_WIDTH 3
/*
* Donut Box
*/
/obj/item/storage/fancy/donut_box
icon = 'icons/obj/food/containers.dmi'
icon_state = "donutbox6"
icon_type = "donut"
name = "donut box"
desc = "Mmm. Donuts."
icon = 'icons/obj/food/donut.dmi'
icon_state = "donutbox_inner"
icon_type = "donut"
spawn_type = /obj/item/reagent_containers/food/snacks/donut
fancy_open = TRUE
custom_price = PRICE_NORMAL
appearance_flags = KEEP_TOGETHER
/obj/item/storage/fancy/donut_box/ComponentInitialize()
. = ..()
@@ -78,6 +79,36 @@
STR.max_items = 6
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donut))
/obj/item/storage/fancy/donut_box/PopulateContents()
. = ..()
update_icon()
/obj/item/storage/fancy/donut_box/update_icon_state()
if(fancy_open)
icon_state = "donutbox_inner"
else
icon_state = "donutbox"
/obj/item/storage/fancy/donut_box/update_overlays()
. = ..()
if (!fancy_open)
return
var/donuts = 0
for (var/_donut in contents)
var/obj/item/reagent_containers/food/snacks/donut/donut = _donut
if (!istype(donut))
continue
. += image(icon = initial(icon), icon_state = donut.in_box_sprite(), pixel_x = donuts * DONUT_INBOX_SPRITE_WIDTH)
donuts += 1
. += image(icon = initial(icon), icon_state = "donutbox_top")
#undef DONUT_INBOX_SPRITE_WIDTH
/*
* Egg Box
*/
+5
View File
@@ -271,6 +271,11 @@
icon = "the_lightbulb"
desc = "A cafe popular among moths and moffs. Once shut down for a week after the bartender used mothballs to protect her spare uniforms."
/datum/barsign/goose
name = "The Loose Goose"
icon = "goose"
desc = "Drink till you puke and/or break the laws of reality!"
/datum/barsign/cybersylph
name = "Cyber Sylph's"
icon = "cybersylph"
+7 -9
View File
@@ -96,18 +96,16 @@ GLOBAL_LIST_INIT(freqtospan, list(
return "[say_mod(input, message_mode)][spanned ? ", \"[spanned]\"" : ""]"
// Citadel edit [spanned ? ", \"[spanned]\"" : ""]"
#define ENCODE_HTML_EPHASIS(input, char, html, varname) \
var/static/regex/##varname = regex("[char]{2}(.+?)[char]{2}", "g");\
input = varname.Replace_char(input, "<[html]>$1</[html]>")
/// Converts specific characters, like +, |, and _ to formatted output.
/atom/movable/proc/say_emphasis(input)
ENCODE_HTML_EPHASIS(input, "\\|", "i", italics)
ENCODE_HTML_EPHASIS(input, "\\+", "b", bold)
ENCODE_HTML_EPHASIS(input, "_", "u", underline)
var/static/regex/italics = regex(@"\|(\S[\w\W]*?\S)\|", "g")
input = italics.Replace_char(input, "<i>$1</i>")
var/static/regex/bold = regex(@"\+(\S[\w\W]*?\S)\+", "g")
input = bold.Replace_char(input, "<b>$1</b>")
var/static/regex/underline = regex(@"_(\S[\w\W]*?\S)_", "g")
input = underline.Replace_char(input, "<u>$1</u>")
return input
#undef ENCODE_HTML_EPHASIS
/// Quirky citadel proc for our custom sayverbs to strip the verb out. Snowflakey as hell, say rewrite 3.0 when?
/atom/movable/proc/quoteless_say_quote(input, list/spans = list(speech_span), message_mode)
if((input[1] == "!") && (length_char(input) > 1))