This commit is contained in:
Zuhayr
2014-09-01 22:03:29 +09:30
6 changed files with 64 additions and 43 deletions

View File

@@ -170,10 +170,10 @@
post_status(href_list["statdisp"])
if("setmsg1" in href_list)
stat_msg1 = reject_bad_text(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40)
stat_msg1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null), 1, 40)), 40)
computer.updateDialog()
if("setmsg2" in href_list)
stat_msg2 = reject_bad_text(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40)
stat_msg2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null), 1, 40)), 40)
computer.updateDialog()
// OMG CENTCOMM LETTERHEAD

View File

@@ -80,6 +80,9 @@
throw_item(A)
return
if(!istype(A,/obj/item/weapon/gun) && !isturf(A) && !istype(A,/obj/screen))
last_target_click = world.time
var/obj/item/W = get_active_hand()
if(W == A)

View File

@@ -169,10 +169,10 @@
post_status(href_list["statdisp"])
if("setmsg1")
stat_msg1 = input("Line 1", "Enter Message Text", stat_msg1) as text|null
stat_msg1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null), 1, 40)), 40)
src.updateDialog()
if("setmsg2")
stat_msg2 = input("Line 2", "Enter Message Text", stat_msg2) as text|null
stat_msg2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null), 1, 40)), 40)
src.updateDialog()
// OMG CENTCOMM LETTERHEAD

View File

@@ -721,8 +721,13 @@
return 0
var/result = 0
var/obj/item/stack/sheet/res = new type(src)
// amount available to take out
var/total_amount = round(resources[mat_string]/res.perunit)
res.amount = min(total_amount,amount)
// number of stacks we're going to take out
res.amount = round(min(total_amount,amount))
if(res.amount>0)
resources[mat_string] -= res.amount*res.perunit
res.Move(src.loc)
@@ -783,6 +788,7 @@
if(istype(W, /obj/item/weapon/card/emag))
emag()
return
var/material
switch(W.type)
if(/obj/item/stack/sheet/mineral/gold)
@@ -805,14 +811,17 @@
if(src.being_built)
user << "The fabricator is currently processing. Please wait until completion."
return
var/obj/item/stack/sheet/stack = W
var/sname = "[stack.name]"
var/amnt = stack.perunit
if(src.resources[material] < res_max_amount)
var/count = 0
src.overlays += "fab-load-[material]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey
sleep(10)
if(stack && stack.amount)
if(stack && stack.amount >= 1)
var/count = 0
src.overlays += "fab-load-[material]"//loading animation is now an overlay based on material type. No more spontaneous conversion of all ores to metal. -vey
sleep(10)
while(src.resources[material] < res_max_amount && stack)
src.resources[material] += amnt
stack.use(1)
@@ -820,6 +829,9 @@
src.overlays -= "fab-load-[material]"
user << "You insert [count] [sname] into the fabricator."
src.updateUsrDialog()
else
user << "The fabricator can only accept full sheets of [sname]."
return
else
user << "The fabricator cannot hold more [sname]."
return

View File

@@ -22,6 +22,12 @@
return
return
/obj/effect/portal/attack_hand(mob/user as mob)
spawn(0)
src.teleport(user)
return
return
/obj/effect/portal/New()
spawn(300)
del(src)

View File

