Replaces some var values with defines

This commit is contained in:
Jordan Brown
2018-02-10 12:10:40 -05:00
committed by CitadelStationBot
parent 9986038318
commit fd479e7128
36 changed files with 200 additions and 129 deletions

View File

@@ -4,7 +4,7 @@ GLOBAL_LIST_EMPTY(explosions)
//Against my better judgement, I will return the explosion datum
//If I see any GC errors for it I will find you
//and I will gib you
/proc/explosion(atom/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = TRUE, ignorecap = FALSE, flame_range = 0 , silent = FALSE, smoke = FALSE)
/proc/explosion(atom/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = TRUE, ignorecap = FALSE, flame_range = 0, silent = FALSE, smoke = FALSE)
return new /datum/explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog, ignorecap, flame_range, silent, smoke)
//This datum creates 3 async tasks
@@ -401,7 +401,7 @@ GLOBAL_LIST_EMPTY(explosions)
A.color = null
A.maptext = ""
/proc/dyn_explosion(turf/epicenter, power, flash_range, adminlog = 1, ignorecap = 1, flame_range = 0 ,silent = 0, smoke = 1)
/proc/dyn_explosion(turf/epicenter, power, flash_range, adminlog = TRUE, ignorecap = TRUE, flame_range = 0, silent = FALSE, smoke = TRUE)
if(!power)
return
var/range = 0

View File

@@ -108,7 +108,7 @@ Class Procs:
var/list/occupant_typecache //if set, turned into typecache in Initialize, other wise, defaults to mob/living typecache
var/atom/movable/occupant = null
var/interact_open = FALSE // Can the machine be interacted with when in maint/when the panel is open.
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/interact_offline = FALSE // Can the machine be interacted with while de-powered.
var/speed_process = FALSE // Process as fast as possible?
var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created
@@ -479,7 +479,7 @@ Class Procs:
/obj/machinery/tesla_act(power, explosive = FALSE)
..()
if(prob(85) && explosive)
explosion(src.loc,1,2,4,flame_range = 2, adminlog = 0, smoke = 0)
explosion(src.loc, 1, 2, 4, flame_range = 2, adminlog = FALSE, smoke = FALSE)
else if(prob(50))
emp_act(EMP_LIGHT)
else

View File

