mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
[MIRROR] Adds a signal for storage exit and insert, uses it to make trading cards zoom properly (#285)
* Adds a signal for storage exit and insert, uses it to make trading cards zoom properly (#52737) * Adds a signal for storage exit and insert, uses it to make trading cards shirk properly * Adds storage param * Adds a signal for storage exit and insert, uses it to make trading cards zoom properly Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
parent
b7b32cb604
commit
0fe96ab3c3
@@ -22,7 +22,9 @@ GLOBAL_LIST_EMPTY(cached_cards)
|
||||
|
||||
/obj/item/tcgcard/Initialize(mapload, datum_series, datum_id)
|
||||
. = ..()
|
||||
transform = matrix(0.3,0,0,0,0.3,0)
|
||||
zoom_out()
|
||||
RegisterSignal(src, COMISG_STORAGE_ENTERED, .proc/zoom_in)
|
||||
RegisterSignal(src, CONSIG_STORAGE_EXITED, .proc/zoom_out)
|
||||
//If they are passed as null let's replace them with the vars on the card. this also means we can allow for map loaded ccards
|
||||
if(!datum_series)
|
||||
datum_series = series
|
||||
@@ -57,10 +59,16 @@ GLOBAL_LIST_EMPTY(cached_cards)
|
||||
|
||||
/obj/item/tcgcard/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
transform = matrix()
|
||||
zoom_in()
|
||||
|
||||
/obj/item/tcgcard/dropped(mob/user, silent)
|
||||
. = ..()
|
||||
zoom_out()
|
||||
|
||||
/obj/item/tcgcard/proc/zoom_in()
|
||||
transform = matrix()
|
||||
|
||||
/obj/item/tcgcard/proc/zoom_out()
|
||||
transform = matrix(0.3,0,0,0,0.3,0)
|
||||
|
||||
/obj/item/cardpack
|
||||
@@ -116,7 +124,9 @@ GLOBAL_LIST_EMPTY(cached_cards)
|
||||
|
||||
/obj/item/cardpack/Initialize()
|
||||
. = ..()
|
||||
transform = matrix(0.4,0,0,0,0.4,0)
|
||||
zoom_out()
|
||||
RegisterSignal(src, COMISG_STORAGE_ENTERED, .proc/zoom_in)
|
||||
RegisterSignal(src, CONSIG_STORAGE_EXITED, .proc/zoom_out)
|
||||
//Pass by refrance moment
|
||||
//This lets us only have one rarity table per pack, badmins beware
|
||||
if(GLOB.cached_rarity_table[type])
|
||||
@@ -130,10 +140,16 @@ GLOBAL_LIST_EMPTY(cached_cards)
|
||||
|
||||
/obj/item/cardpack/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
transform = matrix()
|
||||
zoom_in()
|
||||
|
||||
/obj/item/cardpack/dropped(mob/user, silent)
|
||||
. = ..()
|
||||
zoom_out()
|
||||
|
||||
/obj/item/cardpack/proc/zoom_in()
|
||||
transform = matrix()
|
||||
|
||||
/obj/item/cardpack/proc/zoom_out()
|
||||
transform = matrix(0.4,0,0,0,0.4,0)
|
||||
|
||||
/obj/item/cardpack/attack_self(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user