Migrate gifts to the new attack chain and to the same file. (#32276)

* Migrate gifts to the new attack chain and the same file.

* Make wrapped gifts a small_delivery subtype.

* Remove duplicate vars.

* Apply suggestions from CRUNCH review.

Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
Signed-off-by: Alan <alfalfascout@users.noreply.github.com>

---------

Signed-off-by: Alan <alfalfascout@users.noreply.github.com>
Co-authored-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
This commit is contained in:
Alan
2026-08-01 06:10:02 +00:00
committed by GitHub
co-authored by CRUNCH
parent f3c1c9ef7b
commit fab78d2957
11 changed files with 65 additions and 94 deletions
+4 -4
View File
@@ -74,10 +74,10 @@
L += I
for(var/obj/item/storage/S in src)
L += S.return_inv()
for(var/obj/item/gift/G in src)
L += G.gift
if(isstorage(G.gift))
L += G.gift:return_inv()
for(var/obj/item/small_delivery/gift/G in src)
L += G.wrapped
if(isstorage(G.wrapped))
L += G.wrapped:return_inv()
return L
/obj/item/clothing/suit/storage/serialize()
@@ -58,10 +58,10 @@
for(var/obj/item/storage/S in src)
L += S.return_inv()
for(var/obj/item/gift/G in src)
L += G.gift
if(isstorage(G.gift))
L += G.gift:return_inv()
for(var/obj/item/small_delivery/gift/G in src)
L += G.wrapped
if(isstorage(G.wrapped))
L += G.wrapped:return_inv()
return L
/obj/item/clothing/accessory/storage/activate_self(mob/user)
+1 -1
View File
@@ -3,7 +3,7 @@
if(!is_station_level(xmas.z)) continue
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/a_gift(T)
new /obj/item/small_delivery/gift/random(T)
for(var/mob/living/simple_animal/pet/dog/corgi/ian/Ian in GLOB.mob_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat)
for(var/datum/crafting_recipe/snowman/S in GLOB.crafting_recipes)
-9
View File
@@ -452,11 +452,6 @@
//for(var/obj/item/storage/S in Storage.return_inv()) //Check for storage items
// L += get_contents(S)
for(var/obj/item/gift/G in Storage.return_inv()) //Check for gift-wrapped items
L += G.gift
if(isstorage(G.gift))
L += get_contents(G.gift)
for(var/obj/item/small_delivery/D in Storage.return_inv()) //Check for package wrapped items
L += D.wrapped
if(isstorage(D.wrapped)) //this should never happen
@@ -478,10 +473,6 @@
L += get_contents(S)
for(var/obj/item/bio_chip/storage/I in contents) //Check for storage implants.
L += I.get_contents()
for(var/obj/item/gift/G in contents) //Check for gift-wrapped items
L += G.gift
if(isstorage(G.gift))
L += get_contents(G.gift)
for(var/obj/item/small_delivery/D in contents) //Check for package wrapped items
L += D.wrapped
@@ -135,6 +135,7 @@
user.put_in_hands(wrapped)
playsound(src, 'sound/items/poster_ripped.ogg', 50, TRUE)
qdel(src)
return ITEM_INTERACT_COMPLETE
/obj/item/small_delivery/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(istype(used, /obj/item/dest_tagger))