@@ -6,6 +6,11 @@ GLOBAL_LIST_EMPTY(req_console_supplies)
GLOBAL_LIST_EMPTY(req_console_information)
GLOBAL_LIST_EMPTY(allConsoles)
#define NO_NEW_MESSAGE 0
#define NORMAL_MESSAGE_PRIORITY 1
#define HIGH_MESSAGE_PRIORITY 2
#define EXTREME_MESSAGE_PRIORITY 3 // not implemented, will probably require some hacking... everything needs to have a hidden feature in this game.
/obj/machinery/requests_console
name = "requests console"
desc = "A console intended to send requests to different departments on the station."
@@ -23,11 +28,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
// 5 = ass + info
// 6 = sup + info
// 7 = ass + sup + info
var/newmessagepriority = 0
// 0 = no new message
// 1 = normal priority
// 2 = high priority
// 3 = extreme priority - not implemented, will probably require some hacking... everything needs to have a hidden feature in this game.
var/newmessagepriority = NO_NEW_MESSAGE
var/screen = 0
// 0 = main menu,
// 1 = req. assistance,
@@ -40,15 +41,11 @@ GLOBAL_LIST_EMPTY(allConsoles)
// 8 = view messages
// 9 = authentication before sending
// 10 = send announcement
var/silent = 0 // set to 1 for it not to beep all the time
var/hackState = 0
// 0 = not hacked
// 1 = hacked
var/announcementConsole = 0
// 0 = This console cannot be used to send department announcements
// 1 = This console can send department announcements
var/open = FALSE // 1 if open
var/announceAuth = 0 //Will be set to 1 when you authenticate yourself for announcements
var/silent = FALSE // set to 1 for it not to beep all the time
var/hackState = FALSE
var/announcementConsole = FALSE // FALSE = This console cannot be used to send department announcements, TRUE = This console can send department announcements
var/open = FALSE // TRUE if open
var/announceAuth = FALSE //Will be set to 1 when you authenticate yourself for announcements
var/msgVerified = "" //Will contain the name of the person who verified it
var/msgStamped = "" //If a message is stamped, this will contain the stamp name
var/message = "";
@@ -78,11 +75,11 @@ GLOBAL_LIST_EMPTY(allConsoles)
if(icon_state != "req_comp_off")
icon_state = "req_comp_off"
else
if(emergency || (newmessagepriority == 3))
if(emergency || (newmessagepriority == EXTREME_MESSAGE_PRIORITY))
icon_state = "req_comp3"
else if(newmessagepriority == 2)
else if(newmessagepriority == HIGH_MESSAGE_PRIORITY)
icon_state = "req_comp2"
else if(newmessagepriority == 1)
else if(newmessagepriority == NORMAL_MESSAGE_PRIORITY)
icon_state = "req_comp1"
else
icon_state = "req_comp0"
@@ -194,10 +191,10 @@ GLOBAL_LIST_EMPTY(allConsoles)
if(8) //view messages
for (var/obj/machinery/requests_console/Console in GLOB.allConsoles)
if (Console.department == department)
Console.newmessagepriority = 0
Console.newmessagepriority = NO_NEW_MESSAGE
Console.update_icon()
newmessagepriority = 0
newmessagepriority = NO_NEW_MESSAGE
update_icon()
var/messageComposite = ""
for(var/msg in messages) // This puts more recent messages at the *top*, where they belong.
@@ -230,12 +227,12 @@ GLOBAL_LIST_EMPTY(allConsoles)
else //main menu
screen = 0
announceAuth = 0
if (newmessagepriority == 1)
announceAuth = FALSE
if (newmessagepriority == NORMAL_MESSAGE_PRIORITY)
dat += "<div class='notice'>There are new messages</div><BR>"
if (newmessagepriority == 2)
if (newmessagepriority == HIGH_MESSAGE_PRIORITY)
dat += "<div class='notice'>There are new <b>PRIORITY</b> messages</div><BR>"
if (newmessagepriority == 3)
if (newmessagepriority == EXTREME_MESSAGE_PRIORITY)
dat += "<div class='notice'>There are new <b>EXTREME PRIORITY</b> messages</div><BR>"
dat += "<A href='?src=[REF(src)];setScreen=8'>View Messages</A><BR><BR>"
@@ -296,7 +293,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
priority = text2num(href_list["priority"])
else
message = ""
announceAuth = 0
announceAuth = FALSE
screen = 0
if(href_list["sendAnnouncement"])
@@ -309,7 +306,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
GLOB.news_network.SubmitArticle(message, department, "Station Announcements", null)
log_talk(usr,"[key_name(usr)] has made a station announcement: [message]",LOGSAY)
message_admins("[key_name_admin(usr)] has made a station announcement.")
announceAuth = 0
announceAuth = FALSE
message = ""
screen = 0
@@ -435,9 +432,9 @@ GLOBAL_LIST_EMPTY(allConsoles)
switch( href_list["setSilent"] )
if(null) //skip
if("1")
silent = 1
silent = TRUE
else
silent = 0
silent = FALSE
updateUsrDialog()
return
@@ -464,31 +461,31 @@ GLOBAL_LIST_EMPTY(allConsoles)
capitalize(title)
switch(priority)
if(2) //High priority
if(src.newmessagepriority < 2)
src.newmessagepriority = 2
src.update_icon()
if(!src.silent)
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
if(newmessagepriority < HIGH_MESSAGE_PRIORITY)
newmessagepriority = HIGH_MESSAGE_PRIORITY
update_icon()
if(!silent)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
say(title)
src.messages += "<span class='bad'>High Priority</span><BR><b>From:</b> [linkedsender]<BR>[message]"
messages += "<span class='bad'>High Priority</span><BR><b>From:</b> [linkedsender]<BR>[message]"
if(3) // Extreme Priority
if(src.newmessagepriority < 3)
src.newmessagepriority = 3
src.update_icon()
if(newmessagepriority < EXTREME_MESSAGE_PRIORITY)
newmessagepriority = EXTREME_MESSAGE_PRIORITY
update_icon()
if(1)
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
say(title)
src.messages += "<span class='bad'>!!!Extreme Priority!!!</span><BR><b>From:</b> [linkedsender]<BR>[message]"
messages += "<span class='bad'>!!!Extreme Priority!!!</span><BR><b>From:</b> [linkedsender]<BR>[message]"
else // Normal priority
if(src.newmessagepriority < 1)
src.newmessagepriority = 1
src.update_icon()
if(newmessagepriority < NORMAL_MESSAGE_PRIORITY)
newmessagepriority = NORMAL_MESSAGE_PRIORITY
update_icon()
if(!src.silent)
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
say(title)
src.messages += "<b>From:</b> [linkedsender]<BR>[message]"
messages += "<b>From:</b> [linkedsender]<BR>[message]"
/obj/machinery/requests_console/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/crowbar))
@@ -519,9 +516,9 @@ GLOBAL_LIST_EMPTY(allConsoles)
updateUsrDialog()
if(screen == 10)
if (ACCESS_RC_ANNOUNCE in ID.access)
announceAuth = 1
announceAuth = TRUE
else
announceAuth = 0
announceAuth = FALSE
to_chat(user, "<span class='warning'>You are not authorized to send announcements!</span>")
updateUsrDialog()
return
@@ -532,3 +529,8 @@ GLOBAL_LIST_EMPTY(allConsoles)
updateUsrDialog()
return
return ..()
#undef NO_NEW_MESSAGE
#undef NORMAL_MESSAGE_PRIORITY
#undef HIGH_MESSAGE_PRIORITY
#undef EXTREME_MESSAGE_PRIORITY

