diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 4502ff7675f..2a7066abeef 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -380,3 +380,5 @@ var/list/blood_splatter_icons = list() /atom/proc/handle_slip() return +/atom/proc/singularity_act() + return \ No newline at end of file diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 0cc1312bb81..84099ef3522 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -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' diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 776dca795a5..0f09d860cca 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -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" diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index f45a8b5766f..20805e43bdf 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -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 \ No newline at end of file diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index fe355624d19..13893942dfd 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -208,4 +208,7 @@ proc/setup_map_transitions() //listamania else S.transition = directions[Z_NORTH] - S.Assign_Destination() \ No newline at end of file + S.Assign_Destination() + +/turf/space/singularity_act() + return \ No newline at end of file diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index c5a7f9d6c33..b6cace05907 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -370,4 +370,14 @@ M << "You slipped!" playsound(M.loc, 'sound/misc/slip.ogg', 50, 1, -3) return 1 - return 0 // no success. Used in clown pda and wet floors \ No newline at end of file + 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) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index e9c20065506..95029bf066d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -705,4 +705,15 @@ facial_hair_style = "Shaved" hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") underwear = "Nude" - regenerate_icons() \ No newline at end of file + 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) \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index fad2f1154e8..31d32480ead 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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) \ No newline at end of file diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 349f4f1d581..cc8db95569a 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -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 \ No newline at end of file + 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) \ No newline at end of file