This commit is contained in:
if there were two guys on the moon
2019-06-29 20:04:47 +01:00
parent 505e4e2a55
commit d5f380984f
15 changed files with 298 additions and 1 deletions

View File

@@ -713,3 +713,16 @@
S.reagents.add_reagent(reagent,amount)
S.chassis.use_power(energy_drain)
return 1
//VOREStation edit: medigun
/obj/item/mecha_parts/mecha_equipment/weapon/energy/medigun
equip_cooldown = 6
name = "\improper BL-3 \"Phoenix\" directed restoration system"
desc = "The BL-3 'Phoenix' is a portable medical system used to treat external injuries from afar."
icon_state = "mecha_medbeam"
energy_drain = 1000
projectile = /obj/item/projectile/beam/medigun
fire_sound = 'sound/weapons/eluger.ogg'
equip_type = EQUIP_UTILITY
origin_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 5, TECH_BIO = 6, TECH_POWER = 6)
//VOREStation edit ends

View File

@@ -185,3 +185,11 @@
id = "weasel_head"
build_path = /obj/item/mecha_parts/micro/part/weasel_head
materials = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 2500)
/datum/design/item/mecha/medigun
name = "BL-3/P directed restoration system"
desc = "A portable medical system used to treat external injuries from afar."
id = "mech_medigun"
req_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 5, TECH_BIO = 6)
materials = list(DEFAULT_WALL_MATERIAL = 8000, "gold" = 2000, "silver" = 1750, "diamond" = 1500, "phoron" = 4000)
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/medigun

View File

@@ -44,3 +44,14 @@
icon_state = "explosionfast"
duration = 4
// VOREStation Add End
//VOREStation edit: medigun
/obj/effect/temp_visual/heal
name = "healing glow"
icon_state = "heal"
duration = 15
/obj/effect/temp_visual/heal/Initialize(mapload)
pixel_x = rand(-12, 12)
pixel_y = rand(-9, 0)
//VOREStation edit ends

View File

@@ -79,3 +79,12 @@
light_range = 4
light_power = 3
light_color = "#3300ff"
//VOREStation edit: medigun
/obj/effect/projectile/impact/medigun
icon = 'icons/obj/projectiles_vr.dmi'
icon_state = "impact_medbeam"
light_range = 2
light_power = 0.5
light_color = "#80F5FF"
//VOREStation edit ends

View File

@@ -91,3 +91,12 @@
light_range = 4
light_power = 3
light_color = "#3300ff"
//VOREStation edit: medigun
/obj/effect/projectile/muzzle/medigun
icon = 'icons/obj/projectiles_vr.dmi'
icon_state = "muzzle_medbeam"
light_range = 2
light_power = 0.5
light_color = "#80F5FF"
//VOREStation edit ends

View File

@@ -107,3 +107,12 @@
light_range = 4
light_power = 3
light_color = "#3300ff"
//VOREStation edit: medigun
/obj/effect/projectile/tracer/medigun
icon = 'icons/obj/projectiles_vr.dmi'
icon_state = "medbeam"
light_range = 2
light_power = 0.5
light_color = "#80F5FF"
//VOREStation edit ends

View File