View File

@@ -265,7 +265,7 @@
chemholder = null
return ..()
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = 0)
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = FALSE)
if(isturf(loca))
location = loca
else

View File

@@ -3,6 +3,12 @@
GLOBAL_LIST_EMPTY(PDAs)
#define PDA_SCANNER_NONE 0
#define PDA_SCANNER_MEDICAL 1
#define PDA_SCANNER_FORENSICS 2 //unused
#define PDA_SCANNER_REAGENT 3
#define PDA_SCANNER_HALOGEN 4
#define PDA_SCANNER_GAS 5
/obj/item/device/pda
name = "\improper PDA"
@@ -39,11 +45,11 @@ GLOBAL_LIST_EMPTY(PDAs)
#define MODE_VT 3
//Secondary variables
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
var/fon = 0 //Is the flashlight function on?
var/scanmode = PDA_SCANNER_NONE
var/fon = FALSE //Is the flashlight function on?
var/f_lum = 2.3 //Luminosity for the flashlight function
var/silent = 0 //To beep or not to beep, that is the question
var/toff = 0 //If 1, messenger disabled
var/silent = FALSE //To beep or not to beep, that is the question
var/toff = FALSE //If TRUE, messenger disabled
var/tnote = null //Current Texts
var/last_text //No text spamming
var/last_noise //Also no honk spamming that's bad too
@@ -53,10 +59,10 @@ GLOBAL_LIST_EMPTY(PDAs)
var/mimeamt = 0 //How many silence left when infected with mime.exe
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function
var/notehtml = ""
var/notescanned = 0 // True if what is in the notekeeper was from a paper.
var/notescanned = FALSE // True if what is in the notekeeper was from a paper.
var/detonatable = TRUE // Can the PDA be blown up?
var/hidden = 0 // Is the PDA hidden from the PDA list?
var/emped = 0
var/hidden = FALSE // Is the PDA hidden from the PDA list?
var/emped = FALSE
var/equipped = FALSE //used here to determine if this is the first time its been picked up
var/obj/item/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
@@ -415,7 +421,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if (!isnull(cartridge))
U.put_in_hands(cartridge)
to_chat(U, "<span class='notice'>You remove [cartridge] from [src].</span>")
scanmode = 0
scanmode = PDA_SCANNER_NONE
cartridge.host_pda = null
cartridge = null
update_icon()
@@ -440,40 +446,40 @@ GLOBAL_LIST_EMPTY(PDAs)
if("Light")
if(fon)
fon = 0
fon = FALSE
set_light(0)
else if(f_lum)
fon = 1
fon = TRUE
set_light(f_lum)
update_icon()
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
if(scanmode == PDA_SCANNER_MEDICAL)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_MEDICAL))
scanmode = 1
scanmode = PDA_SCANNER_MEDICAL
if("Reagent Scan")
if(scanmode == 3)
scanmode = 0
if(scanmode == PDA_SCANNER_REAGENT)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_REAGENT_SCANNER))
scanmode = 3
scanmode = PDA_SCANNER_REAGENT
if("Halogen Counter")
if(scanmode == 4)
scanmode = 0
if(scanmode == PDA_SCANNER_HALOGEN)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_ENGINE))
scanmode = 4
scanmode = PDA_SCANNER_HALOGEN
if("Honk")
if ( !(last_noise && world.time < last_noise + 20) )
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
last_noise = world.time
if("Trombone")
if ( !(last_noise && world.time < last_noise + 20) )
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 1)
playsound(src, 'sound/misc/sadtrombone.ogg', 50, 1)
last_noise = world.time
if("Gas Scan")
if(scanmode == 5)
scanmode = 0
if(scanmode == PDA_SCANNER_GAS)
scanmode = PDA_SCANNER_NONE
else if((!isnull(cartridge)) && (cartridge.access & CART_ATMOS))
scanmode = 5
scanmode = PDA_SCANNER_GAS
if("Drone Phone")
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
var/area/A = get_area(U)
@@ -491,7 +497,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if (mode == 1 && n)
note = n
notehtml = parsemarkdown(n, U)
notescanned = 0
notescanned = FALSE
else
U << browse(null, "window=pda")
return
@@ -571,7 +577,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
@@ -656,7 +662,7 @@ GLOBAL_LIST_EMPTY(PDAs)
tnote += "<i><b>&larr; From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i><br>[signal.format_message()]<br>"
if (!silent)
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
audible_message("[icon2html(src, hearers(src))] *[ttone]*", null, 3)
//Search for holder of the PDA.
var/mob/living/L = null
@@ -816,9 +822,6 @@ GLOBAL_LIST_EMPTY(PDAs)
healthscan(user, C, 1)
add_fingerprint(user)
if(2)
// Unused
if(4)
C.visible_message("<span class='warning'>[user] has analyzed [C]'s radiation levels!</span>")
@@ -875,7 +878,7 @@ GLOBAL_LIST_EMPTY(PDAs)
note = replacetext(note, "<ul>", "\[list\]")
note = replacetext(note, "</ul>", "\[/list\]")
note = html_encode(note)
notescanned = 1
notescanned = TRUE
to_chat(user, "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" )
@@ -996,3 +999,9 @@ GLOBAL_LIST_EMPTY(PDAs)
if(!P.owner || P.toff || P.hidden)
continue
. += P
#undef PDA_SCANNER_NONE
#undef PDA_SCANNER_MEDICAL
#undef PDA_SCANNER_REAGENT
#undef PDA_SCANNER_HALOGEN
#undef PDA_SCANNER_GAS

