Ensures contraband for supply computers can be properly acquired via hacking

This commit is contained in:
Yoshax
2016-07-23 20:24:04 +01:00
parent baa25044c3
commit 93b7e661c4
3 changed files with 5 additions and 17 deletions
+2 -2
View File
@@ -31,7 +31,7 @@
cost = 25
containertype = /obj/structure/closet/crate
containername = "Special Ops crate"
hidden = 1
contraband = 1
/datum/supply_packs/security/bolt_rifles_mosin
name = "Surplus militia rifles"
@@ -40,6 +40,6 @@
/obj/item/ammo_magazine/clip/a762 = 6
)
cost = 50
hidden = 1
contraband = 1
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Weapons crate"
+2 -13
View File
@@ -8,7 +8,6 @@
circuit = /obj/item/weapon/circuitboard/supplycomp
var/temp = null
var/reqtime = 0 //Cooldown for requisitions - Quarxink
var/hacked = 0
var/can_order_contraband = 0
var/last_viewed_group = "categories"
@@ -209,9 +208,8 @@
return
/obj/machinery/computer/supplycomp/emag_act(var/remaining_charges, var/mob/user)
if(!hacked)
if(!can_order_contraband)
user << "<span class='notice'>Special supplies unlocked.</span>"
hacked = 1
can_order_contraband = 1
req_access = list()
return 1
@@ -267,18 +265,9 @@
temp += "<b>Request from: [last_viewed_group]</b><BR><BR>"
for(var/supply_name in supply_controller.supply_packs )
var/datum/supply_packs/N = supply_controller.supply_packs[supply_name]
if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != last_viewed_group) continue //Have to send the type instead of a reference to
if((N.contraband && !can_order_contraband) || N.group != last_viewed_group) continue //Have to send the type instead of a reference to
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
/*temp = "Supply points: [supply_controller.points]<BR><HR><BR>Request what?<BR><BR>"
for(var/supply_name in supply_controller.supply_packs )
var/datum/supply_packs/N = supply_controller.supply_packs[supply_name]
if(N.hidden && !hacked) continue
if(N.contraband && !can_order_contraband) continue
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"*/
else if (href_list["doorder"])
if(world.time < reqtime)
for(var/mob/V in hearers(src))
@@ -1,5 +1,5 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/supplycomp
@@ -28,7 +28,6 @@
catastasis = "STANDARD"
switch( alert("Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") )
//switch( alert("Current receiver spectrum is set to: " {(src.contraband_enabled) ? ("BROAD") : ("STANDARD")} , "Multitool-Circuitboard interface" , "Switch to " {(src.contraband_enabled) ? ("STANDARD") : ("BROAD")}, "Cancel") )
if("Switch to STANDARD","Switch to BROAD")
src.contraband_enabled = !src.contraband_enabled