@@ -0,0 +1,181 @@
/obj/item/device/medbeam
name = "rapid restoration system"
desc = "The ML-3 'Medbeam' is a portable medical system used to treat external injuries from afar. It uses advanced nanite technology to deliver rapid restoration nanites along a targeted path, which self-destruct after healing their target. The ML-3/M takes heavy-capacity power cells."
icon = 'icons/obj/gun_vr.dmi'
icon_override = 'icons/obj/gun_vr.dmi'
icon_state = "medbeam"
item_state = "medbeam"
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_MATERIAL = 2, TECH_DATA = 3, TECH_MAGNET = 3)
force = 5
icon_state = "medbeam"
item_state = "medbeam"
slot_flags = SLOT_BELT
var/charge_tick = 10 //how much charge the beam uses per Process()
var/scan_range = 6 // How many tiles away it can heal someone.
var/busy = FALSE // Set to true when healing, to stop multiple targets being healed.
var/obj/item/weapon/cell/cell
var/cell_type = /obj/item/weapon/cell/high
var/datum/beam/heal_beam = null
var/filter = null
var/mob/living/carbon/human/lasttarget
/obj/item/device/medbeam/New()
if(cell_type)
cell = new cell_type(src)
update_icon()
/obj/item/device/medbeam/afterattack(atom/target, mob/user, proximity_flag)
if(busy)
busy = FALSE
if(heal_beam) //delete the healbeam, and...
qdel(heal_beam)
if(lasttarget) //clear healbeam overlay
lasttarget.filters -= filter
if(!cell || cell.charge == 0)
to_chat(user, span("warning", "\The [src] is out of charge!"))
return
if(istype(target, /mob/))
if(!istype(target, /mob/living/carbon/human))
to_chat(user, span("warning", "\The [src] can only heal humanoid targets."))
return
else
return
if(get_dist(target, user) > scan_range)
to_chat(user, span("warning", "You are too far away from \the [target]."))
return
// If you've got this far, you're successfully healing someone
world << "Beam created in afterattack()- before"
heal_beam = Beam(target, icon_state = "medbeam", time = 6000, beam_type=/obj/effect/ebeam/healing,maxdistance=6) //arbitrarily long time ahoy!
world << "Beam created in afterattack()- after"
filter = filter(type = "outline", size = 1, color = "#FFFFFF")
lasttarget = target
busy = TRUE
target.filters += filter
update_icon()
/obj/item/device/medbeam/examine(mob/user)
..()
if(cell)
var/tempdesc
tempdesc += "\The [src] has a \the [cell] attached. "
if(cell.charge <= cell.maxcharge*0.25)
tempdesc += "It appears to have a low amount of power remaining."
else if(cell.charge > cell.maxcharge*0.25 && cell.charge <= cell.maxcharge*0.5)
tempdesc += "It appears to have an average amount of power remaining."
else if(cell.charge > cell.maxcharge*0.5 && cell.charge <= cell.maxcharge*0.75)
tempdesc += "It appears to have an above average amount of power remaining."
else if(cell.charge > cell.maxcharge*0.75 && cell.charge <= cell.maxcharge)
tempdesc += "It appears to have a high amount of power remaining."
to_chat(user, "[tempdesc]")
/obj/item/device/medbeam/emp_act(severity)
for(var/obj/O in contents)
O.emp_act(severity)
..()
/obj/item/device/medbeam/get_cell()
return cell
/obj/item/device/medbeam/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
if(cell)
cell.update_icon()
user.put_in_hands(cell)
cell = null
to_chat(user, "<span class='notice'>You remove the cell from \the [src].</span>")
playsound(src, 'sound/machines/button.ogg', 30, 1, 0)
update_icon()
return
..()
else
return ..()
/obj/item/device/medbeam/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/cell))
if(!cell)
user.drop_item()
W.loc = src
cell = W
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
playsound(src, 'sound/machines/button.ogg', 30, 1, 0)
update_icon()
else
to_chat(user, "<span class='notice'>\The [src] already has a cell.</span>")
else
..()
/obj/item/device/medbeam/update_icon()
if(!cell)
icon_state = "[initial(icon_state)]_open"
return
var/ratio = cell.charge / cell.maxcharge
//make sure that rounding down will not give us the empty state even if we have charge left.
if(cell.charge < charge_tick)
ratio = 0
else
ratio = max(round(ratio, 0.25) * 100, 25)
icon_state = "[initial(icon_state)][ratio]"
/obj/item/device/medbeam/Destroy()
if(busy)
busy = FALSE
if(heal_beam) //delete the healbeam, and...
qdel(heal_beam)
if(lasttarget) //clear healbeam overlay
lasttarget.filters -= filter
/obj/effect/ebeam/healing
name = "healing beam"
desc = "A beam of refined nanite technology designed to heal a patient."
mouse_opacity = 1
var/obj/item/device/medbeam/medbeam = null
/obj/effect/ebeam/healing/New()
START_PROCESSING(SSobj, src)
return ..()
/obj/effect/ebeam/healing/process(atom/target, atom/user)
medbeam = owner.origin
if(istype(target, /mob/))
if(!istype(target, /mob/living/carbon/human)) //Sanity check- if you're not healing a humanoid, stoppit
visible_message("<span class='warning'>\The [src]'s beam deactivates! Stop healing a non-human!!</span>")
qdel(src)
else
var/mob/living/carbon/human/M = target
if(M.health < M.maxHealth)
var/obj/effect/overlay/pulse = new /obj/effect/overlay(get_turf(M))
pulse.icon = 'icons/effects/effects.dmi'
pulse.icon_state = "heal"
pulse.name = "heal"
pulse.anchored = 1
spawn(20)
qdel(pulse)
M.adjustBruteLoss(-4)
M.adjustFireLoss(-4)
M.adjustToxLoss(-1)
M.adjustOxyLoss(-1)
if(medbeam.cell)
if(medbeam.cell.charge >= medbeam.charge_tick)
medbeam.cell.charge -= medbeam.charge_tick
else
medbeam.cell.charge = 0
visible_message("<span class='warning'>\The [src]'s beam deactivates!</span>")
qdel(src)
return
/obj/effect/ebeam/healing/Destroy()
STOP_PROCESSING(SSobj, src)
if(medbeam)
if(medbeam.filter)
qdel(medbeam.filter)
return ..()