View File

@@ -23,7 +23,7 @@
/obj/item/device/pda/ai
icon_state = "NONE"
ttone = "data"
fon = 0
fon = FALSE
detonatable = FALSE
/obj/item/device/pda/ai/attack_self(mob/user)
@@ -84,7 +84,7 @@
default_cartridge = /obj/item/cartridge/virus/mime
inserted_item = /obj/item/toy/crayon/mime
icon_state = "pda-mime"
silent = 1
silent = TRUE
ttone = "silence"
/obj/item/device/pda/heads
@@ -176,7 +176,7 @@
inserted_item = /obj/item/pen/fountain
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader."
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
silent = 1 //Quiet in the library!
silent = TRUE //Quiet in the library!
overlays_x_offset = -3
/obj/item/device/pda/clear

View File

@@ -46,7 +46,7 @@
if(!isnull(target) && !target.toff)
charges--
to_chat(U, "<span class='notice'>Virus Sent!</span>")
target.silent = 1
target.silent = TRUE
target.ttone = "silence"
else
to_chat(U, "PDA not found.")

View File

@@ -40,7 +40,7 @@
//What does the implant do upon injection?
//return 1 if the implant injects
//return 0 if there is no room for implant / it fails
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = 0)
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = FALSE)
LAZYINITLIST(target.implants)
if(!target.can_be_implanted() || !can_be_implanted_in(target))
return 0
@@ -74,7 +74,7 @@
return 1
/obj/item/implant/proc/removed(mob/living/source, silent = 0, special = 0)
/obj/item/implant/proc/removed(mob/living/source, silent = FALSE, special = 0)
moveToNullspace()
imp_in = null
source.implants -= src

