Merge remote-tracking branch 'origin/master' into TGUI-4

This commit is contained in:
Letter N
2020-08-04 09:31:34 +08:00
94 changed files with 5367 additions and 4268 deletions
@@ -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
+91
View File
@@ -0,0 +1,91 @@
/**
* KILLER QUEEN
*
* Simple contact bomb component
* Blows up the first person to touch it.
*/
/datum/component/killerqueen
can_transfer = TRUE
/// strength of explosion on the touch-er. 0 to disable. usually only used if the normal explosion is disabled (this is the default).
var/ex_strength = EXPLODE_HEAVY
/// callback to invoke with (parent, victim) before standard detonation - useful for losing a reference to this component or implementing custom behavior. return FALSE to prevent explosion.
var/datum/callback/pre_explode
/// callback to invoke with (parent) when deleting without an explosion
var/datum/callback/failure
/// did we explode
var/exploded = FALSE
/// examine message
var/examine_message
/// light explosion radius
var/light = 0
/// heavy explosion radius
var/heavy = 0
/// dev explosion radius
var/dev = 0
/// flame explosion radius
var/flame = 0
/// only triggered by living mobs
var/living_only = TRUE
/datum/component/killerqueen/Initialize(ex_strength = EXPLODE_HEAVY, datum/callback/pre_explode, datum/callback/failure, examine_message, light = 0, heavy = 0, dev = 0, flame = 0, living_only = TRUE)
. = ..()
if(. & COMPONENT_INCOMPATIBLE)
return
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
src.ex_strength = ex_strength
src.pre_explode = pre_explode
src.failure = failure
src.examine_message = examine_message
src.light = light
src.heavy = heavy
src.dev = dev
src.flame = flame
src.living_only = living_only
/datum/component/killerqueen/Destroy()
if(!exploded)
failure?.Invoke(parent)
return ..()
/datum/component/killerqueen/RegisterWithParent()
. = ..()
RegisterSignal(parent, list(COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_ATTACK_PAW, COMSIG_ATOM_ATTACK_ANIMAL), .proc/touch_detonate)
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/bump_detonate)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/attackby_detonate)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
/datum/component/killerqueen/UnregisterFromParent()
. = ..()
UnregisterSignal(parent, list(COMSIG_ATOM_ATTACK_ANIMAL, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_ATTACK_PAW,
COMSIG_MOVABLE_BUMP, COMSIG_PARENT_ATTACKBY, COMSIG_PARENT_EXAMINE))
/datum/component/killerqueen/proc/attackby_detonate(datum/source, obj/item/I, mob/user)
detonate(user)
/datum/component/killerqueen/proc/bump_detonate(datum/source, atom/A)
detonate(A)
/datum/component/killerqueen/proc/touch_detonate(datum/source, mob/user)
detonate(user)
/datum/component/killerqueen/proc/on_examine(datum/source, mob/examiner, list/examine_return)
if(examine_message)
examine_return += examine_message
/datum/component/killerqueen/proc/detonate(atom/victim)
if(!isliving(victim) && living_only)
return
if(pre_explode && !pre_explode.Invoke(parent, victim))
return
if(ex_strength)
victim.ex_act(ex_strength)
if(light || heavy || dev || flame)
explosion(parent, dev, heavy, light, flame_range = flame)
else
var/turf/T = get_turf(parent)
playsound(T, 'sound/effects/explosion2.ogg', 200, 1)
new /obj/effect/temp_visual/explosion(T)
exploded = TRUE
qdel(src)
+9
View File
@@ -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]