mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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"])
|
||||
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
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)
|
||||
if(stack && stack.amount)
|
||||
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user