Makes the code pass dreamchecker (#13161)

* Initial Commit - Trying to add DC to Travis

* Forgot to chmod

* This took too long

* Farie Fixes

* Fixes new code

* Job factions are fucking smelly

* Loadouts work again

* Runtime fixes
This commit is contained in:
AffectedArc07
2020-04-11 15:59:16 -06:00
committed by GitHub
parent ded391b325
commit 928a8f0e04
121 changed files with 315 additions and 285 deletions
+2
View File
@@ -47,6 +47,7 @@ jobs:
install:
- pip install --user PyYaml -q
- pip install --user beautifulsoup4 -q
- tools/travis/install_dreamchecker.sh
before_script: skip
script:
- shopt -s globstar
@@ -54,6 +55,7 @@ jobs:
- (num=$(grep -Ern '\\(red|blue|green|black|italic|bold|b|i[^mc])' code/ | wc -l); echo "$num BYOND text macros (expecting ${BYOND_MACRO_COUNT} or fewer)"; [ $num -le ${BYOND_MACRO_COUNT} ])
- md5sum -c - <<< "6dc1b6bf583f3bd4176b6df494caa5f1 *html/changelogs/example.yml"
- python tools/ss13_genchangelog.py html/changelog.html html/changelogs
- ~/dreamchecker
# Compile NanoUI to make sure it works
- stage: NanoUI
+2
View File
@@ -0,0 +1,2 @@
# This file has all the information on what versions of libraries are thrown into the code
export SPACEMANDMM_TAG=suite-1.2
+26
View File
@@ -0,0 +1,26 @@
// This file contains all the defines related to the spacemanDMM linter (dreamchecker). When running under normal conditions, BYOND will ignore all these
#ifdef SPACEMAN_DMM
#define RETURN_TYPE(X) set SpacemanDMM_return_type = X
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
#define UNLINT(X) SpacemanDMM_unlint(X)
#define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X
#define SHOULD_NOT_SLEEP(X)
#define SHOULD_BE_PURE(X)
#define PRIVATE_PROC(X)
#define PROTECTED_PROC(X)
#define VAR_FINAL var/SpacemanDMM_final
#define VAR_PRIVATE var
#define VAR_PROTECTED var
#else
#define RETURN_TYPE(X)
#define SHOULD_CALL_PARENT(X)
#define UNLINT(X) X
#define SHOULD_NOT_OVERRIDE(X)
#define SHOULD_NOT_SLEEP(X)
#define SHOULD_BE_PURE(X)
#define PRIVATE_PROC(X)
#define PROTECTED_PROC(X)
#define VAR_FINAL var
#define VAR_PRIVATE var
#define VAR_PROTECTED var
#endif
+1
View File
@@ -1,4 +1,5 @@
/proc/get_area(atom/A)
RETURN_TYPE(/area)
if(isarea(A))
return A
var/turf/T = get_turf(A)
+1 -1
View File
@@ -28,4 +28,4 @@ This may require updating to a beta release.
#endif
// Macros that must exist before world.dm
#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
// #define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
+2 -2
View File
@@ -36,7 +36,7 @@ SUBSYSTEM_DEF(events)
E.process()
for(var/i = EVENT_LEVEL_MUNDANE to EVENT_LEVEL_MAJOR)
var/list/datum/event_container/EC = event_containers[i]
var/datum/event_container/EC = event_containers[i]
EC.process()
/datum/controller/subsystem/events/proc/event_complete(var/datum/event/E)
@@ -65,7 +65,7 @@ SUBSYSTEM_DEF(events)
log_debug("Event '[EM.name]' has completed at [station_time_timestamp()].")
/datum/controller/subsystem/events/proc/delay_events(var/severity, var/delay)
var/list/datum/event_container/EC = event_containers[severity]
var/datum/event_container/EC = event_containers[severity]
EC.next_event_time += delay
/datum/controller/subsystem/events/proc/Interact(var/mob/living/user)
+4 -6
View File
@@ -10,7 +10,7 @@ SUBSYSTEM_DEF(jobs)
var/list/type_occupations = list() //Dict of all jobs, keys are types
var/list/prioritized_jobs = list() // List of jobs set to priority by HoP/Captain
var/list/id_change_records = list() // List of all job transfer records
var/list/id_change_counter = 1
var/id_change_counter = 1
//Players who need jobs
var/list/unassigned = list()
//Debug info
@@ -39,8 +39,6 @@ SUBSYSTEM_DEF(jobs)
var/datum/job/job = new J()
if(!job)
continue
if(!job.faction in faction)
continue
occupations += job
name_occupations[job.title] = job
type_occupations[J] = job
@@ -138,7 +136,7 @@ SUBSYSTEM_DEF(jobs)
if(flag && !(flag in player.client.prefs.be_special))
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
continue
if(player.mind && job.title in player.mind.restricted_roles)
if(player.mind && (job.title in player.mind.restricted_roles))
Debug("FOC incompatbile with antagonist role, Player: [player]")
continue
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
@@ -180,7 +178,7 @@ SUBSYSTEM_DEF(jobs)
Debug("GRJ player has disability rendering them ineligible for job, Player: [player]")
continue
if(player.mind && job.title in player.mind.restricted_roles)
if(player.mind && (job.title in player.mind.restricted_roles))
Debug("GRJ incompatible with antagonist role, Player: [player], Job: [job.title]")
continue
@@ -357,7 +355,7 @@ SUBSYSTEM_DEF(jobs)
Debug("DO player has disability rendering them ineligible for job, Player: [player], Job:[job.title]")
continue
if(player.mind && job.title in player.mind.restricted_roles)
if(player.mind && (job.title in player.mind.restricted_roles))
Debug("DO incompatible with antagonist role, Player: [player], Job:[job.title]")
continue
+85
View File
@@ -32,5 +32,90 @@ SUBSYSTEM_DEF(mapping)
return ..()
/datum/controller/subsystem/mapping/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins)
if(!z_levels || !z_levels.len)
WARNING("No Z levels provided - Not generating ruins")
return
for(var/zl in z_levels)
var/turf/T = locate(1, 1, zl)
if(!T)
WARNING("Z level [zl] does not exist - Not generating ruins")
return
var/list/ruins = potentialRuins.Copy()
var/list/forced_ruins = list() //These go first on the z level associated (same random one by default)
var/list/ruins_availible = list() //we can try these in the current pass
var/forced_z //If set we won't pick z level and use this one instead.
//Set up the starting ruin list
for(var/key in ruins)
var/datum/map_template/ruin/R = ruins[key]
if(R.cost > budget) //Why would you do that
continue
if(R.always_place)
forced_ruins[R] = -1
if(R.unpickable)
continue
ruins_availible[R] = R.placement_weight
while(budget > 0 && (ruins_availible.len || forced_ruins.len))
var/datum/map_template/ruin/current_pick
var/forced = FALSE
if(forced_ruins.len) //We have something we need to load right now, so just pick it
for(var/ruin in forced_ruins)
current_pick = ruin
if(forced_ruins[ruin] > 0) //Load into designated z
forced_z = forced_ruins[ruin]
forced = TRUE
break
else //Otherwise just pick random one
current_pick = pickweight(ruins_availible)
var/placement_tries = PLACEMENT_TRIES
var/failed_to_place = TRUE
var/z_placed = 0
while(placement_tries > 0)
placement_tries--
z_placed = pick(z_levels)
if(!current_pick.try_to_place(forced_z ? forced_z : z_placed,whitelist))
continue
else
failed_to_place = FALSE
break
//That's done remove from priority even if it failed
if(forced)
//TODO : handle forced ruins with multiple variants
forced_ruins -= current_pick
forced = FALSE
if(failed_to_place)
for(var/datum/map_template/ruin/R in ruins_availible)
if(R.id == current_pick.id)
ruins_availible -= R
log_world("Failed to place [current_pick.name] ruin.")
else
budget -= current_pick.cost
if(!current_pick.allow_duplicates)
for(var/datum/map_template/ruin/R in ruins_availible)
if(R.id == current_pick.id)
ruins_availible -= R
if(current_pick.never_spawn_with)
for(var/blacklisted_type in current_pick.never_spawn_with)
for(var/possible_exclusion in ruins_availible)
if(istype(possible_exclusion,blacklisted_type))
ruins_availible -= possible_exclusion
forced_z = 0
//Update the availible list
for(var/datum/map_template/ruin/R in ruins_availible)
if(R.cost > budget)
ruins_availible -= R
log_world("Ruin loader finished with [budget] left to spend.")
/datum/controller/subsystem/mapping/Recover()
flags |= SS_NO_INIT
+1 -1
View File
@@ -624,7 +624,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
clothes_s = new /icon('icons/mob/uniform.dmi', "syndicate_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "jackboots"), ICON_UNDERLAY)
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "swat_gl"), ICON_UNDERLAY)
else if(H.mind && H.mind.assigned_role in get_all_centcom_jobs())
else if(H.mind && (H.mind.assigned_role in get_all_centcom_jobs()))
clothes_s = new /icon('icons/mob/uniform.dmi', "officer_s")
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "laceups"), ICON_UNDERLAY)
else
+1 -1
View File
@@ -5,7 +5,7 @@
/// Status traits attached to this datum
var/list/status_traits
var/list/comp_lookup
var/list/signal_procs
var/list/list/datum/callback/signal_procs
var/signal_enabled = FALSE
var/datum_flags = NONE
var/var_edited = FALSE //Warranty void if seal is broken
+3 -4
View File
@@ -54,14 +54,13 @@
var/linglink
var/datum/vampire/vampire //vampire holder
var/datum/abductor/abductor //abductor holder
var/datum/devilinfo/devilinfo //devil holder
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD
var/datum/mindslaves/som //stands for slave or master...hush..
var/datum/devilinfo/devilinfo //Information about the devil, if any.
var/damnation_type = 0
var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src
var/damnation_type = 0
var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src
var/hasSoul = TRUE
var/rev_cooldown = 0
@@ -547,7 +546,7 @@
var/mob/def_target = null
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain)
if(objective&&(objective.type in objective_list) && objective:target)
def_target = objective:target.current
def_target = objective.target.current
possible_targets = sortAtom(possible_targets)
possible_targets += "Free objective"
-1
View File
@@ -22,5 +22,4 @@
/mutable_appearance/clean/New()
. = ..()
alpha = 255
opacity = 1
transform = null
+2 -2
View File
@@ -1,7 +1,7 @@
/datum/radio_frequency
var/frequency as num
var/list/list/obj/devices = list()
var/list/obj/devices = list()
/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null)
var/turf/start_point
@@ -108,7 +108,7 @@
. = "Domestic Animal"
else
. = "Unidentifiable"
//callback used by objects to react to incoming radio signals
/obj/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
return null
+1 -1
View File
@@ -95,7 +95,7 @@
if(!marked_item) //linking item to the spell
message = "<span class='warning'>"
for(var/obj/item in hand_items)
if(ABSTRACT in item.flags || NODROP in item.flags)
if((ABSTRACT in item.flags) || (NODROP in item.flags))
continue
marked_item = item
to_chat(M, "<span class='warning'>You begin to focus your very being into the [item.name]...</span>")
+2 -2
View File
@@ -41,7 +41,7 @@
else
message = "<span class='notice'>You must hold the desired item in your hands to mark it for recall.</span>"
else if(marked_item && marked_item in hand_items) //unlinking item to the spell
else if(marked_item && (marked_item in hand_items)) //unlinking item to the spell
message = "<span class='notice'>You remove the mark on [marked_item] to use elsewhere.</span>"
name = "Instant Summons"
marked_item = null
@@ -75,7 +75,7 @@
B.transfer_identity(C)
C.death()
add_attack_logs(target, C, "Magically debrained INTENT: [uppertext(target.a_intent)]")*/
if(C.stomach_contents && item_to_retrieve in C.stomach_contents)
if(C.stomach_contents && (item_to_retrieve in C.stomach_contents))
C.stomach_contents -= item_to_retrieve
for(var/X in C.bodyparts)
var/obj/item/organ/external/part = X
+1 -1
View File
@@ -190,7 +190,7 @@
L.adjustBrainLoss(-3.5)
L.adjustCloneLoss(-1) //Becasue apparently clone damage is the bastion of all health
if(ishuman(L))
var/var/mob/living/carbon/human/H = L
var/mob/living/carbon/human/H = L
for(var/obj/item/organ/external/E in H.bodyparts)
if(prob(10))
E.mend_fracture()
-1
View File
@@ -108,7 +108,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
return desc
/datum/uplink_item/proc/buy(var/obj/item/uplink/hidden/U, var/mob/user)
..()
if(!istype(U))
return 0
+1 -1
View File
@@ -7,7 +7,7 @@
/proc/key_name_helper(whom, include_name, include_link = FALSE, type = null)
if(include_link != FALSE && include_link != TRUE)
log_runtime(EXCEPTION("Key_name was called with an incorrect include_link [include_link]"), src)
log_runtime(EXCEPTION("Key_name was called with an incorrect include_link [include_link]"))
var/mob/M
var/client/C
+1 -1
View File
@@ -30,7 +30,7 @@
* Is the gene active in this mob's DNA?
*/
/datum/dna/gene/proc/is_active(var/mob/M)
return M.active_genes && type in M.active_genes
return M.active_genes && (type in M.active_genes)
// Return 1 if we can activate.
// HANDLE MUTCHK_FORCED HERE!
+1 -1
View File
@@ -175,7 +175,7 @@
var/cword = pick(words)
words.Remove(cword)
var/suffix = copytext(cword,length(cword)-1,length(cword))
while(length(cword)>0 && suffix in list(".",",",";","!",":","?"))
while(length(cword)>0 && (suffix in list(".",",",";","!",":","?")))
cword = copytext(cword,1 ,length(cword)-1)
suffix = copytext(cword,length(cword)-1,length(cword) )
if(length(cword))
-1
View File
@@ -3,7 +3,6 @@
var/interceptname = ""
switch(report)
if(0)
..()
return
if(1)
interceptname = "Level 5-6 Biohazard Response Procedures"
@@ -18,7 +18,7 @@
if((NOCLONE || SKELETON || HUSK) in target.mutations)
to_chat(user, "<span class='warning'>DNA of [target] is ruined beyond usability!</span>")
return
if(!istype(target) || issmall(target) || NO_DNA in target.dna.species.species_traits)
if(!istype(target) || issmall(target) || (NO_DNA in target.dna.species.species_traits))
to_chat(user, "<span class='warning'>[target] is not compatible with this ability.</span>")
return
if(target.mind.changeling)
+1 -1
View File
@@ -720,7 +720,7 @@ GLOBAL_LIST_EMPTY(teleport_runes)
log_game("Astral Communion rune failed - more than one user")
return list()
var/turf/T = get_turf(src)
if(!user in T.contents)
if(!(user in T.contents))
to_chat(user, "<span class='cultitalic'>You must be standing on top of [src]!</span>")
log_game("Astral Communion rune failed - user not standing on rune")
return list()
+1 -1
View File
@@ -17,7 +17,7 @@
to_chat(world,text)
/datum/game_mode/proc/auto_declare_completion_devils()
/var/text = ""
var/text = ""
if(devils.len)
text += "<br><span class='big'><b>The devils were:</b></span>"
for(var/D in devils)
+1 -1
View File
@@ -24,7 +24,7 @@
var/uplink_contents // the contents of the uplink
/datum/faction/syndicate/proc/assign_objectives(var/datum/mind/traitor)
..()
return
/* ----- Begin defining syndicate factions ------ */
+2 -2
View File
@@ -164,11 +164,11 @@
if(ishuman(M))
if(!M.stat)
surviving_humans++
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations))
escaped_humans++
if(!M.stat)
surviving_total++
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
if(M.loc && M.loc.loc && (M.loc.loc.type in escape_locations))
escaped_total++
if(M.loc && M.loc.loc && M.loc.loc.type == SSshuttle.emergency.areaInstance.type && SSshuttle.emergency.mode >= SHUTTLE_ENDGAME)
@@ -186,7 +186,7 @@
var/unlock_sound //Sound played when an ability is unlocked
var/uses
/datum/AI_Module/proc/upgrade(mob/living/silicon/AI/AI) //Apply upgrades!
/datum/AI_Module/proc/upgrade(mob/living/silicon/ai/AI) //Apply upgrades!
return
/datum/AI_Module/large //Big, powerful stuff that can only be used once.
@@ -318,7 +318,7 @@
unlock_text = "<span class='notice'>You establish a power diversion to your turrets, upgrading their health and damage.</span>"
unlock_sound = 'sound/items/rped.ogg'
/datum/AI_Module/large/upgrade_turrets/upgrade(mob/living/silicon/AI/AI)
/datum/AI_Module/large/upgrade_turrets/upgrade(mob/living/silicon/ai/AI)
for(var/obj/machinery/porta_turret/turret in GLOB.machines)
var/turf/T = get_turf(turret)
if(is_station_level(T.z))
@@ -51,7 +51,7 @@
if(iscarbon(target))
changeNext_move(CLICK_CD_MELEE)
if(heal_cooldown <= world.time && !stat)
var/mob/living/carbon/C = target
var/mob/living/carbon/human/C = target
C.adjustBruteLoss(-5, robotic=1)
C.adjustFireLoss(-5, robotic=1)
C.adjustOxyLoss(-5)
+1 -1
View File
@@ -50,7 +50,7 @@
var/turf/location = get_turf(E.loc)
var/area/escape_zone = SSshuttle.emergency.areaInstance
if(E.stat != DEAD && location in escape_zone) // Escapee Scores
if(E.stat != DEAD && (location in escape_zone)) // Escapee Scores
cash_score = get_score_container_worth(E)
if(cash_score > GLOB.score_richestcash)
+1 -1
View File
@@ -280,7 +280,7 @@
SH.mind.transfer_to(C)
if(iscultist(C))
var/datum/action/innate/cultcomm/CC = new()
CC.Grant(C) //We have to grant the cult comms again because they're lost during the mind transfer.
CC.Grant(C) //We have to grant the cult comms again because they're lost during the mind transfer.
qdel(T)
qdel(SH)
to_chat(C, "<B>You are still bound to serve your creator, follow their orders and help them complete their goals at all costs.</B>")
+3 -6
View File
@@ -12,9 +12,6 @@
var/department_flag = 0
var/department_head = list()
//Players will be allowed to spawn in as jobs that are set to "Station"
var/list/faction = list("Station")
//How many players can be this job
var/total_positions = 0
@@ -172,8 +169,8 @@
if(box && H.dna.species.speciesbox)
box = H.dna.species.speciesbox
if(allow_loadout && H.client && (H.client.prefs.gear && H.client.prefs.gear.len))
for(var/gear in H.client.prefs.gear)
if(allow_loadout && H.client && (H.client.prefs.loadout_gear && H.client.prefs.loadout_gear.len))
for(var/gear in H.client.prefs.loadout_gear)
var/datum/gear/G = GLOB.gear_datums[gear]
if(G)
var/permitted = FALSE
@@ -211,7 +208,7 @@
if(gear_leftovers.len)
for(var/datum/gear/G in gear_leftovers)
var/atom/placed_in = H.equip_or_collect(G.spawn_item(null, H.client.prefs.gear[G.display_name]))
var/atom/placed_in = H.equip_or_collect(G.spawn_item(null, H.client.prefs.loadout_gear[G.display_name]))
if(istype(placed_in))
if(isturf(placed_in))
to_chat(H, "<span class='notice'>Placing [G.display_name] on [placed_in]!</span>")
+1 -1
View File
@@ -357,7 +357,7 @@
if(istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter))
return O:id_tag in sensors
/obj/machinery/computer/general_air_control/linkWith(mob/user, obj/O, link/context)
/obj/machinery/computer/general_air_control/linkWith(mob/user, obj/O, context)
sensors[O:id_tag] = reject_bad_name(clean_input(user, "Choose a sensor label:", "Sensor Label"), allow_numbers=1)
return 1
+1 -1
View File
@@ -12,7 +12,7 @@ GLOBAL_LIST_EMPTY(minor_air_alarms)
/obj/machinery/computer/atmos_alert/New()
..()
SSalarms.atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/update_icon)
SSalarms.atmosphere_alarm.register(src, /obj/machinery/computer/station_alert/.proc/update_icon)
/obj/machinery/computer/atmos_alert/Destroy()
SSalarms.atmosphere_alarm.unregister(src)
+1 -1
View File
@@ -133,7 +133,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if(!istype(id_card))
return ..()
if(!scan && ACCESS_CHANGE_IDS in id_card.access)
if(!scan && (ACCESS_CHANGE_IDS in id_card.access))
user.drop_item()
id_card.loc = src
scan = id_card
@@ -499,7 +499,6 @@
if(!frequency) return
var/datum/signal/status_signal = new
status_signal.source = src
status_signal.transmission_method = 1
status_signal.data["command"] = command
@@ -507,13 +506,13 @@
if("message")
status_signal.data["msg1"] = data1
status_signal.data["msg2"] = data2
log_admin("STATUS: [user] set status screen message with [src]: [data1] [data2]")
log_admin("STATUS: [user] set status screen message: [data1] [data2]")
//message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
if("alert")
status_signal.data["picture_state"] = data1
spawn(0)
frequency.post_signal(src, status_signal)
frequency.post_signal(null, status_signal)
/obj/machinery/computer/communications/Destroy()
@@ -20,7 +20,7 @@
/obj/machinery/computer/station_alert/New()
..()
alarm_monitor = new monitor_type(src)
alarm_monitor.register(src, /obj/machinery/computer/station_alert/update_icon)
alarm_monitor.register(src, /obj/machinery/computer/station_alert/.proc/update_icon)
/obj/machinery/computer/station_alert/Destroy()
alarm_monitor.unregister(src)
+1 -1
View File
@@ -95,7 +95,7 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
to_chat(user, "<span class='notice'>[src] is already printing something, please wait.</span>")
return
atom_say("<span class='notice'>Printing explosive log. Standby...</span>")
addtimer(CALLBACK(src, .print), 50)
addtimer(CALLBACK(src, .proc/print), 50)
/obj/machinery/doppler_array/proc/print()
visible_message("<span class='notice'>[src] prints a piece of paper!</span>")
+1 -1
View File
@@ -193,5 +193,5 @@
/obj/machinery/computer/guestpass/hop/get_changeable_accesses()
. = ..()
if(. && ACCESS_CHANGE_IDS in .)
if(. && (ACCESS_CHANGE_IDS in .))
return get_all_accesses()
+1 -1
View File
@@ -78,7 +78,7 @@
try_detonate(TRUE)
//Counter terrorists win
else if(!active || defused)
if(defused && payload in src)
if(defused && (payload in src))
payload.defuse()
countdown.stop()
STOP_PROCESSING(SSfastprocess, src)
@@ -166,7 +166,7 @@
return istype(O,/obj/machinery/telecomms)
/obj/machinery/telecomms/isLinkedWith(var/obj/O)
return O != null && O in links
return O != null && (O in links)
/obj/machinery/telecomms/getLink(var/idx)
return (idx >= 1 && idx <= links.len) ? links[idx] : null
@@ -363,11 +363,13 @@
if(P)
if(P.buffer && P.buffer != src)
if(!(src in P.buffer:links))
P.buffer:links.Add(src)
if(istype(P, /obj/machinery/telecomms))
var/obj/machinery/telecomms/TCM = P.buffer
if(!(src in TCM.links))
TCM.links.Add(src)
if(!(P.buffer in src.links))
src.links.Add(P.buffer)
if(!(P.buffer in src.links))
src.links.Add(P.buffer)
temp = "<font color = #666633>-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-</font>"
+2 -2
View File
@@ -436,7 +436,7 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new())
// Arrays
if(href_list["create_item"])
if(href_list["array"] && href_list["array"] in arrays)
if(href_list["array"] && (href_list["array"] in arrays))
if(requires_unlock[href_list["array"]] && !source.unlocked)
return
var/new_value = clean_input(user, "Provide a value for the new index.", "New Index")
@@ -448,7 +448,7 @@ GLOBAL_DATUM_INIT(nttc_config, /datum/nttc_configuration, new())
log_action(user, "updated [href_list["array"]] - new value [new_value]", TRUE)
if(href_list["delete_item"])
if(href_list["array"] && href_list["array"] in arrays)
if(href_list["array"] && (href_list["array"] in arrays))
if(requires_unlock[href_list["array"]] && !source.unlocked)
return
var/list/array = vars[href_list["array"]]
@@ -93,7 +93,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
/obj/machinery/telecomms/proc/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
// receive information from linked machinery
..()
return
/obj/machinery/telecomms/proc/is_freq_listening(datum/signal/signal)
// return 1 if found, 0 if not found
+3 -3
View File
@@ -540,7 +540,7 @@
/obj/mecha/attack_alien(mob/living/user)
log_message("Attack by alien. Attacker - [user].", color = "red")
log_message("Attack by alien. Attacker - [user].", red=TRUE)
playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE)
attack_generic(user, 15, BRUTE, "melee", 0)
@@ -1094,7 +1094,7 @@
to_chat(user, "<span class='warning'>You stop entering the exosuit!</span>")
/obj/mecha/proc/moved_inside(var/mob/living/carbon/human/H as mob)
if(H && H.client && H in range(1))
if(H && H.client && (H in range(1)))
occupant = H
H.stop_pulling()
H.forceMove(src)
@@ -1141,7 +1141,7 @@
return 0
/obj/mecha/proc/mmi_moved_inside(obj/item/mmi/mmi_as_oc,mob/user)
if(mmi_as_oc && user in range(1))
if(mmi_as_oc && (user in range(1)))
if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client)
to_chat(user, "Consciousness matrix not detected.")
return 0
+1 -1
View File
@@ -139,7 +139,7 @@
..()
if(href_list["drop_from_cargo"])
var/obj/O = locate(href_list["drop_from_cargo"])
if(O && O in cargo)
if(O && (O in cargo))
occupant_message("<span class='notice'>You unload [O].</span>")
O.loc = get_turf(src)
cargo -= O
-1
View File
@@ -1,7 +1,6 @@
//TODO: Flash range does nothing currently
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0, silent = 0, smoke = 1, cause = null, breach = TRUE)
src = null //so we don't abort once src is deleted
epicenter = get_turf(epicenter)
// Archive the uncapped explosion for the doppler array
@@ -458,7 +458,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
R.receive_signal(signal)
// Receiving code can be located in Telecommunications.dm
return signal.data["done"] && position.z in signal.data["level"]
return signal.data["done"] && (position.z in signal.data["level"])
/* ###### Intercoms and station-bounced radios ###### */
@@ -510,7 +510,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
sleep(rand(10,25)) // wait a little...
if(signal.data["done"] && position.z in signal.data["level"])
if(signal.data["done"] && (position.z in signal.data["level"]))
// we're done here.
return 1
@@ -168,7 +168,6 @@ GLOBAL_LIST_EMPTY(world_uplinks)
to_chat(user, "<span class='notice'>[I] refunded.</span>")
qdel(I)
return
..()
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
/* How to create an uplink in 3 easy steps!
+1 -1
View File
@@ -222,7 +222,7 @@
var/input_flag = input(user, "Choose a flag to disguise as.", "Choose a flag.") in show_flag
if(user && src in user.contents)
if(user && (src in user.contents))
var/obj/item/flag/chosen_flag = flag[input_flag]
+1 -1
View File
@@ -106,7 +106,7 @@
P = new(T, whatpipe, iconrotation) //Make the pipe, BUT WAIT! There's more!
if(!iconrotation && P.is_bent_pipe()) //Automatically rotates dispensed pipes if the user selected auto-rotation
P.dir = turn(user.dir, 135)
else if(!iconrotation && P.pipe_type in list(PIPE_CONNECTOR, PIPE_UVENT, PIPE_SCRUBBER, PIPE_HEAT_EXCHANGE, PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP, PIPE_INJECTOR, PIPE_PASV_VENT)) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction
else if(!iconrotation && (P.pipe_type in list(PIPE_CONNECTOR, PIPE_UVENT, PIPE_SCRUBBER, PIPE_HEAT_EXCHANGE, PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP, PIPE_INJECTOR, PIPE_PASV_VENT))) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction
P.dir = turn(user.dir, -180)
else if(iconrotation && P.is_bent_pipe()) //If user selected a rotation and the pipe is bent
P.dir = turn(iconrotation, -45)
+2 -2
View File
@@ -192,13 +192,13 @@
/obj/proc/multitool_menu(var/mob/user,var/obj/item/multitool/P)
return "<b>NO MULTITOOL_MENU!</b>"
/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/link/context)
/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/context)
return 0
/obj/proc/unlinkFrom(var/mob/user, var/obj/buffer)
return 0
/obj/proc/canLink(var/obj/O, var/link/context)
/obj/proc/canLink(var/obj/O, var/context)
return 0
/obj/proc/isLinkedWith(var/obj/O)
@@ -36,7 +36,7 @@
depotarea.armory_locker_looted()
/obj/structure/closet/secure_closet/syndicate/depot/attack_animal(mob/M)
if(isanimal(M) && "syndicate" in M.faction)
if(isanimal(M) && ("syndicate" in M.faction))
to_chat(M, "<span class='warning'>The [src] resists your attack!</span>")
return
return ..()
+1 -1
View File
@@ -25,7 +25,7 @@ GLOBAL_LIST_EMPTY(safes)
var/number_of_tumblers = 3 // The amount of tumblers that will be generated.
var/list/tumblers = list() // The list of tumbler dial positions that need to be hit.
var/list/current_tumbler_index = 1 // The index in the tumblers list of the tumbler dial position that needs to be hit.
var/current_tumbler_index = 1 // The index in the tumblers list of the tumbler dial position that needs to be hit.
var/space = 0 // The combined w_class of everything in the safe.
var/maxspace = 24 // The maximum combined w_class of stuff in the safe.
@@ -38,7 +38,7 @@
if(pod.contents.len)
to_chat(AM, "<span class=The pod is already occupied.</span>")
return
else if(!pod.moving && pod.dir in directions())
else if(!pod.moving && (pod.dir in directions()))
AM.forceMove(pod)
return
@@ -47,7 +47,7 @@
/obj/structure/transit_tube/station/attack_hand(mob/user as mob)
if(!pod_moving)
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && pod.dir in directions())
if(!pod.moving && (pod.dir in directions()))
if(icon_state == "closed")
open_animation()
@@ -100,7 +100,7 @@
/obj/structure/transit_tube/station/proc/launch_pod()
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && pod.dir in directions())
if(!pod.moving && (pod.dir in directions()))
spawn(5)
pod_moving = 1
close_animation()
+1 -1
View File
@@ -261,7 +261,7 @@
/datum/pm_tracker
var/current_title = ""
var/open = FALSE
var/list/pms = list()
var/list/datum/pm_convo/pms = list()
var/show_archived = FALSE
var/window_id = "pms_window"
+1 -1
View File
@@ -85,7 +85,7 @@
var/output = "<b>Radio Report</b><hr>"
for(var/fq in SSradio.frequencies)
output += "<b>Freq: [fq]</b><br>"
var/list/datum/radio_frequency/fqs = SSradio.frequencies[fq]
var/datum/radio_frequency/fqs = SSradio.frequencies[fq]
if(!fqs)
output += "&nbsp;&nbsp;<b>ERROR</b><br>"
continue
+2 -1
View File
@@ -7,4 +7,5 @@ GLOBAL_LIST_INIT(open_logging_views, list())
if(!GLOB.open_logging_views[usr.client.ckey])
GLOB.open_logging_views[usr.client.ckey] = new /datum/log_viewer()
GLOB.open_logging_views[usr.client.ckey].show_ui(usr)
var/datum/log_viewer/LV = GLOB.open_logging_views[usr.client.ckey]
LV.show_ui(usr)
+1 -1
View File
@@ -543,7 +543,7 @@ GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "step_size", "bound_h
var/var_value
if(param_var_name)
if(!param_var_name in O.vars)
if(!(param_var_name in O.vars))
to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this datum ([O])")
return
variable = param_var_name
+1 -1
View File
@@ -82,7 +82,7 @@
else if((H in GLOB.team_bravo) && (A in GLOB.team_bravo))
to_chat(A, "<span class='warning'>He's on your team!</span>")
return
else if(!A in GLOB.team_alpha && !A in GLOB.team_bravo)
else if(!(A in GLOB.team_alpha) && !(A in GLOB.team_bravo))
to_chat(A, "<span class='warning'>You're not part of the dodgeball game, sorry!</span>")
return
else
+1 -1
View File
@@ -533,7 +533,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/list/mobs = list()
var/list/ghosts = list()
var/list/sortmob = sortAtom(GLOB.mob_list) // get the mob list.
/var/any=0
var/any=0
for(var/mob/dead/observer/M in sortmob)
mobs.Add(M) //filter it where it's only ghosts
any = 1 //if no ghosts show up, any will just be 0
+1 -1
View File
@@ -58,7 +58,7 @@ GLOBAL_VAR(claw_game_html)
atom_say("WINNER!")
new /obj/item/toy/prizeball(get_turf(src))
playsound(src.loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10)
addtimer(CALLBACK(src, .update_icon), 10)
addtimer(CALLBACK(src, .proc/update_icon), 10)
/obj/machinery/arcade/claw/start_play(mob/user as mob)
..()
+1 -1
View File
@@ -89,7 +89,7 @@
/obj/item/assembly/mousetrap/attack_hand(mob/living/user)
if(armed)
if((user.getBrainLoss() >= 60 || CLUMSY in user.mutations) && prob(50))
if((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
@@ -22,7 +22,7 @@
field = json["field"]
Evaluate()
if(sensor && field && sensor in parent.sensor_information)
if(sensor && field && (sensor in parent.sensor_information))
return parent.sensor_information[sensor][field]
return 0
-84
View File
@@ -172,87 +172,3 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
new /obj/effect/landmark/ruin(central_turf, src)
return TRUE
return FALSE
/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins)
if(!z_levels || !z_levels.len)
WARNING("No Z levels provided - Not generating ruins")
return
for(var/zl in z_levels)
var/turf/T = locate(1, 1, zl)
if(!T)
WARNING("Z level [zl] does not exist - Not generating ruins")
return
var/list/ruins = potentialRuins.Copy()
var/list/forced_ruins = list() //These go first on the z level associated (same random one by default)
var/list/ruins_availible = list() //we can try these in the current pass
var/forced_z //If set we won't pick z level and use this one instead.
//Set up the starting ruin list
for(var/key in ruins)
var/datum/map_template/ruin/R = ruins[key]
if(R.cost > budget) //Why would you do that
continue
if(R.always_place)
forced_ruins[R] = -1
if(R.unpickable)
continue
ruins_availible[R] = R.placement_weight
while(budget > 0 && (ruins_availible.len || forced_ruins.len))
var/datum/map_template/ruin/current_pick
var/forced = FALSE
if(forced_ruins.len) //We have something we need to load right now, so just pick it
for(var/ruin in forced_ruins)
current_pick = ruin
if(forced_ruins[ruin] > 0) //Load into designated z
forced_z = forced_ruins[ruin]
forced = TRUE
break
else //Otherwise just pick random one
current_pick = pickweight(ruins_availible)
var/placement_tries = PLACEMENT_TRIES
var/failed_to_place = TRUE
var/z_placed = 0
while(placement_tries > 0)
placement_tries--
z_placed = pick(z_levels)
if(!current_pick.try_to_place(forced_z ? forced_z : z_placed,whitelist))
continue
else
failed_to_place = FALSE
break
//That's done remove from priority even if it failed
if(forced)
//TODO : handle forced ruins with multiple variants
forced_ruins -= current_pick
forced = FALSE
if(failed_to_place)
for(var/datum/map_template/ruin/R in ruins_availible)
if(R.id == current_pick.id)
ruins_availible -= R
log_world("Failed to place [current_pick.name] ruin.")
else
budget -= current_pick.cost
if(!current_pick.allow_duplicates)
for(var/datum/map_template/ruin/R in ruins_availible)
if(R.id == current_pick.id)
ruins_availible -= R
if(current_pick.never_spawn_with)
for(var/blacklisted_type in current_pick.never_spawn_with)
for(var/possible_exclusion in ruins_availible)
if(istype(possible_exclusion,blacklisted_type))
ruins_availible -= possible_exclusion
forced_z = 0
//Update the availible list
for(var/datum/map_template/ruin/R in ruins_availible)
if(R.cost > budget)
ruins_availible -= R
log_world("Ruin loader finished with [budget] left to spend.")
+19 -10
View File
@@ -46,17 +46,21 @@
if(!M.id || M.id == "")
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
if(!M.id || M.id == "")
goto line_jump
speed_execute()
return
if(P.id_tag == M.id && P.id_tag && P.id_tag != "")
P.id_tag = null
to_chat(user, "[P] unlinked.")
goto line_jump
speed_execute()
return
if(!M.normaldoorcontrol)
if(link_lines.len && alert(user, "Warning: This will disable links to connected pod doors. Continue?", "Buildmode", "Yes", "No") == "No")
goto line_jump
speed_execute()
return
M.normaldoorcontrol = 1
if(P.id_tag && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
goto line_jump
speed_execute()
return
P.id_tag = M.id
if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/poddoor))
var/obj/machinery/door_control/M = link_obj
@@ -64,24 +68,29 @@
if(!M.id || M.id == "")
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
if(!M.id || M.id == "")
goto line_jump
speed_execute()
return
if(P.id_tag == M.id && P.id_tag && P.id_tag != "")
P.id_tag = null
to_chat(user, "[P] unlinked.")
goto line_jump
speed_execute()
return
if(M.normaldoorcontrol)
if(link_lines.len && alert(user, "Warning: This will disable links to connected airlocks. Continue?", "Buildmode", "Yes", "No") == "No")
goto line_jump
speed_execute()
return
M.normaldoorcontrol = 0
if(!M.id || M.id == "")
M.id = input(user, "Please select an ID for the button", "Buildmode", "")
if(!M.id || M.id == "")
goto line_jump
speed_execute()
return
if(P.id_tag && P.id_tag != 1 && alert(user, "Warning: This will unlink something else from the door. Continue?", "Buildmode", "Yes", "No") == "No")
goto line_jump
speed_execute()
return
P.id_tag = M.id
line_jump // For the goto
/datum/buildmode_mode/link/proc/speed_execute() // For exiting out of hell
clear_lines()
if(istype(link_obj, /obj/machinery/door_control))
+1 -1
View File
@@ -427,7 +427,7 @@
/client/proc/is_connecting_from_localhost()
var/localhost_addresses = list("127.0.0.1", "::1") // Adresses
if(!isnull(address) && address in localhost_addresses)
if(!isnull(address) && (address in localhost_addresses))
return TRUE
return FALSE
+13 -13
View File
@@ -200,7 +200,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
var/unlock_content = 0
//Gear stuff
var/list/gear = list()
var/list/loadout_gear = list()
var/gear_tab = "General"
// Parallax
var/parallax = PARALLAX_HIGH
@@ -508,9 +508,9 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if(TAB_GEAR)
var/total_cost = 0
var/list/type_blacklist = list()
if(gear && gear.len)
for(var/i = 1, i <= gear.len, i++)
var/datum/gear/G = GLOB.gear_datums[gear[i]]
if(loadout_gear && loadout_gear.len)
for(var/i = 1, i <= loadout_gear.len, i++)
var/datum/gear/G = GLOB.gear_datums[loadout_gear[i]]
if(G)
if(!G.subtype_cost_overlap)
if(G.subtype_path in type_blacklist)
@@ -543,7 +543,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "<tr><td colspan=4><hr></td></tr>"
for(var/gear_name in LC.gear)
var/datum/gear/G = LC.gear[gear_name]
var/ticked = (G.display_name in gear)
var/ticked = (G.display_name in loadout_gear)
if(G.donator_tier > user.client.donator_level)
dat += "<tr style='vertical-align:top;'><td width=15%><B>[G.display_name]</B></td>"
else
@@ -576,10 +576,10 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
/datum/preferences/proc/get_gear_metadata(var/datum/gear/G)
. = gear[G.display_name]
. = loadout_gear[G.display_name]
if(!.)
. = list()
gear[G.display_name] = .
loadout_gear[G.display_name] = .
/datum/preferences/proc/get_tweak_metadata(var/datum/gear/G, var/datum/gear_tweak/tweak)
var/list/metadata = get_gear_metadata(G)
@@ -721,7 +721,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
HTML += "</td></tr>"
for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'>&nbsp</td><td>&nbsp</td></tr>"
HTML += "<tr bgcolor='[lastJob ? lastJob.selection_color : "#ffffff"]'><td width='60%' align='right'>&nbsp</td><td>&nbsp</td></tr>"
HTML += "</td'></tr></table>"
@@ -1162,15 +1162,15 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if(href_list["preference"] == "gear")
if(href_list["toggle_gear"])
var/datum/gear/TG = GLOB.gear_datums[href_list["toggle_gear"]]
if(TG.display_name in gear)
gear -= TG.display_name
if(TG.display_name in loadout_gear)
loadout_gear -= TG.display_name
else
if(TG.donator_tier && user.client.donator_level < TG.donator_tier)
to_chat(user, "<span class='warning'>That gear is only available at a higher donation tier than you are on.</span>")
return
var/total_cost = 0
var/list/type_blacklist = list()
for(var/gear_name in gear)
for(var/gear_name in loadout_gear)
var/datum/gear/G = GLOB.gear_datums[gear_name]
if(istype(G))
if(!G.subtype_cost_overlap)
@@ -1180,7 +1180,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
total_cost += G.cost
if((total_cost + TG.cost) <= max_gear_slots)
gear += TG.display_name
loadout_gear += TG.display_name
else if(href_list["gear"] && href_list["tweak"])
var/datum/gear/gear = GLOB.gear_datums[href_list["gear"]]
@@ -1194,7 +1194,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
else if(href_list["select_category"])
gear_tab = href_list["select_category"]
else if(href_list["clear_loadout"])
gear.Cut()
loadout_gear.Cut()
ShowChoices(user)
return
@@ -259,7 +259,7 @@
//socks
socks = query.item[49]
body_accessory = query.item[50]
gear = params2list(query.item[51])
loadout_gear = params2list(query.item[51])
autohiss_mode = text2num(query.item[52])
//Sanitize
@@ -318,7 +318,7 @@
if(!player_alt_titles) player_alt_titles = new()
if(!organ_data) src.organ_data = list()
if(!rlimb_data) src.rlimb_data = list()
if(!gear) gear = list()
if(!loadout_gear) loadout_gear = list()
return 1
@@ -336,8 +336,8 @@
rlimblist = list2params(rlimb_data)
if(!isemptylist(player_alt_titles))
playertitlelist = list2params(player_alt_titles)
if(!isemptylist(gear))
gearlist = list2params(gear)
if(!isemptylist(loadout_gear))
gearlist = list2params(loadout_gear)
var/DBQuery/firstquery = GLOB.dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
firstquery.Execute()
@@ -493,7 +493,8 @@
/datum/preferences/proc/SetChangelog(client/C,hash)
lastchangelog=hash
if(GLOB.preferences_datums[C.ckey].toggles & UI_DARKMODE)
var/datum/preferences/P = GLOB.preferences_datums[C.ckey]
if(P.toggles & UI_DARKMODE)
winset(C, "rpane.changelog", "background-color=#40628a;font-color=#ffffff;font-style=none")
else
winset(C, "rpane.changelog", "background-color=none;font-style=none")
+1 -2
View File
@@ -335,7 +335,6 @@ BLIND // can't see anything
set category = "Object"
set src in usr
set_sensors(usr)
..()
//Head
/obj/item/clothing/head
@@ -739,7 +738,7 @@ BLIND // can't see anything
if(!usr.incapacitated())
if(copytext(item_color,-2) != "_d")
basecolor = item_color
if(basecolor + "_d_s" in icon_states('icons/mob/uniform.dmi'))
if((basecolor + "_d_s") in icon_states('icons/mob/uniform.dmi'))
item_color = item_color == "[basecolor]" ? "[basecolor]_d" : "[basecolor]"
usr.update_inv_w_uniform()
else
@@ -95,7 +95,7 @@
phaseanim.loc = to_turf
sleep(7)
if(holder)
if(user && user in holder.contents)
if(user && (user in holder.contents))
user.loc = to_turf
if(user.client)
if(camera)
@@ -23,7 +23,7 @@
to_chat(usr, "Your module is not installed in a hardsuit.")
return
module.holder.ui_interact(usr, nano_state = GLOB.contained_state)
module.holder.ui_interact(usr, state = GLOB.contained_state)
/obj/item/rig_module/ai_container
+1 -1
View File
@@ -958,7 +958,7 @@
if(linked_staff.faith >= 100) //if the linked staff is fully recharged, do nothing
return
if(!linked_staff in range(3, get_turf(src))) //staff won't charge at range (to prevent it from being handed off / stolen and used)
if(!(linked_staff in range(3, get_turf(src)))) //staff won't charge at range (to prevent it from being handed off / stolen and used)
if(prob(10)) //10% chance per process should avoid being too spammy, can tweak if it ends up still being too frequent.
to_chat(H, "<span class='warning'>Your staff is unable to charge at this range. Get closer!</span>")
return
@@ -35,7 +35,7 @@
/obj/item/reagent_containers/glass/rag/afterattack(atom/A as obj|turf|area, mob/user as mob,proximity)
if(!proximity) return
if(istype(A) && src in user)
if(istype(A) && (src in user))
user.visible_message("[user] starts to wipe down [A] with [src]!")
if(do_after(user, wipespeed, target = A))
user.visible_message("[user] finishes wiping off the [A]!")
+1 -1
View File
@@ -40,7 +40,7 @@ GLOBAL_VAR(current_date_string)
return 0
if(ACCESS_CENT_COMMANDER in held_card.access)
return 2
else if(ACCESS_HOP in held_card.access || ACCESS_CAPTAIN in held_card.access)
else if((ACCESS_HOP in held_card.access) || (ACCESS_CAPTAIN in held_card.access))
return 1
/obj/machinery/computer/account_database/proc/accounting_letterhead(report_name)
+1 -5
View File
@@ -150,7 +150,7 @@
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/card))
var/obj/item/card/id/C = I
if(ACCESS_CENT_COMMANDER in C.access || ACCESS_HOP in C.access || ACCESS_CAPTAIN in C.access)
if((ACCESS_CENT_COMMANDER in C.access) || (ACCESS_HOP in C.access) || (ACCESS_CAPTAIN in C.access))
access_code = 0
to_chat(usr, "[bicon(src)]<span class='info'>Access code reset to 0.</span>")
else if(istype(I, /obj/item/card/emag))
@@ -190,8 +190,4 @@
playsound(src, 'sound/machines/chime.ogg', 50, 1)
visible_message("[bicon(src)] The [src] chimes.")
transaction_paid = 1
else
..()
//emag?
+11 -6
View File
@@ -80,18 +80,23 @@
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
continue
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
active_with_role["Engineer"]++
if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = M
if(R.module && (R.module.name == "engineering robot module"))
active_with_role["Engineer"]++
if(R.module && (R.module.name == "medical robot module"))
active_with_role["Medical"]++
if(R.module && (R.module.name == "security robot module"))
active_with_role["Security"]++
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
active_with_role["Engineer"]++
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
active_with_role["Medical"]++
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
active_with_role["Medical"]++
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
active_with_role["Security"]++
if(M.mind.assigned_role in GLOB.security_positions)
active_with_role["Security"]++
+1 -1
View File
@@ -491,7 +491,7 @@
return message
/proc/generate_static_ion_law()
/var/list/players = list()
var/list/players = list()
for(var/mob/living/carbon/human/player in GLOB.player_list)
if( !player.mind || player.mind.assigned_role == player.mind.special_role || player.client.inactivity > MinutesToTicks(10))
continue
+1 -1
View File
@@ -19,7 +19,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED)
GLOB.event_announcement.Announce("A trading shuttle from Jupiter Station has been denied docking permission due to the heightened security alert aboard [station_name()].", "Trader Shuttle Docking Request Refused")
// if the docking request was refused, fire another major event in 60 seconds
var/list/datum/event_container/EC = SSevents.event_containers[EVENT_LEVEL_MAJOR]
var/datum/event_container/EC = SSevents.event_containers[EVENT_LEVEL_MAJOR]
EC.next_event_time = world.time + (60 * 10)
return
+1 -1
View File
@@ -732,7 +732,7 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite
var/radio_messages = list("Xenos!","Singularity loose!","Comms down!","They are arming the nuke!","They butchered Ian!","H-help!","[pick("Cult", "Wizard", "Ling", "Ops", "Revenant", "Murderer", "Harm", "I hear flashing", "Help")] in [pick(GLOB.teleportlocs)][prob(50)?"!":"!!"]","Where's [target.name]?","Call the shuttle!","AI rogue!!")
var/list/mob/living/carbon/people = list()
var/list/mob/living/carbon/person = null
var/mob/living/carbon/person = null
for(var/mob/living/carbon/H in view(target))
if(H == target)
continue
@@ -88,7 +88,7 @@
bro.cell.use(chargeAmount)
to_chat(user, "<span class='notice'>Now synthesizing [trans] units of [refillName]...</span>")
addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, trans), 300)
addtimer(CALLBACK(GLOBAL_PROC, .proc/__to_chat, user, "<span class='notice'>Cyborg [src] refilled.</span>"), 300)
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, user, "<span class='notice'>Cyborg [src] refilled.</span>"), 300)
else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
if(!is_refillable())
+3 -3
View File
@@ -348,14 +348,14 @@
for(var/i in 1 to seed.growthstages)
if("[seed.icon_grow][i]" in states)
continue
log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!", src)
log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_grow][i] icon!")
if(!(seed.icon_dead in states))
log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!", src)
log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_dead] icon!")
if(seed.icon_harvest) // mushrooms have no grown sprites, same for items with no product
if(!(seed.icon_harvest in states))
log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!", src)
log_runtime("[seed.name] ([seed.type]) lacks the [seed.icon_harvest] icon!")
/obj/item/seeds/proc/randomize_stats()
set_lifespan(rand(25, 60))
+1 -1
View File
@@ -14,7 +14,7 @@
var/points = 0 //How many points this ore gets you from the ore redemption machine
var/refined_type = null //What this ore defaults to being refined into
/obj/item/stack/ore/New()
/obj/item/stack/ore/New(loc, new_amount, merge = TRUE)
..()
pixel_x = rand(0, 16) - 8
pixel_y = rand(0, 8) - 8
@@ -117,7 +117,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
MA.blend_mode = COPY.blend_mode
MA.color = COPY.color
MA.dir = COPY.dir
MA.gender = COPY.gender
MA.icon = COPY.icon
MA.icon_state = COPY.icon_state
MA.layer = COPY.layer
@@ -131,7 +130,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(!isicon(MA.icon) && !LAZYLEN(MA.overlays)) // Gibbing/dusting/melting removes the icon before ghostize()ing the mob, so we need to account for that
MA.icon = initial(icon)
MA.icon_state = initial(icon_state)
MA.suffix = COPY.suffix
MA.underlays = COPY.underlays
. = MA
+1 -1
View File
@@ -90,7 +90,7 @@
if(speaker_name != speaker.real_name && speaker.real_name)
speaker_name = "[speaker.real_name] ([speaker_name])"
track = "([ghost_follow_link(speaker, ghost=src)]) "
if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src))
if(client.prefs.toggles & CHAT_GHOSTEARS && (speaker in view(src)))
message = "<b>[message]</b>"
if(!can_hear())
@@ -83,7 +83,7 @@
else //Maybe uses plasma in the future, although that wouldn't make any sense...
leaping = 1
update_icons()
throw_at(A, MAX_ALIEN_LEAP_DIST, 1, spin = 0, diagonals_first = 1, callback = CALLBACK(src, .leap_end))
throw_at(A, MAX_ALIEN_LEAP_DIST, 1, spin = 0, diagonals_first = 1, callback = CALLBACK(src, .proc/leap_end))
/mob/living/carbon/alien/humanoid/hunter/proc/leap_end()
leaping = 0
@@ -83,7 +83,7 @@
return Attach(AM)
return 0
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed)
/obj/item/clothing/mask/facehugger/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force)
if(!..())
return
if(stat == CONSCIOUS)
@@ -111,7 +111,7 @@
var/obj/item/organ/external/O = get_organ(organ_name)
if(amount > 0)
O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source, list(), FALSE, updating_health)
O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source, forbidden_limbs = list(), ignore_resists=FALSE, updating_health=updating_health)
else
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health)
@@ -23,7 +23,7 @@ GLOBAL_DATUM_INIT(default_martial_art, /datum/martial_art, new())
var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack.
//Equipment slots
var/obj/item/w_uniform = null
var/obj/item/clothing/under/w_uniform = null
var/obj/item/shoes = null
var/obj/item/belt = null
var/obj/item/gloves = null
+2 -2
View File
@@ -897,7 +897,7 @@
// Not on the station or mining?
var/turf/temp_turf = get_turf(remoteview_target)
if(!temp_turf in config.contact_levels)
if(!(temp_turf in config.contact_levels))
to_chat(src, "<span class='alert'>Your psy-connection grows too faint to maintain!</span>")
isRemoteObserve = 0
@@ -1123,4 +1123,4 @@
// Need this in species.
//#undef HUMAN_MAX_OXYLOSS
//#undef HUMAN_CRIT_MAX_OXYLOSS
//#undef HUMAN_CRIT_MAX_OXYLOSS
@@ -347,7 +347,7 @@
if(H.LAssailant && ishuman(H.LAssailant)) //superheros still get the comical hit markers
var/mob/living/carbon/human/A = H.LAssailant
if(A.mind && A.mind in (SSticker.mode.superheroes || SSticker.mode.supervillains || SSticker.mode.greyshirts))
if(A.mind && (A.mind in (SSticker.mode.superheroes) || SSticker.mode.supervillains || SSticker.mode.greyshirts))
var/list/attack_bubble_recipients = list()
var/mob/living/user
for(var/mob/O in viewers(user, src))
@@ -963,7 +963,7 @@ It'll return null if the organ doesn't correspond, so include null checks when u
/datum/species/proc/spec_hitby(atom/movable/AM, mob/living/carbon/human/H)
/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
/datum/species/proc/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H)
/proc/get_random_species(species_name = FALSE) // Returns a random non black-listed or hazardous species, either as a string or datum
var/static/list/random_species = list()
@@ -474,7 +474,7 @@
if(P.is_reflectable)
H.visible_message("<span class='danger'>The [P.name] gets reflected by [H]'s glass skin!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [H]'s glass skin!</span>")
P.reflect_back(H)
return FALSE
@@ -534,7 +534,7 @@
if(world.time > last_teleport + teleport_cooldown && M != H && M.a_intent != INTENT_HELP)
reactive_teleport(H)
/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H)
..()
if(world.time > last_teleport + teleport_cooldown && user != H)
reactive_teleport(H)
@@ -654,7 +654,7 @@
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
last_banana = world.time
/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
/datum/species/golem/bananium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/organ/external/affecting, intent, mob/living/carbon/human/H)
..()
if(world.time > last_banana + banana_cooldown && user != H)
new/obj/item/grown/bananapeel/specialpeel(get_turf(H))
@@ -575,7 +575,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
bloodsies.color = w_uniform.blood_color
standing.overlays += bloodsies
if(w_uniform:accessories.len) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE. // oh my god kys whoever made this if statement jfc :gun:
if(w_uniform.accessories.len) //WE CHECKED THE TYPE ABOVE. THIS REALLY SHOULD BE FINE. // oh my god kys whoever made this if statement jfc :gun:
for(var/obj/item/clothing/accessory/A in w_uniform:accessories)
var/tie_color = A.item_color
if(!tie_color)
-1
View File
@@ -9,7 +9,6 @@
prepare_data_huds()
/mob/living/proc/prepare_data_huds()
..()
med_hud_set_health()
med_hud_set_status()
@@ -48,7 +48,7 @@
if(radio)
radio.wires.CutWireIndex(RADIO_WIRE_TRANSMIT)
if(camera && "Robots" in camera.network)
if(camera && ("Robots" in camera.network))
camera.network.Add("Engineering")
//They are unable to be upgraded, so let's give them a bit of a better battery.
@@ -328,7 +328,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if("Miner")
module = new /obj/item/robot_module/miner(src)
module.channels = list("Supply" = 1)
if(camera && "Robots" in camera.network)
if(camera && ("Robots" in camera.network))
camera.network.Add("Mining Outpost")
module_sprites["Basic"] = "Miner_old"
module_sprites["Advanced Droid"] = "droid-miner"
@@ -340,7 +340,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if("Medical")
module = new /obj/item/robot_module/medical(src)
module.channels = list("Medical" = 1)
if(camera && "Robots" in camera.network)
if(camera && ("Robots" in camera.network))
camera.network.Add("Medical")
module_sprites["Basic"] = "Medbot"
module_sprites["Surgeon"] = "surgeon"
@@ -366,7 +366,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if("Engineering")
module = new /obj/item/robot_module/engineering(src)
module.channels = list("Engineering" = 1)
if(camera && "Robots" in camera.network)
if(camera && ("Robots" in camera.network))
camera.network.Add("Engineering")
module_sprites["Basic"] = "Engineering"
module_sprites["Antique"] = "engineerrobot"
@@ -184,7 +184,7 @@
if(L == user)
continue
var/turf/T = get_turf(L.loc)
if(T && T in targets)
if(T && (T in targets))
L.EyeBlind(4)
return
@@ -374,11 +374,11 @@
return
return
if(parrot_interest && parrot_interest in view(src))
if(parrot_interest && (parrot_interest in view(src)))
parrot_state = PARROT_SWOOP | PARROT_STEAL
return
if(parrot_perch && parrot_perch in view(src))
if(parrot_perch && (parrot_perch in view(src)))
parrot_state = PARROT_SWOOP | PARROT_RETURN
return
@@ -261,7 +261,7 @@
Feedon(Food)
return ..()
/mob/living/simple_animal/slime/unEquip(obj/item/I)
/mob/living/simple_animal/slime/unEquip(obj/item/I, force)
return
/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = move_force, supress_message = FALSE)
@@ -60,7 +60,6 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib
/mob/living/simple_animal/tribble/proc/procreate()
..()
if(GLOB.totaltribbles <= maxtribbles)
for(var/mob/living/simple_animal/tribble/F in src.loc)
if(!F || F == src)
+1 -1
View File
@@ -384,7 +384,7 @@
if(GLOB.summon_magic_triggered)
give_magic(character)
if(!thisjob.is_position_available() && thisjob in SSjobs.prioritized_jobs)
if(!thisjob.is_position_available() && (thisjob in SSjobs.prioritized_jobs))
SSjobs.prioritized_jobs -= thisjob
qdel(src)
+1 -1
View File
@@ -12,7 +12,7 @@
if(monitored_alarm_ids)
for(var/obj/machinery/alarm/alarm in GLOB.machines)
if(alarm.alarm_id && alarm.alarm_id in monitored_alarm_ids)
if(alarm.alarm_id && (alarm.alarm_id in monitored_alarm_ids))
monitored_alarms += alarm
// machines may not yet be ordered at this point
monitored_alarms = dd_sortedObjectList(monitored_alarms)

Some files were not shown because too many files have changed in this diff Show More