Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wibbly Gravity Well Artifact #17541

Merged
merged 1 commit into from Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.