Prevents Hacking for Contraband, Enables Contraband by Emag

Implements logic to dictate unique behaviours of hacking & emagging such that...

1. You can't hack wires to enable contraband-- though you can disable it!
2. The only way to get contraband from the nifsoft shop is by emagging, which is now possible.
This commit is contained in:
KasparoVy
2020-04-18 02:42:31 -04:00
parent a47693dfa7
commit 1d8315c8d9

View File

@@ -19,6 +19,10 @@
/obj/machinery/vending/nifsoft_shop/Initialize()
. = ..()
if(wires)
qdel(wires)
wires = new /datum/wires/vending/no_contraband(src) //These wires can't be hacked for contraband.
entopic = new(aholder = src, aicon = icon, aicon_state = "beacon")
/obj/machinery/vending/nifsoft_shop/Destroy()
@@ -70,9 +74,9 @@
list(premium, CAT_COIN))
for(var/current_list in all_products)
var/category = current_list[2]
var/category = current_list[CAT_HIDDEN]
for(var/entry in current_list[1])
for(var/entry in current_list[CAT_NORMAL])
var/datum/nifsoft/NS = entry
var/applies_to = initial(NS.applies_to)
var/context = ""
@@ -220,3 +224,18 @@
/obj/machinery/vending/nifsoft_shop/throw_item()
//TODO: Make it throw disks at people with random software? That might be fun. EVEN THE ILLEGAL ONES? ;o
return 0
/datum/wires/vending/no_contraband
/datum/wires/vending/no_contraband/UpdatePulsed(index) //Can't hack for contraband, need emag.
if(index != VENDING_WIRE_CONTRABAND)
..(index)
else
return
/obj/machinery/vending/nifsoft_shop/emag_act(remaining_charges, mob/user) //Yeees, YEEES! Give me that black market tech.
if(!emagged)
emagged = 1
categories |= CAT_HIDDEN
to_chat(user, "You short out [src]'s access lock & stock restrictions.")
return 1