Merge resolution.

This commit is contained in:
Zuhayr
2015-05-10 18:33:06 +09:30
777 changed files with 22019 additions and 21336 deletions

View File

@@ -40,8 +40,7 @@
/obj/singularity_act()
ex_act(1)
if(src)
spawn(0)
qdel(src)
qdel(src)
return 2
/obj/singularity_pull(S, current_size)
@@ -72,6 +71,7 @@
return
/obj/machinery/power/supermatter/shard/singularity_act()
src.loc = null
qdel(src)
return 5000
@@ -83,8 +83,8 @@
SetUniversalState(/datum/universal_state/supermatter_cascade)
log_admin("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].")
message_admins("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].")
spawn(0)
qdel(src)
src.loc = null
qdel(src)
return 50000
/obj/item/projectile/beam/emitter/singularity_pull()

View File

@@ -21,7 +21,7 @@ var/global/list/rad_collectors = list()
..()
rad_collectors += src
/obj/machinery/power/rad_collector/Del()
/obj/machinery/power/rad_collector/Destroy()
rad_collectors -= src
..()

View File

@@ -14,7 +14,7 @@
var/obj/machinery/field_generator/FG2 = null
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
/obj/machinery/containment_field/Del()
/obj/machinery/containment_field/Destroy()
if(FG1 && !FG1.clean_up)
FG1.cleanup()
if(FG2 && !FG2.clean_up)
@@ -54,7 +54,7 @@
if(hasShocked)
return 0
if(!FG1 || !FG2)
del(src)
qdel(src)
return 0
if(isliving(user))
hasShocked = 1

View File

@@ -41,7 +41,7 @@
if(state == 2 && anchored)
connect_to_network()
/obj/machinery/power/emitter/Del()
/obj/machinery/power/emitter/Destroy()
message_admins("Emitter deleted at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Emitter deleted at ([x],[y],[z])")
investigate_log("<font color='red'>deleted</font> at ([x],[y],[z])","singulo")

View File

@@ -31,7 +31,7 @@ field_generator power level display
var/list/obj/machinery/containment_field/fields
var/list/obj/machinery/field_generator/connected_gens
var/clean_up = 0
//If keeping field generators powered is hard then increase the emitter active power usage.
var/gen_power_draw = 5500 //power needed per generator
var/field_power_draw = 2000 //power needed per field object
@@ -61,7 +61,6 @@ field_generator power level display
connected_gens = list()
return
/obj/machinery/field_generator/process()
if(Varedit_start == 1)
if(active == 0)
@@ -177,7 +176,7 @@ field_generator power level display
return 0
/obj/machinery/field_generator/Del()
/obj/machinery/field_generator/Destroy()
src.cleanup()
..()
@@ -231,22 +230,22 @@ field_generator power level display
//Tries to draw the needed power from our own power reserve, or connected generators if we can. Returns the amount of power we were able to get.
/obj/machinery/field_generator/proc/draw_power(var/draw = 0, var/list/flood_list = list())
flood_list += src
if(src.power >= draw)//We have enough power
src.power -= draw
return draw
//Need more power
var/actual_draw = src.power //already checked that power < draw
src.power = 0
for(var/obj/machinery/field_generator/FG in connected_gens)
if (FG in flood_list)
continue
actual_draw += FG.draw_power(draw - actual_draw, flood_list) //since the flood list reference is shared this actually works.
if (actual_draw >= draw)
return actual_draw
return actual_draw
/obj/machinery/field_generator/proc/start_fields()
@@ -325,7 +324,7 @@ field_generator power level display
for (var/obj/machinery/containment_field/F in fields)
if (isnull(F))
continue
del(F)
qdel(F)
fields = list()
for(var/obj/machinery/field_generator/FG in connected_gens)
if (isnull(FG))
@@ -343,7 +342,7 @@ field_generator power level display
//I want to avoid using global variables.
spawn(1)
var/temp = 1 //stops spam
for(var/obj/machinery/singularity/O in machines)
for(var/obj/singularity/O in machines)
if(O.last_warning && temp)
if((world.time - O.last_warning) > 50) //to stop message-spam
temp = 0

