Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
02eb65c
Bork Mediguns wew
crossexonar Jun 25, 2025
9b1a04e
Merge branch 'TS-Rogue-Star:master' into medigun-wow-cool
crossexonar Jun 25, 2025
e6a046a
upgrade system added, woo!
crossexonar Jul 1, 2025
94f0afd
Smol changes
crossexonar Jul 1, 2025
b749481
More upgrade system nonsense
crossexonar Jul 2, 2025
0fa31ee
More alien tier upgrade thingies
crossexonar Jul 3, 2025
bfb30e5
Forgot to actually check the tier of the scanning module for the wall…
crossexonar Jul 4, 2025
e87e9f2
backup before I rewrite something im not happy with.
crossexonar Jul 5, 2025
45e951f
TGUI makes my head hurt weh
crossexonar Jul 9, 2025
9e953c4
ui
Kashargul Jul 10, 2025
44afcf5
ui fix
Kashargul Jul 10, 2025
2ad80ac
use normal desc
Kashargul Jul 10, 2025
f245e11
.
Kashargul Jul 10, 2025
89f22b3
-
Kashargul Jul 10, 2025
43e7128
code cleanup
Kashargul Jul 11, 2025
f269f9f
merge the pages
Kashargul Jul 11, 2025
0303126
sanity
Kashargul Jul 11, 2025
6033f8f
cleaner
Kashargul Jul 11, 2025
90ba409
don't biuild useless images
Kashargul Jul 11, 2025
6d56b63
basis
Kashargul Jul 12, 2025
ba38da5
fix box
Kashargul Jul 12, 2025
a965421
no hands use
Kashargul Jul 12, 2025
67c2f67
clearer values
Kashargul Jul 12, 2025
aa04461
state handling
Kashargul Jul 12, 2025
91c6058
fiy that too
Kashargul Jul 12, 2025
d140bc1
push
Kashargul Jul 12, 2025
d2db04b
bark bark bark bark bark Changed how capacitor works moved charge to …
crossexonar Jul 13, 2025
1af7e6c
Muhfockin Wofl Mode
crossexonar Jul 13, 2025
ecfe671
Merge branch 'TS-Rogue-Star:master' into medigun-wow-cool
crossexonar Jul 13, 2025
5b09c90
Various small fixes, more to come.
crossexonar Jul 16, 2025
3ab0991
Merge branch 'medigun-wow-cool' of https://github.com/crossexonar/Rog…
crossexonar Jul 16, 2025
bccf12f
bark bark bark
crossexonar Jul 18, 2025
4f20d01
bunch of ui changes
Kashargul Jul 18, 2025
05754fe
Merge branch 'medigun-wow-cool' of https://github.com/crossexonar/Rog…
Kashargul Jul 18, 2025
50d0af5
.
Kashargul Jul 18, 2025
ce3d3ed
icon
Kashargul Jul 18, 2025
0162704
ui tweaks
Kashargul Jul 18, 2025
5ae1018
small fixes
Kashargul Jul 18, 2025
6869644
fix those
Kashargul Jul 18, 2025
b7c8727
Swapped around the modifiers, replaced pain remover with blood regen …
crossexonar Jul 19, 2025
d5077f1
move that
Kashargul Jul 19, 2025
ea69207
return the proc
Kashargul Jul 19, 2025
ec05a67
fix onehanded
Kashargul Jul 19, 2025
1b2c67a
this can stay like this
Kashargul Jul 19, 2025
8f705b7
sane
Kashargul Jul 19, 2025
24d9823
try that
Kashargul Jul 19, 2025
f76e8a4
.
Kashargul Jul 19, 2025
f1144ca
urg
Kashargul Jul 19, 2025
2f26e8b
.
Kashargul Jul 19, 2025
aa513c7
no closing
Kashargul Jul 19, 2025
7810e7b
push
Kashargul Jul 19, 2025
ec8b12f
.
Kashargul Jul 19, 2025
a421306
.
Kashargul Jul 19, 2025
02d1d86
pull back
Kashargul Jul 19, 2025
5471583
.
Kashargul Jul 19, 2025
4193d6b
cleaner
Kashargul Jul 19, 2025
d0e6cf8
Fixed a kash typo
crossexonar Jul 19, 2025
03d4b74
Merge branch 'medigun-wow-cool' of https://github.com/crossexonar/Rog…
crossexonar Jul 19, 2025
db7f027
repush
Kashargul Jul 19, 2025
b83264e
Temporary rename for deployment on weekend
crossexonar Jul 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
119 changes: 119 additions & 0 deletions code/game/Rogue Star/weapons/Medigun/bork_medigun.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
#define MEDIGUN_IDLE 0
#define MEDIGUN_CANCELLED 1
#define MEDIGUN_BUSY 2

