mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Adds a chance for ID cards to be tastefully thick (#67359)
About The Pull Request Adds a 1% chance for any ID to have a new trait (100% on golden IDs) This trait adds a special interaction with ID appraisal chips https://streamable.com/pdu7kj Why It's Good For The Game Impressive. Very nice. Let's see the Captain's card. Changelog cl add: Adds a chance for ID cards to be tastefully thick /cl
This commit is contained in:
@@ -849,6 +849,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_JOB_FIRST_ID_CARD "job_first_id_card"
|
||||
/// ID cards with this trait will attempt to forcibly occupy the front-facing ID card slot in wallets.
|
||||
#define TRAIT_MAGNETIC_ID_CARD "magnetic_id_card"
|
||||
/// ID cards with this trait have special appraisal text.
|
||||
#define TRAIT_TASTEFULLY_THICK_ID_CARD "impressive_very_nice"
|
||||
|
||||
/// Traits granted to items due to their chameleon properties.
|
||||
#define CHAMELEON_ITEM_TRAIT "chameleon_item_trait"
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@
|
||||
register_context()
|
||||
|
||||
RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, .proc/update_in_wallet)
|
||||
if(prob(1))
|
||||
ADD_TRAIT(src, TRAIT_TASTEFULLY_THICK_ID_CARD, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/item/card/id/Destroy()
|
||||
if (registered_account)
|
||||
@@ -692,8 +694,28 @@
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_ID_APPRAISER))
|
||||
. += HAS_TRAIT(src, TRAIT_JOB_FIRST_ID_CARD) ? span_boldnotice("Hmm... yes, this ID was issued from Central Command!") : span_boldnotice("This ID was created in this sector, not by Central Command.")
|
||||
if(HAS_TRAIT(src, TRAIT_TASTEFULLY_THICK_ID_CARD) && (user.is_holding(src) || (user.CanReach(src) && user.put_in_hands(src, ignore_animation = FALSE))))
|
||||
ADD_TRAIT(src, TRAIT_NODROP, "psycho")
|
||||
. += span_hypnophrase("Look at that subtle coloring... The tasteful thickness of it. Oh my God, it even has a watermark...")
|
||||
var/sound/slowbeat = sound('sound/health/slowbeat.ogg', repeat = TRUE)
|
||||
user.playsound_local(get_turf(src), slowbeat, 40, 0, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
|
||||
if(isliving(user))
|
||||
var/mob/living/living_user = user
|
||||
living_user.adjust_timed_status_effect(10 SECONDS, /datum/status_effect/jitter)
|
||||
addtimer(CALLBACK(src, .proc/drop_card, user), 10 SECONDS)
|
||||
. += span_notice("<i>There's more information below, you can look again to take a closer look...</i>")
|
||||
|
||||
/obj/item/card/id/proc/drop_card(mob/user)
|
||||
user.stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, "psycho")
|
||||
if(user.is_holding(src))
|
||||
user.dropItemToGround(src)
|
||||
for(var/mob/living/carbon/human/viewing_mob in viewers(user, 2))
|
||||
if(viewing_mob.stat || viewing_mob == user)
|
||||
continue
|
||||
viewing_mob.say("Is something wrong? [user.first_name()]... you're sweating.", forced = "psycho")
|
||||
break
|
||||
|
||||
/obj/item/card/id/examine_more(mob/user)
|
||||
if(!user.can_read(src))
|
||||
return
|
||||
@@ -1006,6 +1028,10 @@
|
||||
inhand_icon_state = "gold_id"
|
||||
wildcard_slots = WILDCARD_LIMIT_GOLD
|
||||
|
||||
/obj/item/card/id/advanced/gold/Initialize(mapload)
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_TASTEFULLY_THICK_ID_CARD, ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/item/card/id/advanced/gold/captains_spare
|
||||
name = "captain's spare ID"
|
||||
desc = "The spare ID of the High Lord himself."
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
//Puts the item our active hand if possible. Failing that it tries other hands. Returns TRUE on success.
|
||||
//If both fail it drops it on the floor and returns FALSE.
|
||||
//This is probably the main one you need to know :)
|
||||
/mob/proc/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE, forced = FALSE)
|
||||
/mob/proc/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE, forced = FALSE, ignore_animation = TRUE)
|
||||
if(QDELETED(I))
|
||||
return FALSE
|
||||
|
||||
@@ -228,14 +228,14 @@
|
||||
to_chat(usr, span_notice("Your [inactive_stack.name] stack now contains [inactive_stack.get_amount()] [inactive_stack.singular_name]\s."))
|
||||
return TRUE
|
||||
|
||||
if(put_in_active_hand(I, forced))
|
||||
if(put_in_active_hand(I, forced, ignore_animation))
|
||||
return TRUE
|
||||
|
||||
var/hand = get_empty_held_index_for_side(LEFT_HANDS)
|
||||
if(!hand)
|
||||
hand = get_empty_held_index_for_side(RIGHT_HANDS)
|
||||
if(hand)
|
||||
if(put_in_hand(I, hand, forced))
|
||||
if(put_in_hand(I, hand, forced, ignore_animation))
|
||||
return TRUE
|
||||
if(del_on_fail)
|
||||
qdel(I)
|
||||
|
||||
@@ -615,8 +615,8 @@
|
||||
if(H)
|
||||
H.update_appearance()
|
||||
|
||||
/mob/living/simple_animal/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE)
|
||||
. = ..(I, del_on_fail, merge_stacks)
|
||||
/mob/living/simple_animal/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE, ignore_animation = TRUE)
|
||||
. = ..()
|
||||
update_inv_hands()
|
||||
|
||||
/mob/living/simple_animal/update_inv_hands()
|
||||
|
||||
Reference in New Issue
Block a user