@@ -245,12 +245,12 @@
/* Signaler (Mode: 40) */
if(istype(radio,/obj/item/radio/integrated/signal) && (mode==40))
var/obj/item/radio/integrated/signal/R = radio
values["signal_freq"] = format_frequency(R.frequency)
values["signal_code"] = R.code
/* Station Display (Mode: 42) */
@@ -266,8 +266,8 @@
for(var/obj/machinery/power/monitor/pMon in world)
if(!(pMon.stat & (NOPOWER|BROKEN)) )
pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
if(isnull(powmonitor)) powmonitor = pMon
if(isnull(powmonitor)) powmonitor = pMon
values["powermonitors"] = pMonData
values["poweravail"] = powmonitor.powernet.avail
@@ -284,22 +284,22 @@
var/apcData[0]
for(var/obj/machinery/power/apc/A in L)
apcData[++apcData.len] = list("Name" = html_encode(A.area.name), "Equipment" = Status[A.equipment+1], "Lights" = Status[A.lighting+1], "Environment" = Status[A.environ+1], "CellPct" = A.cell ? round(A.cell.percent(),1) : -1, "CellStatus" = A.cell ? chg[A.charging+1] : 0)
values["apcs"] = apcData
/* General Records (Mode: 44 / 441 / 45 / 451) */
if(mode == 44 || mode == 441 || mode == 45 || mode ==451)
if(istype(active1, /datum/data/record) && (active1 in data_core.general))
values["general"] = active1.fields
values["general_exists"] = 1
else
values["general_exists"] = 0
/* Medical Records (Mode: 44 / 441) */
@@ -316,7 +316,7 @@
else
values["medical_exists"] = 0
/* Security Records (Mode:45 / 451) */
/* Security Records (Mode:45 / 451) */
if(mode == 45 || mode == 451)
var/secData[0]
@@ -348,15 +348,15 @@
if(SC.botlist && SC.botlist.len)
for(var/obj/machinery/bot/B in SC.botlist)
botsCount++
if(B.loc)
if(B.loc)
botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
if(!botsData.len)
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
beepskyData["bots"] = botsData
beepskyData["count"] = botsCount
else
beepskyData["active"] = 0
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
@@ -379,10 +379,10 @@
var/area/loca = QC.botstatus["loca"]
var/loca_name = sanitize(loca.name)
muleData["botstatus"] = list("loca" = loca_name, "mode" = QC.botstatus["mode"],"home"=QC.botstatus["home"],"powr" = QC.botstatus["powr"],"retn" =QC.botstatus["retn"], "pick"=QC.botstatus["pick"], "load" = QC.botstatus["load"], "dest" = sanitize(QC.botstatus["dest"]))
else
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
var/mulebotsCount=0
for(var/obj/machinery/bot/B in QC.botlist)
@@ -397,7 +397,7 @@
muleData["count"] = mulebotsCount
else
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
muleData["botstatus"] = list("loca" = null, "mode" = -1,"home"=null,"powr" = null,"retn" =null, "pick"=null, "load" = null, "dest" = null)
muleData["active"] = 0
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
muleData["bots"] = mulebotsData
@@ -420,13 +420,13 @@
var/supplyOrderData[0]
for(var/S in supply_controller.shoppinglist)
var/datum/supply_order/SO = S
supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!supplyOrderData.len)
supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null)
supplyData["approved"] = supplyOrderData
supplyData["approved_count"] = supplyOrderCount
supplyData["approved_count"] = supplyOrderCount
var/requestCount = 0
var/requestData[0]
@@ -436,20 +436,20 @@
requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
if(!requestData.len)
requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null)
supplyData["requests"] = requestData
supplyData["requests_count"] = requestCount
values["supply"] = supplyData
/* Janitor Supplies Locator (Mode: 49) */
if(mode==49)
var/JaniData[0]
var/turf/cl = get_turf(src)
if(cl)
JaniData["user_loc"] = list("x" = cl.x, "y" = cl.y)
else
@@ -462,14 +462,14 @@
continue
var/direction = get_dir(src, M)
MopData[++MopData.len] = list ("x" = ml.x, "y" = ml.y, "dir" = uppertext(dir2text(direction)), "status" = M.reagents.total_volume ? "Wet" : "Dry")
if(!MopData.len)
MopData[++MopData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/BucketData[0]
for(var/obj/structure/mopbucket/B in world)
var/turf/bl = get_turf(B)
var/turf/bl = get_turf(B)
if(bl)
if(bl.z != cl.z)
continue
@@ -487,8 +487,8 @@
continue
var/direction = get_dir(src,B)
CbotData[++CbotData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.on ? "Online" : "Offline")
if(!CbotData.len)
CbotData[++CbotData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
var/CartData[0]
@@ -501,7 +501,7 @@
CartData[++CartData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.reagents.total_volume/100)
if(!CartData.len)
CartData[++CartData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
@@ -512,7 +512,7 @@
values["janitor"] = JaniData
return values
@@ -525,8 +525,8 @@
usr << browse(null, "window=pda")
return
switch(href_list["choice"])
if("Medical Records")
@@ -577,10 +577,10 @@
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = input("Line 1", "Enter Message Text", message1) as text|null
message1 = reject_bad_text(trim(copytext(sanitize(input("Line 1", "Enter Message Text", message1) as text|null), 1, 40)), 40)
updateSelfDialog()
if("setmsg2")
message2 = input("Line 2", "Enter Message Text", message2) as text|null
message2 = reject_bad_text(trim(copytext(sanitize(input("Line 2", "Enter Message Text", message2) as text|null), 1, 40)), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])