mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
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:
@@ -19,6 +19,10 @@
|
|||||||
|
|
||||||
/obj/machinery/vending/nifsoft_shop/Initialize()
|
/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")
|
entopic = new(aholder = src, aicon = icon, aicon_state = "beacon")
|
||||||
|
|
||||||
/obj/machinery/vending/nifsoft_shop/Destroy()
|
/obj/machinery/vending/nifsoft_shop/Destroy()
|
||||||
@@ -70,9 +74,9 @@
|
|||||||
list(premium, CAT_COIN))
|
list(premium, CAT_COIN))
|
||||||
|
|
||||||
for(var/current_list in all_products)
|
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/datum/nifsoft/NS = entry
|
||||||
var/applies_to = initial(NS.applies_to)
|
var/applies_to = initial(NS.applies_to)
|
||||||
var/context = ""
|
var/context = ""
|
||||||
@@ -220,3 +224,18 @@
|
|||||||
/obj/machinery/vending/nifsoft_shop/throw_item()
|
/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
|
//TODO: Make it throw disks at people with random software? That might be fun. EVEN THE ILLEGAL ONES? ;o
|
||||||
return 0
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user