View File

@@ -12,8 +12,8 @@
/obj/machinery/the_singularitygen/process()
var/turf/T = get_turf(src)
if(src.energy >= 200)
new /obj/machinery/singularity/(T, 50)
if(src) del(src)
new /obj/singularity/(T, 50)
if(src) qdel(src)
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))

View File

@@ -1,7 +1,6 @@
var/global/narsie_behaviour = "CultStation13"
var/global/narsie_cometh = 0
var/global/list/narsie_list = list()
/obj/machinery/singularity/narsie //Moving narsie to its own file for the sake of being clearer
/obj/singularity/narsie //Moving narsie to its own file for the sake of being clearer
name = "Nar-Sie"
desc = "Your mind begins to bubble and ooze as it tries to comprehend what it sees."
icon = 'icons/obj/narsie.dmi'
@@ -16,15 +15,15 @@ var/global/list/narsie_list = list()
consume_range = 3 //How many tiles out do we eat
/obj/machinery/singularity/narsie/New()
/obj/singularity/narsie/New()
..()
narsie_list.Add(src)
/obj/machinery/singularity/narsie/Destroy()
/obj/singularity/narsie/Destroy()
narsie_list.Remove(src)
..()
/obj/machinery/singularity/narsie/large
/obj/singularity/narsie/large
name = "Nar-Sie"
icon = 'icons/obj/narsie.dmi'
icon_state = "narsie"//mobs perceive the geometer of blood through their see_narsie proc
@@ -40,21 +39,23 @@ var/global/list/narsie_list = list()
var/announce=1
var/narnar = 1
/obj/machinery/singularity/narsie/large/New()
/obj/singularity/narsie/large/New()
..()
if(announce)
world << "<font size='15' color='red'><b>[uppertext(name)] HAS RISEN</b></font>"
world << sound('sound/effects/wind/wind_5_1.ogg')
if(emergency_shuttle && emergency_shuttle.can_call())
emergency_shuttle.call_evac()
emergency_shuttle.launch_time = 0 // Cannot recall
narsie_spawn_animation()
if(narnar)
SetUniversalState(/datum/universal_state/hell)
narsie_cometh = 1
/obj/machinery/singularity/narsie/process()
spawn(10 SECONDS)
if(emergency_shuttle && emergency_shuttle.can_call())
emergency_shuttle.call_evac()
emergency_shuttle.launch_time = 0 // Cannot recall
/obj/singularity/narsie/process()
eat()
if (!target || prob(5))
@@ -65,13 +66,13 @@ var/global/list/narsie_list = list()
if (prob(25))
mezzer()
/obj/machinery/singularity/narsie/large/eat()
/obj/singularity/narsie/large/eat()
set background = BACKGROUND_ENABLED
for (var/turf/A in orange(consume_range, src))
consume(A)
/obj/machinery/singularity/narsie/mezzer()
/obj/singularity/narsie/mezzer()
for(var/mob/living/carbon/M in oviewers(8, src))
if(M.stat == CONSCIOUS)
if(M.status_flags & GODMODE)
@@ -81,21 +82,21 @@ var/global/list/narsie_list = list()
M.apply_effect(3, STUN)
/obj/machinery/singularity/narsie/large/Bump(atom/A)
/obj/singularity/narsie/large/Bump(atom/A)
if(!narnar) return
if(isturf(A))
narsiewall(A)
else if(istype(A, /obj/structure/cult))
qdel(A)
/obj/machinery/singularity/narsie/large/Bumped(atom/A)
/obj/singularity/narsie/large/Bumped(atom/A)
if(!narnar) return
if(isturf(A))
narsiewall(A)
else if(istype(A, /obj/structure/cult))
qdel(A)
/obj/machinery/singularity/narsie/move(var/force_move = 0)
/obj/singularity/narsie/move(var/force_move = 0)
if(!move_self)
return 0
@@ -113,7 +114,7 @@ var/global/list/narsie_list = list()
step(src, movement_dir)
return 1
/obj/machinery/singularity/narsie/large/move(var/force_move = 0)
/obj/singularity/narsie/large/move(var/force_move = 0)
if(!move_self)
return 0
@@ -138,14 +139,14 @@ var/global/list/narsie_list = list()
M.see_narsie(src,movement_dir)
return 1
/obj/machinery/singularity/narsie/proc/narsiefloor(var/turf/T)//leaving "footprints"
/obj/singularity/narsie/proc/narsiefloor(var/turf/T)//leaving "footprints"
if(!(istype(T, /turf/simulated/wall/cult)||istype(T, /turf/space)))
if(T.icon_state != "cult-narsie")
T.desc = "something that goes beyond your understanding went this way"
T.icon_state = "cult-narsie"
T.luminosity = 1
/obj/machinery/singularity/narsie/proc/narsiewall(var/turf/T)
/obj/singularity/narsie/proc/narsiewall(var/turf/T)
T.desc = "An opening has been made on that wall, but who can say if what you seek truly lies on the other side?"
T.icon = 'icons/turf/walls.dmi'
T.icon_state = "cult-narsie"
@@ -153,7 +154,7 @@ var/global/list/narsie_list = list()
T.density = 0
luminosity = 1
/obj/machinery/singularity/narsie/large/consume(const/atom/A) //Has its own consume proc because it doesn't need energy and I don't want BoHs to explode it. --NEO
/obj/singularity/narsie/large/consume(const/atom/A) //Has its own consume proc because it doesn't need energy and I don't want BoHs to explode it. --NEO
//NEW BEHAVIOUR
if(narsie_behaviour == "CultStation13")
//MOB PROCESSING
@@ -163,7 +164,7 @@ var/global/list/narsie_list = list()
else if(narsie_behaviour == "Nar-Singulo")
old_narsie(A)
/obj/machinery/singularity/narsie/proc/new_narsie(const/atom/A)
/obj/singularity/narsie/proc/new_narsie(const/atom/A)
if (istype(A, /mob/) && (get_dist(A, src) <= 7))
var/mob/M = A
@@ -192,7 +193,7 @@ var/global/list/narsie_list = list()
T.holy = 0 //Nar-Sie doesn't give a shit about sacred grounds.
T.cultify()
/obj/machinery/singularity/narsie/proc/old_narsie(const/atom/A)
/obj/singularity/narsie/proc/old_narsie(const/atom/A)
if(!(A.singuloCanEat()))
return 0
@@ -224,7 +225,7 @@ var/global/list/narsie_list = list()
var/turf/T2 = A
T2.ChangeTurf(/turf/space)
/obj/machinery/singularity/narsie/consume(const/atom/A) //This one is for the small ones.
/obj/singularity/narsie/consume(const/atom/A) //This one is for the small ones.
if(!(A.singuloCanEat()))
return 0
@@ -266,10 +267,10 @@ var/global/list/narsie_list = list()
var/turf/T2 = A
T2.ChangeTurf(/turf/space)
/obj/machinery/singularity/narsie/ex_act(severity) //No throwing bombs at it either. --NEO
/obj/singularity/narsie/ex_act(severity) //No throwing bombs at it either. --NEO
return
/obj/machinery/singularity/narsie/proc/pickcultist() //Narsie rewards his cultists with being devoured first, then picks a ghost to follow. --NEO
/obj/singularity/narsie/proc/pickcultist() //Narsie rewards his cultists with being devoured first, then picks a ghost to follow. --NEO
var/list/cultists = list()
for(var/datum/mind/cult_nh_mind in cult.current_antagonists)
if(!cult_nh_mind.current)
@@ -307,7 +308,7 @@ var/global/list/narsie_list = list()
return
//no living humans, follow a ghost instead.
/obj/machinery/singularity/narsie/proc/acquire(const/mob/food)
/obj/singularity/narsie/proc/acquire(const/mob/food)
var/capname = uppertext(name)
target << "<span class='notice'><b>[capname] HAS LOST INTEREST IN YOU.</b></span>"
@@ -318,17 +319,17 @@ var/global/list/narsie_list = list()
else
target << "<span class='danger'>[capname] HAS CHOSEN YOU TO LEAD HIM TO HIS NEXT MEAL.</span>"
/obj/machinery/singularity/narsie/on_capture()
/obj/singularity/narsie/on_capture()
chained = 1
move_self = 0
icon_state ="narsie-small-chains"
/obj/machinery/singularity/narsie/on_release()
/obj/singularity/narsie/on_release()
chained = 0
move_self = 1
icon_state ="narsie-small"
/obj/machinery/singularity/narsie/large/on_capture()
/obj/singularity/narsie/large/on_capture()
chained = 1
move_self = 0
icon_state ="narsie-chains"
@@ -336,22 +337,31 @@ var/global/list/narsie_list = list()
if(M.client)
M.see_narsie(src)
/obj/machinery/singularity/narsie/large/on_release()
/obj/singularity/narsie/large/on_release()
chained = 0
move_self = 1
icon_state ="narsie"
/obj/machinery/singularity/narsie/cultify()
/obj/singularity/narsie/cultify()
return
/**
* Wizard narsie.
*/
/obj/machinery/singularity/narsie/wizard
/obj/singularity/narsie/wizard
grav_pull = 0
/obj/machinery/singularity/narsie/wizard/eat()
/obj/singularity/narsie/wizard/eat()
set background = BACKGROUND_ENABLED
for (var/turf/T in trange(consume_range, src))
consume(T)
/obj/singularity/narsie/proc/narsie_spawn_animation()
icon = 'icons/obj/narsie_spawn_anim.dmi'
dir = SOUTH
move_self = 0
flick("narsie_spawn_anim",src)
sleep(11)
move_self = 1
icon = initial(icon)

