fixes slapping uplinks with non uplink items giving runtimes

This commit is contained in:
Sishen
2020-07-29 16:14:01 -06:00
parent 0d85f0553b
commit 7fa5ccbd0e
2 changed files with 9 additions and 6 deletions

View File

@@ -103,11 +103,14 @@ GLOBAL_LIST_EMPTY(uplinks)
if(istype(I, /obj/item/stack/telecrystal))
LoadTC(user, I)
if(active)
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
var/amt = hidden_uplink.telecrystals
hidden_uplink.telecrystals -= amt
src.telecrystals += amt
to_chat(user, "<span class='notice'>You connect the [I] to your uplink, siphoning [amt] telecrystals before quickly undoing the connection.")
if(I.GetComponent(/datum/component/uplink))
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
var/amt = hidden_uplink.telecrystals
hidden_uplink.telecrystals -= amt
src.telecrystals += amt
to_chat(user, "<span class='notice'>You connect the [I] to your uplink, siphoning [amt] telecrystals before quickly undoing the connection.")
else
return
for(var/category in uplink_items)
for(var/item in uplink_items[category])
var/datum/uplink_item/UI = uplink_items[category][item]

View File

@@ -488,7 +488,7 @@
remarks = list("Sweep the legs...", "Chop the throat...", "Punch the lungs...", "Get the gold...", "Where are my sick gloves..?")
/obj/item/book/granter/martial/krav_maga/onlearned(mob/living/carbon/user)
..()
. = ..()
if(oneuse == TRUE)
desc = "It's completely blank."
name = "empty scroll"