View File

@@ -16,7 +16,7 @@
return dat
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = 0)
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = FALSE)
if(..())
if(!target.mind)
return TRUE
@@ -38,7 +38,7 @@
return TRUE
return FALSE
/obj/item/implant/mindshield/removed(mob/target, silent = 0, special = 0)
/obj/item/implant/mindshield/removed(mob/target, silent = FALSE, special = 0)
if(..())
if(target.stat != DEAD && !silent)
to_chat(target, "<span class='boldnotice'>Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.</span>")

View File

@@ -3,7 +3,7 @@
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 6
cant_hold = list(/obj/item/disk/nuclear)
silent = 1
silent = TRUE
/obj/item/implant/storage
@@ -20,7 +20,7 @@
/obj/item/implant/storage/activate()
storage.MouseDrop(imp_in)
/obj/item/implant/storage/removed(source, silent = 0, special = 0)
/obj/item/implant/storage/removed(source, silent = FALSE, special = 0)
if(..())
if(!special)
storage.close_all()
@@ -28,7 +28,7 @@
storage.remove_from_storage(I, get_turf(source))
return 1
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = 0)
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = FALSE)
for(var/X in target.implants)
if(istype(X, type))
var/obj/item/implant/storage/imp_e = X

View File

@@ -11,7 +11,7 @@
. = ..()
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = FALSE)
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
if(hidden_uplink)
for(var/X in target.implants)

View File

@@ -404,7 +404,6 @@
storage_slots = 50
max_combined_w_class = 200
w_class = WEIGHT_CLASS_TINY
preposition = "in"
can_hold = list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle)
resistance_flags = FLAMMABLE
@@ -420,6 +419,5 @@
storage_slots = 25
max_combined_w_class = 200
w_class = WEIGHT_CLASS_TINY
preposition = "in"
can_hold = list(/obj/item/slime_extract, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/blood, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/food/snacks/deadmouse, /obj/item/reagent_containers/food/snacks/monkeycube)
resistance_flags = FLAMMABLE

View File

