Merge branch 'master' of https://github.com/tgstation/-tg-station into Cfour

This commit is contained in:
Razharas
2014-11-18 16:23:04 +03:00
151 changed files with 669 additions and 29040 deletions
+11 -8
View File
@@ -480,10 +480,11 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
//Find the correct supply_pack datum
var/datum/supply_packs/P = supply_shuttle.supply_packs[href_list["doorder"]]
if(!istype(P)) return
if(!istype(P) || P.hidden || P.contraband) //href protection
return
var/timeout = world.time + 600
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
var/reason = stripped_input(usr,"Reason:","Why do you require this item?","")
if(world.time > timeout) return
if(!reason) return
@@ -551,7 +552,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
/obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob)
if(!allowed(user))
user << "<span class='warning'> Access Denied.</span>"
user << "<span class='warning'>Access Denied.</span>"
return
if(..())
@@ -580,7 +581,7 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
/obj/machinery/computer/supplycomp/attackby(I as obj, user as mob)
if(istype(I,/obj/item/weapon/card/emag) && !hacked)
user << "<span class='notice'> Special supplies unlocked.</span>"
user << "<span class='notice'>Special supplies unlocked.</span>"
hacked = 1
return
else
@@ -655,8 +656,9 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
temp += "<b>Request from: [get_supply_group_name(cat)]</b><BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat) 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
if((N.hidden && !hacked) || (N.contraband && !can_order_contraband) || N.group != cat) //Have to send the type instead of a reference to
continue //the obj because it would get caught by the garbage
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>"
/*temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
@@ -674,10 +676,11 @@ var/global/datum/controller/supply_shuttle/supply_shuttle
//Find the correct supply_pack datum
var/datum/supply_packs/P = supply_shuttle.supply_packs[href_list["doorder"]]
if(!istype(P)) return
if(!istype(P) || (P.hidden && !hacked) || (P.contraband && !can_order_contraband)) //href exploit protection
return
var/timeout = world.time + 600
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
var/reason = stripped_input(usr,"Reason:","Why do you require this item?","")
if(world.time > timeout) return
// if(!reason) return