View File

@@ -41,14 +41,14 @@
if (A)
if(ismob(A))
toxmob(A)
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/machinery/singularity/)))
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/)))
A:energy += energy
else if( istype(A,/obj/effect/rust_particle_catcher) )
var/obj/effect/rust_particle_catcher/collided_catcher = A
if(particle_type && particle_type != "neutron")
if(collided_catcher.AddParticles(particle_type, 1 + additional_particles))
collided_catcher.parent.AddEnergy(energy,mega_energy)
del (src)
qdel(src)
else if( istype(A,/obj/machinery/power/rust_core) )
var/obj/machinery/power/rust_core/collided_core = A
if(particle_type && particle_type != "neutron")
@@ -56,7 +56,7 @@
var/energy_loss_ratio = abs(collided_core.owned_field.frequency - frequency) / 1e9
collided_core.owned_field.mega_energy += mega_energy - mega_energy * energy_loss_ratio
collided_core.owned_field.energy += energy - energy * energy_loss_ratio
del (src)
qdel(src)
return
@@ -67,7 +67,7 @@
/obj/effect/accelerated_particle/ex_act(severity)
del(src)
qdel(src)
return
@@ -95,7 +95,7 @@
src.loc = get_step(src,dir)
movement_range--
if(movement_range <= 0)
del(src)
qdel(src)
else
sleep(lag)
move(lag)

