Skip to content

Commit

Permalink
feat(singulo): adds singulo childless generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Filatelele authored Aug 11, 2024
1 parent adb9050 commit e146907
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions code/modules/power/singularity/generator.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/////SINGULARITY SPAWNER
/obj/machinery/the_singularitygen/
/obj/machinery/the_singularitygen
name = "Gravitational Singularity Generator"
desc = "An Odd Device which produces a Gravitational Singularity when set up."
icon = 'icons/obj/singularity.dmi'
Expand All @@ -8,11 +8,12 @@
density = 1
use_power = POWER_USE_OFF
var/energy = 0
var/singulo_children = TRUE

/obj/machinery/the_singularitygen/Process()
var/turf/T = get_turf(src)
if(src.energy >= 200)
new /obj/singularity/(T, 50)
new /obj/singularity/(T, 50, 0, singulo_children)
if(src) qdel(src)

/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
Expand All @@ -29,3 +30,6 @@
"You hear a ratchet")
return
return ..()

/obj/machinery/the_singularitygen/no_children
singulo_children = FALSE
3 changes: 2 additions & 1 deletion code/modules/power/singularity/singularity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

is_poi = TRUE

/obj/singularity/New(loc, starting_energy = 50, temp = 0)
/obj/singularity/New(loc, starting_energy = 50, temp = 0, create_childs)
//CARN: admin-alert for chuckle-fuckery.
admin_investigate_setup()
energy = starting_energy
Expand All @@ -54,6 +54,7 @@
target = singubeacon
break

src.create_childs = create_childs
if(create_childs)
create_childs()

Expand Down

0 comments on commit e146907

Please sign in to comment.