@@ -1088,8 +1088,6 @@
item_state = "cultdagger"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
inhand_x_dimension = 32
inhand_y_dimension = 32
w_class = WEIGHT_CLASS_SMALL
/*

View File

@@ -148,7 +148,7 @@
// Attach the smoke spreader and setup/start it.
S.attach(location)
S.set_up(reagents, death_cloud_size, location, silent=1)
S.set_up(reagents, death_cloud_size, location, silent = TRUE)
S.start()
if(factory)
factory.spore_delay = world.time + factory.spore_cooldown //put the factory on cooldown

View File

@@ -16,7 +16,7 @@
for(var/obj/item/organ/I in organs)
I.Remove(user, 1)
explosion(get_turf(user),0,0,2,0,silent=1)
explosion(get_turf(user), 0, 0, 2, 0, TRUE)
for(var/mob/living/carbon/human/H in range(2,user))
to_chat(H, "<span class='userdanger'>You are blinded by a shower of blood!</span>")
H.Stun(20)

View File

@@ -222,7 +222,7 @@
var/mob/living/silicon/ai/spawned/M = new(loc) //spawn new AI at landmark as var M
M.name = src.name
M.real_name = src.name
M.aiPDA.toff = 1 //turns the AI's PDA messenger off, stopping it showing up on player PDAs
M.aiPDA.toff = TRUE //turns the AI's PDA messenger off, stopping it showing up on player PDAs
M.death() //call the AI's death proc
qdel(src)

View File

@@ -579,7 +579,7 @@
/obj/item/storage/belt/chameleon
name = "toolbelt"
desc = "Holds tools."
silent = 1
silent = TRUE
var/datum/action/item_action/chameleon/change/chameleon_action
/obj/item/storage/belt/chameleon/Initialize()

View File

@@ -207,7 +207,7 @@
cooldown = world.time + cooldowntime
activating = 0
/obj/item/clothing/suit/space/chronos/proc/deactivate(force = 0, silent = 0)
/obj/item/clothing/suit/space/chronos/proc/deactivate(force = 0, silent = FALSE)
if(activated && (!teleporting || force))
activating = 1
var/mob/living/carbon/human/user = src.loc

View File

@@ -1114,7 +1114,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
sleep(rand(70,90))
target.set_screwyhud(SCREWYHUD_NONE)
target.SetKnockdown(0)
target.silent = 0
target.silent = FALSE
qdel(src)
/datum/hallucination/fire

View File

@@ -44,20 +44,20 @@ Doesn't work on other aliens/AI.*/
if(plasma_cost > 0)
return "[plasma_cost]"
/obj/effect/proc_holder/alien/proc/cost_check(check_turf=0,mob/living/carbon/user,silent = 0)
/obj/effect/proc_holder/alien/proc/cost_check(check_turf = FALSE, mob/living/carbon/user, silent = FALSE)
if(user.stat)
if(!silent)
to_chat(user, "<span class='noticealien'>You must be conscious to do this.</span>")
return 0
return FALSE
if(user.getPlasma() < plasma_cost)
if(!silent)
to_chat(user, "<span class='noticealien'>Not enough plasma stored.</span>")
return 0
return FALSE
if(check_turf && (!isturf(user.loc) || isspaceturf(user.loc)))
if(!silent)
to_chat(user, "<span class='noticealien'>Bad place for a garden!</span>")
return 0
return 1
return FALSE
return TRUE
/obj/effect/proc_holder/alien/proc/check_vent_block(mob/living/user)
var/obj/machinery/atmospherics/components/unary/atmos_thing = locate() in user.loc
@@ -71,7 +71,7 @@ Doesn't work on other aliens/AI.*/
name = "Plant Weeds"
desc = "Plants some alien weeds."
plasma_cost = 50
check_turf = 1
check_turf = TRUE
action_icon_state = "alien_plant"
/obj/effect/proc_holder/alien/plant/fire(mob/living/carbon/user)

View File

