Files
Bubberstation/code/game/objects/items/vending_items.dm
Mothblocks 0f3c4e51f7 Modernizing Radiation -- TL;DR: Radiation is now a status effect healed by tox healing, and contamination is removed (#62265)
Implements the Modernizing radiation design document ( https://hackmd.io/@tgstation/rJNIyeBHt ) and replaces the current radiation sources with the new system, as well as replacing/removing a bunch of old consumers of radiation that either had no reason to exist, or could be replaced by something else.

Diverges from the doc in that items radiation don't go up like explained. I was going to, but items get irradiated so easily that it just feels pretty lame. Items still get irradiated, but it's mostly just so that radiation sources look cooler (wow, lots of stuff around going green), and for things like the geiger counter.

Instead of the complicated radiation_wave system, radiation now just checks everything between the radiation source and the potential target, losing power along the way based on the radiation insulation of whats in between. If this reaches too low a point (specified by radiation_pulse consumers), then the radiation will not pass. Otherwise, will roll a chance to irradiate. Uranium structures allow a delay before irradiating, so stay away!
2021-11-01 04:20:39 -03:00

52 lines
1.5 KiB
Plaintext

/*
Vending machine refills can be found at /code/modules/vending/ within each vending machine's respective file
*/
/obj/item/vending_refill
name = "resupply canister"
var/machine_name = "Generic"
icon = 'icons/obj/vending_restock.dmi'
icon_state = "refill_snack"
inhand_icon_state = "restock_unit"
desc = "A vending machine restock cart."
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
flags_1 = CONDUCT_1
force = 7
throwforce = 10
throw_speed = 1
throw_range = 7
w_class = WEIGHT_CLASS_BULKY
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 70, ACID = 30)
// Built automatically from the corresponding vending machine.
// If null, considered to be full. Otherwise, is list(/typepath = amount).
var/list/products
var/list/contraband
var/list/premium
/obj/item/vending_refill/Initialize(mapload)
. = ..()
name = "\improper [machine_name] restocking unit"
/obj/item/vending_refill/examine(mob/user)
. = ..()
var/num = get_part_rating()
if (num == INFINITY)
. += "It's sealed tight, completely full of supplies."
else if (num == 0)
. += "It's empty!"
else
. += "It can restock [num] item\s."
/obj/item/vending_refill/get_part_rating()
if (!products || !contraband || !premium)
return INFINITY
. = 0
for(var/key in products)
. += products[key]
for(var/key in contraband)
. += contraband[key]
for(var/key in premium)
. += premium[key]