Upgrading RPG loot items modifies their name accordingly (#26144)

* Upgrading RPG loot items modifies their name accordingly

- the greater crowbar of many tales +2
- use item fortification scroll
- the greater crowbar of many tales +3

- Once the RPG loot event fires, a global is set which means all new
items will have rpg_loot datums attached to them.

Otherwise, everything functions the same. Item fortification scrolls are
only spawned when the event fires.

Using an admin spawned item fortification scroll on a non-rpg looted
item works, it'll grant that item only a RPG datum.

Made a /unlimited upgrade scroll if admins feel like buffing an item.

* Scroll

* Scroll, <i> nix

* Fixes vaporising items, negative quality

* Fixes runtime when upgrading non-rpg item

* Static lists

* Muh spelling
This commit is contained in:
coiax
2017-04-13 23:14:11 +01:00
committed by duncathan salt
parent 9b1cc42727
commit e2c4843517
2 changed files with 97 additions and 35 deletions
+10
View File
@@ -1,5 +1,9 @@
GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi', "icon_state" = "fire"))
GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// if true, everyone item when created will have its name changed to be
// more... RPG-like.
/obj/item
name = "item"
icon = 'icons/obj/items.dmi'
@@ -99,6 +103,8 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
// non-clothing items
var/datum/dog_fashion/dog_fashion = null
var/datum/rpg_loot/rpg_loot = null
/obj/item/Initialize()
if (!materials)
materials = list()
@@ -107,6 +113,9 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
new path(src)
actions_types = null
if(GLOB.rpg_loot_items)
rpg_loot = new(src)
/obj/item/Destroy()
flags &= ~DROPDEL //prevent reqdels
if(ismob(loc))
@@ -114,6 +123,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/effects/fire.dmi',
m.temporarilyRemoveItemFromInventory(src, TRUE)
for(var/X in actions)
qdel(X)
QDEL_NULL(rpg_loot)
return ..()
/obj/item/device