Skip to content

Commit

Permalink
Wibbly Gravity Well Artifact (#17541)
Browse files Browse the repository at this point in the history
Co-authored-by: Amylizzlep <amylizzle@users.noreply.github.com>
  • Loading branch information
amylizzle and amylizzle committed Jan 2, 2024
1 parent 1f31622 commit e79a70f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions code/obj/artifacts/artifact_machines/grav_well.dm
Expand Up @@ -2,6 +2,17 @@
name = "artifact gravity well generator"
associated_datum = /datum/artifact/gravity_well_generator

/obj/effect/grav_pulse
icon='icons/effects/overlays/lensing.dmi'
icon_state="blank" //haha such hackery
pixel_x = -224
pixel_y = -224
plane = PLANE_DISTORTION
appearance_flags = PIXEL_SCALE | RESET_COLOR | RESET_ALPHA

proc/pulse()
flick("pulse",src)

/datum/artifact/gravity_well_generator
associated_object = /obj/machinery/artifact/gravity_well_generator
type_name = "Gravity Well"
Expand All @@ -21,15 +32,28 @@
var/field_radius = 7
var/gravity_type = 0 // push or pull?
examine_hint = "It is covered in very conspicuous markings."
var/obj/effect/grav_pulse/lense

New()
..()
src.field_radius = rand(4,9) // well radius
src.gravity_type = rand(0,1) // 0 for pull, 1 for push
lense = new()

effect_activate(obj/O)
. = ..()
O.vis_contents += lense

effect_deactivate(obj/O)
. = ..()
O.vis_contents -= lense

effect_process(var/obj/O)
if (..())
return

lense.pulse()

for (var/obj/V in orange(src.field_radius,get_turf(O)))
if (V.anchored)
continue
Expand Down
Binary file modified icons/effects/overlays/lensing.dmi
Binary file not shown.

0 comments on commit e79a70f

Please sign in to comment.