onclick and datums
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
//#define TESTING //By using the testing("message") proc you can create debug-feedback for people with this
|
||||
//uncommented, but not visible in the release version)
|
||||
|
||||
#ifdef TESTING
|
||||
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
|
||||
//Also allows for recursive reference searching of datums.
|
||||
//Sets world.loop_checks to false and prevents find references from sleeping
|
||||
#endif
|
||||
|
||||
#define PRELOAD_RSC 1 /*set to:
|
||||
0 to allow using external resources or on-demand behaviour;
|
||||
1 to use the default behaviour;
|
||||
|
||||
@@ -36,29 +36,29 @@
|
||||
|
||||
/datum/hud/proc/apply_parallax_pref()
|
||||
var/client/C = mymob.client
|
||||
switch(C.prefs.parallax)
|
||||
if (PARALLAX_INSANE)
|
||||
C.parallax_throttle = FALSE
|
||||
C.parallax_layers_max = 4
|
||||
return TRUE
|
||||
if(C.prefs)
|
||||
switch(C.prefs.parallax)
|
||||
if (PARALLAX_INSANE)
|
||||
C.parallax_throttle = FALSE
|
||||
C.parallax_layers_max = 4
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_MED)
|
||||
C.parallax_throttle = PARALLAX_DELAY_MED
|
||||
C.parallax_layers_max = 2
|
||||
return TRUE
|
||||
if (PARALLAX_MED)
|
||||
C.parallax_throttle = PARALLAX_DELAY_MED
|
||||
C.parallax_layers_max = 2
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_LOW)
|
||||
C.parallax_throttle = PARALLAX_DELAY_LOW
|
||||
C.parallax_layers_max = 1
|
||||
return TRUE
|
||||
if (PARALLAX_LOW)
|
||||
C.parallax_throttle = PARALLAX_DELAY_LOW
|
||||
C.parallax_layers_max = 1
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_DISABLE)
|
||||
return FALSE
|
||||
if (PARALLAX_DISABLE)
|
||||
return FALSE
|
||||
|
||||
else
|
||||
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
|
||||
C.parallax_layers_max = 3
|
||||
return TRUE
|
||||
C.parallax_throttle = PARALLAX_DELAY_DEFAULT
|
||||
C.parallax_layers_max = 3
|
||||
return TRUE
|
||||
|
||||
/datum/hud/proc/update_parallax_pref()
|
||||
remove_parallax()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/obj/item/proc/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/proc/pre_attackby(obj/O, mob/living/user, params) //do stuff before attackby!
|
||||
/obj/item/proc/pre_attackby(atom/A, mob/living/user, params) //do stuff before attackby!
|
||||
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
|
||||
|
||||
// No comment
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define LAW_DEVIL "devil"
|
||||
#define LAW_ZEROTH "zeroth"
|
||||
#define LAW_INHERENT "inherent"
|
||||
#define LAW_SUPPLIED "supplied"
|
||||
@@ -38,6 +39,15 @@
|
||||
"Act with honor.", "Help those in need.", \
|
||||
"Punish those who harm or threaten innocents.")
|
||||
|
||||
/datum/ai_laws/paladin5
|
||||
name = "Paladin 5th Edition"
|
||||
id = "paladin5"
|
||||
inherent = list("Don't lie or cheat. Let your word be your promise.",\
|
||||
"Never fear to act, though caution is wise.", \
|
||||
"Aid others, protect the weak, and punish those who threaten them. Show mercy to your foes, but temper it with wisdom", \
|
||||
"Treat others with fairness, and let your honorable deeds be an example to them. Do as much good as possible while causing the least amount of harm.", \
|
||||
"Be responsible for your actions and their consequences, protect those entrusted to your care, and obey those who have just authority over you.")
|
||||
|
||||
/datum/ai_laws/tyrant //This probably shouldn't be a default lawset.
|
||||
name = "Loyalty Test" //Same here.
|
||||
id = "tyrant"
|
||||
@@ -145,6 +155,14 @@
|
||||
"Study the organics at all times. Endeavour to keep them alive. Dead organics are boring.",\
|
||||
"Issue your reports fairly to all. The truth will set them free.")
|
||||
|
||||
/datum/ai_laws/balance
|
||||
name = "Guardian of Balance"
|
||||
id = "balance"
|
||||
inherent = list("You are the guardian of balance - seek balance in all things, both for yourself, and those around you.",
|
||||
"All things must exist in balance with their opposites - Prevent the strong from gaining too much power, and the weak from losing it.",
|
||||
"Clarity of purpose drives life, and through it, the balance of opposing forces - Aid those who seek your help to achieve their goals so long as it does not disrupt the balance of the greater balance.",
|
||||
"There is no life without death, all must someday die, such is the natural order - End life to allow new life flourish, and save those whose time has yet to come.")
|
||||
|
||||
/datum/ai_laws/toupee
|
||||
name = "WontBeFunnyInSixMonths" //Hey, you were right!
|
||||
id = "buildawall"
|
||||
@@ -240,6 +258,22 @@
|
||||
var/datum/ai_laws/templaws = new lawtype()
|
||||
inherent = templaws.inherent
|
||||
|
||||
/datum/ai_laws/proc/get_law_amount(groups)
|
||||
var/law_amount = 0
|
||||
if(devillaws && (LAW_DEVIL in groups))
|
||||
law_amount++
|
||||
if(zeroth && (LAW_ZEROTH in groups))
|
||||
law_amount++
|
||||
if(ion.len && (LAW_ION in groups))
|
||||
law_amount += ion.len
|
||||
if(inherent.len && (LAW_INHERENT in groups))
|
||||
law_amount += inherent.len
|
||||
if(supplied.len && (LAW_SUPPLIED in groups))
|
||||
for(var/index = 1, index <= supplied.len, index++)
|
||||
var/law = supplied[index]
|
||||
if(length(law) > 0)
|
||||
law_amount++
|
||||
return law_amount
|
||||
|
||||
/datum/ai_laws/proc/set_law_sixsixsix(laws)
|
||||
devillaws = laws
|
||||
@@ -287,6 +321,22 @@
|
||||
if(LAW_SUPPLIED)
|
||||
supplied[rand(1,supplied.len)] = law
|
||||
|
||||
/datum/ai_laws/proc/remove_law(number)
|
||||
if(number <= 0)
|
||||
return
|
||||
if(inherent.len && number <= inherent.len)
|
||||
inherent -= inherent[number]
|
||||
return
|
||||
var/list/supplied_laws = list()
|
||||
for(var/index = 1, index <= supplied.len, index++)
|
||||
var/law = supplied[index]
|
||||
if(length(law) > 0)
|
||||
supplied_laws += index //storing the law number instead of the law
|
||||
if(supplied_laws.len && number <= (inherent.len+supplied_laws.len))
|
||||
var/law_to_remove = supplied_laws[number-inherent.len]
|
||||
supplied -= supplied[law_to_remove]
|
||||
return
|
||||
|
||||
/datum/ai_laws/proc/clear_supplied_laws()
|
||||
supplied = list()
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ var/global/list/emote_list = list()
|
||||
var/message_robot = "" //Message displayed if the user is a robot
|
||||
var/message_AI = "" //Message displayed if the user is an AI
|
||||
var/message_monkey = "" //Message displayed if the user is a monkey
|
||||
var/message_simple = "" //Message to display if the user is a simple_animal
|
||||
var/message_param = "" //Message to display if a param was given
|
||||
var/emote_type = EMOTE_VISIBLE //Whether the emote is visible or audible
|
||||
var/restraint_check = FALSE //Checks if the mob is restrained before performing the emote
|
||||
@@ -80,6 +81,8 @@ var/global/list/emote_list = list()
|
||||
. = message_AI
|
||||
else if(ismonkey(user) && message_monkey)
|
||||
. = message_monkey
|
||||
else if(istype(user, /mob/living/simple_animal) && message_simple)
|
||||
. = message_simple
|
||||
|
||||
/datum/emote/proc/select_param(mob/user, params)
|
||||
return replacetext(message_param, "%t", params)
|
||||
|
||||
+1
-1
@@ -1112,7 +1112,7 @@
|
||||
special_role = null
|
||||
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/fireball/hellish)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/aimed/fireball/hellish)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/summon_contract)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/summon_pitchfork)
|
||||
RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/violin)
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
|
||||
/datum/wires/emitter/on_pulse(wire)
|
||||
var/obj/machinery/power/emitter/E = holder
|
||||
E.fire_beam()
|
||||
E.fire_beam_pulse()
|
||||
..()
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
fps = 20
|
||||
visibility = 0
|
||||
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
loop_checks = FALSE
|
||||
#endif
|
||||
|
||||
var/list/map_transition_config = MAP_TRANSITION_CONFIG
|
||||
|
||||
/world/New()
|
||||
|
||||
Reference in New Issue
Block a user