Changes some 1s and 0s to TRUE and FALSE (#1967)

This commit is contained in:
CitadelStationBot
2017-07-10 16:13:16 -07:00
committed by kevinz000
parent 1b70c06474
commit ff6bbbedf5
522 changed files with 1924 additions and 1917 deletions
@@ -37,12 +37,12 @@
var/bot_name
var/list/player_access = list() //Additonal access the bots gets when player controlled
var/emagged = 0
var/emagged = FALSE
var/list/prev_access = list()
var/on = 1
var/open = 0//Maint panel
var/locked = 1
var/hacked = 0 //Used to differentiate between being hacked by silicons and emagged by humans.
var/on = TRUE
var/open = FALSE//Maint panel
var/locked = TRUE
var/hacked = FALSE //Used to differentiate between being hacked by silicons and emagged by humans.
var/text_hack = "" //Custom text returned to a silicon upon hacking a bot.
var/text_dehack = "" //Text shown when resetting a bots hacked status to normal.
var/text_dehack_fail = "" //Shown when a silicon tries to reset a bot emagged with the emag item, which cannot be reset.
@@ -103,14 +103,14 @@
/mob/living/simple_animal/bot/proc/turn_on()
if(stat)
return 0
on = 1
on = TRUE
set_light(initial(light_range))
update_icon()
diag_hud_set_botstat()
return 1
/mob/living/simple_animal/bot/proc/turn_off()
on = 0
on = FALSE
set_light(0)
bot_reset() //Resets an AI's call, should it exist.
update_icon()
@@ -168,14 +168,14 @@
/mob/living/simple_animal/bot/emag_act(mob/user)
if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again.
locked = 0
emagged = 1
locked = FALSE
emagged = TRUE
to_chat(user, "<span class='notice'>You bypass [src]'s controls.</span>")
return
if(!locked && open) //Bot panel is unlocked by ID or emag, and the panel is screwed open. Ready for emagging.
emagged = 2
remote_disabled = 1 //Manually emagging the bot locks out the AI built in panel.
locked = 1 //Access denied forever!
locked = TRUE //Access denied forever!
bot_reset()
turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP.
to_chat(src, "<span class='userdanger'>(#$*#$^^( OVERRIDE DETECTED</span>")
@@ -771,15 +771,15 @@ Pass a positive integer as an argument to override a bot's default speed.
if("hack")
if(emagged != 2)
emagged = 2
hacked = 1
locked = 1
hacked = TRUE
locked = TRUE
to_chat(usr, "<span class='warning'>[text_hack]</span>")
bot_reset()
else if(!hacked)
to_chat(usr, "<span class='boldannounce'>[text_dehack_fail]</span>")
else
emagged = 0
hacked = 0
emagged = FALSE
hacked = FALSE
to_chat(usr, "<span class='notice'>[text_dehack]</span>")
bot_reset()
if("ejectpai")
@@ -4,8 +4,8 @@
desc = "A little cleaning robot, he looks so excited!"
icon = 'icons/mob/aibots.dmi'
icon_state = "cleanbot0"
density = 0
anchored = 0
density = FALSE
anchored = FALSE
health = 25
maxHealth = 25
radio_key = /obj/item/device/encryptionkey/headset_service
@@ -197,7 +197,7 @@
/mob/living/simple_animal/bot/cleanbot/UnarmedAttack(atom/A)
if(istype(A, /obj/effect/decal/cleanable))
anchored = 1
anchored = TRUE
icon_state = "cleanbot-c"
visible_message("<span class='notice'>[src] begins to clean up [A].</span>")
mode = BOT_CLEANING
@@ -208,7 +208,7 @@
if(istype(AM, /obj/effect/decal/cleanable))
qdel(AM)
anchored = 0
anchored = FALSE
target = null
mode = BOT_IDLE
icon_state = "cleanbot[on]"
@@ -250,7 +250,7 @@
..()
/mob/living/simple_animal/bot/cleanbot/explode()
on = 0
on = FALSE
visible_message("<span class='boldannounce'>[src] blows apart!</span>")
var/turf/Tsec = get_turf(src)
@@ -3,8 +3,8 @@
desc = "A security robot. He looks less than thrilled."
icon = 'icons/mob/aibots.dmi'
icon_state = "ed2090"
density = 1
anchored = 0
density = TRUE
anchored = FALSE
health = 100
maxHealth = 100
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
@@ -83,7 +83,7 @@
..()
target = null
oldtarget_name = null
anchored = 0
anchored = FALSE
walk_to(src,0)
last_found = world.time
set_weapon()
@@ -254,7 +254,7 @@ Auto Patrol[]"},
stun_attack(target)
mode = BOT_PREP_ARREST
anchored = 1
anchored = TRUE
target_lastloc = target.loc
return
@@ -288,7 +288,7 @@ Auto Patrol[]"},
if(BOT_ARREST)
if(!target)
anchored = 0
anchored = FALSE
mode = BOT_IDLE
last_found = world.time
frustration = 0
@@ -303,7 +303,7 @@ Auto Patrol[]"},
return
else
mode = BOT_PREP_ARREST
anchored = 0
anchored = FALSE
if(BOT_START_PATROL)
look_for_perp()
@@ -317,7 +317,7 @@ Auto Patrol[]"},
return
/mob/living/simple_animal/bot/ed209/proc/back_to_idle()
anchored = 0
anchored = FALSE
mode = BOT_IDLE
target = null
last_found = world.time
@@ -325,7 +325,7 @@ Auto Patrol[]"},
INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds
/mob/living/simple_animal/bot/ed209/proc/back_to_hunt()
anchored = 0
anchored = FALSE
frustration = 0
mode = BOT_HUNT
INVOKE_ASYNC(src, .proc/handle_automated_action) //ensure bot quickly responds
@@ -335,7 +335,7 @@ Auto Patrol[]"},
/mob/living/simple_animal/bot/ed209/proc/look_for_perp()
if(disabled)
return
anchored = 0
anchored = FALSE
threatlevel = 0
var/judgement_criteria = judgement_criteria()
for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal
@@ -476,7 +476,7 @@ Auto Patrol[]"},
emagged = 2
set_weapon()
shootAt(toshoot)
emagged = 0
emagged = FALSE
set_weapon()
else
shootAt(toshoot)
@@ -4,8 +4,8 @@
desc = "A little floor repairing robot, he looks so excited!"
icon = 'icons/mob/aibots.dmi'
icon_state = "floorbot0"
density = 0
anchored = 0
density = FALSE
anchored = FALSE
health = 25
maxHealth = 25
@@ -61,7 +61,7 @@
target = null
oldloc = null
ignore_list = list()
anchored = 0
anchored = FALSE
update_icon()
/mob/living/simple_animal/bot/floorbot/set_custom_texts()
@@ -252,12 +252,12 @@
repair(target)
else if(emagged == 2 && isfloorturf(target))
var/turf/open/floor/F = target
anchored = 1
anchored = TRUE
mode = BOT_REPAIRING
F.ReplaceWithLattice()
audible_message("<span class='danger'>[src] makes an excited booping sound.</span>")
spawn(5)
anchored = 0
anchored = FALSE
mode = BOT_IDLE
target = null
path = list()
@@ -280,11 +280,11 @@
if(HULL_BREACH) //The most common job, patching breaches in the station's hull.
if(is_hull_breach(scan_target)) //Ensure that the targeted space turf is actually part of the station, and not random space.
result = scan_target
anchored = 1 //Prevent the floorbot being blown off-course while trying to reach a hull breach.
anchored = TRUE //Prevent the floorbot being blown off-course while trying to reach a hull breach.
if(LINE_SPACE_MODE) //Space turfs in our chosen direction are considered.
if(get_dir(src, scan_target) == targetdirection)
result = scan_target
anchored = 1
anchored = TRUE
if(PLACE_TILE)
F = scan_target
if(istype(F, /turf/open/floor/plating)) //The floor must not already have a tile.
@@ -315,7 +315,7 @@
else if(!isfloorturf(target_turf))
return
if(isspaceturf(target_turf)) //If we are fixing an area not part of pure space, it is
anchored = 1
anchored = TRUE
icon_state = "floorbot-c"
visible_message("<span class='notice'>[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
mode = BOT_REPAIRING
@@ -330,7 +330,7 @@
var/turf/open/floor/F = target_turf
if(F.type != initial(tiletype.turf_type) && (F.broken || F.burnt || istype(F, /turf/open/floor/plating)) || F.type == (initial(tiletype.turf_type) && (F.broken || F.burnt)))
anchored = 1
anchored = TRUE
icon_state = "floorbot-c"
mode = BOT_REPAIRING
visible_message("<span class='notice'>[src] begins repairing the floor.</span>")
@@ -341,7 +341,7 @@
F.ChangeTurf(/turf/open/floor/plasteel)
if(replacetiles && F.type != initial(tiletype.turf_type) && specialtiles && !istype(F, /turf/open/floor/plating))
anchored = 1
anchored = TRUE
icon_state = "floorbot-c"
mode = BOT_REPAIRING
visible_message("<span class='notice'>[src] begins replacing the floor tiles.</span>")
@@ -355,7 +355,7 @@
speak("Requesting refill of custom floortiles to continue replacing.")
mode = BOT_IDLE
update_icon()
anchored = 0
anchored = FALSE
target = null
/mob/living/simple_animal/bot/floorbot/update_icon()
@@ -363,7 +363,7 @@
/mob/living/simple_animal/bot/floorbot/explode()
on = 0
on = FALSE
visible_message("<span class='boldannounce'>[src] blows apart!</span>")
var/turf/Tsec = get_turf(src)
@@ -8,8 +8,8 @@
desc = "A little medical robot. He looks somewhat underwhelmed."
icon = 'icons/mob/aibots.dmi'
icon_state = "medibot0"
density = 0
anchored = 0
density = FALSE
anchored = FALSE
health = 20
maxHealth = 20
pass_flags = PASSMOB
@@ -507,7 +507,7 @@
return 0
/mob/living/simple_animal/bot/medbot/explode()
on = 0
on = FALSE
visible_message("<span class='boldannounce'>[src] blows apart!</span>")
var/turf/Tsec = get_turf(src)
@@ -12,8 +12,8 @@
name = "\improper MULEbot"
desc = "A Multiple Utility Load Effector bot."
icon_state = "mulebot0"
density = 1
anchored = 1
density = TRUE
anchored = TRUE
animate_movement=1
health = 50
maxHealth = 50
@@ -114,7 +114,7 @@
/mob/living/simple_animal/bot/mulebot/emag_act(mob/user)
if(emagged < 1)
emagged = 1
emagged = TRUE
if(!open)
locked = !locked
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the [src]'s controls!</span>")
@@ -162,7 +162,7 @@
return
ui_interact(user)
/mob/living/simple_animal/bot/mulebot/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
/mob/living/simple_animal/bot/mulebot/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -428,7 +428,7 @@
/mob/living/simple_animal/bot/mulebot/handle_automated_action()
if(!has_power())
on = 0
on = FALSE
return
if(on)
var/speed = (wires.is_cut(WIRE_MOTOR1) ? 0 : 1) + (wires.is_cut(WIRE_MOTOR2) ? 0 : 2)
@@ -3,8 +3,8 @@
desc = "A little security robot. He looks less than thrilled."
icon = 'icons/mob/aibots.dmi'
icon_state = "secbot0"
density = 0
anchored = 0
density = FALSE
anchored = FALSE
health = 25
maxHealth = 25
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
@@ -86,7 +86,7 @@
..()
target = null
oldtarget_name = null
anchored = 0
anchored = FALSE
walk_to(src,0)
last_found = world.time
@@ -211,7 +211,7 @@ Auto Patrol: []"},
..()
/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0)
/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE)
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby))
@@ -284,7 +284,7 @@ Auto Patrol: []"},
stun_attack(target)
mode = BOT_PREP_ARREST
anchored = 1
anchored = TRUE
target_lastloc = target.loc
return
@@ -318,7 +318,7 @@ Auto Patrol: []"},
if(BOT_ARREST)
if(!target)
anchored = 0
anchored = FALSE
mode = BOT_IDLE
last_found = world.time
frustration = 0
@@ -333,7 +333,7 @@ Auto Patrol: []"},
return
else //Try arresting again if the target escapes.
mode = BOT_PREP_ARREST
anchored = 0
anchored = FALSE
if(BOT_START_PATROL)
look_for_perp()
@@ -347,7 +347,7 @@ Auto Patrol: []"},
return
/mob/living/simple_animal/bot/secbot/proc/back_to_idle()
anchored = 0
anchored = FALSE
mode = BOT_IDLE
target = null
last_found = world.time
@@ -356,7 +356,7 @@ Auto Patrol: []"},
handle_automated_action() //ensure bot quickly responds
/mob/living/simple_animal/bot/secbot/proc/back_to_hunt()
anchored = 0
anchored = FALSE
frustration = 0
mode = BOT_HUNT
spawn(0)
@@ -364,7 +364,7 @@ Auto Patrol: []"},
// look for a criminal in view of the bot
/mob/living/simple_animal/bot/secbot/proc/look_for_perp()
anchored = 0
anchored = FALSE
var/judgement_criteria = judgement_criteria()
for (var/mob/living/carbon/C in view(7,src)) //Let's find us a criminal
if((C.stat) || (C.handcuffed))