/obj/item/device/bork_medigun
name = "prototype bluespace medigun"
desc = "The Bork BSM-92 or 'Blue Space Medigun' utilizes advanced bluespace technology to transfer beneficial reagents directly to torn tissue. This way, even larger wounds can be mended efficiently in short periods of time"
icon = 'code/game/Rogue Star/icons/itemicons/borkmedigun.dmi'
icon_state = "medblaster"
var/wielded_item_state = "medblaster-wielded"
var/base_icon_state = "medblaster"
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns_rs.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns_rs.dmi',
)
w_class = ITEMSIZE_HUGE
force = 0
var/beam_range = 3 // How many tiles away it can scan. Changing this also changes the box size.
var/busy = MEDIGUN_IDLE // Set to true when scanning, to stop multiple scans.
var/action_cancelled = FALSE
var/wielded = FALSE
var/mob/current_target
var/mgcmo
canremove = FALSE

/obj/item/device/bork_medigun/update_twohanding()
var/mob/living/M = loc
if(istype(M) && M.item_is_in_hands(src) && !M.hands_are_full())
wielded = TRUE
name = "[initial(name)] (wielded)"
else
wielded = FALSE
name = initial(name)
..()

/obj/item/device/bork_medigun/update_held_icon()
if(wielded_item_state)
var/mob/living/M = loc
if(istype(M))
if(M.can_wield_item(src) && src.is_held_twohanded(M))
LAZYSET(item_state_slots, slot_l_hand_str, wielded_item_state)
LAZYSET(item_state_slots, slot_r_hand_str, wielded_item_state)
else
LAZYSET(item_state_slots, slot_l_hand_str, initial(item_state))
LAZYSET(item_state_slots, slot_r_hand_str, initial(item_state))
..()

// Draws a box showing the limits of movement while scanning something.
// Only the client supplied will see the box.
/obj/item/device/bork_medigun/proc/draw_box(atom/A, box_size, client/C)
var/list/our_box = list()
// Things moved with pixel_[x|y] will move the box, so this is to correct that.
var/pixel_x_correction = -A.pixel_x
var/pixel_y_correction = -A.pixel_y

var/our_icon_size = world.icon_size
// First, place the bottom-left corner.
our_box += draw_line(A, SOUTHWEST, (-box_size * our_icon_size) + pixel_x_correction, (-box_size * our_icon_size) + pixel_y_correction, C)

var/rendered_size = (box_size * 2) - 1
// Make a line on the bottom, going right.
for(var/i = 1 to rendered_size)
var/x_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_x_correction
var/y_displacement = (-box_size * our_icon_size) + pixel_y_correction
our_box += draw_line(A, SOUTH, x_displacement, y_displacement, C)

// Bottom-right corner.
our_box += draw_line(A, SOUTHEAST, (box_size * our_icon_size) + pixel_x_correction, (-box_size * our_icon_size) + pixel_y_correction, C)

// Second line, for the right side going up.
for(var/i = 1 to rendered_size)
var/x_displacement = (box_size * our_icon_size) + pixel_x_correction
var/y_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_y_correction
our_box += draw_line(A, EAST, x_displacement, y_displacement, C)

// Top-right corner.
our_box += draw_line(A, NORTHEAST, (box_size * our_icon_size) + pixel_x_correction, (box_size * our_icon_size) + pixel_y_correction, C)

// Third line, for the top, going right.
for(var/i = 1 to rendered_size)
var/x_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_x_correction
var/y_displacement = (box_size * our_icon_size) + pixel_y_correction
our_box += draw_line(A, NORTH, x_displacement, y_displacement, C)

// Top-left corner.
our_box += draw_line(A, NORTHWEST, (-box_size * our_icon_size) + pixel_x_correction, (box_size * our_icon_size) + pixel_y_correction, C)

// Fourth and last line, for the left side going up.
for(var/i = 1 to rendered_size)
var/x_displacement = (-box_size * our_icon_size) + pixel_x_correction
var/y_displacement = (-box_size * our_icon_size) + (our_icon_size * i) + pixel_y_correction
our_box += draw_line(A, WEST, x_displacement, y_displacement, C)
return our_box

// Draws an individual segment of the box.
/obj/item/device/bork_medigun/proc/draw_line(atom/A, line_dir, line_pixel_x, line_pixel_y, client/C)
var/image/line = image(icon = 'icons/effects/effects.dmi', loc = A, icon_state = "stripes", dir = line_dir)
line.pixel_x = line_pixel_x
line.pixel_y = line_pixel_y
line.plane = PLANE_FULLSCREEN // It's technically a HUD element but it doesn't need to show above item slots.
line.appearance_flags = RESET_TRANSFORM|RESET_COLOR|RESET_ALPHA|NO_CLIENT_COLOR|TILE_BOUND
line.alpha = 125
C.images += line
return line

// Removes the box that was generated before from the client.
/obj/item/device/bork_medigun/proc/delete_box(list/box_segments, client/C)
for(var/i in box_segments)
C.images -= i
qdel(i)

/obj/item/device/bork_medigun/proc/color_box(list/box_segments, new_color, new_time)
for(var/i in box_segments)
animate(i, color = new_color, time = new_time)

/obj/item/device/bork_medigun/attack_hand(mob/user)
if(user.get_inactive_hand() == src)// && loc != get_turf)
return
return ..()
Loading
Loading