Replaces some var values with defines
This commit is contained in:
committed by
CitadelStationBot
parent
9986038318
commit
fd479e7128
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
silent = 0
|
||||
silent = FALSE
|
||||
losebreath = 0
|
||||
|
||||
if(!gibbed)
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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", \
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user