mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge branch 'master' into upstream-merge-10764
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
to_chat(user, SPAN_WARNING("You are banned from leaving persistent information across rounds."))
|
||||
return
|
||||
|
||||
var/_message = sanitize(input("Enter an additional message to engrave.", "Graffiti") as null|text, trim = TRUE)
|
||||
var/_message = sanitize(input(usr, "Enter an additional message to engrave.", "Graffiti") as null|text, trim = TRUE)
|
||||
if(_message && loc && user && !user.incapacitated() && user.Adjacent(loc) && thing.loc == user)
|
||||
user.visible_message("<span class='warning'>\The [user] begins carving something into \the [loc].</span>")
|
||||
if(do_after(user, max(20, length(_message)), src) && loc)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
/obj/structure/noticeboard/attackby(obj/item/I, mob/user)
|
||||
if(I.is_screwdriver())
|
||||
var/choice = input("Which direction do you wish to place the noticeboard?", "Noticeboard Offset") as null|anything in list("North", "South", "East", "West", "No Offset")
|
||||
var/choice = tgui_input_list(usr, "Which direction do you wish to place the noticeboard?", "Noticeboard Offset", list("North", "South", "East", "West", "No Offset"))
|
||||
if(choice && Adjacent(user) && I.loc == user && !user.incapacitated())
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
switch(choice)
|
||||
|
||||
@@ -51,14 +51,8 @@
|
||||
|
||||
// Delete some stacks if we want
|
||||
if(stacks_go_missing)
|
||||
var/fuzzy = rand(-5,5)
|
||||
switch(count / max_amount)
|
||||
if(0 to 1)
|
||||
count -= 10+fuzzy // 1 stack or less, lose 10
|
||||
if(1 to 10)
|
||||
count -= max_amount+fuzzy // 1 to 10 stacks, lose a stack
|
||||
if(10 to INFINITY)
|
||||
count -= max_amount*3+fuzzy // 10+ stacks, lose 3 stacks
|
||||
var/fuzzy = rand(55,65)
|
||||
count = round(count*0.01*fuzzy) // loss of 35-45% with rounding down
|
||||
if(count <= 0)
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user