mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -170,10 +170,10 @@
|
|||||||
post_status(href_list["statdisp"])
|
post_status(href_list["statdisp"])
|
||||||
|
|
||||||
if("setmsg1" in href_list)
|
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()
|
computer.updateDialog()
|
||||||
if("setmsg2" in href_list)
|
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()
|
computer.updateDialog()
|
||||||
|
|
||||||
// OMG CENTCOMM LETTERHEAD
|
// OMG CENTCOMM LETTERHEAD
|
||||||
|
|||||||
@@ -80,6 +80,9 @@
|
|||||||
throw_item(A)
|
throw_item(A)
|
||||||
return
|
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()
|
var/obj/item/W = get_active_hand()
|
||||||
|
|
||||||
if(W == A)
|
if(W == A)
|
||||||
|
|||||||
@@ -169,10 +169,10 @@
|
|||||||
post_status(href_list["statdisp"])
|
post_status(href_list["statdisp"])
|
||||||
|
|
||||||
if("setmsg1")
|
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()
|
src.updateDialog()
|
||||||
if("setmsg2")
|
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()
|
src.updateDialog()
|
||||||
|
|
||||||
// OMG CENTCOMM LETTERHEAD
|
// OMG CENTCOMM LETTERHEAD
|
||||||
|
|||||||
@@ -721,8 +721,13 @@
|
|||||||
return 0
|
return 0
|
||||||
var/result = 0
|
var/result = 0
|
||||||
var/obj/item/stack/sheet/res = new type(src)
|
var/obj/item/stack/sheet/res = new type(src)
|
||||||
|
|
||||||
|
// amount available to take out
|
||||||
var/total_amount = round(resources[mat_string]/res.perunit)
|
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)
|
if(res.amount>0)
|
||||||
resources[mat_string] -= res.amount*res.perunit
|
resources[mat_string] -= res.amount*res.perunit
|
||||||
res.Move(src.loc)
|
res.Move(src.loc)
|
||||||
@@ -783,6 +788,7 @@
|
|||||||
if(istype(W, /obj/item/weapon/card/emag))
|
if(istype(W, /obj/item/weapon/card/emag))
|
||||||
emag()
|
emag()
|
||||||
return
|
return
|
||||||
|
|
||||||
var/material
|
var/material
|
||||||
switch(W.type)
|
switch(W.type)
|
||||||
if(/obj/item/stack/sheet/mineral/gold)
|
if(/obj/item/stack/sheet/mineral/gold)
|
||||||
@@ -805,14 +811,17 @@
|
|||||||
if(src.being_built)
|
if(src.being_built)
|
||||||
user << "The fabricator is currently processing. Please wait until completion."
|
user << "The fabricator is currently processing. Please wait until completion."
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/stack/sheet/stack = W
|
var/obj/item/stack/sheet/stack = W
|
||||||
|
|
||||||
var/sname = "[stack.name]"
|
var/sname = "[stack.name]"
|
||||||
var/amnt = stack.perunit
|
var/amnt = stack.perunit
|
||||||
if(src.resources[material] < res_max_amount)
|
if(src.resources[material] < res_max_amount)
|
||||||
var/count = 0
|
if(stack && stack.amount >= 1)
|
||||||
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
|
var/count = 0
|
||||||
sleep(10)
|
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
|
||||||
if(stack && stack.amount)
|
sleep(10)
|
||||||
|
|
||||||
while(src.resources[material] < res_max_amount && stack)
|
while(src.resources[material] < res_max_amount && stack)
|
||||||
src.resources[material] += amnt
|
src.resources[material] += amnt
|
||||||
stack.use(1)
|
stack.use(1)
|
||||||
@@ -820,6 +829,9 @@
|
|||||||
src.overlays -= "fab-load-[material]"
|
src.overlays -= "fab-load-[material]"
|
||||||
user << "You insert [count] [sname] into the fabricator."
|
user << "You insert [count] [sname] into the fabricator."
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
|
else
|
||||||
|
user << "The fabricator can only accept full sheets of [sname]."
|
||||||
|
return
|
||||||
else
|
else
|
||||||
user << "The fabricator cannot hold more [sname]."
|
user << "The fabricator cannot hold more [sname]."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -22,6 +22,12 @@
|
|||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/effect/portal/attack_hand(mob/user as mob)
|
||||||
|
spawn(0)
|
||||||
|
src.teleport(user)
|
||||||
|
return
|
||||||
|
return
|
||||||
|
|
||||||
/obj/effect/portal/New()
|
/obj/effect/portal/New()
|
||||||
spawn(300)
|
spawn(300)
|
||||||
del(src)
|
del(src)
|
||||||
|
|||||||
@@ -245,12 +245,12 @@
|
|||||||
|
|
||||||
/* Signaler (Mode: 40) */
|
/* Signaler (Mode: 40) */
|
||||||
|
|
||||||
|
|
||||||
if(istype(radio,/obj/item/radio/integrated/signal) && (mode==40))
|
if(istype(radio,/obj/item/radio/integrated/signal) && (mode==40))
|
||||||
var/obj/item/radio/integrated/signal/R = radio
|
var/obj/item/radio/integrated/signal/R = radio
|
||||||
values["signal_freq"] = format_frequency(R.frequency)
|
values["signal_freq"] = format_frequency(R.frequency)
|
||||||
values["signal_code"] = R.code
|
values["signal_code"] = R.code
|
||||||
|
|
||||||
|
|
||||||
/* Station Display (Mode: 42) */
|
/* Station Display (Mode: 42) */
|
||||||
|
|
||||||
@@ -266,8 +266,8 @@
|
|||||||
for(var/obj/machinery/power/monitor/pMon in world)
|
for(var/obj/machinery/power/monitor/pMon in world)
|
||||||
if(!(pMon.stat & (NOPOWER|BROKEN)) )
|
if(!(pMon.stat & (NOPOWER|BROKEN)) )
|
||||||
pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
|
pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
|
||||||
if(isnull(powmonitor)) powmonitor = pMon
|
if(isnull(powmonitor)) powmonitor = pMon
|
||||||
|
|
||||||
values["powermonitors"] = pMonData
|
values["powermonitors"] = pMonData
|
||||||
|
|
||||||
values["poweravail"] = powmonitor.powernet.avail
|
values["poweravail"] = powmonitor.powernet.avail
|
||||||
@@ -284,22 +284,22 @@
|
|||||||
var/apcData[0]
|
var/apcData[0]
|
||||||
for(var/obj/machinery/power/apc/A in L)
|
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)
|
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
|
values["apcs"] = apcData
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* General Records (Mode: 44 / 441 / 45 / 451) */
|
/* General Records (Mode: 44 / 441 / 45 / 451) */
|
||||||
if(mode == 44 || mode == 441 || mode == 45 || mode ==451)
|
if(mode == 44 || mode == 441 || mode == 45 || mode ==451)
|
||||||
if(istype(active1, /datum/data/record) && (active1 in data_core.general))
|
if(istype(active1, /datum/data/record) && (active1 in data_core.general))
|
||||||
values["general"] = active1.fields
|
values["general"] = active1.fields
|
||||||
values["general_exists"] = 1
|
values["general_exists"] = 1
|
||||||
|
|
||||||
else
|
else
|
||||||
values["general_exists"] = 0
|
values["general_exists"] = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Medical Records (Mode: 44 / 441) */
|
/* Medical Records (Mode: 44 / 441) */
|
||||||
@@ -316,7 +316,7 @@
|
|||||||
else
|
else
|
||||||
values["medical_exists"] = 0
|
values["medical_exists"] = 0
|
||||||
|
|
||||||
/* Security Records (Mode:45 / 451) */
|
/* Security Records (Mode:45 / 451) */
|
||||||
|
|
||||||
if(mode == 45 || mode == 451)
|
if(mode == 45 || mode == 451)
|
||||||
var/secData[0]
|
var/secData[0]
|
||||||
@@ -348,15 +348,15 @@
|
|||||||
if(SC.botlist && SC.botlist.len)
|
if(SC.botlist && SC.botlist.len)
|
||||||
for(var/obj/machinery/bot/B in SC.botlist)
|
for(var/obj/machinery/bot/B in SC.botlist)
|
||||||
botsCount++
|
botsCount++
|
||||||
if(B.loc)
|
if(B.loc)
|
||||||
botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
|
botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(B.loc.loc.name), "ref" = "\ref[B]")
|
||||||
|
|
||||||
if(!botsData.len)
|
if(!botsData.len)
|
||||||
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
|
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
|
||||||
|
|
||||||
beepskyData["bots"] = botsData
|
beepskyData["bots"] = botsData
|
||||||
beepskyData["count"] = botsCount
|
beepskyData["count"] = botsCount
|
||||||
|
|
||||||
else
|
else
|
||||||
beepskyData["active"] = 0
|
beepskyData["active"] = 0
|
||||||
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
|
botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
|
||||||
@@ -379,10 +379,10 @@
|
|||||||
var/area/loca = QC.botstatus["loca"]
|
var/area/loca = QC.botstatus["loca"]
|
||||||
var/loca_name = sanitize(loca.name)
|
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"]))
|
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
|
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)
|
||||||
|
|
||||||
|
|
||||||
var/mulebotsCount=0
|
var/mulebotsCount=0
|
||||||
for(var/obj/machinery/bot/B in QC.botlist)
|
for(var/obj/machinery/bot/B in QC.botlist)
|
||||||
@@ -397,7 +397,7 @@
|
|||||||
muleData["count"] = mulebotsCount
|
muleData["count"] = mulebotsCount
|
||||||
|
|
||||||
else
|
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
|
muleData["active"] = 0
|
||||||
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
|
mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "ref"= null)
|
||||||
muleData["bots"] = mulebotsData
|
muleData["bots"] = mulebotsData
|
||||||
@@ -420,13 +420,13 @@
|
|||||||
var/supplyOrderData[0]
|
var/supplyOrderData[0]
|
||||||
for(var/S in supply_controller.shoppinglist)
|
for(var/S in supply_controller.shoppinglist)
|
||||||
var/datum/supply_order/SO = S
|
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))
|
supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
|
||||||
if(!supplyOrderData.len)
|
if(!supplyOrderData.len)
|
||||||
supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null)
|
supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null)
|
||||||
|
|
||||||
supplyData["approved"] = supplyOrderData
|
supplyData["approved"] = supplyOrderData
|
||||||
supplyData["approved_count"] = supplyOrderCount
|
supplyData["approved_count"] = supplyOrderCount
|
||||||
|
|
||||||
var/requestCount = 0
|
var/requestCount = 0
|
||||||
var/requestData[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))
|
requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
|
||||||
if(!requestData.len)
|
if(!requestData.len)
|
||||||
requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null)
|
requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null)
|
||||||
|
|
||||||
supplyData["requests"] = requestData
|
supplyData["requests"] = requestData
|
||||||
supplyData["requests_count"] = requestCount
|
supplyData["requests_count"] = requestCount
|
||||||
|
|
||||||
|
|
||||||
values["supply"] = supplyData
|
values["supply"] = supplyData
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Janitor Supplies Locator (Mode: 49) */
|
/* Janitor Supplies Locator (Mode: 49) */
|
||||||
if(mode==49)
|
if(mode==49)
|
||||||
var/JaniData[0]
|
var/JaniData[0]
|
||||||
var/turf/cl = get_turf(src)
|
var/turf/cl = get_turf(src)
|
||||||
|
|
||||||
if(cl)
|
if(cl)
|
||||||
JaniData["user_loc"] = list("x" = cl.x, "y" = cl.y)
|
JaniData["user_loc"] = list("x" = cl.x, "y" = cl.y)
|
||||||
else
|
else
|
||||||
@@ -462,14 +462,14 @@
|
|||||||
continue
|
continue
|
||||||
var/direction = get_dir(src, M)
|
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")
|
MopData[++MopData.len] = list ("x" = ml.x, "y" = ml.y, "dir" = uppertext(dir2text(direction)), "status" = M.reagents.total_volume ? "Wet" : "Dry")
|
||||||
|
|
||||||
if(!MopData.len)
|
if(!MopData.len)
|
||||||
MopData[++MopData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
MopData[++MopData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
||||||
|
|
||||||
|
|
||||||
var/BucketData[0]
|
var/BucketData[0]
|
||||||
for(var/obj/structure/mopbucket/B in world)
|
for(var/obj/structure/mopbucket/B in world)
|
||||||
var/turf/bl = get_turf(B)
|
var/turf/bl = get_turf(B)
|
||||||
if(bl)
|
if(bl)
|
||||||
if(bl.z != cl.z)
|
if(bl.z != cl.z)
|
||||||
continue
|
continue
|
||||||
@@ -487,8 +487,8 @@
|
|||||||
continue
|
continue
|
||||||
var/direction = get_dir(src,B)
|
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")
|
CbotData[++CbotData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.on ? "Online" : "Offline")
|
||||||
|
|
||||||
|
|
||||||
if(!CbotData.len)
|
if(!CbotData.len)
|
||||||
CbotData[++CbotData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
CbotData[++CbotData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
||||||
var/CartData[0]
|
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)
|
CartData[++CartData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.reagents.total_volume/100)
|
||||||
if(!CartData.len)
|
if(!CartData.len)
|
||||||
CartData[++CartData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
CartData[++CartData.len] = list("x" = 0, "y" = 0, dir=null, status = null)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -512,7 +512,7 @@
|
|||||||
values["janitor"] = JaniData
|
values["janitor"] = JaniData
|
||||||
|
|
||||||
return values
|
return values
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -525,8 +525,8 @@
|
|||||||
usr << browse(null, "window=pda")
|
usr << browse(null, "window=pda")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch(href_list["choice"])
|
switch(href_list["choice"])
|
||||||
if("Medical Records")
|
if("Medical Records")
|
||||||
@@ -577,10 +577,10 @@
|
|||||||
if("alert")
|
if("alert")
|
||||||
post_status("alert", href_list["alert"])
|
post_status("alert", href_list["alert"])
|
||||||
if("setmsg1")
|
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()
|
updateSelfDialog()
|
||||||
if("setmsg2")
|
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()
|
updateSelfDialog()
|
||||||
else
|
else
|
||||||
post_status(href_list["statdisp"])
|
post_status(href_list["statdisp"])
|
||||||
|
|||||||
Reference in New Issue
Block a user