mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 17:13:46 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into multi-instance-support
This commit is contained in:
@@ -423,6 +423,13 @@
|
||||
/datum/action/item_action/remove_badge
|
||||
name = "Remove Holobadge"
|
||||
|
||||
|
||||
// Clown Acrobat Shoes
|
||||
/datum/action/item_action/slipping
|
||||
name = "Tactical Slip"
|
||||
desc = "Activates the clown shoes' ankle-stimulating module, allowing the user to do a short slip forward going under anyone."
|
||||
button_icon_state = "clown"
|
||||
|
||||
// Jump boots
|
||||
/datum/action/item_action/bhop
|
||||
name = "Activate Jump Boots"
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* # Custom User Item
|
||||
*
|
||||
* Holder for CUIs
|
||||
*
|
||||
* This datum is a holder that is essentially a "model" of the `customuseritems`
|
||||
* database table, and is used for giving people their CUIs on spawn.
|
||||
* It is instanced as part of the client data loading framework on the client.
|
||||
*
|
||||
*/
|
||||
/datum/custom_user_item
|
||||
/// Can this be used on all characters?
|
||||
var/all_characters_allowed = FALSE
|
||||
/// Name of the character that can have this item.
|
||||
var/characer_name
|
||||
/// Are all jobs allowed?
|
||||
var/all_jobs_allowed = FALSE
|
||||
/// List of allowed jobs
|
||||
var/list/allowed_jobs = list()
|
||||
/// Custom item typepath
|
||||
var/object_typepath
|
||||
/// Custom item name override
|
||||
var/item_name_override
|
||||
/// Custom item description override
|
||||
var/item_desc_override
|
||||
/// Raw job mask
|
||||
var/raw_job_mask
|
||||
|
||||
|
||||
/**
|
||||
* CUI Info Parser
|
||||
*
|
||||
* Parses all the raw info into usable stuff, and also does validity checks
|
||||
* Returns TRUE if its a valid item, and FALSE if not
|
||||
*
|
||||
* Arguments:
|
||||
* * owning_ckey - Player who owns this item. Used for logging purposes.
|
||||
*/
|
||||
/datum/custom_user_item/proc/parse_info(owning_ckey)
|
||||
. = FALSE // Setting this here means it will return false even if it runtimes
|
||||
|
||||
// Sort path
|
||||
if(!object_typepath || !ispath(object_typepath))
|
||||
stack_trace("Incorrect database entry found in table 'customuseritems' path value is [object_typepath ? object_typepath : "(NULL)"], which doesnt exist. Ask the host to look at CUI entries for [owning_ckey]")
|
||||
return
|
||||
|
||||
// Sort job mask
|
||||
if(raw_job_mask == "*")
|
||||
all_jobs_allowed = TRUE
|
||||
else
|
||||
var/list/local_allowed_jobs = splittext(raw_job_mask, ",")
|
||||
for(var/i in 1 to length(local_allowed_jobs))
|
||||
if(istext(local_allowed_jobs[i]))
|
||||
local_allowed_jobs[i] = trim(local_allowed_jobs[i])
|
||||
|
||||
allowed_jobs = local_allowed_jobs
|
||||
|
||||
// Sort character name
|
||||
if(characer_name == "*")
|
||||
all_characters_allowed = TRUE
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/custom_user_item/vv_edit_var(var_name, var_value)
|
||||
return FALSE // fuck off
|
||||
+16
-3
@@ -19,6 +19,8 @@
|
||||
var/headers
|
||||
/// URL that the request is being sent to
|
||||
var/url
|
||||
/// If present, response body will be saved to this file.
|
||||
var/output_file
|
||||
/// The raw response, which will be decoeded into a [/datum/http_response]
|
||||
var/_raw_response
|
||||
/// Callback for executing after async requests. Will be called with an argument of [/datum/http_response] as first argument
|
||||
@@ -42,7 +44,7 @@ THE METHODS IN THIS FILE ARE TO BE USED BY THE SUBSYSTEM AS A MANGEMENT HUB
|
||||
* * _body - The body of the request, if applicable
|
||||
* * _headers - Associative list of HTTP headers to send, if applicab;e
|
||||
*/
|
||||
/datum/http_request/proc/prepare(_method, _url, _body = "", list/_headers)
|
||||
/datum/http_request/proc/prepare(_method, _url, _body = "", list/_headers, _output_file)
|
||||
if(!length(_headers))
|
||||
headers = ""
|
||||
else
|
||||
@@ -51,6 +53,7 @@ THE METHODS IN THIS FILE ARE TO BE USED BY THE SUBSYSTEM AS A MANGEMENT HUB
|
||||
method = _method
|
||||
url = _url
|
||||
body = _body
|
||||
output_file = _output_file
|
||||
|
||||
/**
|
||||
* Blocking executor
|
||||
@@ -60,7 +63,7 @@ THE METHODS IN THIS FILE ARE TO BE USED BY THE SUBSYSTEM AS A MANGEMENT HUB
|
||||
*/
|
||||
/datum/http_request/proc/execute_blocking()
|
||||
CRASH("Attempted to execute a blocking HTTP request")
|
||||
// _raw_response = rustg_http_request_blocking(method, url, body, headers)
|
||||
// _raw_response = rustg_http_request_blocking(method, url, body, headers, build_options())
|
||||
|
||||
/**
|
||||
* Async execution starter
|
||||
@@ -73,7 +76,7 @@ THE METHODS IN THIS FILE ARE TO BE USED BY THE SUBSYSTEM AS A MANGEMENT HUB
|
||||
if(in_progress)
|
||||
CRASH("Attempted to re-use a request object.")
|
||||
|
||||
id = rustg_http_request_async(method, url, body, headers)
|
||||
id = rustg_http_request_async(method, url, body, headers, build_options())
|
||||
|
||||
if(isnull(text2num(id)))
|
||||
_raw_response = "Proc error: [id]"
|
||||
@@ -81,6 +84,16 @@ THE METHODS IN THIS FILE ARE TO BE USED BY THE SUBSYSTEM AS A MANGEMENT HUB
|
||||
else
|
||||
in_progress = TRUE
|
||||
|
||||
/**
|
||||
* Options builder
|
||||
*
|
||||
* Builds options for if we want to download files with SShttp
|
||||
*/
|
||||
/datum/http_request/proc/build_options()
|
||||
if(output_file)
|
||||
return json_encode(list("output_filename" = output_file, "body_filename" = null))
|
||||
return null
|
||||
|
||||
/**
|
||||
* Async completion checker
|
||||
*
|
||||
|
||||
@@ -1456,6 +1456,12 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "shaft miner starter kit"
|
||||
|
||||
/datum/supply_packs/misc/carpet
|
||||
name = "Carpet Crate"
|
||||
cost = 20
|
||||
contains = list(/obj/item/stack/tile/carpet/twenty)
|
||||
containername = "carpet crate"
|
||||
|
||||
|
||||
///////////// Paper Work
|
||||
|
||||
|
||||
@@ -167,18 +167,19 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
//Clown
|
||||
/datum/uplink_item/jobspecific/clowngrenade
|
||||
name = "Banana Grenade"
|
||||
desc = "A grenade that explodes into HONK! brand banana peels that are genetically modified to be extra slippery and extrude caustic acid when stepped on"
|
||||
desc = "A grenade that explodes into HONK! brand banana peels that are genetically modified to be extra slippery and extrude caustic acid when stepped on."
|
||||
reference = "BG"
|
||||
item = /obj/item/grenade/clown_grenade
|
||||
cost = 5
|
||||
job = list("Clown")
|
||||
|
||||
/datum/uplink_item/jobspecific/clownmagboots
|
||||
name = "Clown Magboots"
|
||||
desc = "A pair of modified clown shoes fitted with an advanced magnetic traction system. Look and sound exactly like regular clown shoes unless closely inspected."
|
||||
reference = "CM"
|
||||
item = /obj/item/clothing/shoes/magboots/clown
|
||||
/datum/uplink_item/jobspecific/clownslippers
|
||||
name = "Clown Acrobatic Shoes"
|
||||
desc = "A pair of modified clown shoes fitted with a built-in propulsion system that allows the user to perform a short slip below anyone. Turning on the waddle dampeners removes the slowdown on the shoes."
|
||||
reference = "CAS"
|
||||
item = /obj/item/clothing/shoes/clown_shoes/slippers
|
||||
cost = 3
|
||||
surplus = 75
|
||||
job = list("Clown")
|
||||
|
||||
/datum/uplink_item/jobspecific/trick_revolver
|
||||
|
||||
Reference in New Issue
Block a user