mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Bools and returns super-pr (#53221)
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns Edit: Most left out ones are in mecha which should be done in mecha refactor already Oh my look how clean it is Co-authored-by: TiviPlus <TiviPlus> Co-authored-by: Couls <coul422@gmail.com>
This commit is contained in:
@@ -47,12 +47,12 @@
|
||||
var/time_to_wait = GLOB.fileaccess_timer - world.time
|
||||
if(time_to_wait > 0)
|
||||
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].</font>")
|
||||
return 1
|
||||
return TRUE
|
||||
var/delay = FTPDELAY
|
||||
if(holder)
|
||||
delay *= ADMIN_FTPDELAY_MODIFIER
|
||||
GLOB.fileaccess_timer = world.time + delay
|
||||
return 0
|
||||
return FALSE
|
||||
#undef FTPDELAY
|
||||
#undef ADMIN_FTPDELAY_MODIFIER
|
||||
|
||||
|
||||
+7
-11
@@ -94,8 +94,8 @@
|
||||
if(C == must_be_alone)
|
||||
continue
|
||||
if(our_area == get_area(C))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
//We used to use linear regression to approximate the answer, but Mloc realized this was actually faster.
|
||||
//And lo and behold, it is, and it's more accurate to boot.
|
||||
@@ -263,7 +263,7 @@
|
||||
while(Y1!=Y2)
|
||||
T=locate(X1,Y1,Z)
|
||||
if(IS_OPAQUE_TURF(T))
|
||||
return 0
|
||||
return FALSE
|
||||
Y1+=s
|
||||
else
|
||||
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
|
||||
@@ -279,8 +279,8 @@
|
||||
X1+=signX //Line exits tile horizontally
|
||||
T=locate(X1,Y1,Z)
|
||||
if(IS_OPAQUE_TURF(T))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
#undef SIGNV
|
||||
|
||||
|
||||
@@ -289,13 +289,9 @@
|
||||
var/turf/Bturf = get_turf(B)
|
||||
|
||||
if(!Aturf || !Bturf)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(inLineOfSight(Aturf.x,Aturf.y, Bturf.x,Bturf.y,Aturf.z))
|
||||
return 1
|
||||
|
||||
else
|
||||
return 0
|
||||
return inLineOfSight(Aturf.x,Aturf.y, Bturf.x,Bturf.y,Aturf.z)
|
||||
|
||||
/proc/try_move_adjacent(atom/movable/AM, trydir)
|
||||
var/turf/T = get_turf(AM)
|
||||
|
||||
@@ -257,15 +257,15 @@
|
||||
/proc/text_in_list(haystack, list/needle_list, start=1, end=0)
|
||||
for(var/needle in needle_list)
|
||||
if(findtext(haystack, needle, start, end))
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Like above, but case sensitive
|
||||
/proc/text_in_list_case(haystack, list/needle_list, start=1, end=0)
|
||||
for(var/needle in needle_list)
|
||||
if(findtextEx(haystack, needle, start, end))
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Adds 'char' ahead of 'text' until there are 'count' characters total
|
||||
/proc/add_leading(text, count, char = " ")
|
||||
|
||||
+10
-10
@@ -669,28 +669,28 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
|
||||
//Direction works sometimes
|
||||
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
|
||||
if(O.dir == turn(dir, 180))
|
||||
return 1
|
||||
return TRUE
|
||||
else if(O.dir == dir)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
//Some stuff doesn't use dir properly, so we need to check pixel instead
|
||||
//That's exactly what get_turf_pixel() does
|
||||
if(get_turf_pixel(O) == locdir)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(is_type_in_typecache(O, GLOB.WALLITEMS_EXTERNAL) && check_external)
|
||||
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
|
||||
if(O.dir == turn(dir, 180))
|
||||
return 1
|
||||
return TRUE
|
||||
else if(O.dir == dir)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
//Some stuff is placed directly on the wallturf (signs)
|
||||
for(var/obj/O in locdir)
|
||||
if(is_type_in_typecache(O, GLOB.WALLITEMS) && check_external != 2)
|
||||
if(O.pixel_x == 0 && O.pixel_y == 0)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/proc/format_text(text)
|
||||
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
|
||||
@@ -976,13 +976,13 @@ B --><-- A
|
||||
|
||||
/atom/proc/contains(atom/A)
|
||||
if(!A)
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/atom/location = A.loc, location, location = location.loc)
|
||||
if(location == src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/proc/flick_overlay_static(O, atom/A, duration)
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
if(!A || !O)
|
||||
return
|
||||
A.add_overlay(O)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
to check that the mob is not inside of something
|
||||
*/
|
||||
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
|
||||
return 0
|
||||
return
|
||||
|
||||
// Not a sane use of the function and (for now) indicative of an error elsewhere
|
||||
/area/Adjacent(atom/neighbor)
|
||||
@@ -57,9 +57,9 @@
|
||||
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover))
|
||||
continue // could not enter src
|
||||
|
||||
return 1 // we don't care about our own density
|
||||
return TRUE // we don't care about our own density
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
Adjacency (to anything else):
|
||||
@@ -78,11 +78,11 @@
|
||||
// This is necessary for storage items not on your person.
|
||||
/obj/item/Adjacent(atom/neighbor, recurse = 1)
|
||||
if(neighbor == loc)
|
||||
return 1
|
||||
return TRUE
|
||||
if(isitem(loc))
|
||||
if(recurse > 0)
|
||||
return loc.Adjacent(neighbor,recurse - 1)
|
||||
return 0
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/*
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
if( O.flags_1&ON_BORDER_1) // windows are on border, check them first
|
||||
if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
|
||||
return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
|
||||
return FALSE //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
|
||||
else if( !border_only ) // dense, not on border, cannot pass over
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -78,13 +78,13 @@
|
||||
. = automatic
|
||||
|
||||
/atom/proc/IsAutoclickable()
|
||||
. = 1
|
||||
return TRUE
|
||||
|
||||
/obj/screen/IsAutoclickable()
|
||||
. = 0
|
||||
return FALSE
|
||||
|
||||
/obj/screen/click_catcher/IsAutoclickable()
|
||||
. = 1
|
||||
return TRUE
|
||||
|
||||
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
|
||||
var/list/L = params2list(params)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/obj/screen/movable/action_button/Click(location,control,params)
|
||||
if (!can_use(usr))
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"])
|
||||
@@ -68,7 +68,7 @@
|
||||
desc = "Shift-click any button to reset its position, and Control-click it to lock it in place. Alt-click this button to reset all buttons to their default positions."
|
||||
icon = 'icons/mob/actions.dmi'
|
||||
icon_state = "bg_default"
|
||||
var/hidden = 0
|
||||
var/hidden = FALSE
|
||||
var/hide_icon = 'icons/mob/actions.dmi'
|
||||
var/hide_state = "hide"
|
||||
var/show_state = "show"
|
||||
@@ -78,7 +78,7 @@
|
||||
/obj/screen/movable/action_button/hide_toggle/Initialize()
|
||||
. = ..()
|
||||
var/static/list/icon_cache = list()
|
||||
|
||||
|
||||
var/cache_key = "[hide_icon][hide_state]"
|
||||
hide_appearance = icon_cache[cache_key]
|
||||
if(!hide_appearance)
|
||||
|
||||
@@ -83,14 +83,15 @@
|
||||
required_software = "host scan"
|
||||
|
||||
/obj/screen/pai/host_monitor/Click()
|
||||
if(!..())
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/living/silicon/pai/pAI = usr
|
||||
if(iscarbon(pAI.card.loc))
|
||||
pAI.hostscan.attack(pAI.card.loc, pAI)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You are not being carried by anyone!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/screen/pai/crew_manifest
|
||||
name = "Crew Manifest"
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
*/
|
||||
|
||||
/mob/living/carbon/RestrainedClickOn(atom/A)
|
||||
return 0
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/RangedAttack(atom/A, mouseparams)
|
||||
. = ..()
|
||||
|
||||
@@ -31,7 +31,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
|
||||
Initialize()
|
||||
|
||||
/datum/controller/failsafe/Initialize()
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
Failsafe.Loop()
|
||||
if(!QDELETED(src))
|
||||
qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us
|
||||
|
||||
@@ -22,13 +22,13 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
|
||||
|
||||
/datum/controller/global_vars/Destroy(force)
|
||||
// This is done to prevent an exploit where admins can get around protected vars
|
||||
SHOULD_CALL_PARENT(0)
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
return QDEL_HINT_IWILLGC
|
||||
|
||||
/datum/controller/global_vars/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
|
||||
stat("Globals:", statclick.update("Edit"))
|
||||
|
||||
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
|
||||
|
||||
@@ -39,7 +39,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
///Only run ticker subsystems for the next n ticks.
|
||||
var/skip_ticks = 0
|
||||
|
||||
var/make_runtime = 0
|
||||
var/make_runtime = FALSE
|
||||
|
||||
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
var/priority = FIRE_PRIORITY_DEFAULT
|
||||
|
||||
/// [Subsystem Flags][SS_NO_INIT] to control binary behavior. Flags must be set at compile time or before preinit finishes to take full effect. (You can also restart the mc to force them to process again)
|
||||
var/flags = 0
|
||||
var/flags = NONE
|
||||
|
||||
/// This var is set to TRUE after the subsystem has been initialized.
|
||||
var/initialized = FALSE
|
||||
|
||||
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(acid)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/acid/fire(resumed = 0)
|
||||
/datum/controller/subsystem/acid/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = processing.Copy()
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ SUBSYSTEM_DEF(air)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/fire(resumed = 0)
|
||||
/datum/controller/subsystem/air/fire(resumed = FALSE)
|
||||
var/timer = TICK_USAGE_REAL
|
||||
|
||||
if(currentpart == SSAIR_REBUILD_PIPENETS)
|
||||
@@ -90,7 +90,7 @@ SUBSYSTEM_DEF(air)
|
||||
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_ATMOSMACHINERY
|
||||
|
||||
if(currentpart == SSAIR_ATMOSMACHINERY)
|
||||
@@ -99,7 +99,7 @@ SUBSYSTEM_DEF(air)
|
||||
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_ACTIVETURFS
|
||||
|
||||
if(currentpart == SSAIR_ACTIVETURFS)
|
||||
@@ -108,7 +108,7 @@ SUBSYSTEM_DEF(air)
|
||||
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_EXCITEDGROUPS
|
||||
|
||||
if(currentpart == SSAIR_EXCITEDGROUPS)
|
||||
@@ -117,7 +117,7 @@ SUBSYSTEM_DEF(air)
|
||||
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_HIGHPRESSURE
|
||||
|
||||
if(currentpart == SSAIR_HIGHPRESSURE)
|
||||
@@ -126,7 +126,7 @@ SUBSYSTEM_DEF(air)
|
||||
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_HOTSPOTS
|
||||
|
||||
if(currentpart == SSAIR_HOTSPOTS)
|
||||
@@ -135,7 +135,7 @@ SUBSYSTEM_DEF(air)
|
||||
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_SUPERCONDUCTIVITY
|
||||
|
||||
if(currentpart == SSAIR_SUPERCONDUCTIVITY)
|
||||
@@ -144,13 +144,13 @@ SUBSYSTEM_DEF(air)
|
||||
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_REBUILD_PIPENETS
|
||||
|
||||
SStgui.update_uis(SSair) //Lightning fast debugging motherfucker
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = networks.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -169,7 +169,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(istype(atmos_machine, /obj/machinery/atmospherics))
|
||||
pipenets_needing_rebuilt += atmos_machine
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = FALSE)
|
||||
var/seconds = wait * 0.1
|
||||
if (!resumed)
|
||||
src.currentrun = atmos_machinery.Copy()
|
||||
@@ -184,7 +184,7 @@ SUBSYSTEM_DEF(air)
|
||||
return
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = active_super_conductivity.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -196,7 +196,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_hotspots(resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = hotspots.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -212,7 +212,7 @@ SUBSYSTEM_DEF(air)
|
||||
return
|
||||
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_high_pressure_delta(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_high_pressure_delta(resumed = FALSE)
|
||||
while (high_pressure_delta.len)
|
||||
var/turf/open/T = high_pressure_delta[high_pressure_delta.len]
|
||||
high_pressure_delta.len--
|
||||
@@ -221,7 +221,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_active_turfs(resumed = FALSE)
|
||||
//cache for sanic speed
|
||||
var/fire_count = times_fired
|
||||
if (!resumed)
|
||||
@@ -236,7 +236,7 @@ SUBSYSTEM_DEF(air)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
|
||||
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = excited_groups.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -262,7 +262,7 @@ SUBSYSTEM_DEF(air)
|
||||
T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, COLOR_VIBRANT_LIME)
|
||||
#endif
|
||||
if(istype(T))
|
||||
T.excited = 0
|
||||
T.excited = FALSE
|
||||
if(T.excited_group)
|
||||
T.excited_group.garbage_collect()
|
||||
|
||||
@@ -271,7 +271,7 @@ SUBSYSTEM_DEF(air)
|
||||
#ifdef VISUALIZE_ACTIVE_TURFS
|
||||
T.add_atom_colour(COLOR_VIBRANT_LIME, TEMPORARY_COLOUR_PRIORITY)
|
||||
#endif
|
||||
T.excited = 1
|
||||
T.excited = TRUE
|
||||
active_turfs |= T
|
||||
if(currentpart == SSAIR_ACTIVETURFS)
|
||||
currentrun |= T
|
||||
@@ -370,7 +370,7 @@ SUBSYSTEM_DEF(air)
|
||||
else
|
||||
EG.add_turf(ET)
|
||||
if (!ET.excited)
|
||||
ET.excited = 1
|
||||
ET.excited = TRUE
|
||||
. += ET
|
||||
/turf/open/space/resolve_active_graph()
|
||||
return list()
|
||||
|
||||
@@ -42,14 +42,14 @@ SUBSYSTEM_DEF(discord)
|
||||
var/list/reverify_cache = list()
|
||||
var/notify_file = file("data/notify.json")
|
||||
/// Is TGS enabled (If not we won't fire because otherwise this is useless)
|
||||
var/enabled = 0
|
||||
var/enabled = FALSE
|
||||
|
||||
/datum/controller/subsystem/discord/Initialize(start_timeofday)
|
||||
// Check for if we are using TGS, otherwise return and disables firing
|
||||
if(world.TgsAvailable())
|
||||
enabled = 1 // Allows other procs to use this (Account linking, etc)
|
||||
enabled = TRUE // Allows other procs to use this (Account linking, etc)
|
||||
else
|
||||
can_fire = 0 // We dont want excess firing
|
||||
can_fire = FALSE // We dont want excess firing
|
||||
return ..() // Cancel
|
||||
|
||||
try
|
||||
|
||||
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(events)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/events/fire(resumed = 0)
|
||||
/datum/controller/subsystem/events/fire(resumed = FALSE)
|
||||
if(!resumed)
|
||||
checkEvent() //only check these if we aren't resuming a paused fire
|
||||
src.currentrun = running.Copy()
|
||||
|
||||
@@ -2,13 +2,13 @@ SUBSYSTEM_DEF(ipintel)
|
||||
name = "XKeyScore"
|
||||
init_order = INIT_ORDER_XKEYSCORE
|
||||
flags = SS_NO_FIRE
|
||||
var/enabled = 0 //disable at round start to avoid checking reconnects
|
||||
var/enabled = FALSE //disable at round start to avoid checking reconnects
|
||||
var/throttle = 0
|
||||
var/errors = 0
|
||||
|
||||
var/list/cache = list()
|
||||
|
||||
/datum/controller/subsystem/ipintel/Initialize(timeofday, zlevel)
|
||||
enabled = 1
|
||||
enabled = TRUE
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ SUBSYSTEM_DEF(job)
|
||||
var/list/all_jobs = subtypesof(/datum/job)
|
||||
if(!all_jobs.len)
|
||||
to_chat(world, "<span class='boldannounce'>Error setting up jobs, no job datums found</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
for(var/J in all_jobs)
|
||||
var/datum/job/job = new J()
|
||||
@@ -62,7 +62,7 @@ SUBSYSTEM_DEF(job)
|
||||
name_occupations[job.title] = job
|
||||
type_occupations[J] = job
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/controller/subsystem/job/proc/GetJob(rank)
|
||||
@@ -189,8 +189,8 @@ SUBSYSTEM_DEF(job)
|
||||
continue
|
||||
var/mob/dead/new_player/candidate = pick(candidates)
|
||||
if(AssignRole(candidate, command_position))
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
//This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
|
||||
@@ -209,10 +209,10 @@ SUBSYSTEM_DEF(job)
|
||||
AssignRole(candidate, command_position)
|
||||
|
||||
/datum/controller/subsystem/job/proc/FillAIPosition()
|
||||
var/ai_selected = 0
|
||||
var/ai_selected = FALSE
|
||||
var/datum/job/job = GetJob("AI")
|
||||
if(!job)
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/i = job.total_positions, i > 0, i--)
|
||||
for(var/level in level_order)
|
||||
var/list/candidates = list()
|
||||
@@ -223,8 +223,8 @@ SUBSYSTEM_DEF(job)
|
||||
ai_selected++
|
||||
break
|
||||
if(ai_selected)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
/** Proc DivideOccupations
|
||||
|
||||
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(machines)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/machines/fire(resumed = 0)
|
||||
/datum/controller/subsystem/machines/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
for(var/datum/powernet/Powernet in powernets)
|
||||
Powernet.reset() //reset the power state.
|
||||
|
||||
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(mobs)
|
||||
dead_players_by_zlevel.len++
|
||||
dead_players_by_zlevel[dead_players_by_zlevel.len] = list()
|
||||
|
||||
/datum/controller/subsystem/mobs/fire(resumed = 0)
|
||||
/datum/controller/subsystem/mobs/fire(resumed = FALSE)
|
||||
var/seconds = wait * 0.1
|
||||
if (!resumed)
|
||||
src.currentrun = GLOB.mob_living_list.Copy()
|
||||
|
||||
@@ -68,7 +68,7 @@ SUBSYSTEM_DEF(pai)
|
||||
|
||||
if("submit")
|
||||
if(candidate)
|
||||
candidate.ready = 1
|
||||
candidate.ready = TRUE
|
||||
for(var/obj/item/paicard/p in pai_card_list)
|
||||
if(!p.pai)
|
||||
p.alertUpdate()
|
||||
@@ -195,4 +195,4 @@ SUBSYSTEM_DEF(pai)
|
||||
var/description
|
||||
var/role
|
||||
var/comments
|
||||
var/ready = 0
|
||||
var/ready = FALSE
|
||||
|
||||
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(processing)
|
||||
msg = "[stat_tag]:[length(processing)]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/processing/fire(resumed = 0)
|
||||
/datum/controller/subsystem/processing/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
currentrun = processing.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
@@ -34,5 +34,5 @@ SUBSYSTEM_DEF(processing)
|
||||
|
||||
///This proc is called on a datum if it is being processed in a subsystem. If you override this do not call parent, as it will return PROCESS_KILL. This is done to prevent objects that dont override process() from staying in the processing list
|
||||
/datum/proc/process()
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -303,7 +303,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
if (!SSticker.IsRoundInProgress())
|
||||
return
|
||||
|
||||
var/callShuttle = 1
|
||||
var/callShuttle = TRUE
|
||||
|
||||
for(var/thing in GLOB.shuttle_caller_list)
|
||||
if(isAI(thing))
|
||||
@@ -319,7 +319,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
var/turf/T = get_turf(thing)
|
||||
if(T && is_station_level(T.z))
|
||||
callShuttle = 0
|
||||
callShuttle = FALSE
|
||||
break
|
||||
|
||||
if(callShuttle)
|
||||
|
||||
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(spacedrift)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/spacedrift/fire(resumed = 0)
|
||||
/datum/controller/subsystem/spacedrift/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
src.currentrun = processing.Copy()
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(tgui)
|
||||
msg = "P:[length(open_uis)]"
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/tgui/fire(resumed = 0)
|
||||
/datum/controller/subsystem/tgui/fire(resumed = FALSE)
|
||||
if(!resumed)
|
||||
src.current_run = open_uis.Copy()
|
||||
// Cache for sanic speed (lists are references anyways)
|
||||
|
||||
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/start_immediately = FALSE
|
||||
var/setup_done = FALSE //All game setup done including mode post setup and
|
||||
|
||||
var/hide_mode = 0
|
||||
var/hide_mode = FALSE
|
||||
var/datum/game_mode/mode = null
|
||||
|
||||
var/login_music //music played in pregame lobby
|
||||
@@ -23,7 +23,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
var/list/datum/mind/minds = list() //The characters in the game. Used for objective tracking.
|
||||
|
||||
var/delay_end = 0 //if set true, the round will not restart on it's own
|
||||
var/delay_end = FALSE //if set true, the round will not restart on it's own
|
||||
var/admin_delay_notice = "" //a message to display to anyone who tries to restart the world after a delay
|
||||
var/ready_for_reboot = FALSE //all roundend preparation done with, all that's left is reboot
|
||||
|
||||
@@ -32,7 +32,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
///Boolean to see if the game needs to set up a triumvirate ai (see tripAI.dm)
|
||||
var/triai = FALSE
|
||||
|
||||
var/tipped = 0 //Did we broadcast the tip of the day yet?
|
||||
var/tipped = FALSE //Did we broadcast the tip of the day yet?
|
||||
var/selected_tip // What will be the tip of the day?
|
||||
|
||||
var/timeLeft //pregame timer
|
||||
@@ -227,7 +227,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(!mode)
|
||||
if(!runnable_modes.len)
|
||||
to_chat(world, "<B>Unable to choose playable game mode.</B> Reverting to pre-game lobby.")
|
||||
return 0
|
||||
return FALSE
|
||||
mode = pickweight(runnable_modes)
|
||||
if(!mode) //too few roundtypes all run too recently
|
||||
mode = pick(runnable_modes)
|
||||
@@ -239,7 +239,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
qdel(mode)
|
||||
mode = null
|
||||
SSjob.ResetOccupations()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
CHECK_TICK
|
||||
//Configure mode and assign player to special mode stuff
|
||||
@@ -255,7 +255,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
QDEL_NULL(mode)
|
||||
to_chat(world, "<B>Error setting up [GLOB.master_mode].</B> Reverting to pre-game lobby.")
|
||||
SSjob.ResetOccupations()
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
message_admins("<span class='notice'>DEBUG: Bypassing prestart checks...</span>")
|
||||
|
||||
|
||||
@@ -168,12 +168,13 @@
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/Trigger()
|
||||
if(!..())
|
||||
return 0
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
if(target)
|
||||
var/obj/item/I = target
|
||||
I.ui_action_click(owner, src)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button, force)
|
||||
if(button_icon && button_icon_state)
|
||||
@@ -315,7 +316,7 @@
|
||||
if(istype(target, /obj/item/hierophant_club))
|
||||
var/obj/item/hierophant_club/H = target
|
||||
if(H.teleporting)
|
||||
return 0
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/toggle_helmet_flashlight
|
||||
@@ -384,7 +385,7 @@
|
||||
/datum/action/item_action/jetpack_stabilization/IsAvailable()
|
||||
var/obj/item/tank/jetpack/J = target
|
||||
if(!istype(J) || !J.on)
|
||||
return 0
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/hands_free
|
||||
@@ -439,7 +440,7 @@
|
||||
/datum/action/item_action/organ_action/IsAvailable()
|
||||
var/obj/item/organ/I = target
|
||||
if(!I.owner)
|
||||
return 0
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/organ_action/toggle/New(Target)
|
||||
@@ -586,12 +587,12 @@
|
||||
|
||||
/datum/action/innate/Trigger()
|
||||
if(!..())
|
||||
return 0
|
||||
return FALSE
|
||||
if(!active)
|
||||
Activate()
|
||||
else
|
||||
Deactivate()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/proc/Activate()
|
||||
return
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
opentime = 0
|
||||
|
||||
/datum/browser/modal/open(use_onclose)
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
opentime = world.time
|
||||
|
||||
if (stealfocus)
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
// used ONLY on april's fool. I moved it to a component so it could be
|
||||
// used in other places
|
||||
|
||||
//This is copypasted on other obj so if you are readin this go refactor it, start on objs with var/limiting_spam
|
||||
/datum/component/honkspam
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/spam_flag = FALSE
|
||||
var/limiting_spam = FALSE
|
||||
|
||||
/datum/component/honkspam/Initialize()
|
||||
if(!isitem(parent))
|
||||
@@ -12,11 +13,11 @@
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/interact)
|
||||
|
||||
/datum/component/honkspam/proc/reset_spamflag()
|
||||
spam_flag = FALSE
|
||||
limiting_spam = FALSE
|
||||
|
||||
/datum/component/honkspam/proc/interact(mob/user)
|
||||
if(!spam_flag)
|
||||
spam_flag = TRUE
|
||||
if(!limiting_spam)
|
||||
limiting_spam = TRUE
|
||||
var/obj/item/parent_item = parent
|
||||
playsound(parent_item.loc, 'sound/items/bikehorn.ogg', 50, TRUE)
|
||||
addtimer(CALLBACK(src, .proc/reset_spamflag), 2 SECONDS)
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
else
|
||||
if(the_event.timeout)
|
||||
addtimer(CALLBACK(src, .proc/clear_event, null, category), the_event.timeout, TIMER_UNIQUE|TIMER_OVERRIDE)
|
||||
return 0 //Don't have to update the event.
|
||||
return //Don't have to update the event.
|
||||
var/list/params = args.Copy(4)
|
||||
params.Insert(1, parent)
|
||||
the_event = new type(arglist(params))
|
||||
@@ -276,7 +276,7 @@
|
||||
category = REF(category)
|
||||
var/datum/mood_event/event = mood_events[category]
|
||||
if(!event)
|
||||
return 0
|
||||
return
|
||||
|
||||
mood_events -= category
|
||||
qdel(event)
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
/datum/component/spawner/proc/try_spawn_mob()
|
||||
var/atom/P = parent
|
||||
if(spawned_mobs.len >= max_mobs)
|
||||
return 0
|
||||
return
|
||||
if(spawn_delay > world.time)
|
||||
return 0
|
||||
return
|
||||
spawn_delay = world.time + spawn_time
|
||||
var/chosen_mob_type = pick(mob_types)
|
||||
var/mob/living/simple_animal/L = new chosen_mob_type(P.loc)
|
||||
|
||||
@@ -52,11 +52,11 @@
|
||||
|
||||
/datum/component/summoning/proc/do_spawn_mob(atom/spawn_location, summoner)
|
||||
if(spawned_mobs.len >= max_mobs)
|
||||
return 0
|
||||
return
|
||||
if(last_spawned_time > world.time)
|
||||
return 0
|
||||
return
|
||||
if(!prob(spawn_chance))
|
||||
return 0
|
||||
return
|
||||
last_spawned_time = world.time + spawn_delay
|
||||
var/chosen_mob_type = pick(mob_types)
|
||||
var/mob/living/simple_animal/L = new chosen_mob_type(spawn_location)
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
* Returns [QDEL_HINT_QUEUE]
|
||||
*/
|
||||
/datum/proc/Destroy(force=FALSE, ...)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
tag = null
|
||||
datum_flags &= ~DF_USE_TAG //In case something tries to REF us
|
||||
weak_reference = null //ensure prompt GCing of weakref.
|
||||
|
||||
@@ -136,11 +136,11 @@
|
||||
/datum/disease/advance/IsSame(datum/disease/advance/D)
|
||||
|
||||
if(!(istype(D, /datum/disease/advance)))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(GetDiseaseID() != D.GetDiseaseID())
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// Returns the advance disease with a different reference memory.
|
||||
/datum/disease/advance/Copy()
|
||||
@@ -178,8 +178,8 @@
|
||||
/datum/disease/advance/proc/HasSymptom(datum/symptom/S)
|
||||
for(var/datum/symptom/symp in symptoms)
|
||||
if(symp.type == S.type)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
// Will generate new unique symptoms, use this if there are none. Returns a list of symptoms that were generated.
|
||||
/datum/disease/advance/proc/GenerateSymptoms(level_min, level_max, amount_get = 0)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
desc = "Monkeys with this disease will bite humans, causing humans to mutate into a monkey."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
stage_prob = 4
|
||||
visibility_flags = 0
|
||||
visibility_flags = NONE
|
||||
agent = "Kongey Vibrion M-909"
|
||||
new_form = /mob/living/carbon/monkey
|
||||
bantype = ROLE_MONKEY
|
||||
@@ -172,7 +172,7 @@
|
||||
agent = "R2D2 Nanomachines"
|
||||
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
visibility_flags = NONE
|
||||
stage1 = list()
|
||||
stage2 = list("Your joints feel stiff.", "<span class='danger'>Beep...boop..</span>")
|
||||
stage3 = list("<span class='danger'>Your joints feel very stiff.</span>", "Your skin feels loose.", "<span class='danger'>You can feel something move...inside.</span>")
|
||||
@@ -209,7 +209,7 @@
|
||||
agent = "Rip-LEY Alien Microbes"
|
||||
desc = "This disease changes the victim into a xenomorph."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
visibility_flags = NONE
|
||||
stage1 = list()
|
||||
stage2 = list("Your throat feels scratchy.", "<span class='danger'>Kill...</span>")
|
||||
stage3 = list("<span class='danger'>Your throat feels very scratchy.</span>", "Your skin feels tight.", "<span class='danger'>You can feel something move...inside.</span>")
|
||||
@@ -242,7 +242,7 @@
|
||||
agent = "Advanced Mutation Toxin"
|
||||
desc = "This highly concentrated extract converts anything into more of itself."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
visibility_flags = NONE
|
||||
stage1 = list("You don't feel very well.")
|
||||
stage2 = list("Your skin feels a little slimy.")
|
||||
stage3 = list("<span class='danger'>Your appendages are melting away.</span>", "<span class='danger'>Your limbs begin to lose their shape.</span>")
|
||||
@@ -275,7 +275,7 @@
|
||||
agent = "Fell Doge Majicks"
|
||||
desc = "This disease transforms the victim into a corgi."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
visibility_flags = NONE
|
||||
stage1 = list("BARK.")
|
||||
stage2 = list("You feel the need to wear silly hats.")
|
||||
stage3 = list("<span class='danger'>Must... eat... chocolate....</span>", "<span class='danger'>YAP</span>")
|
||||
@@ -305,7 +305,7 @@
|
||||
desc = "A 'gift' from somewhere terrible."
|
||||
stage_prob = 20
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
visibility_flags = NONE
|
||||
stage1 = list("Your stomach rumbles.")
|
||||
stage2 = list("Your skin feels saggy.")
|
||||
stage3 = list("<span class='danger'>Your appendages are melting away.</span>", "<span class='danger'>Your limbs begin to lose their shape.</span>")
|
||||
@@ -324,7 +324,7 @@
|
||||
agent = "Tranquility"
|
||||
desc = "Consuming the flesh of a Gondola comes at a terrible price."
|
||||
severity = DISEASE_SEVERITY_BIOHAZARD
|
||||
visibility_flags = 0
|
||||
visibility_flags = NONE
|
||||
stage1 = list("You seem a little lighter in your step.")
|
||||
stage2 = list("You catch yourself smiling for no reason.")
|
||||
stage3 = list("<span class='danger'>A cruel sense of calm overcomes you.</span>", "<span class='danger'>You can't feel your arms!</span>", "<span class='danger'>You let go of the urge to hurt clowns.</span>")
|
||||
|
||||
+5
-5
@@ -221,8 +221,8 @@
|
||||
/datum/dna/proc/is_same_as(datum/dna/D)
|
||||
if(uni_identity == D.uni_identity && mutation_index == D.mutation_index && real_name == D.real_name)
|
||||
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/dna/proc/update_instability(alert=TRUE)
|
||||
stability = 100
|
||||
@@ -438,7 +438,7 @@
|
||||
|
||||
/datum/dna/proc/check_block_string(mutation)
|
||||
if((LAZYLEN(mutation_index) > DNA_MUTATION_BLOCKS) || !(mutation in mutation_index))
|
||||
return 0
|
||||
return FALSE
|
||||
return is_gene_active(mutation)
|
||||
|
||||
/datum/dna/proc/is_gene_active(mutation)
|
||||
@@ -549,7 +549,7 @@
|
||||
|
||||
/proc/scramble_dna(mob/living/carbon/M, ui=FALSE, se=FALSE, probability)
|
||||
if(!M.has_dna())
|
||||
return 0
|
||||
return FALSE
|
||||
if(se)
|
||||
for(var/i=1, i<=DNA_MUTATION_BLOCKS, i++)
|
||||
if(prob(probability))
|
||||
@@ -560,7 +560,7 @@
|
||||
if(prob(probability))
|
||||
M.dna.uni_identity = setblock(M.dna.uni_identity, i, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters))
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
//value in range 1 to values. values must be greater than 0
|
||||
//all arguments assumed to be positive integers
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/// Activates the functionality defined by the element on the given target datum
|
||||
/datum/element/proc/Attach(datum/target)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(type == /datum/element)
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
SEND_SIGNAL(target, COMSIG_ELEMENT_ATTACH, src)
|
||||
@@ -30,7 +30,7 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
SEND_SIGNAL(source, COMSIG_ELEMENT_DETACH, src)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
UnregisterSignal(source, COMSIG_PARENT_QDELETING)
|
||||
|
||||
/datum/element/Destroy(force)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"<span class='danger'>You avoid [A]'s [atk_verb]!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, A)
|
||||
to_chat(A, "<span class='warning'>Your [atk_verb] misses [D]!</span>")
|
||||
log_combat(A, D, "attempted to hit", atk_verb)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
@@ -46,7 +46,7 @@
|
||||
D.apply_effect(200,EFFECT_KNOCKDOWN,armor_block)
|
||||
D.SetSleeping(100)
|
||||
log_combat(A, D, "knocked out (boxing) ")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/gloves/boxing
|
||||
var/datum/martial_art/boxing/style = new
|
||||
|
||||
@@ -75,20 +75,20 @@
|
||||
if("neck_chop")
|
||||
streak = ""
|
||||
neck_chop(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("leg_sweep")
|
||||
streak = ""
|
||||
leg_sweep(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("quick_choke")//is actually lung punch
|
||||
streak = ""
|
||||
quick_choke(A,D)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(D.stat || D.IsParalyzed())
|
||||
return 0
|
||||
return FALSE
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor_block = D.run_armor_check(affecting, MELEE)
|
||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
|
||||
@@ -98,7 +98,7 @@
|
||||
D.apply_damage(rand(20,30), STAMINA, affecting, armor_block)
|
||||
D.Knockdown(60)
|
||||
log_combat(A, D, "leg sweeped")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/proc/quick_choke(mob/living/carbon/human/A, mob/living/carbon/human/D)//is actually lung punch
|
||||
D.visible_message("<span class='warning'>[A] pounds [D] on the chest!</span>", \
|
||||
@@ -109,7 +109,7 @@
|
||||
D.losebreath = clamp(D.losebreath + 5, 0, 10)
|
||||
D.adjustOxyLoss(10)
|
||||
log_combat(A, D, "quickchoked")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/proc/neck_chop(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
D.visible_message("<span class='warning'>[A] karate chops [D]'s neck!</span>", \
|
||||
@@ -120,17 +120,17 @@
|
||||
if(D.silent <= 10)
|
||||
D.silent = clamp(D.silent + 10, 0, 10)
|
||||
log_combat(A, D, "neck chopped")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
log_combat(A, D, "grabbed (Krav Maga)")
|
||||
..()
|
||||
|
||||
/datum/martial_art/krav_maga/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
log_combat(A, D, "punched")
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, MELEE)
|
||||
@@ -150,11 +150,11 @@
|
||||
"<span class='userdanger'>You're [picked_hit_type]ed by [A]!</span>", "<span class='hear'>You hear a sickening sound of flesh hitting flesh!</span>", COMBAT_MESSAGE_RANGE, A)
|
||||
to_chat(A, "<span class='danger'>You [picked_hit_type] [D]!</span>")
|
||||
log_combat(A, D, "[picked_hit_type] with [name]")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/krav_maga/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, MELEE)
|
||||
if((D.mobility_flags & MOBILITY_STAND))
|
||||
@@ -176,7 +176,7 @@
|
||||
if(prob(D.getStaminaLoss()))
|
||||
D.visible_message("<span class='warning'>[D] sputters and recoils in pain!</span>", "<span class='userdanger'>You recoil in pain as you are jabbed in a nerve!</span>")
|
||||
D.drop_all_held_items()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
//Krav Maga Gloves
|
||||
|
||||
|
||||
@@ -22,24 +22,24 @@
|
||||
if("drop")
|
||||
streak = ""
|
||||
drop(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("strike")
|
||||
streak = ""
|
||||
strike(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("kick")
|
||||
streak = ""
|
||||
kick(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("throw")
|
||||
streak = ""
|
||||
throw_wrassle(A,D)
|
||||
return 1
|
||||
return TRUE
|
||||
if("slam")
|
||||
streak = ""
|
||||
slam(A,D)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/action/slam
|
||||
name = "Slam (Cinch) - Slam a grappled opponent into the floor."
|
||||
@@ -158,11 +158,11 @@
|
||||
|
||||
if (get_dist(A, D) > 1)
|
||||
to_chat(A, "<span class='warning'>[D] is too far away!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "<span class='warning'>You can't throw [D] from here!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
A.setDir(turn(A.dir, 90))
|
||||
var/turf/T = get_step(A, A.dir)
|
||||
@@ -171,7 +171,7 @@
|
||||
D.forceMove(T)
|
||||
D.setDir(get_dir(D, A))
|
||||
else
|
||||
return 0
|
||||
return
|
||||
|
||||
sleep(delay)
|
||||
|
||||
@@ -180,11 +180,11 @@
|
||||
|
||||
if (get_dist(A, D) > 1)
|
||||
to_chat(A, "<span class='warning'>[D] is too far away!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "<span class='warning'>You can't throw [D] from here!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
D.forceMove(A.loc) // Maybe this will help with the wallthrowing bug.
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
D.emote("scream")
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/Paralyze, 20))
|
||||
log_combat(A, D, "has thrown with wrestling")
|
||||
return 0
|
||||
return
|
||||
|
||||
/datum/martial_art/wrestling/proc/FlipAnimation(mob/living/carbon/human/D)
|
||||
set waitfor = FALSE
|
||||
@@ -247,7 +247,7 @@
|
||||
A.pixel_y = 0
|
||||
D.pixel_x = 0
|
||||
D.pixel_y = 0
|
||||
return 0
|
||||
return
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "<span class='warning'>You can't slam [D] here!</span>")
|
||||
@@ -255,7 +255,7 @@
|
||||
A.pixel_y = 0
|
||||
D.pixel_x = 0
|
||||
D.pixel_y = 0
|
||||
return 0
|
||||
return
|
||||
else
|
||||
if (A)
|
||||
A.pixel_x = 0
|
||||
@@ -263,7 +263,7 @@
|
||||
if (D)
|
||||
D.pixel_x = 0
|
||||
D.pixel_y = 0
|
||||
return 0
|
||||
return
|
||||
|
||||
sleep(1)
|
||||
|
||||
@@ -275,11 +275,11 @@
|
||||
|
||||
if (get_dist(A, D) > 1)
|
||||
to_chat(A, "<span class='warning'>[D] is too far away!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
to_chat(A, "<span class='warning'>You can't slam [D] here!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
D.forceMove(A.loc)
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
|
||||
|
||||
log_combat(A, D, "body-slammed")
|
||||
return 0
|
||||
return
|
||||
|
||||
/datum/martial_art/wrestling/proc/CheckStrikeTurf(mob/living/carbon/human/A, turf/T)
|
||||
if (A && (T && isturf(T) && get_dist(A, T) <= 1))
|
||||
@@ -401,12 +401,12 @@
|
||||
A.adjustBruteLoss(rand(10,20))
|
||||
A.Paralyze(60)
|
||||
to_chat(A, "<span class='warning'>[D] is too far away!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
if (!isturf(A.loc) || !isturf(D.loc))
|
||||
A.pixel_y = 0
|
||||
to_chat(A, "<span class='warning'>You can't drop onto [D] from here!</span>")
|
||||
return 0
|
||||
return
|
||||
|
||||
if(A)
|
||||
animate(A, transform = matrix(90, MATRIX_ROTATE), time = 1, loop = 0)
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@
|
||||
var/name //replaces mob/var/original_name
|
||||
var/ghostname //replaces name for observers name if set
|
||||
var/mob/living/current
|
||||
var/active = 0
|
||||
var/active = FALSE
|
||||
|
||||
var/memory
|
||||
|
||||
@@ -779,7 +779,7 @@
|
||||
|
||||
/mob/proc/sync_mind()
|
||||
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
|
||||
mind.active = 1 //indicates that the mind is currently synced with a client
|
||||
mind.active = TRUE //indicates that the mind is currently synced with a client
|
||||
|
||||
/datum/mind/proc/has_martialart(string)
|
||||
if(martial_art && martial_art.id == string)
|
||||
|
||||
@@ -451,9 +451,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/area/proc/powered(chan) // return true if the area has power to given channel
|
||||
|
||||
if(!requires_power)
|
||||
return 1
|
||||
return TRUE
|
||||
if(always_unpowered)
|
||||
return 0
|
||||
return FALSE
|
||||
switch(chan)
|
||||
if(AREA_USAGE_EQUIP)
|
||||
return power_equip
|
||||
@@ -462,13 +462,13 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
if(AREA_USAGE_ENVIRON)
|
||||
return power_environ
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Space is not powered ever, so this returns 0
|
||||
* Space is not powered ever, so this returns false
|
||||
*/
|
||||
/area/space/powered(chan) //Nope.avi
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Called when the area power status changes
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT | HIDDEN_AREA
|
||||
|
||||
var/obj/machinery/computer/holodeck/linked
|
||||
var/restricted = 0 // if true, program goes on emag list
|
||||
var/restricted = FALSE // if true, program goes on emag list
|
||||
|
||||
/*
|
||||
Power tracking: Use the holodeck computer's power grid
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/area/holodeck/use_power(amount, chan)
|
||||
if(!linked)
|
||||
return 0
|
||||
return FALSE
|
||||
var/area/A = get_area(linked)
|
||||
ASSERT(!istype(A, /area/holodeck))
|
||||
return ..()
|
||||
@@ -102,28 +102,28 @@
|
||||
|
||||
/area/holodeck/rec_center/medical
|
||||
name = "Holodeck - Emergency Medical"
|
||||
restricted = 1
|
||||
restricted = TRUE
|
||||
|
||||
/area/holodeck/rec_center/thunderdome1218
|
||||
name = "Holodeck - 1218 AD"
|
||||
restricted = 1
|
||||
restricted = TRUE
|
||||
|
||||
/area/holodeck/rec_center/burn
|
||||
name = "Holodeck - Atmospheric Burn Test"
|
||||
restricted = 1
|
||||
restricted = TRUE
|
||||
|
||||
/area/holodeck/rec_center/wildlife
|
||||
name = "Holodeck - Wildlife Simulation"
|
||||
restricted = 1
|
||||
restricted = TRUE
|
||||
|
||||
/area/holodeck/rec_center/bunker
|
||||
name = "Holodeck - Holdout Bunker"
|
||||
restricted = 1
|
||||
restricted = TRUE
|
||||
|
||||
/area/holodeck/rec_center/anthophila
|
||||
name = "Holodeck - Anthophila"
|
||||
restricted = 1
|
||||
restricted = TRUE
|
||||
|
||||
/area/holodeck/rec_center/refuel
|
||||
name = "Holodeck - Refueling Station"
|
||||
restricted = 1
|
||||
restricted = TRUE
|
||||
|
||||
+3
-3
@@ -643,7 +643,7 @@
|
||||
|
||||
/// Updates the overlays of the atom
|
||||
/atom/proc/update_overlays()
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
. = list()
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
|
||||
|
||||
@@ -1482,10 +1482,10 @@
|
||||
return max_grav
|
||||
|
||||
if(isspaceturf(T)) // Turf never has gravity
|
||||
return FALSE
|
||||
return 0
|
||||
if(istype(T, /turf/open/transparent/openspace)) //openspace in a space area doesn't get gravity
|
||||
if(istype(get_area(T), /area/space))
|
||||
return FALSE
|
||||
return 0
|
||||
|
||||
var/area/A = get_area(T)
|
||||
if(A.has_gravity) // Areas which always has gravity
|
||||
|
||||
+10
-10
@@ -605,38 +605,38 @@
|
||||
*/
|
||||
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
|
||||
if(has_gravity(src))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(pulledby)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(throwing)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(!isturf(loc))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/// Only moves the object if it's under no gravity
|
||||
/atom/movable/proc/newtonian_move(direction)
|
||||
if(!loc || Process_Spacemove(0))
|
||||
inertia_dir = 0
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
inertia_dir = direction
|
||||
if(!direction)
|
||||
return 1
|
||||
return TRUE
|
||||
inertia_last_loc = loc
|
||||
SSspacedrift.processing[src] = src
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
var/hitpush = TRUE
|
||||
var/impact_signal = SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
|
||||
if(impact_signal & COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH)
|
||||
|
||||
@@ -150,7 +150,7 @@ GLOBAL_LIST_INIT(reverseradiochannels, list(
|
||||
if(range)
|
||||
start_point = get_turf(source)
|
||||
if(!start_point)
|
||||
return 0
|
||||
return
|
||||
|
||||
//Send the data
|
||||
for(var/current_filter in filter_list)
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
return 0
|
||||
return FALSE
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(!istype(U))
|
||||
return 0
|
||||
return FALSE
|
||||
if(U.sensor_mode <= SENSOR_VITALS)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
|
||||
if(check_sensors(H))
|
||||
|
||||
@@ -17,12 +17,13 @@
|
||||
var/const/changeling_amount = 1 //hard limit on changelings if scaling is turned off
|
||||
|
||||
/datum/game_mode/traitor/changeling/can_start()
|
||||
if(!..())
|
||||
return 0
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
possible_changelings = get_players_for_role(ROLE_CHANGELING)
|
||||
if(possible_changelings.len < required_enemies)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/game_mode/traitor/changeling/pre_setup()
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
<span class='cult'>Cultists</span>: Carry out Nar'Sie's will.\n\
|
||||
<span class='notice'>Crew</span>: Prevent the cult from expanding and drive it out."
|
||||
|
||||
var/finished = 0
|
||||
|
||||
var/acolytes_needed = 10 //for the survive objective
|
||||
var/acolytes_survived = 0
|
||||
|
||||
@@ -145,9 +143,9 @@
|
||||
if(cult_mind.current.onCentCom() || cult_mind.current.onSyndieBase())
|
||||
acolytes_survived++
|
||||
if(acolytes_survived>=acolytes_needed)
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/game_mode/cult/generate_report()
|
||||
|
||||
@@ -40,5 +40,5 @@
|
||||
outsellobjective.target = target_mind
|
||||
outsellobjective.update_explanation_text()
|
||||
D.objectives += outsellobjective
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
/// A flag that determines how the ruleset is handled
|
||||
/// HIGHLANDER_RULESET are rulesets can end the round.
|
||||
/// TRAITOR_RULESET and MINOR_RULESET can't end the round and have no difference right now.
|
||||
var/flags = 0
|
||||
var/flags = NONE
|
||||
/// Pop range per requirement. If zero defaults to mode's pop_per_requirement.
|
||||
var/pop_per_requirement = 0
|
||||
/// Requirements are the threat level requirements per pop range.
|
||||
|
||||
@@ -714,7 +714,7 @@
|
||||
cost = 0
|
||||
requirements = list(101,101,101,101,101,101,101,101,101,101)
|
||||
var/meteordelay = 2000
|
||||
var/nometeors = 0
|
||||
var/nometeors = FALSE
|
||||
var/rampupdelta = 5
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/meteor/rule_process()
|
||||
|
||||
@@ -69,20 +69,20 @@
|
||||
playerC++
|
||||
if(!GLOB.Debug2)
|
||||
if(playerC < required_players || (maximum_players >= 0 && playerC > maximum_players))
|
||||
return 0
|
||||
return FALSE
|
||||
antag_candidates = get_players_for_role(antag_flag)
|
||||
if(!GLOB.Debug2)
|
||||
if(antag_candidates.len < required_enemies)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
else
|
||||
message_admins("<span class='notice'>DEBUG: GAME STARTING WITHOUT PLAYER NUMBER CHECKS, THIS WILL PROBABLY BREAK SHIT.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
///Attempts to select players for special roles the mode might have.
|
||||
/datum/game_mode/proc/pre_setup()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
|
||||
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
|
||||
@@ -119,7 +119,7 @@
|
||||
addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h))
|
||||
generate_station_goals()
|
||||
gamemode_ready = TRUE
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
///Handles late-join antag assignments
|
||||
@@ -159,10 +159,10 @@
|
||||
|
||||
switch(SSshuttle.emergency.mode) //Rounds on the verge of ending don't get new antags, they just run out
|
||||
if(SHUTTLE_STRANDED, SHUTTLE_ESCAPE)
|
||||
return 1
|
||||
return TRUE
|
||||
if(SHUTTLE_CALL)
|
||||
if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
var/matc = CONFIG_GET(number/midround_antag_time_check)
|
||||
if(world.time >= (matc * 600))
|
||||
@@ -199,7 +199,7 @@
|
||||
//somewhere between 1 and 3 minutes from now
|
||||
if(!CONFIG_GET(keyed_list/midround_antag)[SSticker.mode.config_tag])
|
||||
round_converted = 0
|
||||
return 1
|
||||
return TRUE
|
||||
for(var/mob/living/carbon/human/H in antag_candidates)
|
||||
if(H.client)
|
||||
replacementmode.make_antag_chance(H)
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
///Called by the gameSSticker
|
||||
/datum/game_mode/process()
|
||||
return 0
|
||||
return
|
||||
|
||||
//For things that do not die easily
|
||||
/datum/game_mode/proc/are_special_antags_dead()
|
||||
@@ -234,41 +234,41 @@
|
||||
if(Player.mind)
|
||||
if(Player.mind.special_role || LAZYLEN(Player.mind.antag_datums))
|
||||
continuous_sanity_checked = 1
|
||||
return 0
|
||||
return FALSE
|
||||
if(!continuous_sanity_checked)
|
||||
message_admins("The roundtype ([config_tag]) has no antagonists, continuous round has been defaulted to on and midround_antag has been defaulted to off.")
|
||||
continuous[config_tag] = TRUE
|
||||
midround_antag[config_tag] = FALSE
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player) && (living_antag_player.mind.special_role || LAZYLEN(living_antag_player.mind.antag_datums)))
|
||||
return 0 //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
|
||||
return FALSE //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
|
||||
|
||||
for(var/mob/Player in GLOB.alive_mob_list)
|
||||
if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) &&!isbrain(Player) && Player.client && (Player.mind.special_role || LAZYLEN(Player.mind.antag_datums))) //Someone's still antagging but is their antagonist datum important enough to skip mulligan?
|
||||
for(var/datum/antagonist/antag_types in Player.mind.antag_datums)
|
||||
if(antag_types.prevent_roundtype_conversion)
|
||||
living_antag_player = Player //they were an important antag, they're our new mark
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!are_special_antags_dead())
|
||||
return FALSE
|
||||
|
||||
if(!continuous[config_tag] || force_ending)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
else
|
||||
round_converted = convert_roundtype()
|
||||
if(!round_converted)
|
||||
if(round_ends_with_antag_death)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
midround_antag[config_tag] = 0
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/game_mode/proc/send_intercept()
|
||||
|
||||
@@ -92,7 +92,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
var/hitpwr = 2 //Level of ex_act to be called on hit.
|
||||
var/dest
|
||||
pass_flags = PASSTABLE
|
||||
var/heavy = 0
|
||||
var/heavy = FALSE
|
||||
var/meteorsound = 'sound/effects/meteorimpact.ogg'
|
||||
var/z_original
|
||||
var/threat = 0 // used for determining which meteors are most interesting
|
||||
@@ -245,7 +245,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
name = "big meteor"
|
||||
icon_state = "large"
|
||||
hits = 6
|
||||
heavy = 1
|
||||
heavy = TRUE
|
||||
dropamt = 4
|
||||
threat = 10
|
||||
|
||||
@@ -258,7 +258,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
name = "flaming meteor"
|
||||
icon_state = "flaming"
|
||||
hits = 5
|
||||
heavy = 1
|
||||
heavy = TRUE
|
||||
meteorsound = 'sound/effects/bamf.ogg'
|
||||
meteordrop = list(/obj/item/stack/ore/plasma)
|
||||
threat = 20
|
||||
@@ -271,7 +271,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
/obj/effect/meteor/irradiated
|
||||
name = "glowing meteor"
|
||||
icon_state = "glowing"
|
||||
heavy = 1
|
||||
heavy = TRUE
|
||||
meteordrop = list(/obj/item/stack/ore/uranium)
|
||||
threat = 15
|
||||
|
||||
@@ -288,7 +288,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
icon_state = "meateor"
|
||||
desc = "Just... don't think too hard about where this thing came from."
|
||||
hits = 2
|
||||
heavy = 1
|
||||
heavy = TRUE
|
||||
meteorsound = 'sound/effects/blobattack.ogg'
|
||||
meteordrop = list(/obj/item/reagent_containers/food/snacks/meat/slab/human, /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant, /obj/item/organ/heart, /obj/item/organ/lungs, /obj/item/organ/tongue, /obj/item/organ/appendix/)
|
||||
var/meteorgibs = /obj/effect/gibspawner/generic
|
||||
@@ -340,7 +340,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
desc = "Your life briefly passes before your eyes the moment you lay them on this monstrosity."
|
||||
hits = 30
|
||||
hitpwr = 1
|
||||
heavy = 1
|
||||
heavy = TRUE
|
||||
meteorsound = 'sound/effects/bamf.ogg'
|
||||
meteordrop = list(/obj/item/stack/ore/plasma)
|
||||
threat = 50
|
||||
@@ -371,7 +371,7 @@ GLOBAL_LIST_INIT(meteorsSPOOKY, list(/obj/effect/meteor/pumpkin))
|
||||
icon = 'icons/obj/meteor_spooky.dmi'
|
||||
icon_state = "pumpkin"
|
||||
hits = 10
|
||||
heavy = 1
|
||||
heavy = TRUE
|
||||
dropamt = 1
|
||||
meteordrop = list(/obj/item/clothing/head/hardhat/pumpkinhead, /obj/item/reagent_containers/food/snacks/grown/pumpkin)
|
||||
threat = 100
|
||||
|
||||
@@ -8,8 +8,8 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
var/team_explanation_text //For when there are multiple owners.
|
||||
var/datum/mind/target = null //If they are focused on a particular person.
|
||||
var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
|
||||
var/completed = 0 //currently only used for custom objectives.
|
||||
var/martyr_compatible = 0 //If the objective is compatible with martyr objective, i.e. if you can still do it while dead.
|
||||
var/completed = FALSE //currently only used for custom objectives.
|
||||
var/martyr_compatible = FALSE //If the objective is compatible with martyr objective, i.e. if you can still do it while dead.
|
||||
|
||||
/datum/objective/New(text)
|
||||
if(text)
|
||||
@@ -170,7 +170,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
/datum/objective/assassinate
|
||||
name = "assasinate"
|
||||
var/target_role_type=FALSE
|
||||
martyr_compatible = 1
|
||||
martyr_compatible = TRUE
|
||||
|
||||
/datum/objective/assassinate/find_target_by_role(role, role_type=FALSE,invert=FALSE)
|
||||
if(!invert)
|
||||
@@ -191,7 +191,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
admin_simple_target_pick(admin)
|
||||
|
||||
/datum/objective/assassinate/internal
|
||||
var/stolen = 0 //Have we already eliminated this target?
|
||||
var/stolen = FALSE //Have we already eliminated this target?
|
||||
|
||||
/datum/objective/assassinate/internal/update_explanation_text()
|
||||
..()
|
||||
@@ -224,7 +224,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
/datum/objective/maroon
|
||||
name = "maroon"
|
||||
var/target_role_type=FALSE
|
||||
martyr_compatible = 1
|
||||
martyr_compatible = TRUE
|
||||
|
||||
/datum/objective/maroon/find_target_by_role(role, role_type=FALSE,invert=FALSE)
|
||||
if(!invert)
|
||||
@@ -279,7 +279,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
|
||||
/datum/objective/protect//The opposite of killing a dude.
|
||||
name = "protect"
|
||||
martyr_compatible = 1
|
||||
martyr_compatible = TRUE
|
||||
var/target_role_type = FALSE
|
||||
var/human_check = TRUE
|
||||
|
||||
@@ -350,7 +350,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
name = "hijack"
|
||||
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
|
||||
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
|
||||
martyr_compatible = 0 //Technically you won't get both anyway.
|
||||
martyr_compatible = FALSE //Technically you won't get both anyway.
|
||||
|
||||
/datum/objective/hijack/check_completion() // Requires all owners to escape.
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
|
||||
@@ -378,7 +378,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
/datum/objective/purge
|
||||
name = "no mutants on shuttle"
|
||||
explanation_text = "Ensure no mutant humanoid species are present aboard the escape shuttle."
|
||||
martyr_compatible = 1
|
||||
martyr_compatible = TRUE
|
||||
|
||||
/datum/objective/purge/check_completion()
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
|
||||
@@ -393,7 +393,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
/datum/objective/robot_army
|
||||
name = "robot army"
|
||||
explanation_text = "Have at least eight active cyborgs synced to you."
|
||||
martyr_compatible = 0
|
||||
martyr_compatible = FALSE
|
||||
|
||||
/datum/objective/robot_army/check_completion()
|
||||
var/counter = 0
|
||||
@@ -497,7 +497,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
|
||||
/datum/objective/nuclear
|
||||
name = "nuclear"
|
||||
explanation_text = "Destroy the station with a nuclear device."
|
||||
martyr_compatible = 1
|
||||
martyr_compatible = TRUE
|
||||
|
||||
/datum/objective/nuclear/check_completion()
|
||||
if(SSticker && SSticker.mode && SSticker.mode.station_was_nuked)
|
||||
@@ -509,7 +509,7 @@ GLOBAL_LIST_EMPTY(possible_items)
|
||||
name = "steal"
|
||||
var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later.
|
||||
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
|
||||
martyr_compatible = 0
|
||||
martyr_compatible = FALSE
|
||||
|
||||
/datum/objective/steal/get_target()
|
||||
return steal_target
|
||||
@@ -793,7 +793,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
|
||||
/datum/objective/destroy
|
||||
name = "destroy AI"
|
||||
martyr_compatible = 1
|
||||
martyr_compatible = TRUE
|
||||
|
||||
/datum/objective/destroy/find_target(dupe_search_range)
|
||||
var/list/possible_targets = active_ais(1)
|
||||
@@ -891,7 +891,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
////////////////////////////////
|
||||
|
||||
/datum/objective/changeling_team_objective //Abstract type
|
||||
martyr_compatible = 0 //Suicide is not teamwork!
|
||||
martyr_compatible = FALSE //Suicide is not teamwork!
|
||||
explanation_text = "Changeling Friendship!"
|
||||
var/min_lings = 3 //Minimum amount of lings for this team objective to be possible
|
||||
var/escape_objective_compatible = FALSE
|
||||
|
||||
@@ -136,8 +136,8 @@
|
||||
/datum/objective_item/steal/functionalai/check_special_completion(obj/item/aicard/C)
|
||||
for(var/mob/living/silicon/ai/A in C)
|
||||
if(isAI(A) && A.stat != DEAD) //See if any AI's are alive inside that card.
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/objective_item/steal/blueprints
|
||||
name = "the station blueprints."
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/require_all = 1
|
||||
|
||||
var/paintjob = "none"
|
||||
var/glassdoor = 0
|
||||
var/glassdoor = FALSE
|
||||
|
||||
var/doorname = "airlock"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
sandbox = new/datum/h_sandbox
|
||||
sandbox.owner = src.ckey
|
||||
if(src.client.holder)
|
||||
sandbox.admin = 1
|
||||
sandbox.admin = TRUE
|
||||
add_verb(src, /mob/proc/sandbox_panel)
|
||||
|
||||
/mob/proc/sandbox_panel()
|
||||
@@ -14,7 +14,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
|
||||
/datum/h_sandbox
|
||||
var/owner = null
|
||||
var/admin = 0
|
||||
var/admin = FALSE
|
||||
|
||||
var/static/clothinfo = null
|
||||
var/static/reaginfo = null
|
||||
|
||||
@@ -266,12 +266,12 @@ Class Procs:
|
||||
|
||||
/obj/machinery/proc/auto_use_power()
|
||||
if(!powered(power_channel))
|
||||
return 0
|
||||
return FALSE
|
||||
if(use_power == 1)
|
||||
use_power(idle_power_usage,power_channel)
|
||||
else if(use_power >= 2)
|
||||
use_power(active_power_usage,power_channel)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
///Called when we want to change the value of the `is_operational` variable. Boolean.
|
||||
@@ -370,11 +370,11 @@ Class Procs:
|
||||
/obj/machinery/Topic(href, href_list)
|
||||
..()
|
||||
if(!can_interact(usr))
|
||||
return 1
|
||||
return TRUE
|
||||
if(!usr.canUseTopic(src))
|
||||
return 1
|
||||
return TRUE
|
||||
add_fingerprint(usr)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -467,7 +467,7 @@ Class Procs:
|
||||
M.icon_state = "box_1"
|
||||
|
||||
/obj/machinery/obj_break(damage_flag)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
. = ..()
|
||||
if(!(machine_stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
|
||||
set_machine_stat(machine_stat | BROKEN)
|
||||
@@ -513,8 +513,8 @@ Class Procs:
|
||||
I.play_tool_sound(src, 50)
|
||||
setDir(turn(dir,-90))
|
||||
to_chat(user, "<span class='notice'>You rotate [src].</span>")
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/proc/can_be_unfasten_wrench(mob/user, silent) //if we can unwrench this object; returns SUCCESSFUL_UNFASTEN and FAILED_UNFASTEN, which are both TRUE, or CANT_UNFASTEN, which isn't.
|
||||
if(!(isfloorturf(loc) || istype(loc, /turf/open/indestructible)) && !anchored)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/list/L = list()
|
||||
var/list/LL = list()
|
||||
var/hacked = FALSE
|
||||
var/disabled = 0
|
||||
var/disabled = FALSE
|
||||
var/shocked = FALSE
|
||||
var/hack_wire
|
||||
var/disable_wire
|
||||
|
||||
@@ -96,14 +96,14 @@
|
||||
return
|
||||
|
||||
if(!target.can_track(usr))
|
||||
U.tracking = 1
|
||||
U.tracking = TRUE
|
||||
if(!cameraticks)
|
||||
to_chat(U, "<span class='warning'>Target is not near any active cameras. Attempting to reacquire...</span>")
|
||||
cameraticks++
|
||||
if(cameraticks > 9)
|
||||
U.cameraFollow = null
|
||||
to_chat(U, "<span class='warning'>Unable to reacquire, cancelling track...</span>")
|
||||
tracking = 0
|
||||
tracking = FALSE
|
||||
return
|
||||
else
|
||||
sleep(10)
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
else
|
||||
cameraticks = 0
|
||||
U.tracking = 0
|
||||
U.tracking = FALSE
|
||||
|
||||
if(U.eyeobj)
|
||||
U.eyeobj.setLoc(get_turf(target))
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
/obj/machinery/computer/process()
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/update_overlays()
|
||||
. = ..()
|
||||
|
||||
@@ -514,10 +514,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
return
|
||||
if(can_open_job(j) != 1)
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
return
|
||||
if(opened_positions[edit_job_target] >= 0)
|
||||
GLOB.time_last_changed_position = world.time / 10
|
||||
j.total_positions++
|
||||
@@ -531,10 +531,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
return
|
||||
if(can_close_job(j) != 1)
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
return
|
||||
//Allow instant closing without cooldown if a position has been opened before
|
||||
if(opened_positions[edit_job_target] <= 0)
|
||||
GLOB.time_last_changed_position = world.time / 10
|
||||
@@ -549,7 +549,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/datum/job/j = SSjob.GetJob(priority_target)
|
||||
if(!j)
|
||||
updateUsrDialog()
|
||||
return 0
|
||||
return
|
||||
var/priority = TRUE
|
||||
if(j in SSjob.prioritized_jobs)
|
||||
SSjob.prioritized_jobs -= j
|
||||
|
||||
@@ -559,14 +559,12 @@
|
||||
continue
|
||||
|
||||
/obj/machinery/computer/med_data/proc/canUseMedicalRecordsConsole(mob/user, message = 1, record1, record2)
|
||||
if(user)
|
||||
if(message)
|
||||
if(authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(!record1 || record1 == active1)
|
||||
if(!record2 || record2 == active2)
|
||||
return 1
|
||||
return 0
|
||||
if(user && message && authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(!record1 || record1 == active1)
|
||||
if(!record2 || record2 == active2)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/computer/med_data/laptop
|
||||
name = "medical laptop"
|
||||
|
||||
@@ -855,12 +855,11 @@ What a mess.*/
|
||||
continue
|
||||
|
||||
/obj/machinery/computer/secure_data/proc/canUseSecurityRecordsConsole(mob/user, message1 = 0, record1, record2)
|
||||
if(user)
|
||||
if(authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(!trim(message1))
|
||||
return 0
|
||||
if(!record1 || record1 == active1)
|
||||
if(!record2 || record2 == active2)
|
||||
return 1
|
||||
return 0
|
||||
if(user && authenticated)
|
||||
if(user.canUseTopic(src, !issilicon(user)))
|
||||
if(!trim(message1))
|
||||
return FALSE
|
||||
if(!record1 || record1 == active1)
|
||||
if(!record2 || record2 == active2)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/structure/frame/machine/examine(user)
|
||||
. = ..()
|
||||
if(state == 3 && req_components && req_component_names)
|
||||
var/hasContent = 0
|
||||
var/hasContent = FALSE
|
||||
var/requires = "It requires"
|
||||
|
||||
for(var/i = 1 to req_components.len)
|
||||
@@ -41,7 +41,7 @@
|
||||
continue
|
||||
var/use_and = i == req_components.len
|
||||
requires += "[(hasContent ? (use_and ? ", and" : ",") : "")] [amt] [amt == 1 ? req_component_names[tname] : "[req_component_names[tname]]\s"]"
|
||||
hasContent = 1
|
||||
hasContent = TRUE
|
||||
|
||||
if(hasContent)
|
||||
. += "[requires]."
|
||||
@@ -267,9 +267,9 @@
|
||||
to_chat(user, "<span class='notice'>You add [P] to [src].</span>")
|
||||
components += P
|
||||
req_components[I]--
|
||||
return 1
|
||||
return TRUE
|
||||
to_chat(user, "<span class='warning'>You cannot add that to the machine!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -472,11 +472,11 @@
|
||||
|
||||
/obj/machinery/door/airlock/cult/allowed(mob/living/L)
|
||||
if(!density)
|
||||
return 1
|
||||
return TRUE
|
||||
if(friendly || iscultist(L) || istype(L, /mob/living/simple_animal/shade) || isconstruct(L))
|
||||
if(!stealthy)
|
||||
new openingoverlaytype(loc)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
if(!stealthy)
|
||||
new /obj/effect/temp_visual/cult/sac(loc)
|
||||
@@ -486,7 +486,7 @@
|
||||
flash_color(L, flash_color="#960000", flash_time=20)
|
||||
L.Paralyze(40)
|
||||
L.throw_at(throwtarget, 5, 1,src)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/door/airlock/cult/proc/conceal()
|
||||
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
|
||||
|
||||
@@ -35,15 +35,16 @@
|
||||
/obj/machinery/embedded_controller/proc/return_text()
|
||||
|
||||
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
|
||||
return 0
|
||||
return
|
||||
|
||||
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal)
|
||||
if(istype(signal) && program)
|
||||
program.receive_signal(signal)
|
||||
|
||||
/obj/machinery/embedded_controller/Topic(href, href_list)
|
||||
if(..())
|
||||
return 0
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
if(program)
|
||||
program.receive_user_command(href_list["command"])
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
area.power_change()
|
||||
|
||||
/obj/machinery/light_switch/power_change()
|
||||
SHOULD_CALL_PARENT(0)
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
if(area == get_area(src))
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -201,8 +201,8 @@
|
||||
var/speed = 1 // lowest = 1, highest = 10
|
||||
var/list/rpath = list() // real path of the magnet, used in iterator
|
||||
|
||||
var/moving = 0 // 1 if scheduled to loop
|
||||
var/looping = 0 // 1 if looping
|
||||
var/moving = TRUE // true if scheduled to loop
|
||||
var/looping = TRUE // true if looping
|
||||
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
if("setpath")
|
||||
var/newpath = stripped_input(usr, "Please define a new path!", "New Path", path, MAX_MESSAGE_LEN)
|
||||
if(newpath && newpath != "")
|
||||
moving = 0 // stop moving
|
||||
moving = FALSE // stop moving
|
||||
path = newpath
|
||||
pathpos = 1 // reset position
|
||||
filter_path() // renders rpath
|
||||
@@ -323,7 +323,7 @@
|
||||
if(machine_stat & (BROKEN|NOPOWER))
|
||||
break
|
||||
|
||||
looping = 1
|
||||
looping = TRUE
|
||||
|
||||
// Prepare the radio signal
|
||||
var/datum/signal/signal = new(list("code" = code))
|
||||
@@ -353,7 +353,7 @@
|
||||
else
|
||||
sleep(12-speed)
|
||||
|
||||
looping = 0
|
||||
looping = FALSE
|
||||
|
||||
|
||||
/obj/machinery/magnetic_controller/proc/filter_path()
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
if(altPatient.reagents.reagent_list.len) //Chemical Analysis details.
|
||||
for(var/datum/reagent/R in altPatient.reagents.reagent_list)
|
||||
chemical_list += list(list("name" = R.name, "volume" = round(R.volume, 0.01)))
|
||||
if(R.overdosed == 1)
|
||||
if(R.overdosed)
|
||||
overdose_list += list(list("name" = R.name))
|
||||
|
||||
if(altPatient.reagents.addiction_list.len)
|
||||
|
||||
@@ -13,7 +13,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
var/body =""
|
||||
var/list/authorCensorTime = list()
|
||||
var/list/bodyCensorTime = list()
|
||||
var/is_admin_message = 0
|
||||
var/is_admin_message = FALSE
|
||||
var/icon/img = null
|
||||
var/time_stamp = ""
|
||||
var/list/datum/newscaster/feed_comment/comments = list()
|
||||
@@ -61,11 +61,11 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
var/list/datum/newscaster/feed_message/messages = list()
|
||||
var/locked = FALSE
|
||||
var/author = ""
|
||||
var/censored = 0
|
||||
var/censored = FALSE
|
||||
var/list/authorCensorTime = list()
|
||||
var/list/DclassCensorTime = list()
|
||||
var/authorCensor
|
||||
var/is_admin_channel = 0
|
||||
var/is_admin_channel = FALSE
|
||||
|
||||
/datum/newscaster/feed_channel/proc/returnAuthor(censor)
|
||||
if(censor == -1)
|
||||
@@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
CreateFeedChannel("Station Announcements", "SS13", 1)
|
||||
wanted_issue = new /datum/newscaster/wanted_message
|
||||
|
||||
/datum/newscaster/feed_network/proc/CreateFeedChannel(channel_name, author, locked, adminChannel = 0)
|
||||
/datum/newscaster/feed_network/proc/CreateFeedChannel(channel_name, author, locked, adminChannel = FALSE)
|
||||
var/datum/newscaster/feed_channel/newChannel = new /datum/newscaster/feed_channel
|
||||
newChannel.channel_name = channel_name
|
||||
newChannel.author = author
|
||||
@@ -118,7 +118,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
newChannel.is_admin_channel = adminChannel
|
||||
network_channels += newChannel
|
||||
|
||||
/datum/newscaster/feed_network/proc/SubmitArticle(msg, author, channel_name, datum/picture/picture, adminMessage = 0, allow_comments = 1, update_alert = TRUE)
|
||||
/datum/newscaster/feed_network/proc/SubmitArticle(msg, author, channel_name, datum/picture/picture, adminMessage = FALSE, allow_comments = TRUE, update_alert = TRUE)
|
||||
var/datum/newscaster/feed_message/newMsg = new /datum/newscaster/feed_message
|
||||
newMsg.author = author
|
||||
newMsg.body = msg
|
||||
@@ -138,8 +138,8 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
lastAction ++
|
||||
newMsg.creationTime = lastAction
|
||||
|
||||
/datum/newscaster/feed_network/proc/submitWanted(criminal, body, scanned_user, datum/picture/picture, adminMsg = 0, newMessage = 0)
|
||||
wanted_issue.active = 1
|
||||
/datum/newscaster/feed_network/proc/submitWanted(criminal, body, scanned_user, datum/picture/picture, adminMsg = FALSE, newMessage = FALSE)
|
||||
wanted_issue.active = TRUE
|
||||
wanted_issue.criminal = criminal
|
||||
wanted_issue.body = body
|
||||
wanted_issue.scannedUser = scanned_user
|
||||
@@ -153,7 +153,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
N.update_icon()
|
||||
|
||||
/datum/newscaster/feed_network/proc/deleteWanted()
|
||||
wanted_issue.active = 0
|
||||
wanted_issue.active = FALSE
|
||||
wanted_issue.criminal = null
|
||||
wanted_issue.body = null
|
||||
wanted_issue.scannedUser = null
|
||||
@@ -273,9 +273,9 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
dat+= "<BR><A href='?src=[REF(src)];refresh=1'>Re-scan User</A>"
|
||||
dat+= "<BR><BR><A href='?src=[REF(human_or_robot_user)];mach_close=newscaster_main'>Exit</A>"
|
||||
if(securityCaster)
|
||||
var/wanted_already = 0
|
||||
var/wanted_already = FALSE
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
wanted_already = 1
|
||||
wanted_already = TRUE
|
||||
dat+="<HR><B>Feed Security functions:</B><BR>"
|
||||
dat+="<BR><A href='?src=[REF(src)];menu_wanted=1'>[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue</A>"
|
||||
dat+="<BR><A href='?src=[REF(src)];menu_censor_story=1'>Censor Feed Stories</A>"
|
||||
@@ -334,10 +334,10 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
dat+="<FONT COLOR='maroon'>There is already a Feed channel under your name.</FONT><BR>"
|
||||
if(channel_name=="" || channel_name == "\[REDACTED\]")
|
||||
dat+="<FONT COLOR='maroon'>Invalid channel name.</FONT><BR>"
|
||||
var/check = 0
|
||||
var/check = FALSE
|
||||
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == channel_name)
|
||||
check = 1
|
||||
check = TRUE
|
||||
break
|
||||
if(check)
|
||||
dat+="<FONT COLOR='maroon'>Channel name already in use.</FONT><BR>"
|
||||
@@ -436,10 +436,10 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
dat+="<BR><A href='?src=[REF(src)];setScreen=[11]'>Back</A>"
|
||||
if(14)
|
||||
dat+="<B>Wanted Issue Handler:</B>"
|
||||
var/wanted_already = 0
|
||||
var/wanted_already = FALSE
|
||||
var/end_param = 1
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
wanted_already = 1
|
||||
wanted_already = TRUE
|
||||
end_param = 2
|
||||
if(wanted_already)
|
||||
dat+="<FONT SIZE=2><BR><I>A wanted issue is already in Feed Circulation. You can edit or cancel it below.</FONT></I>"
|
||||
@@ -516,10 +516,10 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
existing_authors += GLOB.news_network.redactedText
|
||||
else
|
||||
existing_authors += FC.author
|
||||
var/check = 0
|
||||
var/check = FALSE
|
||||
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == channel_name)
|
||||
check = 1
|
||||
check = TRUE
|
||||
break
|
||||
if(channel_name == "" || channel_name == "\[REDACTED\]" || scanned_user == "Unknown" || check || (scanned_user in existing_authors) )
|
||||
screen=7
|
||||
@@ -578,10 +578,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
screen=11
|
||||
updateUsrDialog()
|
||||
else if(href_list["menu_wanted"])
|
||||
var/already_wanted = 0
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
already_wanted = 1
|
||||
if(already_wanted)
|
||||
channel_name = GLOB.news_network.wanted_issue.criminal
|
||||
msg = GLOB.news_network.wanted_issue.body
|
||||
screen = 14
|
||||
@@ -971,17 +968,17 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
|
||||
/obj/item/newspaper/proc/notContent(list/L)
|
||||
if(!L.len)
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/i=L.len;i>0;i--)
|
||||
var/num = abs(L[i])
|
||||
if(creationTime <= num)
|
||||
continue
|
||||
else
|
||||
if(L[i] > 0)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/item/newspaper/Topic(href, href_list)
|
||||
var/mob/living/U = usr
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
circuit = /obj/item/circuitboard/machine/recycler
|
||||
var/safety_mode = FALSE // Temporarily stops machine if it detects a mob
|
||||
var/icon_name = "grinder-o"
|
||||
var/blood = 0
|
||||
var/bloody = FALSE
|
||||
var/eat_dir = WEST
|
||||
var/amount_produced = 50
|
||||
var/crush_damage = 1000
|
||||
@@ -76,7 +76,7 @@
|
||||
var/is_powered = !(machine_stat & (BROKEN|NOPOWER))
|
||||
if(safety_mode)
|
||||
is_powered = FALSE
|
||||
icon_state = icon_name + "[is_powered]" + "[(blood ? "bld" : "")]" // add the blood tag at the end
|
||||
icon_state = icon_name + "[is_powered]" + "[(bloody ? "bld" : "")]" // add the blood tag at the end
|
||||
|
||||
/obj/machinery/recycler/CanAllowThrough(atom/movable/AM)
|
||||
. = ..()
|
||||
@@ -181,8 +181,8 @@
|
||||
L.say("ARRRRRRRRRRRGH!!!", forced="recycler grinding")
|
||||
add_mob_blood(L)
|
||||
|
||||
if(!blood && !issilicon(L))
|
||||
blood = TRUE
|
||||
if(!bloody && !issilicon(L))
|
||||
bloody = TRUE
|
||||
update_icon()
|
||||
|
||||
// Instantly lie down, also go unconscious from the pain, before you die.
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
light_color = LIGHT_COLOR_BROWN
|
||||
var/money = 3000 //How much money it has CONSUMED
|
||||
var/plays = 0
|
||||
var/working = 0
|
||||
var/working = FALSE
|
||||
var/balance = 0 //How much money is in the machine, ready to be CONSUMED.
|
||||
var/jackpots = 0
|
||||
var/paymode = HOLOCHIP //toggles between HOLOCHIP/COIN, defined above
|
||||
@@ -229,15 +229,17 @@
|
||||
/obj/machinery/computer/slot_machine/proc/can_spin(mob/user)
|
||||
if(machine_stat & NOPOWER)
|
||||
to_chat(user, "<span class='warning'>The slot machine has no power!</span>")
|
||||
return FALSE
|
||||
if(machine_stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>The slot machine is broken!</span>")
|
||||
return FALSE
|
||||
if(working)
|
||||
to_chat(user, "<span class='warning'>You need to wait until the machine stops spinning before you can play again!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(balance < SPIN_PRICE)
|
||||
to_chat(user, "<span class='warning'>Insufficient money to play!</span>")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/slot_machine/proc/toggle_reel_spin(value, delay = 0) //value is 1 or 0 aka on or off
|
||||
for(var/list/reel in reels)
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
dump_contents()
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/resist_open(mob/user)
|
||||
if(!state_open && occupant && (user in src) && user.stat == 0) // Check they're still here.
|
||||
if(!state_open && occupant && (user in src) && user.stat == CONSCIOUS) // Check they're still here.
|
||||
visible_message("<span class='notice'>You see [user] burst out of [src]!</span>", \
|
||||
"<span class='notice'>You escape the cramped confines of [src]!</span>")
|
||||
open_machine()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
verb_say = "states"
|
||||
var/cooldown = 0
|
||||
|
||||
var/active = 0
|
||||
var/active = FALSE
|
||||
var/icontype = "beacon"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(singulo.z == z)
|
||||
singulo.target = src
|
||||
icon_state = "[icontype]1"
|
||||
active = 1
|
||||
active = TRUE
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You activate the beacon.</span>")
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
if(singulo.target == src)
|
||||
singulo.target = null
|
||||
icon_state = "[icontype]0"
|
||||
active = 0
|
||||
active = FALSE
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You deactivate the beacon.</span>")
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
circuit = /obj/item/circuitboard/machine/teleporter_hub
|
||||
var/accuracy = 0
|
||||
var/obj/machinery/teleport/station/power_station
|
||||
var/calibrated //Calibration prevents mutation
|
||||
var/calibrated = FALSE//Calibration prevents mutation
|
||||
|
||||
/obj/machinery/teleport/hub/Initialize()
|
||||
. = ..()
|
||||
@@ -83,7 +83,7 @@
|
||||
log_game("[human] ([key_name(human)]) was turned into a fly person")
|
||||
|
||||
human.apply_effect((rand(120 - accuracy * 40, 180 - accuracy * 60)), EFFECT_IRRADIATE, 0)
|
||||
calibrated = 0
|
||||
calibrated = FALSE
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/hub/update_icon_state()
|
||||
|
||||
@@ -139,7 +139,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
|
||||
density = TRUE
|
||||
state_open = TRUE
|
||||
var/busy = FALSE
|
||||
var/bloody_mess = 0
|
||||
var/bloody_mess = FALSE
|
||||
var/obj/item/color_source
|
||||
var/max_wash_capacity = 5
|
||||
|
||||
@@ -264,7 +264,7 @@ GLOBAL_LIST_INIT(dye_registry, list(
|
||||
|
||||
/obj/item/clothing/shoes/sneakers/machine_wash(obj/machinery/washing_machine/WM)
|
||||
if(chained)
|
||||
chained = 0
|
||||
chained = FALSE
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
new /obj/item/restraints/handcuffs(loc)
|
||||
..()
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
var/turf/pos = get_turf(src)
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
if(!T.density && pos.z == T.z)
|
||||
var/clear = 1
|
||||
var/clear = TRUE
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
clear = 0
|
||||
clear = FALSE
|
||||
break
|
||||
if(clear)
|
||||
L+=T
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/atom/movable
|
||||
var/can_buckle = 0
|
||||
var/can_buckle = FALSE
|
||||
var/buckle_lying = -1 //bed-like behaviour, forces mob.lying = buckle_lying if != -1
|
||||
var/buckle_requires_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
|
||||
var/buckle_requires_restraints = FALSE //require people to be handcuffed before being able to buckle. eg: pipes
|
||||
var/list/mob/living/buckled_mobs = null //list()
|
||||
var/max_buckled_mobs = 1
|
||||
var/buckle_prevents_pull = FALSE
|
||||
@@ -15,10 +15,10 @@
|
||||
if(buckled_mobs.len > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in sortNames(buckled_mobs)
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
if(user_unbuckle_mob(buckled_mobs[1],user))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/atom/movable/attackby(obj/item/W, mob/user, params)
|
||||
if(!can_buckle || !istype(W, /obj/item/riding_offhand) || !user.Adjacent(src))
|
||||
|
||||
@@ -32,10 +32,9 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/acid/process()
|
||||
. = 1
|
||||
if(!target)
|
||||
qdel(src)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(prob(5))
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
@@ -50,7 +49,8 @@
|
||||
acid_level = max(acid_level - (5 + 2*round(sqrt(acid_level))), 0)
|
||||
if(acid_level <= 0)
|
||||
qdel(src)
|
||||
return 0
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/effect/acid/Crossed(AM as mob|obj)
|
||||
. = ..()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(list/directions)
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
var/direction = pick(directions)
|
||||
for(var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
|
||||
sleep(2)
|
||||
|
||||
@@ -227,5 +227,5 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/can_bloodcrawl_in()
|
||||
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
beauty = -50
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50), i++)
|
||||
sleep(2)
|
||||
|
||||
@@ -162,14 +162,14 @@
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
return FALSE
|
||||
if(!istype(L))
|
||||
return 0
|
||||
return FALSE
|
||||
var/fraction = 1/initial(reagent_divisor)
|
||||
if(lifetime % reagent_divisor)
|
||||
reagents.expose(L, VAPOR, fraction)
|
||||
lifetime--
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/spread_foam()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
|
||||
@@ -85,11 +85,11 @@
|
||||
|
||||
/datum/effect_system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
var/flashing = FALSE // does explosion creates flash effect?
|
||||
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
|
||||
var/explosion_message = 1 //whether we show a message to mobs.
|
||||
|
||||
/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = 0, flash_fact = 0, message = 1)
|
||||
/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = FALSE, flash_fact = 0, message = TRUE)
|
||||
amount = amt
|
||||
explosion_message = message
|
||||
if(isturf(loca))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
layer = FLY_LAYER
|
||||
anchored = TRUE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
animate_movement = 0
|
||||
animate_movement = FALSE
|
||||
var/amount = 4
|
||||
var/lifetime = 5
|
||||
var/opaque = 1 //whether the smoke can block the view when in enough amount
|
||||
@@ -49,23 +49,23 @@
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_smoke()
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/mob/living/L in range(0,src))
|
||||
smoke_mob(L)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C)
|
||||
if(!istype(C))
|
||||
return 0
|
||||
return FALSE
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
return FALSE
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
return FALSE
|
||||
if(C.smoke_delay)
|
||||
return 0
|
||||
return FALSE
|
||||
C.smoke_delay++
|
||||
addtimer(CALLBACK(src, .proc/remove_smoke_delay, C), 10)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
|
||||
if(C)
|
||||
@@ -126,11 +126,12 @@
|
||||
lifetime = 8
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
M.drop_all_held_items()
|
||||
M.adjustOxyLoss(1)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/Crossed(atom/movable/AM, oldloc)
|
||||
. = ..()
|
||||
@@ -148,7 +149,7 @@
|
||||
/obj/effect/particle_effect/smoke/freezing
|
||||
name = "nanofrost smoke"
|
||||
color = "#B2FFFF"
|
||||
opaque = 0
|
||||
opaque = FALSE
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing
|
||||
effect_type = /obj/effect/particle_effect/smoke/freezing
|
||||
@@ -226,7 +227,8 @@
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/process()
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
var/turf/T = get_turf(src)
|
||||
var/fraction = 1/initial(lifetime)
|
||||
for(var/atom/movable/AM in T)
|
||||
@@ -237,20 +239,20 @@
|
||||
reagents.expose(AM, TOUCH, fraction)
|
||||
|
||||
reagents.expose(T, TOUCH, fraction)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
return FALSE
|
||||
if(!istype(M))
|
||||
return 0
|
||||
return FALSE
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
return FALSE
|
||||
var/fraction = 1/initial(lifetime)
|
||||
reagents.copy_to(C, fraction*reagents.total_volume)
|
||||
reagents.expose(M, INGEST, fraction)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
/obj/effect/particle_effect/water/Move(turf/newloc)
|
||||
if (--src.life < 1)
|
||||
qdel(src)
|
||||
return 0
|
||||
return FALSE
|
||||
if(newloc.density)
|
||||
return 0
|
||||
.=..()
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF
|
||||
move_resist = INFINITY
|
||||
obj_flags = 0
|
||||
obj_flags = NONE
|
||||
vis_flags = VIS_INHERIT_PLANE
|
||||
|
||||
/obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
@@ -18,7 +18,7 @@
|
||||
return
|
||||
|
||||
/obj/effect/mech_melee_attack(obj/mecha/M)
|
||||
return 0
|
||||
return
|
||||
|
||||
/obj/effect/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
@@ -45,7 +45,6 @@
|
||||
|
||||
/obj/effect/singularity_act()
|
||||
qdel(src)
|
||||
return 0
|
||||
|
||||
/obj/effect/ConveyorMove()
|
||||
return
|
||||
|
||||
@@ -50,8 +50,10 @@
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
anchored = TRUE
|
||||
vis_flags = NONE
|
||||
var/unused = 0 //When detected to be unused it gets set to world.time, after a while it gets removed
|
||||
var/cache_expiration = 2 MINUTES // overlays which go unused for 2 minutes get cleaned up
|
||||
///When detected to be unused it gets set to world.time, after a while it gets removed
|
||||
var/unused = 0
|
||||
///overlays which go unused for this amount of time get cleaned up
|
||||
var/cache_expiration = 2 MINUTES
|
||||
|
||||
/obj/effect/overlay/atmos_excited
|
||||
name = "excited group"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
return
|
||||
var/atom/movable/AM = A
|
||||
var/curtiles = 0
|
||||
var/stopthrow = 0
|
||||
var/stopthrow = FALSE
|
||||
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
@@ -82,11 +82,11 @@
|
||||
if(!nostop)
|
||||
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
|
||||
if(T.stopper && T != src)
|
||||
stopthrow = 1
|
||||
stopthrow = TRUE
|
||||
else
|
||||
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
|
||||
if(T.stopper)
|
||||
stopthrow = 1
|
||||
stopthrow = TRUE
|
||||
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
//temporary visual effects(/obj/effect/temp_visual) used by cult stuff
|
||||
/obj/effect/temp_visual/cult
|
||||
icon = 'icons/effects/cult_effects.dmi'
|
||||
randomdir = 0
|
||||
randomdir = FALSE
|
||||
duration = 10
|
||||
|
||||
/obj/effect/temp_visual/cult/sparks
|
||||
randomdir = 1
|
||||
randomdir = TRUE
|
||||
name = "blood sparks"
|
||||
icon_state = "bloodsparkles"
|
||||
|
||||
|
||||
@@ -460,7 +460,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
/obj/item/proc/dropped(mob/user, silent = FALSE)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(user)
|
||||
@@ -474,7 +474,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
/// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
|
||||
item_flags |= IN_INVENTORY
|
||||
|
||||
@@ -491,7 +491,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
* * Initial is used to indicate whether or not this is the initial equipment (job datums etc) or just a player doing it
|
||||
*/
|
||||
/obj/item/proc/equipped(mob/user, slot, initial = FALSE)
|
||||
SHOULD_CALL_PARENT(1)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
|
||||
@@ -810,7 +810,7 @@ RLD
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
if(do_after(user, decondelay, target = A))
|
||||
if(!useResource(deconcost, user))
|
||||
return 0
|
||||
return FALSE
|
||||
activate()
|
||||
qdel(A)
|
||||
return TRUE
|
||||
@@ -871,9 +871,9 @@ RLD
|
||||
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, TRUE)
|
||||
if(do_after(user, floordelay, target = A))
|
||||
if(!istype(F))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!useResource(floorcost, user))
|
||||
return 0
|
||||
return FALSE
|
||||
activate()
|
||||
var/destination = get_turf(A)
|
||||
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
if(can_use(user))
|
||||
ink.charges--
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, TRUE)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//This proc only checks if the painter can be used.
|
||||
//Call this if you don't want the painter to be used right after this check, for example
|
||||
@@ -54,12 +54,12 @@
|
||||
/obj/item/airlock_painter/proc/can_use(mob/user)
|
||||
if(!ink)
|
||||
to_chat(user, "<span class='warning'>There is no toner cartridge installed in [src]!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
else if(ink.charges < 1)
|
||||
to_chat(user, "<span class='warning'>[src] is out of ink!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/airlock_painter/suicide_act(mob/user)
|
||||
var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS)
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
if(iscarbon(loc))
|
||||
Insert(loc)
|
||||
|
||||
/obj/item/organ/body_egg/Insert(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/body_egg/Insert(mob/living/carbon/M, special = FALSE)
|
||||
..()
|
||||
ADD_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
|
||||
ADD_TRAIT(owner, TRAIT_XENO_IMMUNE, "xeno immune")
|
||||
owner.med_hud_set_status()
|
||||
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
|
||||
|
||||
/obj/item/organ/body_egg/Remove(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/body_egg/Remove(mob/living/carbon/M, special = FALSE)
|
||||
if(owner)
|
||||
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, TRAIT_GENERIC)
|
||||
REMOVE_TRAIT(owner, TRAIT_XENO_IMMUNE, "xeno immune")
|
||||
|
||||
@@ -88,5 +88,5 @@
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
owner.visible_message("<span class='danger'>Ranged attacks just make [owner] angrier!</span>")
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -112,9 +112,9 @@
|
||||
var/turf/currentpos = get_turf(src)
|
||||
var/mob/living/user = loc
|
||||
if((currentpos == startpos) && (field in view(CHRONO_BEAM_RANGE, currentpos)) && (user.mobility_flags & MOBILITY_STAND) && (user.stat == CONSCIOUS))
|
||||
return 1
|
||||
return TRUE
|
||||
field_disconnect(F)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/energy/chrono_gun/proc/pass_mind(datum/mind/M)
|
||||
if(TED)
|
||||
@@ -170,7 +170,6 @@
|
||||
var/obj/item/gun/energy/chrono_gun/gun = null
|
||||
var/tickstokill = 15
|
||||
var/mutable_appearance/mob_underlay
|
||||
var/preloaded = 0
|
||||
var/RPpos = null
|
||||
var/attached = TRUE //if the gun arg isn't included initially, then the chronofield will work without one
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
smoketime = 0
|
||||
chem_volume = 100
|
||||
list_reagents = null
|
||||
var/packeditem = 0
|
||||
var/packeditem = FALSE
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/Initialize()
|
||||
. = ..()
|
||||
@@ -537,11 +537,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(ismob(loc))
|
||||
var/mob/living/M = loc
|
||||
to_chat(M, "<span class='notice'>Your [name] goes out.</span>")
|
||||
lit = 0
|
||||
lit = FALSE
|
||||
icon_state = icon_off
|
||||
inhand_icon_state = icon_off
|
||||
M.update_inv_wear_mask()
|
||||
packeditem = 0
|
||||
packeditem = FALSE
|
||||
name = "empty [initial(name)]"
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
@@ -557,7 +557,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(G.dry == 1)
|
||||
to_chat(user, "<span class='notice'>You stuff [O] into [src].</span>")
|
||||
smoketime = 400
|
||||
packeditem = 1
|
||||
packeditem = TRUE
|
||||
name = "[O.name]-packed [initial(name)]"
|
||||
if(O.reagents)
|
||||
O.reagents.trans_to(src, O.reagents.total_volume, transfered_by = user)
|
||||
@@ -580,7 +580,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/turf/location = get_turf(user)
|
||||
if(lit)
|
||||
user.visible_message("<span class='notice'>[user] puts out [src].</span>", "<span class='notice'>You put out [src].</span>")
|
||||
lit = 0
|
||||
lit = FALSE
|
||||
icon_state = icon_off
|
||||
inhand_icon_state = icon_off
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -588,7 +588,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!lit && smoketime > 0)
|
||||
to_chat(user, "<span class='notice'>You empty [src] onto [location].</span>")
|
||||
new /obj/effect/decal/cleanable/ash(location)
|
||||
packeditem = 0
|
||||
packeditem = FALSE
|
||||
smoketime = 0
|
||||
reagents.clear_reagents()
|
||||
name = "empty [initial(name)]"
|
||||
@@ -626,7 +626,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
light_power = 0.6
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
light_on = FALSE
|
||||
var/lit = 0
|
||||
var/lit = FALSE
|
||||
var/fancy = TRUE
|
||||
var/overlay_state
|
||||
var/overlay_list = list(
|
||||
@@ -849,8 +849,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/chem_volume = 100
|
||||
var/vapetime = 0 //this so it won't puff out clouds every tick
|
||||
var/screw = 0 // kinky
|
||||
var/super = 0 //for the fattest vapes dude.
|
||||
var/screw = FALSE // kinky
|
||||
var/super = FALSE //for the fattest vapes dude.
|
||||
|
||||
/obj/item/clothing/mask/vape/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is puffin hard on dat vape, [user.p_they()] trying to join the vape life on a whole notha plane!</span>")//it doesn't give you cancer, it is cancer
|
||||
@@ -888,12 +888,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(screw && !(obj_flags & EMAGGED))//also kinky
|
||||
if(!super)
|
||||
cut_overlays()
|
||||
super = 1
|
||||
super = TRUE
|
||||
to_chat(user, "<span class='notice'>You increase the voltage of [src].</span>")
|
||||
add_overlay("vapeopen_med")
|
||||
else
|
||||
cut_overlays()
|
||||
super = 0
|
||||
super = FALSE
|
||||
to_chat(user, "<span class='notice'>You decrease the voltage of [src].</span>")
|
||||
add_overlay("vapeopen_low")
|
||||
|
||||
@@ -908,7 +908,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!(obj_flags & EMAGGED))
|
||||
cut_overlays()
|
||||
obj_flags |= EMAGGED
|
||||
super = 0
|
||||
super = FALSE
|
||||
to_chat(user, "<span class='warning'>You maximize the voltage of [src].</span>")
|
||||
add_overlay("vapeopen_high")
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user