@@ -7,7 +7,7 @@
var/list/stomach_contents = list()
var/list/internal_organs = list() //List of /obj/item/organ in the mob. They don't go in the contents for some reason I don't want to know.
var/list/internal_organs_slot= list() //Same as above, but stores "slot ID" - "organ" pairs for easy access.
var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU.
var/silent = FALSE //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU.
var/dreaming = 0 //How many dream images we have left to send
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed

View File

@@ -2,7 +2,7 @@
if(stat == DEAD)
return
silent = 0
silent = FALSE
losebreath = 0
if(!gibbed)

View File

@@ -200,7 +200,7 @@
if(istype(O, /obj/item/device/pda))
var/obj/item/device/pda/PDA = O
PDA.set_light(0)
PDA.fon = 0
PDA.fon = FALSE
PDA.f_lum = 0
PDA.update_icon()
visible_message("<span class='danger'>The light in [PDA] shorts out!</span>")

View File

@@ -74,7 +74,7 @@
var/overload_bulletblock = 0 //Why is this a good idea?
var/overload_maxhealth = 0
canmove = FALSE
var/silent = 0
var/silent = FALSE
var/hit_slowdown = 0
var/brightness_power = 5
var/slowdown = 0

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/*
name
key
@@ -59,3 +60,66 @@
F["role"] >> src.role
F["comments"] >> src.comments
return 1
=======
/*
name
key
description
role
comments
ready = 0
*/
/datum/paiCandidate/proc/savefile_path(mob/user)
return "data/player_saves/[copytext(user.ckey, 1, 2)]/[user.ckey]/pai.sav"
/datum/paiCandidate/proc/savefile_save(mob/user)
if(IsGuestKey(user.key))
return 0
var/savefile/F = new /savefile(src.savefile_path(user))
WRITE_FILE(F["name"], name)
WRITE_FILE(F["description"], description)
WRITE_FILE(F["role"], role)
WRITE_FILE(F["comments"], comments)
WRITE_FILE(F["version"], 1)
return 1
// loads the savefile corresponding to the mob's ckey
// if silent=true, report incompatible savefiles
// returns 1 if loaded (or file was incompatible)
// returns 0 if savefile did not exist
/datum/paiCandidate/proc/savefile_load(mob/user, silent = TRUE)
if (IsGuestKey(user.key))
return 0
var/path = savefile_path(user)
if (!fexists(path))
return 0
var/savefile/F = new /savefile(path)
if(!F)
return //Not everyone has a pai savefile.
var/version = null
F["version"] >> version
if (isnull(version) || version != 1)
fdel(path)
if (!silent)
alert(user, "Your savefile was incompatible with this version and was deleted.")
return 0
F["name"] >> src.name
F["description"] >> src.description
F["role"] >> src.role
F["comments"] >> src.comments
return 1
>>>>>>> f5ff686... Merge pull request #35424 from ShizCalev/var-cleanup

View File

@@ -19,7 +19,7 @@
return
if(buckled)
Feedstop(silent = 1) //releases ourselves from the mob we fed on.
Feedstop(silent = TRUE) //releases ourselves from the mob we fed on.
stat = DEAD
cut_overlays()

View File

@@ -181,7 +181,7 @@
var/mob/M = buckled
if(stat)
Feedstop(silent = 1)
Feedstop(silent = TRUE)
if(M.stat == DEAD) // our victim died
if(!client)

View File

