mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Refactors to add directly to desc less (#71996)
## About The Pull Request Refactors some of the desc += calls to instead use examine() additions ## Why It's Good For The Game There were a few parts in the code where the description was directly written to after an action, where that extra note is information on the status of the item. Moving it to examine() lets you call those procs multiple time without worry and makes it look more consistent to players (extra item info displayed as notice/warning spans under desc) ## Changelog 🆑 refactor: moved some description edits to examine hooks /🆑 Co-authored-by: etherware-novice <candy@notarealaddr.com>
This commit is contained in:
co-authored by
etherware-novice
parent
614f75a729
commit
c2577638ef
@@ -277,9 +277,13 @@
|
||||
playsound(src, SFX_SPARKS, 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
sleep(0.6 SECONDS)
|
||||
operating = FALSE
|
||||
desc += "<BR>[span_warning("Its access panel is smoking slightly.")]"
|
||||
open(2)
|
||||
|
||||
/obj/machinery/door/window/examine(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
. += span_warning("Its access panel is smoking slightly.")
|
||||
|
||||
/obj/machinery/door/window/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
if(flags_1 & NODECONSTRUCT_1)
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
greyscale_config = /datum/greyscale_config/encryptionkey_basic
|
||||
greyscale_colors = "#820a16#3758c4"
|
||||
|
||||
/obj/item/encryptionkey/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!channels.len && !translate_binary && !translated_language)
|
||||
desc += " Has no special codes in it. You should probably tell a coder!"
|
||||
|
||||
/obj/item/encryptionkey/examine(mob/user)
|
||||
. = ..()
|
||||
if(LAZYLEN(channels) || translate_binary)
|
||||
@@ -32,6 +27,8 @@
|
||||
examine_text_list += "[GLOB.channel_tokens[MODE_BINARY]] - [MODE_BINARY]"
|
||||
|
||||
. += span_notice("It can access the following channels; [jointext(examine_text_list, ", ")].")
|
||||
else
|
||||
. += span_warning("Has no special codes in it. You should probably tell a coder!")
|
||||
|
||||
/obj/item/encryptionkey/syndicate
|
||||
name = "syndicate encryption key"
|
||||
|
||||
@@ -261,6 +261,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
||||
attack_verb_continuous = list("attacks", "burns", "blesses", "damns", "scorches")
|
||||
attack_verb_simple = list("attack", "burn", "bless", "damn", "scorch")
|
||||
var/uses = 1
|
||||
var/ownername
|
||||
|
||||
/obj/item/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H)
|
||||
if (uses)
|
||||
@@ -270,8 +271,12 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning",
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, TRUE)
|
||||
H.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
to_chat(H, span_notice("Your name appears on the inside cover, in blood."))
|
||||
var/ownername = H.real_name
|
||||
desc += span_warning("The name [ownername] is written in blood inside the cover.")
|
||||
ownername = H.real_name
|
||||
|
||||
/obj/item/storage/book/bible/syndicate/examine(mob/user)
|
||||
. = ..()
|
||||
if(ownername)
|
||||
. += span_warning("The name [ownername] is written in blood inside the cover.")
|
||||
|
||||
/obj/item/storage/book/bible/syndicate/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE)
|
||||
if (!user.combat_mode)
|
||||
|
||||
@@ -53,12 +53,16 @@
|
||||
if(!broken)
|
||||
broken = TRUE
|
||||
atom_storage.locked = FALSE
|
||||
desc += "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(user)
|
||||
visible_message(span_warning("\The [src] is broken by [user] with an electromagnetic card!"))
|
||||
return
|
||||
|
||||
/obj/item/storage/lockbox/examine(mob/user)
|
||||
. = ..()
|
||||
if(broken)
|
||||
. += span_notice("It appears to be broken.")
|
||||
|
||||
/obj/item/storage/lockbox/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
||||
. = ..()
|
||||
open = TRUE
|
||||
|
||||
@@ -217,9 +217,13 @@
|
||||
if(prob(20))
|
||||
victim.emote("cry")
|
||||
used = TRUE
|
||||
desc += " It has been used up."
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/obj/item/eyesnatcher/examine(mob/user)
|
||||
. = ..()
|
||||
if(used)
|
||||
. += span_notice("It has been used up.")
|
||||
|
||||
/obj/item/eyesnatcher/proc/eyeballs_exist(obj/item/organ/internal/eyes/eyeballies, obj/item/bodypart/head/head, mob/living/carbon/human/victim)
|
||||
if(!eyeballies || QDELETED(eyeballies))
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user