View File

@@ -72,6 +72,12 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
var/strength = null
var/desc_holder = null
/obj/structure/particle_accelerator/Destroy()
construction_state = 0
if(master)
master.part_scan()
..()
/obj/structure/particle_accelerator/end_cap
name = "Alpha Particle Generation Array"
desc_holder = "This is where Alpha particles are generated from \[REDACTED\]"
@@ -138,15 +144,15 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/structure/particle_accelerator/ex_act(severity)
switch(severity)
if(1.0)
del(src)
qdel(src)
return
if(2.0)
if (prob(50))
del(src)
qdel(src)
return
if(3.0)
if (prob(25))
del(src)
qdel(src)
return
else
return
@@ -154,13 +160,13 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/structure/particle_accelerator/blob_act()
if(prob(50))
del(src)
qdel(src)
return
/obj/structure/particle_accelerator/meteorhit()
if(prob(50))
del(src)
qdel(src)
return
/obj/structure/particle_accelerator/update_icon()
@@ -325,15 +331,15 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/machinery/particle_accelerator/ex_act(severity)
switch(severity)
if(1.0)
del(src)
qdel(src)
return
if(2.0)
if (prob(50))
del(src)
qdel(src)
return
if(3.0)
if (prob(25))
del(src)
qdel(src)
return
else
return
@@ -341,13 +347,13 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/machinery/particle_accelerator/blob_act()
if(prob(50))
del(src)
qdel(src)
return
/obj/machinery/particle_accelerator/meteorhit()
if(prob(50))
del(src)
qdel(src)
return

