mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge remote-tracking branch 'upstream/master' into his-grace-ascended
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
var/button_icon_state = "default"
|
||||
var/mob/owner
|
||||
|
||||
/datum/action/New(var/Target)
|
||||
/datum/action/New(Target)
|
||||
target = Target
|
||||
button = new
|
||||
button.linked_action = src
|
||||
|
||||
+29
-60
@@ -17,10 +17,6 @@
|
||||
/datum/ai_law/zero/get_index()
|
||||
return 0
|
||||
|
||||
/datum/ai_law/sixsixsix/get_index()
|
||||
return 666
|
||||
|
||||
|
||||
/datum/ai_laws
|
||||
var/name = "Unknown Laws"
|
||||
var/law_header = "Prime Directives"
|
||||
@@ -31,11 +27,9 @@
|
||||
var/list/datum/ai_law/inherent_laws = list()
|
||||
var/list/datum/ai_law/supplied_laws = list()
|
||||
var/list/datum/ai_law/ion/ion_laws = list()
|
||||
var/list/datum/ai_law/sixsixsix/devil_laws = list()
|
||||
var/list/datum/ai_law/sorted_laws = list()
|
||||
|
||||
var/state_zeroth = 0
|
||||
var/list/state_devil = list()
|
||||
var/list/state_ion = list()
|
||||
var/list/state_inherent = list()
|
||||
var/list/state_supplied = list()
|
||||
@@ -68,9 +62,6 @@
|
||||
for(var/ion_law in ion_laws)
|
||||
sorted_laws += ion_law
|
||||
|
||||
for(var/evil_law in devil_laws)
|
||||
sorted_laws += evil_law
|
||||
|
||||
var/index = 1
|
||||
for(var/datum/ai_law/inherent_law in inherent_laws)
|
||||
inherent_law.index = index++
|
||||
@@ -81,7 +72,7 @@
|
||||
if(istype(AL))
|
||||
sorted_laws += AL
|
||||
|
||||
/datum/ai_laws/proc/sync(var/mob/living/silicon/S, var/full_sync = 1)
|
||||
/datum/ai_laws/proc/sync(mob/living/silicon/S, full_sync = 1)
|
||||
// Add directly to laws to avoid log-spam
|
||||
S.sync_zeroth(zeroth_law, zeroth_law_borg)
|
||||
|
||||
@@ -101,7 +92,7 @@
|
||||
S.laws.add_supplied_law(law.index, law.law)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
|
||||
/mob/living/silicon/proc/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg)
|
||||
if(!is_special_character(src) || mind.original != src)
|
||||
if(zeroth_law_borg)
|
||||
laws.set_zeroth_law(zeroth_law_borg.law)
|
||||
@@ -110,14 +101,14 @@
|
||||
else
|
||||
laws.clear_zeroth_laws()
|
||||
|
||||
/mob/living/silicon/ai/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
|
||||
/mob/living/silicon/ai/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg)
|
||||
if(zeroth_law)
|
||||
laws.set_zeroth_law(zeroth_law.law, zeroth_law_borg ? zeroth_law_borg.law : null)
|
||||
|
||||
/****************
|
||||
* Add Laws *
|
||||
****************/
|
||||
/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null)
|
||||
/datum/ai_laws/proc/set_zeroth_law(law, law_borg = null)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -128,22 +119,7 @@
|
||||
zeroth_law_borg = null
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/set_sixsixsix_law(var/law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
for(var/datum/ai_law/AL in devil_laws)
|
||||
if(AL.law == law)
|
||||
return
|
||||
|
||||
var/new_law = new/datum/ai_law/sixsixsix(law)
|
||||
devil_laws += new_law
|
||||
if(state_devil.len < devil_laws.len)
|
||||
state_devil += 1
|
||||
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/add_ion_law(var/law)
|
||||
/datum/ai_laws/proc/add_ion_law(law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -158,7 +134,7 @@
|
||||
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/add_inherent_law(var/law)
|
||||
/datum/ai_laws/proc/add_inherent_law(law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -173,7 +149,7 @@
|
||||
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/add_supplied_law(var/number, var/law)
|
||||
/datum/ai_laws/proc/add_supplied_law(number, law)
|
||||
if(!law)
|
||||
return
|
||||
|
||||
@@ -200,31 +176,28 @@
|
||||
/****************
|
||||
* Remove Laws *
|
||||
*****************/
|
||||
/datum/ai_laws/proc/delete_law(var/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/delete_law(datum/ai_law/law)
|
||||
if(istype(law))
|
||||
law.delete_law(src)
|
||||
|
||||
/datum/ai_law/proc/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/proc/delete_law(datum/ai_laws/laws)
|
||||
|
||||
/datum/ai_law/zero/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/zero/delete_law(datum/ai_laws/laws)
|
||||
laws.clear_zeroth_laws()
|
||||
|
||||
/datum/ai_law/ion/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/ion/delete_law(datum/ai_laws/laws)
|
||||
laws.internal_delete_law(laws.ion_laws, laws.state_ion, src)
|
||||
|
||||
/datum/ai_law/sixsixsix/delete_law(var/datum/ai_laws/laws)
|
||||
laws.internal_delete_law(laws.devil_laws, laws.state_devil, src)
|
||||
|
||||
/datum/ai_law/inherent/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/inherent/delete_law(datum/ai_laws/laws)
|
||||
laws.internal_delete_law(laws.inherent_laws, laws.state_inherent, src)
|
||||
|
||||
/datum/ai_law/supplied/delete_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/supplied/delete_law(datum/ai_laws/laws)
|
||||
var/index = laws.supplied_laws.Find(src)
|
||||
if(index)
|
||||
laws.supplied_laws[index] = ""
|
||||
laws.state_supplied[index] = 1
|
||||
|
||||
/datum/ai_laws/proc/internal_delete_law(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/internal_delete_law(list/datum/ai_law/laws, list/state, list/datum/ai_law/law)
|
||||
var/index = laws.Find(law)
|
||||
if(index)
|
||||
laws -= law
|
||||
@@ -239,10 +212,6 @@
|
||||
zeroth_law = null
|
||||
zeroth_law_borg = null
|
||||
|
||||
/datum/ai_laws/proc/clear_sixsixsix_laws()
|
||||
devil_laws.Cut()
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/clear_ion_laws()
|
||||
ion_laws.Cut()
|
||||
sorted_laws.Cut()
|
||||
@@ -255,7 +224,7 @@
|
||||
supplied_laws.Cut()
|
||||
sorted_laws.Cut()
|
||||
|
||||
/datum/ai_laws/proc/show_laws(var/who)
|
||||
/datum/ai_laws/proc/show_laws(who)
|
||||
sort_laws()
|
||||
for(var/datum/ai_law/law in sorted_laws)
|
||||
if(law == zeroth_law_borg)
|
||||
@@ -271,25 +240,25 @@
|
||||
/********
|
||||
* Get *
|
||||
********/
|
||||
/datum/ai_laws/proc/get_state_law(var/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/get_state_law(datum/ai_law/law)
|
||||
return law.get_state_law(src)
|
||||
|
||||
/datum/ai_law/proc/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/proc/get_state_law(datum/ai_laws/laws)
|
||||
|
||||
/datum/ai_law/zero/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/zero/get_state_law(datum/ai_laws/laws)
|
||||
if(src == laws.zeroth_law)
|
||||
return laws.state_zeroth
|
||||
|
||||
/datum/ai_law/ion/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/ion/get_state_law(datum/ai_laws/laws)
|
||||
return laws.get_state_internal(laws.ion_laws, laws.state_ion, src)
|
||||
|
||||
/datum/ai_law/inherent/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/inherent/get_state_law(datum/ai_laws/laws)
|
||||
return laws.get_state_internal(laws.inherent_laws, laws.state_inherent, src)
|
||||
|
||||
/datum/ai_law/supplied/get_state_law(var/datum/ai_laws/laws)
|
||||
/datum/ai_law/supplied/get_state_law(datum/ai_laws/laws)
|
||||
return laws.get_state_internal(laws.supplied_laws, laws.state_supplied, src)
|
||||
|
||||
/datum/ai_laws/proc/get_state_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law)
|
||||
/datum/ai_laws/proc/get_state_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law)
|
||||
var/index = laws.Find(law)
|
||||
if(index)
|
||||
return state[index]
|
||||
@@ -298,25 +267,25 @@
|
||||
/********
|
||||
* Set *
|
||||
********/
|
||||
/datum/ai_laws/proc/set_state_law(var/datum/ai_law/law, var/state)
|
||||
/datum/ai_laws/proc/set_state_law(datum/ai_law/law, state)
|
||||
law.set_state_law(src, state)
|
||||
|
||||
/datum/ai_law/proc/set_state_law(var/datum/ai_law/law, var/state)
|
||||
/datum/ai_law/proc/set_state_law(datum/ai_law/law, state)
|
||||
|
||||
/datum/ai_law/zero/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/zero/set_state_law(datum/ai_laws/laws, state)
|
||||
if(src == laws.zeroth_law)
|
||||
laws.state_zeroth = state
|
||||
|
||||
/datum/ai_law/ion/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/ion/set_state_law(datum/ai_laws/laws, state)
|
||||
laws.set_state_law_internal(laws.ion_laws, laws.state_ion, src, state)
|
||||
|
||||
/datum/ai_law/inherent/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/inherent/set_state_law(datum/ai_laws/laws, state)
|
||||
laws.set_state_law_internal(laws.inherent_laws, laws.state_inherent, src, state)
|
||||
|
||||
/datum/ai_law/supplied/set_state_law(var/datum/ai_laws/laws, var/state)
|
||||
/datum/ai_law/supplied/set_state_law(datum/ai_laws/laws, state)
|
||||
laws.set_state_law_internal(laws.supplied_laws, laws.state_supplied, src, state)
|
||||
|
||||
/datum/ai_laws/proc/set_state_law_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law, var/do_state)
|
||||
/datum/ai_laws/proc/set_state_law_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law, do_state)
|
||||
var/index = laws.Find(law)
|
||||
if(index)
|
||||
state[index] = do_state
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/title_buttons = ""
|
||||
|
||||
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null)
|
||||
|
||||
user = nuser
|
||||
window_id = nwindow_id
|
||||
@@ -101,7 +101,7 @@
|
||||
[get_footer()]
|
||||
"}
|
||||
|
||||
/datum/browser/proc/open(var/use_onclose = 1)
|
||||
/datum/browser/proc/open(use_onclose = 1)
|
||||
var/window_size = ""
|
||||
if(width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
@@ -145,7 +145,7 @@
|
||||
// Otherwise, the user mob's machine var will be reset directly.
|
||||
//
|
||||
|
||||
/proc/onclose(mob/user, windowid, var/atom/ref=null)
|
||||
/proc/onclose(mob/user, windowid, atom/ref=null)
|
||||
if(!user || !user.client) return
|
||||
var/param = "null"
|
||||
if(ref)
|
||||
@@ -161,7 +161,7 @@
|
||||
// if a valid atom reference is supplied, call the atom's Topic() with "close=1"
|
||||
// otherwise, just reset the client mob's machine var.
|
||||
//
|
||||
/client/verb/windowclose(var/atomref as text)
|
||||
/client/verb/windowclose(atomref as text)
|
||||
set hidden = 1 // hide this verb from the user's panel
|
||||
set name = ".windowclose" // no autocomplete on cmd line
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
GLOBAL_DATUM_INIT(powermonitor_repository, /datum/repository/powermonitor, new())
|
||||
|
||||
/datum/repository/powermonitor/proc/powermonitor_data(var/refresh = 0)
|
||||
/datum/repository/powermonitor/proc/powermonitor_data(refresh = 0)
|
||||
var/pMonData[0]
|
||||
|
||||
var/datum/cache_entry/cache_entry = cache_data
|
||||
|
||||
@@ -71,5 +71,5 @@
|
||||
if(strength >= cleanable)
|
||||
qdel(src)
|
||||
|
||||
/datum/component/decal/proc/examine(datum/source, mob/user, var/list/examine_list)
|
||||
/datum/component/decal/proc/examine(datum/source, mob/user, list/examine_list)
|
||||
examine_list += description
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
return amt
|
||||
return FALSE
|
||||
|
||||
/datum/component/material_container/proc/transer_amt_to(var/datum/component/material_container/T, amt, id)
|
||||
/datum/component/material_container/proc/transer_amt_to(datum/component/material_container/T, amt, id)
|
||||
if((amt==0)||(!T)||(!id))
|
||||
return FALSE
|
||||
if(amt<0)
|
||||
|
||||
@@ -345,7 +345,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
|
||||
locked += L
|
||||
return
|
||||
|
||||
/proc/get_id_photo(mob/living/carbon/human/H, var/custom_job = null)
|
||||
/proc/get_id_photo(mob/living/carbon/human/H, custom_job = null)
|
||||
var/icon/preview_icon = null
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
var/obj/item/organ/internal/eyes/eyes_organ = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
|
||||
@@ -445,7 +445,7 @@
|
||||
usr << browse(html, "window=variables[refid];size=475x650")
|
||||
|
||||
#define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing )
|
||||
/proc/debug_variable(name, value, level, var/datum/DA = null, sanitize = TRUE)
|
||||
/proc/debug_variable(name, value, level, datum/DA = null, sanitize = TRUE)
|
||||
var/header
|
||||
if(DA)
|
||||
if(islist(DA))
|
||||
|
||||
@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
|
||||
*/
|
||||
|
||||
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D)
|
||||
/datum/disease/advance/New(process = 1, datum/disease/advance/D)
|
||||
if(!istype(D))
|
||||
D = null
|
||||
// Generate symptoms if we weren't given any.
|
||||
@@ -317,7 +317,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
*/
|
||||
|
||||
// Mix a list of advance diseases and return the mixed result.
|
||||
/proc/Advance_Mix(var/list/D_list)
|
||||
/proc/Advance_Mix(list/D_list)
|
||||
|
||||
// to_chat(world, "Mixing!!!!")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Cold
|
||||
|
||||
/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/cold/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Cold"
|
||||
symptoms = list(new/datum/symptom/sneeze)
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// Flu
|
||||
|
||||
/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/flu/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Flu"
|
||||
symptoms = list(new/datum/symptom/cough)
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
// Voice Changing
|
||||
|
||||
/datum/disease/advance/voice_change/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/voice_change/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Epiglottis Mutation"
|
||||
symptoms = list(new/datum/symptom/voice_change)
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
// Toxin Filter
|
||||
|
||||
/datum/disease/advance/heal/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/heal/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Liver Enhancer"
|
||||
symptoms = list(new/datum/symptom/heal)
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
// Hullucigen
|
||||
|
||||
/datum/disease/advance/hullucigen/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/hullucigen/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Reality Impairment"
|
||||
symptoms = list(new/datum/symptom/hallucigen)
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
// Sensory Restoration
|
||||
|
||||
/datum/disease/advance/sensory_restoration/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/sensory_restoration/New(process = 1, datum/disease/advance/D, copy = 0)
|
||||
if(!D)
|
||||
name = "Reality Enhancer"
|
||||
symptoms = list(new/datum/symptom/sensory_restoration)
|
||||
|
||||
@@ -36,15 +36,18 @@ BONUS
|
||||
if(3, 4)
|
||||
if(!(head_organ.h_style == "Bald") && !(head_organ.h_style == "Balding Hair"))
|
||||
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
|
||||
spawn(50)
|
||||
head_organ.h_style = "Balding Hair"
|
||||
H.update_hair()
|
||||
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, null, "Balding Hair"), 5 SECONDS)
|
||||
if(5)
|
||||
if(!(head_organ.f_style == "Shaved") || !(head_organ.h_style == "Bald"))
|
||||
to_chat(H, "<span class='warning'>Your hair starts to fall out in clumps...</span>")
|
||||
spawn(50)
|
||||
head_organ.f_style = "Shaved"
|
||||
head_organ.h_style = "Bald"
|
||||
H.update_hair()
|
||||
H.update_fhair()
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, "Shaved", "Bald"), 5 SECONDS)
|
||||
|
||||
/datum/symptom/shedding/proc/change_hair(mob/living/carbon/human/H, obj/item/organ/external/head/head_organ, f_style, h_style)
|
||||
if(!H || !head_organ)
|
||||
return
|
||||
if(f_style)
|
||||
head_organ.f_style = f_style
|
||||
H.update_fhair()
|
||||
if(h_style)
|
||||
head_organ.h_style = h_style
|
||||
H.update_hair()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
if(speak_emote)
|
||||
D.speak_emote = speak_emote
|
||||
|
||||
/datum/dog_fashion/proc/get_overlay(var/dir)
|
||||
/datum/dog_fashion/proc/get_overlay(dir)
|
||||
if(icon_file && obj_icon_state)
|
||||
var/image/corgI = image(icon_file, obj_icon_state, dir = dir)
|
||||
corgI.alpha = obj_alpha
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
text = replacetext(text,"{HOLDER}","[holder]")
|
||||
return text
|
||||
|
||||
/datum/construction/reversible2/custom_action(index, diff, used_atom, var/mob/user)
|
||||
/datum/construction/reversible2/custom_action(index, diff, used_atom, mob/user)
|
||||
if(!..(index,used_atom,user))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return result
|
||||
|
||||
// Callback function should take the result as the last argument
|
||||
/datum/async_input/proc/on_close(var/datum/callback/cb)
|
||||
/datum/async_input/proc/on_close(datum/callback/cb)
|
||||
onCloseCb = cb
|
||||
|
||||
/datum/async_input/proc/show()
|
||||
|
||||
@@ -84,14 +84,12 @@
|
||||
/datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound)
|
||||
if(location)
|
||||
if(effect)
|
||||
spawn(-1)
|
||||
src = null
|
||||
effect.attach(location)
|
||||
effect.start()
|
||||
src = null
|
||||
effect.attach(location)
|
||||
effect.start()
|
||||
if(sound)
|
||||
spawn(-1)
|
||||
src = null
|
||||
playsound(location,sound,60,1)
|
||||
src = null
|
||||
playsound(location,sound,60,1)
|
||||
return
|
||||
|
||||
//do the monkey dance
|
||||
|
||||
@@ -21,7 +21,6 @@ GLOBAL_LIST_INIT(huds, list( \
|
||||
ANTAG_HUD_VAMPIRE = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),\
|
||||
DATA_HUD_ABDUCTOR = new/datum/atom_hud/abductor(),\
|
||||
ANTAG_HUD_DEVIL = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden()\
|
||||
))
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
else
|
||||
. = subject
|
||||
|
||||
/datum/log_record/proc/get_health_string(var/mob/living/L)
|
||||
/datum/log_record/proc/get_health_string(mob/living/L)
|
||||
var/OX = L.getOxyLoss() > 50 ? "<b>[L.getOxyLoss()]</b>" : L.getOxyLoss()
|
||||
var/TX = L.getToxLoss() > 50 ? "<b>[L.getToxLoss()]</b>" : L.getToxLoss()
|
||||
var/BU = L.getFireLoss() > 50 ? "<b>[L.getFireLoss()]</b>" : L.getFireLoss()
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
|
||||
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
|
||||
var/datum/mindslaves/som //stands for slave or master...hush..
|
||||
var/datum/devilinfo/devilinfo //Information about the devil, if any.
|
||||
var/damnation_type = 0
|
||||
var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src
|
||||
var/hasSoul = TRUE
|
||||
|
||||
var/isholy = FALSE // is this person a chaplain or admin role allowed to use bibles
|
||||
var/isblessed = FALSE // is this person blessed by a chaplain?
|
||||
@@ -76,7 +72,6 @@
|
||||
|
||||
/datum/mind/New(new_key)
|
||||
key = new_key
|
||||
soulOwner = src
|
||||
|
||||
/datum/mind/Destroy()
|
||||
SSticker.minds -= src
|
||||
@@ -88,7 +83,6 @@
|
||||
antag_datums = null
|
||||
current = null
|
||||
original = null
|
||||
soulOwner = null
|
||||
return ..()
|
||||
|
||||
/datum/mind/proc/transfer_to(mob/living/new_character)
|
||||
@@ -314,22 +308,6 @@
|
||||
|
||||
. += _memory_edit_role_enabled(ROLE_ABDUCTOR)
|
||||
|
||||
/datum/mind/proc/memory_edit_devil(mob/living/H)
|
||||
. = _memory_edit_header("devil", list("devilagents"))
|
||||
if(src in SSticker.mode.devils)
|
||||
if(!devilinfo)
|
||||
. += "<b>No devilinfo found! Yell at a coder!</b>"
|
||||
else if(!devilinfo.ascendable)
|
||||
. += "<b>DEVIL</b>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
|
||||
else
|
||||
. += "<a href='?src=[UID()];devil=devil'>DEVIL</a>|<b>ASCENDABLE DEVIL</b>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
|
||||
else if(src in SSticker.mode.sintouched)
|
||||
. += "devil|Ascendable Devil|<b>SINTOUCHED</b>|<a href='?src=[UID()];devil=clear'>no</a>"
|
||||
else
|
||||
. += "<a href='?src=[UID()];devil=devil'>devil</a>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|<a href='?src=[UID()];devil=sintouched'>sintouched</a>|<b>NO</b>"
|
||||
|
||||
. += _memory_edit_role_enabled(ROLE_DEVIL)
|
||||
|
||||
/datum/mind/proc/memory_edit_eventmisc(mob/living/H)
|
||||
. = _memory_edit_header("event", list())
|
||||
if(src in SSticker.mode.eventmiscs)
|
||||
@@ -461,10 +439,6 @@
|
||||
sections["shadowling"] = memory_edit_shadowling(H)
|
||||
/** Abductors **/
|
||||
sections["abductor"] = memory_edit_abductor(H)
|
||||
/** DEVIL ***/
|
||||
var/static/list/devils_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/carbon/true_devil, /mob/living/silicon/robot))
|
||||
if(is_type_in_typecache(current, devils_typecache))
|
||||
sections["devil"] = memory_edit_devil(H)
|
||||
sections["eventmisc"] = memory_edit_eventmisc(H)
|
||||
/** TRAITOR ***/
|
||||
sections["traitor"] = memory_edit_traitor()
|
||||
@@ -1104,76 +1078,6 @@
|
||||
SSticker.mode.update_eventmisc_icons_added(src)
|
||||
message_admins("[key_name_admin(usr)] has eventantag'ed [current].")
|
||||
log_admin("[key_name(usr)] has eventantag'ed [current].")
|
||||
else if(href_list["devil"])
|
||||
switch(href_list["devil"])
|
||||
if("clear")
|
||||
if(src in SSticker.mode.devils)
|
||||
if(istype(current,/mob/living/carbon/true_devil/))
|
||||
to_chat(usr,"<span class='warning'>This cannot be used on true or arch-devils.</span>")
|
||||
else
|
||||
SSticker.mode.devils -= src
|
||||
SSticker.mode.update_devil_icons_removed(src)
|
||||
special_role = null
|
||||
to_chat(current,"<span class='userdanger'>Your infernal link has been severed! You are no longer a devil!</span>")
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/infernal_jaunt)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/fireball/hellish)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/summon_contract)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/violin)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/summon_dancefloor)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch/ascended)
|
||||
message_admins("[key_name_admin(usr)] has de-devil'ed [current].")
|
||||
if(issilicon(current))
|
||||
var/mob/living/silicon/S = current
|
||||
S.laws.clear_sixsixsix_laws()
|
||||
devilinfo = null
|
||||
log_admin("[key_name(usr)] has de-devil'ed [current].")
|
||||
else if(src in SSticker.mode.sintouched)
|
||||
SSticker.mode.sintouched -= src
|
||||
message_admins("[key_name_admin(usr)] has de-sintouch'ed [current].")
|
||||
log_admin("[key_name(usr)] has de-sintouch'ed [current].")
|
||||
if("devil")
|
||||
if(devilinfo)
|
||||
devilinfo.ascendable = FALSE
|
||||
message_admins("[key_name_admin(usr)] has made [current] unable to ascend as a devil.")
|
||||
log_admin("[key_name_admin(usr)] has made [current] unable to ascend as a devil.")
|
||||
return
|
||||
if(!ishuman(current) && !isrobot(current))
|
||||
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
|
||||
return
|
||||
SSticker.mode.devils += src
|
||||
special_role = "devil"
|
||||
SSticker.mode.update_devil_icons_added(src)
|
||||
SSticker.mode.finalize_devil(src, FALSE)
|
||||
SSticker.mode.forge_devil_objectives(src, 2)
|
||||
SSticker.mode.greet_devil(src)
|
||||
message_admins("[key_name_admin(usr)] has devil'ed [current].")
|
||||
log_admin("[key_name(usr)] has devil'ed [current].")
|
||||
if("ascendable_devil")
|
||||
if(devilinfo)
|
||||
devilinfo.ascendable = TRUE
|
||||
message_admins("[key_name_admin(usr)] has made [current] able to ascend as a devil.")
|
||||
log_admin("[key_name_admin(usr)] has made [current] able to ascend as a devil.")
|
||||
return
|
||||
if(!ishuman(current) && !isrobot(current))
|
||||
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
|
||||
return
|
||||
SSticker.mode.devils += src
|
||||
special_role = "devil"
|
||||
SSticker.mode.update_devil_icons_added(src)
|
||||
SSticker.mode.finalize_devil(src, TRUE)
|
||||
SSticker.mode.forge_devil_objectives(src, 2)
|
||||
SSticker.mode.greet_devil(src)
|
||||
message_admins("[key_name_admin(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
|
||||
log_admin("[key_name(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
|
||||
if("sintouched")
|
||||
var/mob/living/carbon/human/H = current
|
||||
H.influenceSin()
|
||||
message_admins("[key_name_admin(usr)] has sintouch'ed [current].")
|
||||
log_admin("[key_name(usr)] has sintouch'ed [current].")
|
||||
|
||||
else if(href_list["traitor"])
|
||||
switch(href_list["traitor"])
|
||||
@@ -1805,17 +1709,6 @@
|
||||
var/obj/effect/proc_holder/spell/S = X
|
||||
S.action.Grant(new_character)
|
||||
|
||||
/datum/mind/proc/disrupt_spells(delay, list/exceptions = New())
|
||||
for(var/X in spell_list)
|
||||
var/obj/effect/proc_holder/spell/S = X
|
||||
for(var/type in exceptions)
|
||||
if(istype(S, type))
|
||||
continue
|
||||
S.charge_counter = delay
|
||||
spawn(0)
|
||||
S.start_recharge()
|
||||
S.updateButtonIcon()
|
||||
|
||||
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
|
||||
for(var/mob/dead/observer/G in GLOB.dead_mob_list)
|
||||
if(G.mind == src)
|
||||
@@ -1891,18 +1784,6 @@
|
||||
to_chat(current, "<span class='warning'><b>You seem to have forgotten the events of the past 10 minutes or so, and your head aches a bit as if someone beat it savagely with a stick.</b></span>")
|
||||
to_chat(current, "<span class='warning'><b>This means you don't remember who you were working for or what you were doing.</b></span>")
|
||||
|
||||
/datum/mind/proc/is_revivable() //Note, this ONLY checks the mind.
|
||||
if(damnation_type)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// returns a mob to message to produce something visible for the target mind
|
||||
/datum/mind/proc/messageable_mob()
|
||||
if(!QDELETED(current) && current.client)
|
||||
return current
|
||||
else
|
||||
return get_ghost(even_if_they_cant_reenter = TRUE)
|
||||
|
||||
//Initialisation procs
|
||||
/mob/proc/mind_initialize()
|
||||
if(mind)
|
||||
|
||||
@@ -370,13 +370,13 @@ GLOBAL_LIST_EMPTY(rpd_pipe_list) //Some pipes we don't want to be dispensable
|
||||
pipe_id = PIPE_DISPOSALS_JUNCTION_LEFT
|
||||
pipe_icon = "pipe-j2"
|
||||
|
||||
/proc/get_pipe_name(var/pipe_id, var/pipe_type)
|
||||
/proc/get_pipe_name(pipe_id, pipe_type)
|
||||
for(var/datum/pipes/P in GLOB.construction_pipe_list)
|
||||
if(P.pipe_id == pipe_id && P.pipe_type == pipe_type)
|
||||
return P.pipe_name
|
||||
return "unknown pipe"
|
||||
|
||||
/proc/get_pipe_icon(var/pipe_id)
|
||||
/proc/get_pipe_icon(pipe_id)
|
||||
for(var/datum/pipes/P in GLOB.construction_pipe_list)
|
||||
if(P.pipe_id == pipe_id)
|
||||
return P.pipe_icon
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
var/frequency as num
|
||||
var/list/obj/devices = list()
|
||||
|
||||
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
|
||||
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, filter = null as text|null, range = null as num|null)
|
||||
var/turf/start_point
|
||||
if(range)
|
||||
start_point = get_turf(source)
|
||||
@@ -19,7 +19,7 @@
|
||||
send_to_filter(source, signal, next_filter, start_point, range)
|
||||
|
||||
//Sends a signal to all machines belonging to a given filter. Should be called by post_signal()
|
||||
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, var/filter, var/turf/start_point = null, var/range = null)
|
||||
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, filter, turf/start_point = null, range = null)
|
||||
if(range && !start_point)
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
|
||||
|
||||
/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null)
|
||||
/datum/radio_frequency/proc/add_listener(obj/device as obj, filter as text|null)
|
||||
if(!filter)
|
||||
filter = RADIO_DEFAULT
|
||||
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
/mob/living
|
||||
var/list/ownedSoullinks //soullinks we are the owner of
|
||||
var/list/sharedSoullinks //soullinks we are a/the sharer of
|
||||
|
||||
/mob/living/Destroy()
|
||||
for(var/s in ownedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.ownerDies(FALSE)
|
||||
qdel(s) //If the owner is destroy()'d, the soullink is destroy()'d
|
||||
ownedSoullinks = null
|
||||
for(var/s in sharedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.sharerDies(FALSE)
|
||||
S.removeSoulsharer(src) //If a sharer is destroy()'d, they are simply removed
|
||||
sharedSoullinks = null
|
||||
return ..()
|
||||
|
||||
//Keeps track of a Mob->Mob (potentially Player->Player) connection
|
||||
//Can be used to trigger actions on one party when events happen to another
|
||||
//Eg: shared deaths
|
||||
//Can be used to form a linked list of mob-hopping
|
||||
//Does NOT transfer with minds
|
||||
/datum/soullink
|
||||
var/mob/living/soulowner
|
||||
var/mob/living/soulsharer
|
||||
var/id //Optional ID, for tagging and finding specific instances
|
||||
|
||||
/datum/soullink/Destroy()
|
||||
if(soulowner)
|
||||
LAZYREMOVE(soulowner.ownedSoullinks, src)
|
||||
soulowner = null
|
||||
if(soulsharer)
|
||||
LAZYREMOVE(soulsharer.sharedSoullinks, src)
|
||||
soulsharer = null
|
||||
return ..()
|
||||
|
||||
/datum/soullink/proc/removeSoulsharer(mob/living/sharer)
|
||||
if(soulsharer == sharer)
|
||||
soulsharer = null
|
||||
LAZYREMOVE(sharer.sharedSoullinks, src)
|
||||
|
||||
//Used to assign variables, called primarily by soullink()
|
||||
//Override this to create more unique soullinks (Eg: 1->Many relationships)
|
||||
//Return TRUE/FALSE to return the soullink/null in soullink()
|
||||
/datum/soullink/proc/parseArgs(mob/living/owner, mob/living/sharer)
|
||||
if(!owner || !sharer)
|
||||
return FALSE
|
||||
soulowner = owner
|
||||
soulsharer = sharer
|
||||
LAZYADD(owner.ownedSoullinks, src)
|
||||
LAZYADD(sharer.sharedSoullinks, src)
|
||||
return TRUE
|
||||
|
||||
//Runs after /living death()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/ownerDies(gibbed, mob/living/owner)
|
||||
|
||||
//Runs after /living death()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/sharerDies(gibbed, mob/living/owner)
|
||||
|
||||
//Runs after /living update_revive()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/ownerRevives(mob/living/owner)
|
||||
|
||||
//Runs after /living update_revive()
|
||||
//Override this for content
|
||||
/datum/soullink/proc/sharerRevives(mob/living/owner)
|
||||
|
||||
//Quick-use helper
|
||||
/proc/soullink(typepath, ...)
|
||||
var/datum/soullink/S = new typepath()
|
||||
if(S.parseArgs(arglist(args.Copy(2, 0))))
|
||||
return S
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
// MULTISHARER //
|
||||
/////////////////
|
||||
//Abstract soullink for use with 1 Owner -> Many Sharer setups
|
||||
/datum/soullink/multisharer
|
||||
var/list/soulsharers
|
||||
|
||||
/datum/soullink/multisharer/parseArgs(mob/living/owner, list/sharers)
|
||||
if(!owner || !LAZYLEN(sharers))
|
||||
return FALSE
|
||||
soulowner = owner
|
||||
soulsharers = sharers
|
||||
LAZYADD(owner.ownedSoullinks, src)
|
||||
for(var/l in sharers)
|
||||
var/mob/living/L = l
|
||||
LAZYADD(L.sharedSoullinks, src)
|
||||
return TRUE
|
||||
|
||||
/datum/soullink/multisharer/removeSoulsharer(mob/living/sharer)
|
||||
LAZYREMOVE(soulsharers, sharer)
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
// SHARED FATE //
|
||||
/////////////////
|
||||
//When the soulowner dies, the soulsharer dies, and vice versa
|
||||
//This is intended for two players(or AI) and two mobs
|
||||
|
||||
/datum/soullink/sharedfate/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulsharer)
|
||||
soulsharer.death(gibbed)
|
||||
|
||||
/datum/soullink/sharedfate/sharerDies(gibbed, mob/living/sharer)
|
||||
if(soulowner)
|
||||
soulowner.death(gibbed)
|
||||
|
||||
/////////////////
|
||||
// Demon Bind //
|
||||
/////////////////
|
||||
//When the soulowner dies, the soulsharer dies, but NOT vice versa
|
||||
//This is intended for two players(or AI) and two mobs
|
||||
|
||||
/datum/soullink/oneway/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulsharer)
|
||||
soulsharer.dust(FALSE)
|
||||
|
||||
/datum/soullink/oneway/devilfriend
|
||||
|
||||
/////////////////
|
||||
// SHARED BODY //
|
||||
/////////////////
|
||||
//When the soulsharer dies, they're placed in the soulowner, who remains alive
|
||||
//If the soulowner dies, the soulsharer is killed and placed into the soulowner (who is still dying)
|
||||
//This one is intended for one player moving between many mobs
|
||||
|
||||
/datum/soullink/sharedbody/ownerDies(gibbed, mob/living/owner)
|
||||
if(soulowner && soulsharer)
|
||||
if(soulsharer.mind)
|
||||
soulsharer.mind.transfer_to(soulowner)
|
||||
soulsharer.death(gibbed)
|
||||
|
||||
/datum/soullink/sharedbody/sharerDies(gibbed, mob/living/sharer)
|
||||
if(soulowner && soulsharer && soulsharer.mind)
|
||||
soulsharer.mind.transfer_to(soulowner)
|
||||
|
||||
|
||||
|
||||
//////////////////////
|
||||
// REPLACEMENT POOL //
|
||||
//////////////////////
|
||||
//When the owner dies, one of the sharers is placed in the owner's body, fully healed
|
||||
//Sort of a "winner-stays-on" soullink
|
||||
//Gibbing ends it immediately
|
||||
|
||||
/datum/soullink/multisharer/replacementpool/ownerDies(gibbed, mob/living/owner)
|
||||
if(LAZYLEN(soulsharers) && !gibbed) //let's not put them in some gibs
|
||||
var/list/souls = shuffle(soulsharers.Copy())
|
||||
for(var/l in souls)
|
||||
var/mob/living/L = l
|
||||
if(L.stat != DEAD && L.mind)
|
||||
L.mind.transfer_to(soulowner)
|
||||
soulowner.revive(TRUE, TRUE)
|
||||
L.death(FALSE)
|
||||
|
||||
//Lose your claim to the throne!
|
||||
/datum/soullink/multisharer/replacementpool/sharerDies(gibbed, mob/living/sharer)
|
||||
removeSoulsharer(sharer)
|
||||
|
||||
@@ -38,7 +38,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
spell.remove_ranged_ability(spell.ranged_ability_user)
|
||||
return ..()
|
||||
|
||||
/obj/effect/proc_holder/proc/add_ranged_ability(mob/user, var/msg)
|
||||
/obj/effect/proc_holder/proc/add_ranged_ability(mob/user, msg)
|
||||
if(!user || !user.client)
|
||||
return
|
||||
if(user.ranged_ability && user.ranged_ability != src)
|
||||
@@ -61,7 +61,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
if(C && ranged_mousepointer && C.mouse_pointer_icon == ranged_mousepointer)
|
||||
C.mouse_pointer_icon = initial(C.mouse_pointer_icon)
|
||||
|
||||
/obj/effect/proc_holder/proc/remove_ranged_ability(mob/user, var/msg)
|
||||
/obj/effect/proc_holder/proc/remove_ranged_ability(mob/user, msg)
|
||||
if(!user || (user.ranged_ability && user.ranged_ability != src)) //To avoid removing the wrong ability
|
||||
return
|
||||
user.ranged_ability = null
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
summoned_object.admin_spawned = TRUE
|
||||
|
||||
if(summon_lifespan)
|
||||
spawn(summon_lifespan)
|
||||
if(summoned_object)
|
||||
qdel(summoned_object)
|
||||
QDEL_IN(summoned_object, summon_lifespan)
|
||||
else
|
||||
switch(charge_type)
|
||||
if("recharge")
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork
|
||||
name = "Summon Pitchfork"
|
||||
desc = "A devil's weapon of choice. Use this to summon/unsummon your pitchfork."
|
||||
item_type = /obj/item/twohanded/pitchfork/demonic
|
||||
action_icon_state = "pitchfork"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater
|
||||
item_type = /obj/item/twohanded/pitchfork/demonic/greater
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended
|
||||
item_type = /obj/item/twohanded/pitchfork/demonic/ascended
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/violin
|
||||
item_type = /obj/item/instrument/violin/golden
|
||||
desc = "A devil's instrument of choice. Use this to summon/unsummon your golden violin."
|
||||
invocation_type = "whisper"
|
||||
invocation = "I ain't have this much fun since Georgia."
|
||||
action_icon_state = "golden_violin"
|
||||
name = "Summon golden violin"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/summon_contract
|
||||
name = "Summon infernal contract"
|
||||
desc = "Skip making a contract by hand, just do it by magic."
|
||||
invocation_type = "whisper"
|
||||
invocation = "Just sign on the dotted line."
|
||||
selection_activated_message = "<span class='notice'>You prepare a detailed contract. Click on a target to summon the contract in his hands.</span>"
|
||||
selection_deactivated_message = "<span class='notice'>You archive the contract for later use.</span>"
|
||||
include_user = FALSE
|
||||
range = 5
|
||||
auto_target_single = FALSE // Prevent an accidental contract from summoning
|
||||
click_radius = -1 // Precision clicking required
|
||||
allowed_type = /mob/living/carbon
|
||||
clothes_req = FALSE
|
||||
school = "conjuration"
|
||||
charge_max = 150
|
||||
cooldown_min = 10
|
||||
action_icon_state = "spell_default"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/summon_contract/cast(list/targets, mob/user = usr)
|
||||
for(var/target in targets)
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.mind && user.mind)
|
||||
if(C.stat == DEAD)
|
||||
if(user.drop_item())
|
||||
var/obj/item/paper/contract/infernal/revive/contract = new(user.loc, C.mind, user.mind)
|
||||
user.put_in_hands(contract)
|
||||
else
|
||||
var/obj/item/paper/contract/infernal/contract
|
||||
var/contractTypeName = input(user, "What type of contract?") in list (CONTRACT_POWER, CONTRACT_WEALTH, CONTRACT_PRESTIGE, CONTRACT_MAGIC, CONTRACT_KNOWLEDGE, CONTRACT_FRIENDSHIP) //TODO: Refactor this to be less boilerplate-y
|
||||
switch(contractTypeName)
|
||||
if(CONTRACT_POWER)
|
||||
contract = new /obj/item/paper/contract/infernal/power(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_WEALTH)
|
||||
contract = new /obj/item/paper/contract/infernal/wealth(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_PRESTIGE)
|
||||
contract = new /obj/item/paper/contract/infernal/prestige(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_MAGIC)
|
||||
contract = new /obj/item/paper/contract/infernal/magic(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_KNOWLEDGE)
|
||||
contract = new /obj/item/paper/contract/infernal/knowledge(C.loc, C.mind, user.mind)
|
||||
if(CONTRACT_FRIENDSHIP)
|
||||
contract = new /obj/item/paper/contract/infernal/friendship(C.loc, C.mind, user.mind)
|
||||
C.put_in_hands(contract)
|
||||
else
|
||||
to_chat(user,"<span class='notice'>[C] seems to not be sentient. You are unable to summon a contract for them.</span>")
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/fireball/hellish
|
||||
name = "Hellfire"
|
||||
desc = "This spell launches hellfire at the target."
|
||||
school = "evocation"
|
||||
charge_max = 80
|
||||
clothes_req = FALSE
|
||||
invocation = "Your very soul will catch fire!"
|
||||
invocation_type = "shout"
|
||||
fireball_type = /obj/item/projectile/magic/fireball/infernal
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/click/fireball/hellish/cast(list/targets, mob/living/user = usr)
|
||||
add_attack_logs(user, targets, "has fired a Hellfire ball", ATKLOG_FEW)
|
||||
.=..()
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/infernal_jaunt
|
||||
name = "Infernal Jaunt"
|
||||
desc = "Use hellfire to phase out of existence."
|
||||
charge_max = 200
|
||||
clothes_req = FALSE
|
||||
selection_type = "range"
|
||||
range = -1
|
||||
cooldown_min = 0
|
||||
overlay = null
|
||||
include_user = TRUE
|
||||
action_icon_state = "jaunt"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/infernal_jaunt/cast(list/targets, mob/living/user = usr)
|
||||
if(istype(user))
|
||||
if(istype(user.loc, /obj/effect/dummy/slaughter))
|
||||
var/continuing = 0
|
||||
if(istype(get_area(user), /area/shuttle)) // Can always phase in in a shuttle.
|
||||
continuing = TRUE
|
||||
else
|
||||
for(var/mob/living/C in orange(2, get_turf(user.loc))) //Can also phase in when nearby a potential buyer.
|
||||
if (C.mind && C.mind.soulOwner == C.mind)
|
||||
continuing = TRUE
|
||||
break
|
||||
if(continuing)
|
||||
to_chat(user,"<span class='warning'>You are now phasing in.</span>")
|
||||
if(do_mob(user,user,150))
|
||||
user.infernalphasein()
|
||||
else
|
||||
to_chat(user,"<span class='warning'>You can only re-appear near a potential signer or on a shuttle.</span>")
|
||||
revert_cast()
|
||||
return ..()
|
||||
else
|
||||
user.notransform = TRUE
|
||||
user.fakefire()
|
||||
to_chat(user,"<span class='warning'>You begin to phase back into sinful flames.</span>")
|
||||
if(do_mob(user,user,150))
|
||||
user.infernalphaseout()
|
||||
else
|
||||
to_chat(user,"<span class='warning'>You must remain still while exiting.</span>")
|
||||
user.ExtinguishMob()
|
||||
start_recharge()
|
||||
return
|
||||
revert_cast()
|
||||
|
||||
|
||||
/mob/living/proc/infernalphaseout()
|
||||
dust_animation()
|
||||
visible_message("<span class='warning'>[src] disappears in a flashfire!</span>")
|
||||
playsound(get_turf(src), 'sound/misc/enter_blood.ogg', 100, 1, -1)
|
||||
var/obj/effect/dummy/slaughter/s_holder = new(loc)
|
||||
ExtinguishMob()
|
||||
forceMove(s_holder)
|
||||
holder = s_holder
|
||||
notransform = FALSE
|
||||
fakefireextinguish()
|
||||
|
||||
/mob/living/proc/infernalphasein()
|
||||
if(notransform)
|
||||
to_chat(src,"<span class='warning'>You're too busy to jaunt in.</span>")
|
||||
return 0
|
||||
fakefire()
|
||||
forceMove(get_turf(src))
|
||||
visible_message("<span class='warning'><B>[src] appears in a firey blaze!</B></span>")
|
||||
playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1)
|
||||
spawn(15)
|
||||
fakefireextinguish(TRUE)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/sintouch
|
||||
name = "Sin Touch"
|
||||
desc = "Subtly encourage someone to sin."
|
||||
charge_max = 1800
|
||||
clothes_req = FALSE
|
||||
selection_type = "range"
|
||||
range = 2
|
||||
cooldown_min = 0
|
||||
overlay = null
|
||||
include_user = FALSE
|
||||
action_icon_state = "sintouch"
|
||||
action_background_icon_state = "bg_demon"
|
||||
random_target = TRUE
|
||||
random_target_priority = TARGET_RANDOM
|
||||
max_targets = 3
|
||||
invocation = "TASTE SIN AND INDULGE!!"
|
||||
invocation_type = "shout"
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/sintouch/ascended
|
||||
name = "Greater sin touch"
|
||||
charge_max = 100
|
||||
range = 7
|
||||
max_targets = 10
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/sintouch/cast(list/targets, mob/living/user = usr)
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
if(!H.mind)
|
||||
continue
|
||||
for(var/datum/objective/sintouched/A in H.mind.objectives)
|
||||
continue
|
||||
H.influenceSin()
|
||||
H.Weaken(2)
|
||||
H.Stun(2)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_dancefloor
|
||||
name = "Summon Dancefloor"
|
||||
desc = "When what a Devil really needs is funk."
|
||||
include_user = TRUE
|
||||
range = -1
|
||||
clothes_req = FALSE
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 10
|
||||
cooldown_min = 50 //5 seconds, so the smoke can't be spammed
|
||||
action_icon_state = "funk"
|
||||
action_background_icon_state = "bg_demon"
|
||||
|
||||
var/list/dancefloor_turfs
|
||||
var/list/dancefloor_turfs_types
|
||||
var/dancefloor_exists = FALSE
|
||||
// var/datum/effect_system/smoke_spread/transparent/dancefloor_devil/smoke
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_dancefloor/cast(list/targets, mob/user = usr)
|
||||
LAZYINITLIST(dancefloor_turfs)
|
||||
LAZYINITLIST(dancefloor_turfs_types)
|
||||
|
||||
/*
|
||||
if(!smoke)
|
||||
smoke = new()
|
||||
smoke.set_up(0, get_turf(user))
|
||||
smoke.start()
|
||||
*/
|
||||
|
||||
if(dancefloor_exists)
|
||||
dancefloor_exists = FALSE
|
||||
for(var/i in 1 to dancefloor_turfs.len)
|
||||
var/turf/T = dancefloor_turfs[i]
|
||||
T.ChangeTurf(dancefloor_turfs_types[i])
|
||||
else
|
||||
var/list/funky_turfs = RANGE_TURFS(1, user)
|
||||
for(var/turf/T in funky_turfs)
|
||||
if(T.density)
|
||||
to_chat(user, "<span class='warning'>You're too close to a wall.</span>")
|
||||
return
|
||||
dancefloor_exists = TRUE
|
||||
var/i = 1
|
||||
dancefloor_turfs.len = funky_turfs.len
|
||||
dancefloor_turfs_types.len = funky_turfs.len
|
||||
for(var/t in funky_turfs)
|
||||
var/turf/T = t
|
||||
dancefloor_turfs[i] = T
|
||||
dancefloor_turfs_types[i] = T.type
|
||||
T.ChangeTurf((i % 2 == 0) ? /turf/simulated/floor/light/colour_cycle/dancefloor_a : /turf/simulated/floor/light/colour_cycle/dancefloor_b)
|
||||
i++
|
||||
|
||||
/*
|
||||
/datum/effect_system/smoke_spread/transparent/dancefloor_devil
|
||||
effect_type = /obj/effect/particle_effect/smoke/transparent/dancefloor_devil
|
||||
|
||||
/obj/effect/particle_effect/smoke/transparent/dancefloor_devil
|
||||
lifetime = 2
|
||||
*/
|
||||
@@ -1,73 +0,0 @@
|
||||
/obj/effect/proc_holder/spell/targeted/summon_wealth
|
||||
name = "Summon wealth"
|
||||
desc = "The reward for selling your soul."
|
||||
invocation_type = "none"
|
||||
include_user = 1
|
||||
range = -1
|
||||
clothes_req = 0
|
||||
school = "conjuration"
|
||||
charge_max = 100
|
||||
cooldown_min = 10
|
||||
action_icon_state = "moneybag"
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_wealth/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/carbon/C in targets)
|
||||
if(user.drop_item())
|
||||
var/obj/item = pick(
|
||||
new /obj/item/coin/gold(user.loc),
|
||||
new /obj/item/coin/diamond(user.loc),
|
||||
new /obj/item/coin/silver(user.loc),
|
||||
new /obj/item/stack/sheet/mineral/gold(user.loc),
|
||||
new /obj/item/stack/sheet/mineral/silver(user.loc),
|
||||
new /obj/item/stack/sheet/mineral/diamond(user.loc),
|
||||
new /obj/item/stack/spacecash/c1000(user.loc))
|
||||
C.put_in_hands(item)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/view_range
|
||||
name = "Distant vision"
|
||||
desc = "The reward for selling your soul."
|
||||
invocation_type = "none"
|
||||
include_user = 1
|
||||
range = -1
|
||||
clothes_req = 0
|
||||
charge_max = 50
|
||||
cooldown_min = 10
|
||||
action_icon_state = "camera_jump"
|
||||
var/ranges = list(7,8,9,10/*,11,12*/)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/view_range/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/C in targets)
|
||||
if(!C.client)
|
||||
continue
|
||||
C.client.view = input("Select view range:", "Range", 4) in ranges
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_friend
|
||||
name = "Summon Friend"
|
||||
desc = "The reward for selling your soul."
|
||||
invocation_type = "none"
|
||||
include_user = 1
|
||||
range = -1
|
||||
clothes_req = 0
|
||||
charge_max = 50
|
||||
cooldown_min = 10
|
||||
action_icon_state = "sacredflame"
|
||||
var/mob/living/friend
|
||||
var/obj/effect/mob_spawn/human/demonic_friend/friendShell
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/summon_friend/cast(list/targets, mob/user = usr)
|
||||
if(!QDELETED(friend))
|
||||
to_chat(friend, "<span class='userdanger'>Your master has deemed you a poor friend. Your durance in hell will now resume.</span>")
|
||||
to_chat(user, "<span class='notice'>You banish your friend back to whence [friend.p_they()] came.</span>")
|
||||
friend.dust()
|
||||
qdel(friendShell)
|
||||
return
|
||||
if(!QDELETED(friendShell))
|
||||
qdel(friendShell)
|
||||
return
|
||||
for(var/C in targets)
|
||||
var/mob/living/L = C
|
||||
friendShell = new /obj/effect/mob_spawn/human/demonic_friend(L.loc, L.mind, src)
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/conjure_item/spellpacket/robeless
|
||||
clothes_req = FALSE
|
||||
+16
-12
@@ -16,19 +16,23 @@
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets, mob/user = usr)
|
||||
for(var/turf/T in targets)
|
||||
for(var/obj/machinery/door/door in T.contents)
|
||||
spawn(1)
|
||||
if(istype(door,/obj/machinery/door/airlock/hatch/gamma))
|
||||
return
|
||||
if(istype(door,/obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = door
|
||||
A.unlock(1) //forced because it's magic!
|
||||
door.open()
|
||||
INVOKE_ASYNC(src, .proc/try_open_airlock, door)
|
||||
for(var/obj/structure/closet/C in T.contents)
|
||||
spawn(1)
|
||||
if(istype(C, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = C
|
||||
SC.locked = 0
|
||||
C.open()
|
||||
INVOKE_ASYNC(src, .proc/try_open_closet, C)
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/proc/try_open_airlock(obj/machinery/door/door)
|
||||
if(istype(door, /obj/machinery/door/airlock/hatch/gamma))
|
||||
return
|
||||
if(istype(door, /obj/machinery/door/airlock))
|
||||
var/obj/machinery/door/airlock/A = door
|
||||
A.unlock(TRUE) //forced because it's magic!
|
||||
door.open()
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/proc/try_open_closet(obj/structure/closet/C)
|
||||
if(istype(C, /obj/structure/closet/secure_closet))
|
||||
var/obj/structure/closet/secure_closet/SC = C
|
||||
SC.locked = FALSE
|
||||
C.open()
|
||||
|
||||
/obj/effect/proc_holder/spell/aoe_turf/knock/greater
|
||||
name = "Greater Knock"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY_ENGINEER,SUPPLY_MEDICAL,SUPPLY_SCIENCE,SUPPLY_ORGANIC,SUPPLY_MATERIALS,SUPPLY_MISC,SUPPLY_VEND))
|
||||
|
||||
/proc/get_supply_group_name(var/cat)
|
||||
/proc/get_supply_group_name(cat)
|
||||
switch(cat)
|
||||
if(SUPPLY_EMERGENCY)
|
||||
return "Emergency"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
|
||||
/proc/get_uplink_items(var/job = null)
|
||||
/proc/get_uplink_items(job = null)
|
||||
var/list/uplink_items = list()
|
||||
var/list/sales_items = list()
|
||||
var/newreference = 1
|
||||
@@ -82,7 +82,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
var/refund_path = null // Alternative path for refunds, in case the item purchased isn't what is actually refunded (ie: holoparasites).
|
||||
var/refund_amount // specified refund amount in case there needs to be a TC penalty for refunds.
|
||||
|
||||
/datum/uplink_item/proc/spawn_item(var/turf/loc, var/obj/item/uplink/U)
|
||||
/datum/uplink_item/proc/spawn_item(turf/loc, obj/item/uplink/U)
|
||||
|
||||
if(hijack_only && !(usr.mind.special_role == SPECIAL_ROLE_NUKEOPS))//nukies get items that regular traitors only get with hijack. If a hijack-only item is not for nukies, then exclude it via the gamemode list.
|
||||
if(!(locate(/datum/objective/hijack) in usr.mind.objectives))
|
||||
@@ -103,7 +103,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
desc = replacetext(initial(temp.desc), "\n", "<br>")
|
||||
return desc
|
||||
|
||||
/datum/uplink_item/proc/buy(var/obj/item/uplink/hidden/U, var/mob/user)
|
||||
/datum/uplink_item/proc/buy(obj/item/uplink/hidden/U, mob/user)
|
||||
|
||||
if(!istype(U))
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user