Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit
This commit is contained in:
@@ -383,7 +383,7 @@
|
||||
auto.Remove(buckled_mob)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/emitter/prototype/user_buckle_mob(mob/living/M, mob/living/carbon/user)
|
||||
/obj/machinery/power/emitter/prototype/user_buckle_mob(mob/living/M, mob/living/carbon/user, check_loc)
|
||||
if(user.incapacitated() || !istype(user))
|
||||
return
|
||||
for(var/atom/movable/A in get_turf(src))
|
||||
@@ -426,7 +426,7 @@
|
||||
for(var/obj/item/I in U.held_items)
|
||||
if(istype(I, /obj/item/turret_control))
|
||||
qdel(I)
|
||||
UpdateButtonIcon()
|
||||
UpdateButtons()
|
||||
return
|
||||
else
|
||||
playsound(PE,'sound/mecha/mechmove01.ogg', 50, TRUE)
|
||||
@@ -443,7 +443,7 @@
|
||||
else //Entries in the list should only ever be items or null, so if it's not an item, we can assume it's an empty hand
|
||||
var/obj/item/turret_control/TC = new /obj/item/turret_control()
|
||||
U.put_in_hands(TC)
|
||||
UpdateButtonIcon()
|
||||
UpdateButtons()
|
||||
|
||||
|
||||
/obj/item/turret_control
|
||||
|
||||
@@ -76,7 +76,7 @@ field_generator power level display
|
||||
if(get_dist(src, user) <= 1)//Need to actually touch the thing to turn it on
|
||||
if(active >= FG_CHARGING)
|
||||
to_chat(user, "<span class='warning'>You are unable to turn off [src] once it is online!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
user.visible_message("[user] turns on [src].", \
|
||||
"<span class='notice'>You turn on [src].</span>", \
|
||||
@@ -157,7 +157,7 @@ field_generator power level display
|
||||
|
||||
/obj/machinery/field/generator/blob_act(obj/structure/blob/B)
|
||||
if(active)
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -207,25 +207,25 @@ field_generator power level display
|
||||
|
||||
if(draw_power(round(power_draw/2,1)))
|
||||
check_power_level()
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>The [name] shuts down!</span>", "<span class='italics'>You hear something shutting down.</span>")
|
||||
turn_off()
|
||||
investigate_log("ran out of power and <font color='red'>deactivated</font>", INVESTIGATE_SINGULO)
|
||||
power = 0
|
||||
check_power_level()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//This could likely be better, it tends to start loopin if you have a complex generator loop setup. Still works well enough to run the engine fields will likely recode the field gens and fields sometime -Mport
|
||||
/obj/machinery/field/generator/proc/draw_power(draw = 0, failsafe = FALSE, obj/machinery/field/generator/G = null, obj/machinery/field/generator/last = null)
|
||||
if((G && (G == src)) || (failsafe >= 8))//Loopin, set fail
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
failsafe++
|
||||
|
||||
if(power >= draw)//We have enough power
|
||||
power -= draw
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
else//Need more power
|
||||
draw -= power
|
||||
@@ -236,14 +236,14 @@ field_generator power level display
|
||||
continue
|
||||
if(G)//Another gen is askin for power and we dont have it
|
||||
if(FG.draw_power(draw,failsafe,G,src))//Can you take the load
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
else//We are askin another for power
|
||||
if(FG.draw_power(draw,failsafe,src,src))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/machinery/field/generator/proc/start_fields()
|
||||
@@ -266,22 +266,22 @@ field_generator power level display
|
||||
/obj/machinery/field/generator/proc/setup_field(NSEW)
|
||||
var/turf/T = loc
|
||||
if(!istype(T))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/obj/machinery/field/generator/G = null
|
||||
var/steps = 0
|
||||
if(!NSEW)//Make sure its ran right
|
||||
return 0
|
||||
return FALSE
|
||||
for(var/dist in 0 to 7) // checks out to 8 tiles away for another generator
|
||||
T = get_step(T, NSEW)
|
||||
if(T.density)//We cant shoot a field though this
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
G = locate(/obj/machinery/field/generator) in T
|
||||
if(G)
|
||||
steps -= 1
|
||||
if(!G.active)
|
||||
return 0
|
||||
return FALSE
|
||||
break
|
||||
|
||||
for(var/TC in T.contents)
|
||||
@@ -289,12 +289,12 @@ field_generator power level display
|
||||
if(ismob(A))
|
||||
continue
|
||||
if(A.density)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
steps++
|
||||
|
||||
if(!G)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
T = loc
|
||||
for(var/dist in 0 to steps) // creates each field tile
|
||||
|
||||
@@ -141,8 +141,8 @@
|
||||
/obj/structure/particle_accelerator/proc/connect_master(obj/O)
|
||||
if(O.dir == dir)
|
||||
master = O
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
///////////
|
||||
// PARTS //
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/set_delay(delay)
|
||||
if(delay >= 0)
|
||||
fire_delay = delay
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/particle_accelerator/particle_emitter/proc/emit_particle(strength = 0)
|
||||
if((last_shot + fire_delay) <= world.time)
|
||||
@@ -39,5 +39,5 @@
|
||||
if(3)
|
||||
P = new/obj/effect/accelerated_particle/powerful(T)
|
||||
P.setDir(dir)
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
return ..()
|
||||
else
|
||||
last_failed_movement = direct
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/singularity/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
consume(user)
|
||||
@@ -74,10 +74,10 @@
|
||||
|
||||
/obj/singularity/attackby(obj/item/W, mob/user, params)
|
||||
consume(user)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/singularity/Process_Spacemove() //The singularity stops drifting for no man!
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/singularity/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
@@ -235,18 +235,18 @@
|
||||
dissipate = 0
|
||||
if(current_size == allowed_size)
|
||||
investigate_log("<font color='red'>grew to size [current_size]</font>", INVESTIGATE_SINGULO)
|
||||
return 1
|
||||
return TRUE
|
||||
else if(current_size < (--temp_allowed_size))
|
||||
expand(temp_allowed_size)
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/singularity/proc/check_energy()
|
||||
if(energy <= 0)
|
||||
investigate_log("collapsed.", INVESTIGATE_SINGULO)
|
||||
qdel(src)
|
||||
return 0
|
||||
return FALSE
|
||||
switch(energy)//Some of these numbers might need to be changed up later -Mport
|
||||
if(1 to 199)
|
||||
allowed_size = STAGE_ONE
|
||||
@@ -263,7 +263,7 @@
|
||||
allowed_size = STAGE_FIVE
|
||||
if(current_size != allowed_size)
|
||||
expand()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/singularity/proc/eat()
|
||||
@@ -296,7 +296,7 @@
|
||||
|
||||
/obj/singularity/proc/move(force_move = 0)
|
||||
if(!move_self)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/movement_dir = pick(GLOB.alldirs - last_failed_movement)
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
|
||||
/obj/singularity/proc/check_turfs_in(direction = 0, step = 0)
|
||||
if(!direction)
|
||||
return 0
|
||||
return FALSE
|
||||
var/steps = 0
|
||||
if(!step)
|
||||
switch(current_size)
|
||||
@@ -342,7 +342,7 @@
|
||||
for(var/i = 1 to steps)
|
||||
T = get_step(T,direction)
|
||||
if(!isturf(T))
|
||||
return 0
|
||||
return FALSE
|
||||
turfs.Add(T)
|
||||
var/dir2 = 0
|
||||
var/dir3 = 0
|
||||
@@ -357,35 +357,35 @@
|
||||
for(var/j = 1 to steps-1)
|
||||
T2 = get_step(T2,dir2)
|
||||
if(!isturf(T2))
|
||||
return 0
|
||||
return FALSE
|
||||
turfs.Add(T2)
|
||||
for(var/k = 1 to steps-1)
|
||||
T = get_step(T,dir3)
|
||||
if(!isturf(T))
|
||||
return 0
|
||||
return FALSE
|
||||
turfs.Add(T)
|
||||
for(var/turf/T3 in turfs)
|
||||
if(isnull(T3))
|
||||
continue
|
||||
if(!can_move(T3))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/singularity/proc/can_move(turf/T)
|
||||
if(!T)
|
||||
return 0
|
||||
return FALSE
|
||||
if((locate(/obj/machinery/field/containment) in T)||(locate(/obj/machinery/shieldwall) in T))
|
||||
return 0
|
||||
return FALSE
|
||||
else if(locate(/obj/machinery/field/generator) in T)
|
||||
var/obj/machinery/field/generator/G = locate(/obj/machinery/field/generator) in T
|
||||
if(G && G.active)
|
||||
return 0
|
||||
return FALSE
|
||||
else if(locate(/obj/machinery/shieldwallgen) in T)
|
||||
var/obj/machinery/shieldwallgen/S = locate(/obj/machinery/shieldwallgen) in T
|
||||
if(S && S.active)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/singularity/proc/event()
|
||||
@@ -397,11 +397,11 @@
|
||||
mezzer()
|
||||
if(3,4) //Sets all nearby mobs on fire
|
||||
if(current_size < STAGE_SIX)
|
||||
return 0
|
||||
return FALSE
|
||||
combust_mobs()
|
||||
else
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/singularity/proc/combust_mobs()
|
||||
|
||||
Reference in New Issue
Block a user