Merge remote-tracking branch 'upstream/master' into wounds-part-2
This commit is contained in:
@@ -263,6 +263,14 @@
|
||||
time = 30
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_reinforcement_kit
|
||||
name = "Durathread Reinforcement Kit"
|
||||
result = /obj/item/armorkit
|
||||
reqs = list(/obj/item/stack/sheet/durathread = 4)
|
||||
tools = list(/obj/item/stack/sheet/mineral/titanium, TOOL_WIRECUTTER) // tough needle for a tough fabric
|
||||
time = 40
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_duffelbag
|
||||
name = "Durathread Dufflebag"
|
||||
result = /obj/item/storage/backpack/duffelbag/durathread
|
||||
|
||||
@@ -102,6 +102,15 @@ GLOBAL_LIST_EMPTY(uplinks)
|
||||
return //no hitting everyone/everything just to try to slot tcs in!
|
||||
if(istype(I, /obj/item/stack/telecrystal))
|
||||
LoadTC(user, I)
|
||||
if(active)
|
||||
if(I.GetComponent(/datum/component/uplink))
|
||||
var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink)
|
||||
var/amt = hidden_uplink.telecrystals
|
||||
hidden_uplink.telecrystals -= amt
|
||||
src.telecrystals += amt
|
||||
to_chat(user, "<span class='notice'>You connect the [I] to your uplink, siphoning [amt] telecrystals before quickly undoing the connection.")
|
||||
else
|
||||
return
|
||||
for(var/category in uplink_items)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/UI = uplink_items[category][item]
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/datum/http_request
|
||||
var/id
|
||||
var/in_progress = FALSE
|
||||
|
||||
var/method
|
||||
var/body
|
||||
var/headers
|
||||
var/url
|
||||
|
||||
var/_raw_response
|
||||
|
||||
/datum/http_request/proc/prepare(method, url, body = "", list/headers)
|
||||
if (!length(headers))
|
||||
headers = ""
|
||||
else
|
||||
headers = json_encode(headers)
|
||||
|
||||
src.method = method
|
||||
src.url = url
|
||||
src.body = body
|
||||
src.headers = headers
|
||||
|
||||
/datum/http_request/proc/execute_blocking()
|
||||
_raw_response = rustg_http_request_blocking(method, url, body, headers)
|
||||
|
||||
/datum/http_request/proc/begin_async()
|
||||
if (in_progress)
|
||||
CRASH("Attempted to re-use a request object.")
|
||||
|
||||
id = rustg_http_request_async(method, url, body, headers)
|
||||
|
||||
if (isnull(text2num(id)))
|
||||
stack_trace("Proc error: [id]")
|
||||
_raw_response = "Proc error: [id]"
|
||||
else
|
||||
in_progress = TRUE
|
||||
|
||||
/datum/http_request/proc/is_complete()
|
||||
if (isnull(id))
|
||||
return TRUE
|
||||
|
||||
if (!in_progress)
|
||||
return TRUE
|
||||
|
||||
var/r = rustg_http_check_request(id)
|
||||
|
||||
if (r == RUSTG_JOB_NO_RESULTS_YET)
|
||||
return FALSE
|
||||
else
|
||||
_raw_response = r
|
||||
in_progress = FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/http_request/proc/into_response()
|
||||
var/datum/http_response/R = new()
|
||||
|
||||
try
|
||||
var/list/L = json_decode(_raw_response)
|
||||
R.status_code = L["status_code"]
|
||||
R.headers = L["headers"]
|
||||
R.body = L["body"]
|
||||
catch
|
||||
R.errored = TRUE
|
||||
R.error = _raw_response
|
||||
|
||||
return R
|
||||
|
||||
/datum/http_response
|
||||
var/status_code
|
||||
var/body
|
||||
var/list/headers
|
||||
|
||||
var/errored = FALSE
|
||||
var/error
|
||||
@@ -44,11 +44,11 @@
|
||||
//Here we roll for our damage to be added into the damage var in the various attack procs. This is changed depending on whether we are in combat mode, lying down, or if our target is in combat mode.
|
||||
var/damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
|
||||
if(SEND_SIGNAL(D, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
|
||||
damage *= 1.5
|
||||
damage *= 1.2
|
||||
if(!CHECK_MOBILITY(A, MOBILITY_STAND))
|
||||
damage *= 0.5
|
||||
damage *= 0.7
|
||||
if(SEND_SIGNAL(A, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
|
||||
damage *= 0.25
|
||||
damage *= 0.8
|
||||
return damage
|
||||
|
||||
/datum/martial_art/proc/teach(mob/living/carbon/human/H, make_temporary = FALSE)
|
||||
|
||||
@@ -97,6 +97,21 @@
|
||||
duration = set_duration
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/off_balance
|
||||
id = "offbalance"
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/off_balance/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/off_balance/on_remove()
|
||||
var/active_item = owner.get_active_held_item()
|
||||
if(is_type_in_typecache(active_item, GLOB.shove_disarming_types))
|
||||
owner.visible_message("<span class='warning'>[owner.name] regains their grip on \the [active_item]!</span>", "<span class='warning'>You regain your grip on \the [active_item]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/status_effect/asleep
|
||||
name = "Asleep"
|
||||
desc = "You've fallen asleep. Wait a bit and you should wake up. Unless you don't, considering how helpless you are."
|
||||
|
||||
Reference in New Issue
Block a user