mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-20 10:37:17 +01:00
Merge remote-tracking branch 'upstream/master' into dutch-food
This commit is contained in:
@@ -97,10 +97,9 @@
|
||||
qdel(exist_query)
|
||||
else
|
||||
if(!exist_query.NextRow()) // If there isnt a row, they aint been seen before
|
||||
if(GLOB.panic_bunker_enabled)
|
||||
if(SSqueue?.queue_enabled && (length(GLOB.clients) > SSqueue.queue_threshold) && !(ckey in SSqueue.queue_bypass_list))
|
||||
qdel(exist_query)
|
||||
var/threshold = GLOB.configuration.general.panic_bunker_threshold
|
||||
return list("reason" = "panic bunker", "desc" = "Server is not accepting connections from never-before-seen players until player count is less than [threshold]. Please try again later.")
|
||||
return list("reason" = "server queue", "desc" = "You seem to have managed to skip the server queue, possibly due to connecting during a restart. Please reconnect in 10 minutes. If you still cannot connect, please inform the server host.")
|
||||
|
||||
qdel(exist_query)
|
||||
|
||||
|
||||
@@ -137,7 +137,9 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
|
||||
/client/proc/toggle_antagHUD_restrictions,
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/reset_ooc,
|
||||
/client/proc/set_next_map
|
||||
/client/proc/set_next_map,
|
||||
/client/proc/manage_queue,
|
||||
/client/proc/add_queue_server_bypass
|
||||
))
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/client/proc/manage_queue()
|
||||
set name = "Manage Queue Server"
|
||||
set desc = "Manage the queue server and its settings"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
var/list/choices = list("Show Status", "Toggle Queue Server", "Set Threshold", "Toggle Setting Persistence")
|
||||
var/choice = input(usr, "Please, select an option", "Queue Server Manipulation") as null|anything in choices
|
||||
|
||||
switch(choice)
|
||||
if("Show Status")
|
||||
to_chat(usr, "<b>Queue Server Status</b>")
|
||||
to_chat(usr, "Enabled: <b>[SSqueue.queue_enabled ? "<font color='green'>Yes</font>" : "<font color='red'>No</font>"]</b>")
|
||||
to_chat(usr, "Queue Threshold: <b>[SSqueue.queue_threshold]</b>")
|
||||
to_chat(usr, "Setting Persistence: <b>[SSqueue.persist_queue ? "<font color='green'>Yes</font>" : "<font color='red'>No</font>"]</b>")
|
||||
if("Toggle Queue Server")
|
||||
SSqueue.queue_enabled = !SSqueue.queue_enabled
|
||||
to_chat(usr, "Queue server is now <b>[SSqueue.queue_enabled ? "<font color='green'>Enabled</font>" : "<font color='red'>Disabled</font>"]</b>")
|
||||
message_admins("[key_name_admin(usr)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
|
||||
log_admin("[key_name(usr)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
|
||||
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.queue_enabled ? "enabled" : "disabled"]** the queue server.")
|
||||
if("Set Threshold")
|
||||
var/new_threshold = input(usr, "Enter new threshold", "Queue Server Manipulation", SSqueue.queue_threshold) as num|null
|
||||
if(!new_threshold)
|
||||
return
|
||||
SSqueue.queue_threshold = new_threshold
|
||||
to_chat(usr, "Queue threshold is now <b>[SSqueue.queue_threshold]</b>")
|
||||
message_admins("[key_name_admin(usr)] has set the queue threshold to [SSqueue.queue_threshold].")
|
||||
log_admin("[key_name(usr)] has set the queue threshold to [SSqueue.queue_threshold].")
|
||||
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has set the queue threshold to **[SSqueue.queue_threshold]**.")
|
||||
if("Toggle Setting Persistence")
|
||||
SSqueue.persist_queue = !SSqueue.persist_queue
|
||||
to_chat(usr, "Queue server setting persistence is now <b>[SSqueue.persist_queue ? "<font color='green'>Enabled</font>" : "<font color='red'>Disabled</font>"]</b>")
|
||||
message_admins("[key_name_admin(usr)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
|
||||
log_admin("[key_name(usr)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
|
||||
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.persist_queue ? "enabled" : "disabled"]** server queue settings persistence.")
|
||||
|
||||
/client/proc/add_queue_server_bypass()
|
||||
set name = "Add Queue Server Bypass"
|
||||
set desc = "Allow a ckey to bypass the server queue"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
var/bypass_ckey = input(usr, "Please, enter a ckey", "Queue Server Bypass")
|
||||
|
||||
if(!bypass_ckey)
|
||||
return
|
||||
|
||||
var/clean_ckey = ckey(bypass_ckey)
|
||||
|
||||
if(!clean_ckey)
|
||||
to_chat(usr, "Invalid ckey supplied")
|
||||
return
|
||||
|
||||
SSqueue.queue_bypass_list.Add(clean_ckey)
|
||||
message_admins("[key_name_admin(usr)] has added the ckey [clean_ckey] to the queue bypass list.")
|
||||
log_admin("[key_name(usr)] has added the ckey [clean_ckey] to the queue bypass list.")
|
||||
@@ -379,23 +379,15 @@
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
|
||||
// Update the state of the panic bunker based on current playercount
|
||||
var/threshold = GLOB.configuration.general.panic_bunker_threshold
|
||||
|
||||
if((playercount > threshold) && (GLOB.panic_bunker_enabled == FALSE))
|
||||
GLOB.panic_bunker_enabled = TRUE
|
||||
message_admins("Panic bunker has been automatically enabled due to playercount rising above [threshold]")
|
||||
|
||||
if((playercount < threshold) && (GLOB.panic_bunker_enabled == TRUE))
|
||||
GLOB.panic_bunker_enabled = FALSE
|
||||
message_admins("Panic bunker has been automatically disabled due to playercount dropping below [threshold]")
|
||||
|
||||
// Tell clients about active testmerges
|
||||
if(world.TgsAvailable() && length(GLOB.revision_info.testmerges))
|
||||
to_chat(src, GLOB.revision_info.get_testmerge_chatmessage(TRUE))
|
||||
|
||||
INVOKE_ASYNC(src, .proc/cid_count_check)
|
||||
|
||||
if(check_rights(R_ADMIN, FALSE, mob)) // Mob is required. Dont even try without it.
|
||||
to_chat(src, "The queue server is currently [SSqueue.queue_enabled ? "<font color='green'>enabled</font>" : "<font color='disabled'>disabled</font>"], with a threshold of <b>[SSqueue.queue_threshold]</b>. This <b>[SSqueue.persist_queue ? "will" : "will not"]</b> persist through rounds.")
|
||||
|
||||
|
||||
/client/proc/is_connecting_from_localhost()
|
||||
var/localhost_addresses = list("127.0.0.1", "::1") // Adresses
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
name = "meatbread slice"
|
||||
desc = "A slice of delicious meatbread."
|
||||
icon_state = "meatbreadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#FF7575"
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/sliceable/xenomeatbread
|
||||
@@ -34,7 +33,6 @@
|
||||
name = "xenomeatbread slice"
|
||||
desc = "A slice of delicious meatbread. Extra Heretical."
|
||||
icon_state = "xenobreadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#8AFF75"
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/sliceable/spidermeatbread
|
||||
@@ -49,8 +47,7 @@
|
||||
/obj/item/reagent_containers/food/snacks/spidermeatbreadslice
|
||||
name = "spider meat bread slice"
|
||||
desc = "A slice of meatloaf made from an animal that most likely still wants you dead."
|
||||
icon_state = "xenobreadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
icon_state = "spidermeatslice"
|
||||
list_reagents = list("toxin" = 2)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/sliceable/bananabread
|
||||
@@ -67,7 +64,6 @@
|
||||
name = "banana-nut bread slice"
|
||||
desc = "A slice of delicious banana bread."
|
||||
icon_state = "bananabreadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#EDE5AD"
|
||||
tastes = list("bread" = 10)
|
||||
|
||||
@@ -85,7 +81,6 @@
|
||||
name = "tofubread slice"
|
||||
desc = "A slice of delicious tofubread."
|
||||
icon_state = "tofubreadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#F7FFE0"
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/sliceable/bread
|
||||
@@ -102,7 +97,6 @@
|
||||
name = "bread slice"
|
||||
desc = "A slice of home."
|
||||
icon_state = "breadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#D27332"
|
||||
list_reagents = list("nutriment" = 2, "bread" = 5)
|
||||
tastes = list("bread" = 10)
|
||||
@@ -121,7 +115,6 @@
|
||||
name = "cream cheese bread slice"
|
||||
desc = "A slice of yum!"
|
||||
icon_state = "creamcheesebreadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#FFF896"
|
||||
list_reagents = list("nutriment" = 4, "vitamin" = 1)
|
||||
tastes = list("bread" = 10, "cheese" = 10)
|
||||
@@ -140,7 +133,6 @@
|
||||
name = "banarnarbread slice"
|
||||
desc = "A slice of delicious mah'weyh pleggh at e'ntrath!"
|
||||
icon_state = "banarnarbreadslice"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#6F0000"
|
||||
list_reagents = list("nutriment" = 4, "vitamin" = 1)
|
||||
tastes = list("heresy" = 10, "banana" = 10)
|
||||
@@ -200,7 +192,6 @@
|
||||
name = "jellied toast"
|
||||
desc = "A slice of bread covered with delicious jam."
|
||||
icon_state = "jellytoast"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#B572AB"
|
||||
bitesize = 3
|
||||
tastes = list("toast" = 1, "jelly" = 1)
|
||||
|
||||
@@ -165,7 +165,6 @@
|
||||
name = "sandwich"
|
||||
desc = "A grand creation of meat, cheese, bread, and several leaves of lettuce! Arthur Dent would be proud."
|
||||
icon_state = "sandwich"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#D9BE29"
|
||||
list_reagents = list("nutriment" = 6, "vitamin" = 1)
|
||||
tastes = list("meat" = 2, "cheese" = 1, "bread" = 2, "lettuce" = 1)
|
||||
@@ -174,7 +173,6 @@
|
||||
name = "toasted sandwich"
|
||||
desc = "Now if you only had a pepper bar."
|
||||
icon_state = "toastedsandwich"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#D9BE29"
|
||||
list_reagents = list("nutriment" = 6, "carbon" = 2)
|
||||
tastes = list("toast" = 1)
|
||||
@@ -183,7 +181,6 @@
|
||||
name = "grilled cheese sandwich"
|
||||
desc = "Goes great with tomato soup!"
|
||||
icon_state = "toastedsandwich"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#D9BE29"
|
||||
list_reagents = list("nutriment" = 7, "vitamin" = 1) //why make a regualr sandwhich when you can make grilled cheese, with this nutriment value?
|
||||
tastes = list("toast" = 1, "grilled cheese" = 1)
|
||||
@@ -192,7 +189,6 @@
|
||||
name = "jelly sandwich"
|
||||
desc = "You wish you had some peanut butter to go with this..."
|
||||
icon_state = "jellysandwich"
|
||||
trash = /obj/item/trash/plate
|
||||
filling_color = "#9E3A78"
|
||||
bitesize = 3
|
||||
tastes = list("toast" = 1, "jelly" = 1)
|
||||
|
||||
@@ -10,6 +10,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "fax"
|
||||
insert_anim = "faxsend"
|
||||
var/receive_anim = "faxsend"
|
||||
pass_flags = PASSTABLE
|
||||
var/fax_network = "Local Fax Network"
|
||||
/// If true, prevents fax machine from sending messages to NT machines
|
||||
@@ -51,11 +52,17 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/longrange
|
||||
name = "long range fax machine"
|
||||
icon_state = "longfax"
|
||||
insert_anim = "longfaxsend"
|
||||
receive_anim = "longfaxreceive"
|
||||
fax_network = "Central Command Quantum Entanglement Network"
|
||||
long_range_enabled = TRUE
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/longrange/syndie
|
||||
name = "syndicate long range fax machine"
|
||||
icon_state = "fax"
|
||||
insert_anim = "faxsend"
|
||||
receive_anim = "faxsend"
|
||||
emagged = TRUE
|
||||
syndie_restricted = TRUE
|
||||
req_one_access = list(ACCESS_SYNDICATE)
|
||||
@@ -293,7 +300,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
if(department == "Unknown")
|
||||
return FALSE //You can't send faxes to "Unknown"
|
||||
|
||||
flick("faxreceive", src)
|
||||
flick(receive_anim, src)
|
||||
|
||||
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
var/knife_x_offset = 0
|
||||
var/knife_y_offset = 0
|
||||
|
||||
var/can_holster = TRUE
|
||||
var/can_holster = FALSE // Anything that can be holstered should be manually set
|
||||
|
||||
var/list/upgrades = list()
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
|
||||
actions_types = list(/datum/action/item_action/toggle_gunlight)
|
||||
shaded_charge = FALSE
|
||||
can_holster = TRUE // Pistol sized, so it should fit into a holster
|
||||
|
||||
/obj/item/gun/energy/gun/mini/Initialize(mapload, ...)
|
||||
gun_light = new /obj/item/flashlight/seclite(src)
|
||||
@@ -57,6 +58,7 @@
|
||||
ammo_x_offset = 4
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
shaded_charge = FALSE
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/energy/gun/blueshield
|
||||
name = "advanced stun revolver"
|
||||
@@ -67,6 +69,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos)
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = TRUE
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/energy/gun/blueshield/pdw9
|
||||
name = "PDW-9 taser pistol"
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
origin_tech = "combat=4;materials=4;biotech=5;plasmatech=6"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/declone)
|
||||
ammo_x_offset = 1
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/energy/decloner/update_icon()
|
||||
..()
|
||||
@@ -56,6 +57,7 @@
|
||||
modifystate = 1
|
||||
ammo_x_offset = 1
|
||||
selfcharge = 1
|
||||
can_holster = TRUE
|
||||
|
||||
// Meteor Gun //
|
||||
/obj/item/gun/energy/meteorgun
|
||||
@@ -109,6 +111,7 @@
|
||||
can_flashlight = 0
|
||||
max_mod_capacity = 0
|
||||
empty_state = null
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/detailed_examine()
|
||||
return "This is an energy weapon. To fire the weapon, have your gun mode set to 'fire', \
|
||||
@@ -159,6 +162,7 @@
|
||||
force = 12
|
||||
sharp = 1
|
||||
can_charge = 0
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -297,6 +301,7 @@
|
||||
clumsy_check = 0
|
||||
selfcharge = 1
|
||||
ammo_x_offset = 3
|
||||
can_holster = TRUE // you'll never see it coming
|
||||
|
||||
/obj/item/gun/energy/toxgun
|
||||
name = "plasma pistol"
|
||||
@@ -308,6 +313,7 @@
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/toxplasma)
|
||||
shaded_charge = 1
|
||||
can_holster = TRUE
|
||||
|
||||
// Energy Sniper //
|
||||
/obj/item/gun/energy/sniperrifle
|
||||
@@ -636,6 +642,7 @@
|
||||
selfcharge = 1
|
||||
ammo_x_offset = 3
|
||||
var/mimic_type = /obj/item/gun/projectile/automatic/pistol //Setting this to the mimicgun type does exactly what you think it will.
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/energy/mimicgun/newshot()
|
||||
var/obj/item/ammo_casing/energy/mimic/M = ammo_type[select]
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
origin_tech = "combat=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 3
|
||||
can_holster = TRUE // Pistol size
|
||||
|
||||
/obj/item/gun/energy/shock_revolver
|
||||
name = "tesla revolver"
|
||||
@@ -16,6 +17,8 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/shock_revolver)
|
||||
can_flashlight = 0
|
||||
shaded_charge = FALSE
|
||||
can_holster = TRUE
|
||||
|
||||
|
||||
/obj/item/gun/energy/gun/advtaser
|
||||
name = "hybrid taser"
|
||||
@@ -26,6 +29,7 @@
|
||||
ammo_x_offset = 2
|
||||
flight_x_offset = 15
|
||||
shaded_charge = FALSE
|
||||
can_holster = TRUE // Pistol size
|
||||
|
||||
/obj/item/gun/energy/gun/advtaser/detailed_examine()
|
||||
return "This is an energy weapon. To recharge this weapon, use a weapon recharger. \
|
||||
@@ -49,6 +53,7 @@
|
||||
origin_tech = "combat=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 3
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
origin_tech = null
|
||||
clumsy_check = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
|
||||
can_holster = FALSE // Nothing here is a gun, and therefore shouldn't really fit into a holster
|
||||
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
var/select = 1
|
||||
can_tactical = TRUE
|
||||
can_suppress = 1
|
||||
can_holster = FALSE
|
||||
burst_size = 3
|
||||
fire_delay = 2
|
||||
actions_types = list(/datum/action/item_action/toggle_firemode)
|
||||
@@ -143,6 +142,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/uzim9mm
|
||||
fire_sound = 'sound/weapons/gunshots/gunshot_pistol.ogg'
|
||||
burst_size = 2
|
||||
can_holster = TRUE // it's a mini-uzi after all
|
||||
|
||||
//M-90gl Carbine//
|
||||
/obj/item/gun/projectile/automatic/m90
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/grenadelauncher
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
can_holster = FALSE // Not your normal revolver
|
||||
|
||||
/obj/item/gun/projectile/revolver/grenadelauncher/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder
|
||||
origin_tech = "combat=3;materials=2"
|
||||
fire_sound = 'sound/weapons/gunshots/gunshot_strong.ogg'
|
||||
can_holster = TRUE
|
||||
|
||||
/obj/item/gun/projectile/revolver/New()
|
||||
..()
|
||||
@@ -158,6 +159,7 @@
|
||||
fire_sound_text = null
|
||||
lefthand_file = null
|
||||
righthand_file = null
|
||||
can_holster = FALSE // Get your fingers out of there!
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
clumsy_check = 0 //Stole your uplink! Honk!
|
||||
needs_permit = 0 //go away beepsky
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
can_suppress = 0
|
||||
burst_size = 1
|
||||
fire_delay = 0
|
||||
can_holster = TRUE
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/update_icon()
|
||||
@@ -42,8 +43,8 @@
|
||||
..()
|
||||
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/enforcer
|
||||
name = "Foam Enforcer"
|
||||
desc = "A foam shooting version of the Enforcer meant to be used for training new caddets who can't be trusted with rubber bullets."
|
||||
name = "foam Enforcer"
|
||||
desc = "A foam-shooting version of the Enforcer meant to be used for training new cadets who can't be trusted with rubber bullets."
|
||||
icon_state = "enforcer"
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/enforcer
|
||||
can_flashlight = TRUE
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
var/recharge_counter = 0
|
||||
var/hackedcheck = FALSE
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/image/icon_beaker = null //cached overlay
|
||||
var/list/dispensable_reagents = list("hydrogen", "lithium", "carbon", "nitrogen", "oxygen", "fluorine",
|
||||
"sodium", "aluminum", "silicon", "phosphorus", "sulfur", "chlorine", "potassium", "iron",
|
||||
"copper", "mercury", "plasma", "radium", "water", "ethanol", "sugar", "iodine", "bromine", "silver", "chromium")
|
||||
@@ -130,6 +129,15 @@
|
||||
else
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/chem_dispenser/update_icon()
|
||||
if(panel_open)
|
||||
icon_state = "[initial(icon_state)]-o"
|
||||
return
|
||||
if(!powered() && !is_drink)
|
||||
icon_state = "dispenser_nopower"
|
||||
return
|
||||
icon_state = "[initial(icon_state)][beaker ? "_working" : ""]"
|
||||
|
||||
/obj/machinery/chem_dispenser/ex_act(severity)
|
||||
if(severity < 3)
|
||||
if(beaker)
|
||||
@@ -140,7 +148,6 @@
|
||||
..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
overlays.Cut()
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
@@ -204,11 +211,6 @@
|
||||
atom_say("Not enough energy to complete operation!")
|
||||
return
|
||||
R.add_reagent(params["reagent"], actual)
|
||||
overlays.Cut()
|
||||
if(!icon_beaker)
|
||||
icon_beaker = mutable_appearance('icons/obj/chemical.dmi', "disp_beaker") //randomize beaker overlay position.
|
||||
icon_beaker.pixel_x = rand(-10, 5)
|
||||
overlays += icon_beaker
|
||||
if("remove")
|
||||
var/amount = text2num(params["amount"])
|
||||
if(!beaker || !amount)
|
||||
@@ -226,7 +228,7 @@
|
||||
if(Adjacent(usr) && !issilicon(usr))
|
||||
usr.put_in_hands(beaker)
|
||||
beaker = null
|
||||
overlays.Cut()
|
||||
update_icon()
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -255,10 +257,7 @@
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You set [I] on the machine.</span>")
|
||||
SStgui.update_uis(src) // update all UIs attached to src
|
||||
if(!icon_beaker)
|
||||
icon_beaker = mutable_appearance('icons/obj/chemical.dmi', "disp_beaker") //randomize beaker overlay position.
|
||||
icon_beaker.pixel_x = rand(-10, 5)
|
||||
overlays += icon_beaker
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
underlays += filling
|
||||
|
||||
if(!is_open_container())
|
||||
var/image/lid = image(icon, src, "lid_bottle")
|
||||
var/image/lid = image(icon, src, "lid_[icon_state]")
|
||||
overlays += lid
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/datum/world_topic_handler/queue_status
|
||||
topic_key = "queue_status"
|
||||
requires_commskey = TRUE
|
||||
|
||||
// This topic is sent every 10 seconds from the bouncer
|
||||
/datum/world_topic_handler/queue_status/execute(list/input, key_valid)
|
||||
var/ckey_check = input["ckey_check"]
|
||||
|
||||
if(!ckey_check)
|
||||
return json_encode(list("error" = "No ckey supplied"))
|
||||
|
||||
var/list/output_data = list()
|
||||
output_data["queue_enabled"] = SSqueue.queue_enabled
|
||||
|
||||
// Decide whether we should hold the player in queue
|
||||
// NOTE: We only queue never seen before players
|
||||
if(SSqueue.queue_enabled)
|
||||
// If they are in the bypass list, let em in
|
||||
if(ckey_check in SSqueue.queue_bypass_list)
|
||||
output_data["allow_player"] = TRUE
|
||||
else // Otherwise
|
||||
// If we have more than the threshold, queue
|
||||
if(length(GLOB.clients) > SSqueue.queue_threshold)
|
||||
output_data["allow_player"] = FALSE
|
||||
else // We have less than the threshold, allow if were in the timeframe
|
||||
if(world.time > (SSqueue.last_letin_time + 3 SECONDS))
|
||||
output_data["allow_player"] = TRUE
|
||||
SSqueue.last_letin_time = world.time
|
||||
else
|
||||
output_data["allow_player"] = FALSE
|
||||
|
||||
else
|
||||
// We arent enabled. Just let them in anyway.
|
||||
output_data["allow_player"] = TRUE
|
||||
|
||||
return json_encode(output_data)
|
||||
Reference in New Issue
Block a user