@@ -86,7 +86,7 @@
else
to_chat(src, "<span class='warning'><i>I have failed to latch onto the subject!</i></span>")
/mob/living/simple_animal/slime/proc/Feedstop(silent=0, living=1)
/mob/living/simple_animal/slime/proc/Feedstop(silent = FALSE, living=1)
if(buckled)
if(!living)
to_chat(src, "<span class='warning'>[pick("This subject is incompatible", \

View File

@@ -242,7 +242,7 @@
if(M == src)
return
if(buckled)
Feedstop(silent=1)
Feedstop(silent = TRUE)
visible_message("<span class='danger'>[M] pulls [src] off!</span>")
return
attacked += 5
@@ -400,7 +400,7 @@
if(Target)
Target = null
if(buckled)
Feedstop(silent=1) //we unbuckle the slime from the mob it latched onto.
Feedstop(silent = TRUE) //we unbuckle the slime from the mob it latched onto.
SStun = world.time + rand(20,60)
spawn(0)

View File

@@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
power_channel = ENVIRON
sprite_number = 8
use_power = IDLE_POWER_USE
interact_offline = 1
interact_offline = TRUE
var/on = TRUE
var/breaker = 1
var/list/parts = list()

View File

@@ -65,7 +65,7 @@
/obj/item/ammo_box/proc/can_load(mob/user)
return 1
/obj/item/ammo_box/attackby(obj/item/A, mob/user, params, silent = 0, replace_spent = 0)
/obj/item/ammo_box/attackby(obj/item/A, mob/user, params, silent = FALSE, replace_spent = 0)
var/num_loaded = 0
if(!can_load(user))
return

View File

@@ -7,7 +7,7 @@
icon_state = "dispenser"
use_power = IDLE_POWER_USE
idle_power_usage = 40
interact_offline = 1
interact_offline = TRUE
resistance_flags = FIRE_PROOF | ACID_PROOF
var/cell_type = /obj/item/stock_parts/cell/high
var/obj/item/stock_parts/cell/cell

View File

@@ -50,7 +50,7 @@
M.SetKnockdown(0, 0)
M.SetStun(0, 0)
M.SetUnconscious(0, 0)
M.silent = 0
M.silent = FALSE
M.dizziness = 0
M.disgust = 0
M.drowsyness = 0

View File

@@ -317,7 +317,7 @@
R.add_reagent(chosenchem , 50)
investigate_log("Experimentor has released [chosenchem] smoke.", INVESTIGATE_EXPERIMENTOR)
var/datum/effect_system/smoke_spread/chem/smoke = new
smoke.set_up(R, 0, src, silent = 1)
smoke.set_up(R, 0, src, silent = TRUE)
playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
qdel(R)
@@ -329,7 +329,7 @@
R.my_atom = src
R.add_reagent(chosenchem , 50)
var/datum/effect_system/smoke_spread/chem/smoke = new
smoke.set_up(R, 0, src, silent = 1)
smoke.set_up(R, 0, src, silent = TRUE)
playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
qdel(R)
@@ -413,7 +413,7 @@
R.add_reagent("frostoil" , 50)
investigate_log("Experimentor has released frostoil gas.", INVESTIGATE_EXPERIMENTOR)
var/datum/effect_system/smoke_spread/chem/smoke = new
smoke.set_up(R, 0, src, silent = 1)
smoke.set_up(R, 0, src, silent = TRUE)
playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
qdel(R)

View File

@@ -146,7 +146,7 @@
break
if(!S.ckey)
if(S.buckled)
S.Feedstop(silent=1)
S.Feedstop(silent = TRUE)
S.visible_message("[S] vanishes in a flash of light!")
S.forceMove(X)
X.stored_slimes += S

View File

@@ -134,13 +134,13 @@
/obj/item/organ/cyberimp/chest/thrusters/Remove(mob/living/carbon/M, special = 0)
if(on)
toggle(silent=1)
toggle(silent = TRUE)
..()
/obj/item/organ/cyberimp/chest/thrusters/ui_action_click()
toggle()
/obj/item/organ/cyberimp/chest/thrusters/proc/toggle(silent=0)
/obj/item/organ/cyberimp/chest/thrusters/proc/toggle(silent = FALSE)
if(!on)
if(crit_fail)
if(!silent)
@@ -196,6 +196,6 @@
else
T.assume_air(removed)
toggle(silent=1)
toggle(silent = TRUE)
return 0