Drops the machinery part of the singularity.

This commit is contained in:
PsiOmega
2015-04-16 12:51:02 +02:00
parent fdd041830a
commit d381eb6083
19 changed files with 86 additions and 82 deletions

View File

@@ -343,7 +343,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,7 +12,7 @@
/obj/machinery/the_singularitygen/process()
var/turf/T = get_turf(src)
if(src.energy >= 200)
new /obj/machinery/singularity/(T, 50)
new /obj/singularity/(T, 50)
if(src) del(src)
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)

View File

@@ -1,7 +1,7 @@
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 +16,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,7 +40,7 @@ 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>"
@@ -54,7 +54,7 @@ var/global/list/narsie_list = list()
SetUniversalState(/datum/universal_state/hell)
narsie_cometh = 1
/obj/machinery/singularity/narsie/process()
/obj/singularity/narsie/process()
eat()
if (!target || prob(5))
@@ -65,13 +65,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 +81,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 +113,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 +138,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 +153,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 +163,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 +192,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 +224,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 +266,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 +307,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 +318,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,21 +336,21 @@ 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))

View File

@@ -41,7 +41,7 @@
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

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)