View File

@@ -2,4 +2,26 @@
projectile_type = /obj/item/projectile/ion/pistol // still packs a punch but no AoE
/obj/item/weapon/gun/energy/ionrifle/weak
projectile_type = /obj/item/projectile/ion/small
projectile_type = /obj/item/projectile/ion/small
/obj/item/weapon/gun/energy/medigun //Adminspawn/ERT etc
name = "directed restoration system"
desc = "The BL-3 'Phoenix' is an adaptation on the ML-3 'Medbeam' design that channels the power of the beam into a single healing laser. It is highly energy-inefficient, but its medical power cannot be denied."
force = 5
icon_state = "medbeam"
item_state = "medbeam"
icon = 'icons/obj/gun_vr.dmi'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns_vr.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns_vr.dmi',
)
slot_flags = SLOT_BELT
accuracy = 100
fire_delay = 12
fire_sound = 'sound/weapons/eluger.ogg'
projectile_type = /obj/item/projectile/beam/medigun
accept_cell_type = /obj/item/weapon/cell
cell_type = /obj/item/weapon/cell/high
charge_cost = 2500

View File

@@ -41,3 +41,37 @@
muzzle_type = /obj/effect/projectile/muzzle/laser_blue
tracer_type = /obj/effect/projectile/tracer/laser_blue
impact_type = /obj/effect/projectile/impact/laser_blue
/obj/item/projectile/beam/medigun
name = "healing beam"
icon_state = "healbeam"
damage = 0 //stops it damaging walls
nodamage = TRUE
no_attack_log = TRUE
damage_type = BURN
check_armour = "laser"
light_color = "#80F5FF"
combustion = FALSE
muzzle_type = /obj/effect/projectile/muzzle/medigun
tracer_type = /obj/effect/projectile/tracer/medigun
impact_type = /obj/effect/projectile/impact/medigun
/obj/item/projectile/beam/medigun/on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(M.health < M.maxHealth)
var/obj/effect/overlay/pulse = new /obj/effect/overlay(get_turf(M))
pulse.icon = 'icons/effects/effects.dmi'
pulse.icon_state = "heal"
pulse.name = "heal"
pulse.anchored = 1
spawn(20)
qdel(pulse)
to_chat(target, "<span class='notice'>As the beam strikes you, your injuries close up!</span>")
M.adjustBruteLoss(-15)
M.adjustFireLoss(-15)
M.adjustToxLoss(-5)
M.adjustOxyLoss(-5)
return 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -972,6 +972,7 @@
#include "code\game\objects\items\devices\laserpointer.dm"
#include "code\game\objects\items\devices\lightreplacer.dm"
#include "code\game\objects\items\devices\locker_painter.dm"
#include "code\game\objects\items\devices\medbeam.dm"
#include "code\game\objects\items\devices\megaphone.dm"
#include "code\game\objects\items\devices\modkit.dm"
#include "code\game\objects\items\devices\multitool.dm"