Files
CHOMPStation2/code/game/objects/items/stacks/telecrystal.dm
Neerti 828dacf485 Centralizes weight class definitions
A lot of new defines are now in inventory_sizes.dm, which contains;
All the size identifiers (the thing that tells the game if something is bulky, or w/e).
Storage costs for all the sizes, which are exponents of two, as previously.
A few constants for inventory size.

Also changes all storage item's capacity definitions by basing it off of how many 'normal slots' exist for it.  This allows one to change the definition for all of the defines in the file, and everything will follow along without needing to change 500 files.  In testing, I made all ITEMSIZE_COST_* defines doubled, and nothing had broke.

The benefit of doing all of this is that it makes adding new weight classes in the future much simpler, and makes knowing how much space a container has easier, as seeing ITEMSIZE_COST_NORMAL * 7 means it can hold seven normal items.
2016-09-22 00:51:51 -04:00

26 lines
1.2 KiB
Plaintext

/obj/item/stack/telecrystal
name = "telecrystal"
desc = "It seems to be pulsing with suspiciously enticing energies."
description_antag = "Telecrystals can be activated by utilizing them on devices with an actively running uplink. They will not activate on unactivated uplinks."
singular_name = "telecrystal"
icon = 'icons/obj/stock_parts.dmi'
icon_state = "telecrystal"
w_class = ITEMSIZE_TINY
max_amount = 240
origin_tech = list(TECH_MATERIAL = 6, TECH_BLUESPACE = 4)
force = 1 //Needs a token force to ensure you can attack because for some reason you can't attack with 0 force things
/obj/item/stack/telecrystal/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
if(amount >= 5)
target.visible_message("<span class='warning'>\The [target] has been transported with \the [src] by \the [user].</span>")
safe_blink(target, 14)
use(5)
else
user << "<span class='warning'>There are not enough telecrystals to do that.</span>"
/obj/item/stack/telecrystal/attack_self(mob/user as mob)
if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals
user << "<span class='notice'>You use \the [src], adding [src.amount] to your balance.</span>"
user.mind.tcrystals += amount
use(amount)
return