Merge remote-tracking branch 'refs/remotes/Citadel-Station-13/master' into donoritemmodularization
# Conflicts: # code/citadel/custom_loadout/custom_items.dm # code/datums/components/riding.dm # code/game/objects/items/implants/implantuplink.dm # icons/mob/neck.dmi # icons/obj/clothing/cloaks.dmi
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
var/datum/objective/escape/escape_objective = new
|
||||
escape_objective.owner = owner
|
||||
objectives += escape_objective
|
||||
|
||||
|
||||
if(31 to 60)
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = owner
|
||||
@@ -103,8 +103,8 @@
|
||||
if (!(locate(/datum/objective/hijack) in owner.objectives))
|
||||
var/datum/objective/hijack/hijack_objective = new
|
||||
hijack_objective.owner = owner
|
||||
objectives += hijack_objective
|
||||
|
||||
objectives += hijack_objective
|
||||
|
||||
for(var/datum/objective/O in objectives)
|
||||
owner.objectives += O
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
if(H.age < wiz_age)
|
||||
H.age = wiz_age
|
||||
H.equipOutfit(outfit_type)
|
||||
|
||||
|
||||
/datum/antagonist/wizard/greet()
|
||||
to_chat(owner, "<span class='boldannounce'>You are the Space Wizard!</span>")
|
||||
to_chat(owner, "<B>The Space Wizards Federation has given you the following tasks:</B>")
|
||||
@@ -204,11 +204,11 @@
|
||||
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/forcewall(null))
|
||||
H.put_in_hands(new /obj/item/gun/magic/staff/healing(H))
|
||||
to_chat(owner, "<B>Your service has not gone unrewarded, however. Studying under [master.current.real_name], you have learned livesaving survival spells. You are able to cast charge and forcewall.")
|
||||
if(APPRENTICE_HEALING)
|
||||
if(APPRENTICE_ROBELESS)
|
||||
owner.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
|
||||
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/mind_transfer(null))
|
||||
to_chat(owner, "<B>Your service has not gone unrewarded, however. Studying under [master.current.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap.")
|
||||
|
||||
|
||||
/datum/antagonist/wizard/apprentice/create_objectives()
|
||||
var/datum/objective/protect/new_objective = new /datum/objective/protect
|
||||
new_objective.owner = owner
|
||||
@@ -221,6 +221,7 @@
|
||||
/datum/antagonist/wizard/apprentice/imposter
|
||||
name = "Wizard Imposter"
|
||||
allow_rename = FALSE
|
||||
move_to_lair = FALSE
|
||||
|
||||
/datum/antagonist/wizard/apprentice/imposter/greet()
|
||||
to_chat(owner, "<B>You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!</B>")
|
||||
@@ -266,7 +267,7 @@
|
||||
|
||||
/datum/antagonist/wizard/academy/equip_wizard()
|
||||
. = ..()
|
||||
|
||||
|
||||
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt)
|
||||
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile)
|
||||
owner.AddSpell(new /obj/effect/proc_holder/spell/aimed/fireball)
|
||||
@@ -274,7 +275,7 @@
|
||||
var/mob/living/M = owner.current
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/implant/exile/Implant = new/obj/item/implant/exile(M)
|
||||
Implant.implant(M)
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
if(!isnum(dupe_mode))
|
||||
qdel(src)
|
||||
CRASH("[type]: Invalid dupe_mode!")
|
||||
if(dupe_type && !ispath(dupe_type))
|
||||
var/dt = dupe_type
|
||||
if(dt && !ispath(dt))
|
||||
qdel(src)
|
||||
CRASH("[type]: Invalid dupe_type!")
|
||||
|
||||
parent = P
|
||||
var/list/arguments = args.Copy()
|
||||
arguments.Cut(1, 2)
|
||||
var/list/arguments = args.Copy(2)
|
||||
if(Initialize(arglist(arguments)) == COMPONENT_INCOMPATIBLE)
|
||||
qdel(src, TRUE, TRUE)
|
||||
return
|
||||
@@ -142,10 +142,6 @@
|
||||
/datum/component/proc/OnTransfer(datum/new_parent)
|
||||
return
|
||||
|
||||
/datum/component/proc/AfterComponentActivated()
|
||||
set waitfor = FALSE
|
||||
return
|
||||
|
||||
/datum/component/proc/_GetInverseTypeList(our_type = type)
|
||||
#if DM_VERSION >= 513
|
||||
#warning 512 is definitely stable now, remove the old code
|
||||
@@ -167,8 +163,7 @@
|
||||
var/list/comps = datum_components
|
||||
if(!comps)
|
||||
return NONE
|
||||
var/list/arguments = args.Copy()
|
||||
arguments.Cut(1, 2)
|
||||
var/list/arguments = args.Copy(2)
|
||||
var/target = comps[/datum/component]
|
||||
if(!length(target))
|
||||
var/datum/component/C = target
|
||||
@@ -177,28 +172,16 @@
|
||||
var/datum/callback/CB = C.signal_procs[sigtype]
|
||||
if(!CB)
|
||||
return NONE
|
||||
. = CB.InvokeAsync(arglist(arguments))
|
||||
if(. & COMPONENT_ACTIVATED)
|
||||
ComponentActivated(C)
|
||||
C.AfterComponentActivated()
|
||||
else
|
||||
. = NONE
|
||||
for(var/I in target)
|
||||
var/datum/component/C = I
|
||||
if(!C.enabled)
|
||||
continue
|
||||
var/datum/callback/CB = C.signal_procs[sigtype]
|
||||
if(!CB)
|
||||
continue
|
||||
var/retval = CB.InvokeAsync(arglist(arguments))
|
||||
. |= retval
|
||||
if(retval & COMPONENT_ACTIVATED)
|
||||
ComponentActivated(C)
|
||||
C.AfterComponentActivated()
|
||||
|
||||
/datum/proc/ComponentActivated(datum/component/C)
|
||||
set waitfor = FALSE
|
||||
return
|
||||
return CB.InvokeAsync(arglist(arguments))
|
||||
. = NONE
|
||||
for(var/I in target)
|
||||
var/datum/component/C = I
|
||||
if(!C.enabled)
|
||||
continue
|
||||
var/datum/callback/CB = C.signal_procs[sigtype]
|
||||
if(!CB)
|
||||
continue
|
||||
. |= CB.InvokeAsync(arglist(arguments))
|
||||
|
||||
/datum/proc/GetComponent(c_type)
|
||||
var/list/dc = datum_components
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
var/list/archdrops
|
||||
var/prob2drop
|
||||
var/dug
|
||||
var/datum/callback/callback
|
||||
|
||||
/datum/component/archaeology/Initialize(_prob2drop, list/_archdrops = list())
|
||||
/datum/component/archaeology/Initialize(_prob2drop, list/_archdrops = list(), datum/callback/_callback)
|
||||
prob2drop = Clamp(_prob2drop, 0, 100)
|
||||
archdrops = _archdrops
|
||||
callback = _callback
|
||||
RegisterSignal(COMSIG_PARENT_ATTACKBY,.proc/Dig)
|
||||
RegisterSignal(COMSIG_ATOM_EX_ACT, .proc/BombDig)
|
||||
RegisterSignal(COMSIG_ATOM_SING_PULL, .proc/SingDig)
|
||||
@@ -67,6 +69,8 @@
|
||||
if(OT.slowdown) //Things like snow slow you down until you dig them.
|
||||
OT.slowdown = 0
|
||||
dug = TRUE
|
||||
if(callback)
|
||||
callback.Invoke()
|
||||
|
||||
/datum/component/archaeology/proc/SingDig(S, current_size)
|
||||
switch(current_size)
|
||||
|
||||
@@ -9,5 +9,4 @@
|
||||
var/mob/living/carbon/victim = AM
|
||||
if(istype(victim))
|
||||
for(var/datum/disease/D in diseases)
|
||||
victim.ContactContractDisease(D, "feet")
|
||||
return COMPONENT_ACTIVATED
|
||||
victim.ContactContractDisease(D, "feet")
|
||||
@@ -16,20 +16,19 @@
|
||||
var/list/materials
|
||||
var/show_on_examine
|
||||
var/list/allowed_typecache
|
||||
var/last_inserted_type
|
||||
var/last_inserted_id
|
||||
var/last_amount_inserted
|
||||
var/last_insert_success
|
||||
var/precise_insertion = FALSE
|
||||
var/datum/callback/precondition
|
||||
var/datum/callback/after_insert
|
||||
|
||||
/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition)
|
||||
/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition, datum/callback/_after_insert)
|
||||
materials = list()
|
||||
max_amount = max(0, max_amt)
|
||||
show_on_examine = _show_on_examine
|
||||
if(allowed_types)
|
||||
allowed_typecache = typecacheof(allowed_types)
|
||||
precondition = _precondition
|
||||
after_insert = _after_insert
|
||||
|
||||
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
|
||||
RegisterSignal(COMSIG_PARENT_EXAMINE, .proc/OnExamine)
|
||||
@@ -57,10 +56,9 @@
|
||||
if((I.flags_2 & (HOLOGRAM_2 | NO_MAT_REDEMPTION_2)) || (tc && !is_type_in_typecache(I, tc)))
|
||||
to_chat(user, "<span class='warning'>[parent] won't accept [I]!</span>")
|
||||
return
|
||||
. = COMPONENT_ACTIVATED | COMPONENT_NO_AFTERATTACK
|
||||
last_insert_success = FALSE
|
||||
. = COMPONENT_NO_AFTERATTACK
|
||||
var/datum/callback/pc = precondition
|
||||
if(pc && !pc.Invoke())
|
||||
if(pc && !pc.Invoke(user))
|
||||
return
|
||||
var/material_amount = get_item_material_amount(I)
|
||||
if(!material_amount)
|
||||
@@ -69,11 +67,12 @@
|
||||
if(!has_space(material_amount))
|
||||
to_chat(user, "<span class='warning'>[parent] is full. Please remove metal or glass from [parent] in order to insert more.</span>")
|
||||
return
|
||||
INVOKE_ASYNC(src, .proc/user_insert, I, user)
|
||||
user_insert(I, user)
|
||||
|
||||
/datum/component/material_container/proc/user_insert(obj/item/I, mob/living/user)
|
||||
var/requested_amount
|
||||
if(istype(I, /obj/item/stack) && precise_insertion)
|
||||
var/Itype = I.type
|
||||
if(ispath(Itype, /obj/item/stack) && precise_insertion)
|
||||
var/atom/current_parent = parent
|
||||
requested_amount = input(user, "How much do you want to insert?", "Inserting sheets") as num|null
|
||||
if(isnull(requested_amount) || (requested_amount <= 0))
|
||||
@@ -85,7 +84,6 @@
|
||||
return
|
||||
var/inserted = insert_item(I, stack_amt = requested_amount)
|
||||
if(inserted)
|
||||
last_insert_success = TRUE
|
||||
if(istype(I, /obj/item/stack))
|
||||
to_chat(user, "<span class='notice'>You insert [inserted] sheet[inserted>1 ? "s" : ""] into [parent].</span>")
|
||||
if(!QDELETED(I))
|
||||
@@ -93,6 +91,8 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You insert a material total of [inserted] into [parent].</span>")
|
||||
qdel(I)
|
||||
if(after_insert)
|
||||
after_insert.Invoke(Itype, last_inserted_id, inserted)
|
||||
else
|
||||
user.put_in_active_hand(I)
|
||||
|
||||
@@ -132,9 +132,7 @@
|
||||
return FALSE
|
||||
|
||||
last_inserted_id = insert_materials(S,amt)
|
||||
last_inserted_type = S.type
|
||||
S.use(amt)
|
||||
last_amount_inserted = amt
|
||||
return amt
|
||||
|
||||
/datum/component/material_container/proc/insert_item(obj/item/I, multiplier = 1, stack_amt)
|
||||
@@ -148,8 +146,6 @@
|
||||
return FALSE
|
||||
|
||||
last_inserted_id = insert_materials(I, multiplier)
|
||||
last_inserted_type = I.type
|
||||
last_amount_inserted = material_amount
|
||||
return material_amount
|
||||
|
||||
/datum/component/material_container/proc/insert_materials(obj/item/I, multiplier = 1) //for internal usage only
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
buckled_mob.pixel_x = 0
|
||||
buckled_mob.pixel_y = 0
|
||||
if(buckled_mob.client)
|
||||
buckled_mob.client.change_view(world.view)
|
||||
buckled_mob.client.change_view(CONFIG_GET(string/default_view))
|
||||
|
||||
//MOVEMENT
|
||||
/datum/component/riding/proc/turf_check(turf/next, turf/current)
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
/datum/component/slippery
|
||||
var/intensity
|
||||
var/lube_flags
|
||||
var/mob/slip_victim
|
||||
var/datum/callback/callback
|
||||
|
||||
/datum/component/slippery/Initialize(_intensity, _lube_flags = NONE)
|
||||
/datum/component/slippery/Initialize(_intensity, _lube_flags = NONE, datum/callback/_callback)
|
||||
intensity = max(_intensity, 0)
|
||||
lube_flags = _lube_flags
|
||||
callback = _callback
|
||||
RegisterSignal(list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), .proc/Slip)
|
||||
|
||||
/datum/component/slippery/proc/Slip(atom/movable/AM)
|
||||
var/mob/victim = AM
|
||||
if(istype(victim) && !victim.is_flying() && victim.slip(intensity, parent, lube_flags))
|
||||
slip_victim = victim
|
||||
return COMPONENT_ACTIVATED
|
||||
|
||||
/datum/component/slippery/AfterComponentActivated()
|
||||
slip_victim = null
|
||||
if(istype(victim) && !victim.is_flying() && victim.slip(intensity, parent, lube_flags) && callback)
|
||||
callback.Invoke(victim)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
mid_sounds = list('sound/machines/shower/shower_mid1.ogg'=1,'sound/machines/shower/shower_mid2.ogg'=1,'sound/machines/shower/shower_mid3.ogg'=1)
|
||||
mid_length = 10
|
||||
end_sound = 'sound/machines/shower/shower_end.ogg'
|
||||
volume = 25
|
||||
volume = 20
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -109,4 +109,4 @@
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
AI.holopad_talk(message, language)
|
||||
return FALSE
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -94,7 +94,13 @@
|
||||
admin_notes = "Due to the limited space for non paying crew, this shuttle may cause a riot."
|
||||
credit_cost = 10000
|
||||
|
||||
|
||||
/datum/map_template/shuttle/emergency/discoinferno
|
||||
suffix = "discoinferno"
|
||||
name = "Disco Inferno"
|
||||
description = "The glorious results of centuries of plasma research done by Nanotrasen employees. This is the reason why you are here. Get on and dance like you're on fire, burn baby burn!"
|
||||
admin_notes = "Flaming hot."
|
||||
credit_cost = 10000
|
||||
|
||||
/datum/map_template/shuttle/emergency/arena
|
||||
suffix = "arena"
|
||||
name = "The Arena"
|
||||
|
||||
Reference in New Issue
Block a user