singularity is now OOP

This commit is contained in:
Hornygranny
2014-10-20 16:36:00 -07:00
parent b7de714fa7
commit e5e6ded884
9 changed files with 60 additions and 60 deletions
+2
View File
@@ -380,3 +380,5 @@ var/list/blood_splatter_icons = list()
/atom/proc/handle_slip()
return
/atom/proc/singularity_act()
return
+3
View File
@@ -3,6 +3,9 @@
unacidable = 1
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
obj/effect/overlay/singularity_act()
return
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
name="beam"
icon='icons/effects/beam.dmi'
@@ -62,6 +62,11 @@
crit_fail = 1
icon_state = "brokenpack"
/obj/item/weapon/storage/backpack/holding/singularity_act(current_size)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
return
/obj/item/weapon/storage/backpack/santabag
name = "Santa's Gift Bag"
+5
View File
@@ -134,3 +134,8 @@
var/obj/Loc=loc
Loc.on_log()
/obj/singularity_act()
ex_act(1.0)
if(src && isnull(gc_destroyed))
qdel(src)
return 2
+4 -1
View File
@@ -208,4 +208,7 @@ proc/setup_map_transitions() //listamania
else
S.transition = directions[Z_NORTH]
S.Assign_Destination()
S.Assign_Destination()
/turf/space/singularity_act()
return
+11 -1
View File
@@ -370,4 +370,14 @@
M << "<span class='notice'>You slipped!</span>"
playsound(M.loc, 'sound/misc/slip.ogg', 50, 1, -3)
return 1
return 0 // no success. Used in clown pda and wet floors
return 0 // no success. Used in clown pda and wet floors
/turf/singularity_act()
if(intact)
for(var/obj/O in contents)
if(O.level != 1)
continue
if(O.invisibility == 101)
O.singularity_act()
ChangeTurf(/turf/space)
return(2)
+12 -1
View File
@@ -705,4 +705,15 @@
facial_hair_style = "Shaved"
hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
underwear = "Nude"
regenerate_icons()
regenerate_icons()
/mob/living/carbon/human/singularity_act()
var/gain = 20
if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer") )
gain = 100
if(mind.assigned_role == "Clown")
gain = rand(-300, 300)
investigate_log(" has consumed [key_name(src)].","singulo") //Oh that's where the clown ended up!
gib()
sleep(1)
return(gain)
+7
View File
@@ -630,3 +630,10 @@
src.unEquip(what)
who.equip_to_slot_if_possible(what, where, 0, 1)
add_logs(src, who, "equipped", object=what)
/mob/living/singularity_act()
var/gain = 20
investigate_log(" has consumed [key_name(src)].","singulo") //Oh that's where the clown ended up!
gib()
sleep(1)
return(gain)
+11 -57
View File
@@ -25,9 +25,8 @@
var/event_chance = 15 //Prob for event each tick
var/target = null //its target. moves towards the target if it has one
var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing
var/teleport_del = 0
var/last_warning
var/list/uneatable = list(/turf/space, /obj/effect/overlay)
var/list/uneatable = null
/obj/machinery/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
//CARN: admin-alert for chuckle-fuckery.
@@ -244,60 +243,8 @@
/obj/machinery/singularity/proc/consume(var/atom/A)
var/gain = 0
if(is_type_in_list(A, uneatable))
return 0
if (istype(A,/mob/living))//Mobs get gibbed
var/mob/living/M = A
gain = 20
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.mind)
if((H.mind.assigned_role == "Station Engineer") || (H.mind.assigned_role == "Chief Engineer") )
gain = 100
if(H.mind.assigned_role == "Clown")
gain = rand(-300, 300) // HONK
investigate_log(" has consumed [key_name(M)].","singulo") //Oh that's where the clown ended up!
M.gib()
sleep(1)
else if(istype(A,/obj/))
if (istype(A,/obj/item/weapon/storage/backpack/holding))
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
return
if(istype(A, /obj/machinery/singularity))//Welp now you did it
var/obj/machinery/singularity/S = A
src.energy += (S.energy/2)//Absorb most of it
qdel(S)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
return//Quits here, the obj should be gone, hell we might be
if((teleport_del) && (!istype(A, /obj/machinery)))//Going to see if it does not lag less to tele items over to Z 2
var/obj/O = A
O.x = 2
O.y = 2
O.z = 2
else
A.ex_act(1.0)
if(A && isnull(A.gc_destroyed))
qdel(A)
gain = 2
else if(isturf(A))
var/turf/T = A
if(T.intact)
for(var/obj/O in T.contents)
if(O.level != 1)
continue
if(O.invisibility == 101)
src.consume(O)
T.ChangeTurf(/turf/space)
gain = 2
var/gain = A.singularity_act()
A.singularity_act(current_size)
src.energy += gain
return
@@ -456,4 +403,11 @@
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)
return
return
/obj/machinery/singularity/singularity_act()
var/gain = (energy/2)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
qdel()
return(gain)