View File

@@ -27,6 +27,10 @@
active_power_usage = initial(active_power_usage) * (strength + 1)
..()
/obj/machinery/particle_accelerator/control_box/Destroy()
if(active)
toggle_power()
..()
/obj/machinery/particle_accelerator/control_box/attack_hand(mob/user as mob)
if(construction_state >= 3)

View File

@@ -1,6 +1,6 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/obj/machinery/singularity/
/obj/singularity/
name = "gravitational singularity"
desc = "A gravitational singularity."
icon = 'icons/obj/singularity.dmi'
@@ -10,7 +10,6 @@
layer = 6
luminosity = 6
unacidable = 1 //Don't comment this out.
use_power = 0
var/current_size = 1
var/allowed_size = 1
@@ -30,7 +29,7 @@
var/chained = 0//Adminbus chain-grab
/obj/machinery/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
/obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
//CARN: admin-alert for chuckle-fuckery.
admin_investigate_setup()
energy = starting_energy
@@ -40,19 +39,24 @@
qdel(src)
..()
processing_objects += src
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)
if(singubeacon.active)
target = singubeacon
break
/obj/machinery/singularity/attack_hand(mob/user as mob)
/obj/singularity/Destroy()
processing_objects -= src
..()
/obj/singularity/attack_hand(mob/user as mob)
consume(user)
return 1
/obj/machinery/singularity/blob_act(severity)
/obj/singularity/blob_act(severity)
return
/obj/machinery/singularity/ex_act(severity)
/obj/singularity/ex_act(severity)
if(current_size == STAGE_SUPER)//IT'S UNSTOPPABLE
return
switch(severity)
@@ -67,16 +71,16 @@
energy += round((rand(20,60)/2),1)
return
/obj/machinery/singularity/bullet_act(obj/item/projectile/P)
/obj/singularity/bullet_act(obj/item/projectile/P)
return 0 //Will there be an impact? Who knows. Will we see it? No.
/obj/machinery/singularity/Bump(atom/A)
/obj/singularity/Bump(atom/A)
consume(A)
/obj/machinery/singularity/Bumped(atom/A)
/obj/singularity/Bumped(atom/A)
consume(A)
/obj/machinery/singularity/process()
/obj/singularity/process()
eat()
dissipate()
check_energy()
@@ -88,10 +92,10 @@
if (prob(event_chance)) //Chance for it to run a special event TODO: Come up with one or two more that fit.
event()
/obj/machinery/singularity/attack_ai() //To prevent ais from gibbing themselves when they click on one.
/obj/singularity/attack_ai() //To prevent ais from gibbing themselves when they click on one.
return
/obj/machinery/singularity/proc/admin_investigate_setup()
/obj/singularity/proc/admin_investigate_setup()
last_warning = world.time
var/count = locate(/obj/machinery/containment_field) in orange(30, src)
@@ -100,7 +104,7 @@
investigate_log("was created. [count ? "" : "<font color='red'>No containment fields were active.</font>"]", I_SINGULO)
/obj/machinery/singularity/proc/dissipate()
/obj/singularity/proc/dissipate()
if (!dissipate)
return
@@ -110,7 +114,7 @@
else
dissipate_track++
/obj/machinery/singularity/proc/expand(var/force_size = 0, var/growing = 1)
/obj/singularity/proc/expand(var/force_size = 0, var/growing = 1)
if(current_size == STAGE_SUPER)//if this is happening, this is an error
message_admins("expand() was called on a super singulo. This should not happen. Contact a coder immediately!")
return
@@ -241,7 +245,7 @@
else
return 0
/obj/machinery/singularity/proc/check_energy()
/obj/singularity/proc/check_energy()
if (energy <= 0)
investigate_log("collapsed.", I_SINGULO)
qdel(src)
@@ -265,12 +269,12 @@
expand(null, current_size > allowed_size)
return 1
/obj/machinery/singularity/proc/eat()
/obj/singularity/proc/eat()
set background = BACKGROUND_ENABLED
for(var/atom/X in orange(grav_pull, src))
var/dist = get_dist(X, src)
var/obj/machinery/singularity/S = src
var/obj/singularity/S = src
if(!istype(src))
return
if(dist > consume_range)
@@ -283,11 +287,11 @@
return
/obj/machinery/singularity/proc/consume(const/atom/A)
/obj/singularity/proc/consume(const/atom/A)
src.energy += A.singularity_act(src, current_size)
return
/obj/machinery/singularity/proc/move(var/force_move = 0)
/obj/singularity/proc/move(var/force_move = 0)
if(!move_self)
return 0
@@ -314,7 +318,7 @@
last_failed_movement = movement_dir
return 0
/obj/machinery/singularity/proc/check_turfs_in(var/direction = 0, var/step = 0)
/obj/singularity/proc/check_turfs_in(var/direction = 0, var/step = 0)
if(!direction)
return 0
var/steps = 0
@@ -368,7 +372,7 @@
return 0
return 1
/obj/machinery/singularity/proc/can_move(const/turf/T)
/obj/singularity/proc/can_move(const/turf/T)
if (!isturf(T))
return 0
@@ -386,7 +390,7 @@
return 0
return 1
/obj/machinery/singularity/proc/event()
/obj/singularity/proc/event()
var/numb = pick(1, 2, 3, 4, 5, 6)
switch (numb)
@@ -403,7 +407,7 @@
return 1
/obj/machinery/singularity/proc/toxmob()
/obj/singularity/proc/toxmob()
var/toxrange = 10
var/toxdamage = 4
var/radiation = 15
@@ -421,7 +425,7 @@
return
/obj/machinery/singularity/proc/mezzer()
/obj/singularity/proc/mezzer()
for(var/mob/living/carbon/M in oviewers(8, src))
if(istype(M, /mob/living/carbon/brain)) //Ignore brains
continue
@@ -440,13 +444,13 @@
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='danger'>[] stares blankly at The []!</span>", M, src), 1)
/obj/machinery/singularity/proc/emp_area()
/obj/singularity/proc/emp_area()
if(current_size != 11)
empulse(src, 8, 10)
else
empulse(src, 12, 16)
/obj/machinery/singularity/proc/smwave()
/obj/singularity/proc/smwave()
for(var/mob/living/M in view(10, src.loc))
if(prob(67))
M.apply_effect(rand(energy), IRRADIATE)
@@ -458,12 +462,12 @@
M.dust()
return
/obj/machinery/singularity/proc/pulse()
/obj/singularity/proc/pulse()
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
if (get_dist(R, src) <= 15) //Better than using orange() every process.
R.receive_pulse(energy)
/obj/machinery/singularity/proc/on_capture()
/obj/singularity/proc/on_capture()
chained = 1
overlays = 0
move_self = 0
@@ -479,12 +483,12 @@
if(9)
overlays += image('icons/effects/288x288.dmi',"chain_s9")
/obj/machinery/singularity/proc/on_release()
/obj/singularity/proc/on_release()
chained = 0
overlays = 0
move_self = 1
/obj/machinery/singularity/singularity_act(S, size)
/obj/singularity/singularity_act(S, size)
if(current_size <= size)
var/gain = (energy/2)
var/dist = max((current_size - 2), 1)