mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 11:07:46 +01:00
Merge branch 'master' into Arokha/matdefs
This commit is contained in:
+11
-27
@@ -5,8 +5,8 @@
|
||||
/obj/item/weapon/cell
|
||||
name = "power cell"
|
||||
desc = "A rechargable electrochemical power cell."
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "cell"
|
||||
icon = 'icons/obj/power_cells.dmi'
|
||||
icon_state = "b_st"
|
||||
item_state = "cell"
|
||||
origin_tech = list(TECH_POWER = 1)
|
||||
force = 5.0
|
||||
@@ -29,8 +29,7 @@
|
||||
pickup_sound = 'sound/items/pickup/component.ogg'
|
||||
|
||||
// Overlay stuff.
|
||||
var/overlay_half_state = "cell-o1" // Overlay used when not fully charged but not empty.
|
||||
var/overlay_full_state = "cell-o2" // Overlay used when fully charged.
|
||||
var/standard_overlays = TRUE
|
||||
var/last_overlay_state = null // Used to optimize update_icon() calls.
|
||||
|
||||
/obj/item/weapon/cell/New()
|
||||
@@ -73,29 +72,14 @@
|
||||
#define OVERLAY_EMPTY 0
|
||||
|
||||
/obj/item/weapon/cell/update_icon()
|
||||
var/new_overlay = null // The overlay that is needed.
|
||||
// If it's different than the current overlay, then it'll get changed.
|
||||
// Otherwise nothing happens, to save on CPU.
|
||||
|
||||
if(charge < 0.01) // Empty.
|
||||
new_overlay = OVERLAY_EMPTY
|
||||
if(last_overlay_state != new_overlay)
|
||||
cut_overlays()
|
||||
|
||||
else if(charge/maxcharge >= 0.995) // Full
|
||||
new_overlay = OVERLAY_FULL
|
||||
if(last_overlay_state != new_overlay)
|
||||
cut_overlay(overlay_half_state)
|
||||
add_overlay(overlay_full_state)
|
||||
|
||||
|
||||
else // Inbetween.
|
||||
new_overlay = OVERLAY_PARTIAL
|
||||
if(last_overlay_state != new_overlay)
|
||||
cut_overlay(overlay_full_state)
|
||||
add_overlay(overlay_half_state)
|
||||
|
||||
last_overlay_state = new_overlay
|
||||
if(!standard_overlays)
|
||||
return
|
||||
var/ratio = clamp(round(charge / maxcharge, 0.25) * 100, 0, 100)
|
||||
var/new_state = "[icon_state]_[ratio]"
|
||||
if(new_state != last_overlay_state)
|
||||
cut_overlay(last_overlay_state)
|
||||
add_overlay(new_state)
|
||||
last_overlay_state = new_state
|
||||
|
||||
#undef OVERLAY_FULL
|
||||
#undef OVERLAY_PARTIAL
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/obj/item/weapon/cell/device
|
||||
name = "device power cell"
|
||||
desc = "A small power cell designed to power handheld devices."
|
||||
icon_state = "dcell"
|
||||
icon_state = "m_st"
|
||||
item_state = "egg6"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
force = 0
|
||||
@@ -16,7 +16,7 @@
|
||||
/obj/item/weapon/cell/device/weapon
|
||||
name = "weapon power cell"
|
||||
desc = "A small power cell designed to power handheld weaponry."
|
||||
icon_state = "wcell"
|
||||
icon_state = "m_sup"
|
||||
maxcharge = 2400
|
||||
charge_amount = 20
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/item/weapon/cell/device/weapon/recharge
|
||||
name = "self-charging weapon power cell"
|
||||
desc = "A small power cell designed to power handheld weaponry. This one recharges itself."
|
||||
// icon_state = "wcell" //TODO: Different sprite
|
||||
icon_state = "meb_m_nu"
|
||||
self_recharge = TRUE
|
||||
charge_amount = 120
|
||||
charge_delay = 75
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/obj/item/weapon/cell/device/weapon/recharge/alien
|
||||
name = "void cell (device)"
|
||||
var/swaps_to = /obj/item/weapon/cell/void
|
||||
standard_overlays = FALSE
|
||||
|
||||
/obj/item/weapon/cell/device/weapon/recharge/alien/attack_self(var/mob/user)
|
||||
user.remove_from_mob(src)
|
||||
@@ -13,10 +14,6 @@
|
||||
newcell.charge = newcell.maxcharge * percentage
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/cell/device/weapon/recharge/alien/update_icon()
|
||||
return
|
||||
|
||||
|
||||
//The machine cell
|
||||
/obj/item/weapon/cell/void
|
||||
name = "void cell (machinery)"
|
||||
@@ -29,6 +26,7 @@
|
||||
self_recharge = TRUE
|
||||
charge_delay = 50
|
||||
matter = null
|
||||
standard_overlays = FALSE
|
||||
var/swaps_to = /obj/item/weapon/cell/device/weapon/recharge/alien
|
||||
|
||||
/obj/item/weapon/cell/void/attack_self(var/mob/user)
|
||||
@@ -40,9 +38,6 @@
|
||||
newcell.charge = newcell.maxcharge * percentage
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/cell/void/update_icon()
|
||||
return
|
||||
|
||||
// Bloo friendlier hybrid tech
|
||||
/obj/item/weapon/cell/device/weapon/recharge/alien/hybrid
|
||||
icon = 'icons/obj/power_vr.dmi'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "modified power cell"
|
||||
desc = "A modified power cell sitting in a highly conductive chassis."
|
||||
origin_tech = list(TECH_POWER = 2)
|
||||
icon_state = "spikecell"
|
||||
icon_state = "exs_m"
|
||||
maxcharge = 10000
|
||||
matter = list(MAT_STEEL = 1000, MAT_GLASS = 80, MAT_SILVER = 100)
|
||||
self_recharge = TRUE
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "\improper rechargable AA battery"
|
||||
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
|
||||
origin_tech = list(TECH_POWER = 0)
|
||||
icon_state = "s_st"
|
||||
maxcharge = 500
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 40)
|
||||
|
||||
@@ -12,6 +13,7 @@
|
||||
/obj/item/weapon/cell/secborg
|
||||
name = "security borg rechargable D battery"
|
||||
origin_tech = list(TECH_POWER = 0)
|
||||
icon_state = "meb_s_st"
|
||||
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 40)
|
||||
|
||||
@@ -23,13 +25,14 @@
|
||||
/obj/item/weapon/cell/apc
|
||||
name = "heavy-duty power cell"
|
||||
origin_tech = list(TECH_POWER = 1)
|
||||
icon_state = "meb_b_st"
|
||||
maxcharge = 5000
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 50)
|
||||
|
||||
/obj/item/weapon/cell/high
|
||||
name = "high-capacity power cell"
|
||||
origin_tech = list(TECH_POWER = 2)
|
||||
icon_state = "hcell"
|
||||
icon_state = "b_hi"
|
||||
maxcharge = 10000
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 60)
|
||||
|
||||
@@ -41,7 +44,7 @@
|
||||
/obj/item/weapon/cell/super
|
||||
name = "super-capacity power cell"
|
||||
origin_tech = list(TECH_POWER = 5)
|
||||
icon_state = "scell"
|
||||
icon_state = "b_sup"
|
||||
maxcharge = 20000
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 70)
|
||||
|
||||
@@ -53,7 +56,7 @@
|
||||
/obj/item/weapon/cell/hyper
|
||||
name = "hyper-capacity power cell"
|
||||
origin_tech = list(TECH_POWER = 6)
|
||||
icon_state = "hpcell"
|
||||
icon_state = "b_hy"
|
||||
maxcharge = 30000
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 80)
|
||||
|
||||
@@ -64,12 +67,13 @@
|
||||
|
||||
/obj/item/weapon/cell/mech
|
||||
name = "mecha power cell"
|
||||
icon_state = "exs_l"
|
||||
charge = 15000
|
||||
maxcharge = 15000
|
||||
|
||||
/obj/item/weapon/cell/infinite
|
||||
name = "infinite-capacity power cell!"
|
||||
icon_state = "icell"
|
||||
icon_state = "infinite_b"
|
||||
origin_tech = null
|
||||
maxcharge = 30000 //determines how badly mobs get shocked
|
||||
matter = list(MAT_STEEL = 700, MAT_GLASS = 80)
|
||||
@@ -89,6 +93,7 @@
|
||||
charge = 100
|
||||
maxcharge = 300
|
||||
minor_fault = 1
|
||||
standard_overlays = FALSE
|
||||
|
||||
/obj/item/weapon/cell/slime
|
||||
name = "charged slime core"
|
||||
@@ -100,13 +105,14 @@
|
||||
maxcharge = 10000
|
||||
matter = null
|
||||
self_recharge = TRUE
|
||||
standard_overlays = FALSE
|
||||
|
||||
//Not actually a cell, but if people look for it, they'll probably look near other cells
|
||||
/obj/item/device/fbp_backup_cell
|
||||
name = "backup battery"
|
||||
desc = "A small one-time-use chemical battery for synthetic crew when they are low on power in emergency situations."
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "fbp_cell"
|
||||
icon = 'icons/obj/power_cells.dmi'
|
||||
icon_state = "exs_s"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/amount = 100
|
||||
var/used = FALSE
|
||||
@@ -144,6 +150,7 @@
|
||||
desc = "A tiny power cell with a very low power capacity. Used in light fixtures to power them in the event of an outage."
|
||||
maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell
|
||||
matter = list(MAT_GLASS = 20)
|
||||
icon_state = "meb_s_sup"
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/weapon/cell/emergency_light/Initialize()
|
||||
|
||||
@@ -67,7 +67,7 @@ GLOBAL_LIST_EMPTY(fusion_cores)
|
||||
if(Output.get_pairing())
|
||||
reagents.trans_to_holder(Output.reagents, Output.reagents.maximum_volume)
|
||||
if(prob(5))
|
||||
visible_message("<span class='notice'>\The [src] gurgles as it exports fluid.</span>")
|
||||
visible_message("<b>\The [src]</b> gurgles as it exports fluid.")
|
||||
|
||||
if(owned_field)
|
||||
|
||||
@@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(fusion_cores)
|
||||
/obj/machinery/power/fusion_core/attack_hand(var/mob/user)
|
||||
if(!Adjacent(user)) // As funny as it was for the AI to hug-kill the tokamak field from a distance...
|
||||
return
|
||||
visible_message("<span class='notice'>\The [user] hugs \the [src] to make it feel better!</span>")
|
||||
visible_message("<b>\The [user]</b> hugs \the [src] to make it feel better!")
|
||||
if(owned_field)
|
||||
Shutdown()
|
||||
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
to_chat(user, "<span class='warning'>You need at least three hundred units of material to form a fuel rod.</span>")
|
||||
return 1
|
||||
var/datum/reagent/R = thing.reagents.reagent_list[1]
|
||||
visible_message("<span class='notice'>\The [src] compresses the contents of \the [thing] into a new fuel assembly.</span>")
|
||||
visible_message("<b>\The [src]</b> compresses the contents of \the [thing] into a new fuel assembly.")
|
||||
var/obj/item/weapon/fuel_assembly/F = new(get_turf(src), R.id, R.color)
|
||||
thing.reagents.remove_reagent(R.id, R.volume)
|
||||
user.put_in_hands(F)
|
||||
|
||||
else if(istype(thing, /obj/machinery/power/supermatter))
|
||||
var/obj/item/weapon/fuel_assembly/F = new(get_turf(src), "supermatter")
|
||||
visible_message("<span class='notice'>\The [src] compresses \the [thing] into a new fuel assembly.</span>")
|
||||
visible_message("<b>\The [src]</b> compresses \the [thing] into a new fuel assembly.")
|
||||
qdel(thing)
|
||||
user.put_in_hands(F)
|
||||
return 1
|
||||
@@ -58,7 +58,7 @@
|
||||
to_chat(user, "<span class='warning'>You need at least 25 [mat.sheet_plural_name] to make a fuel rod.</span>")
|
||||
return
|
||||
var/obj/item/weapon/fuel_assembly/F = new(get_turf(src), mat.name)
|
||||
visible_message("<span class='notice'>\The [src] compresses the [mat.use_name] into a new fuel assembly.</span>")
|
||||
visible_message("<b>\The [src]</b> compresses the [mat.use_name] into a new fuel assembly.")
|
||||
M.use(FUSION_ROD_SHEET_AMT)
|
||||
user.put_in_hands(F)
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
|
||||
|
||||
if(cur_assembly)
|
||||
cur_assembly.forceMove(get_turf(src))
|
||||
visible_message("<span class='notice'>\The [user] swaps \the [src]'s [cur_assembly] for \a [W].</span>")
|
||||
visible_message("<b>\The [user]</b> swaps \the [src]'s [cur_assembly] for \a [W].")
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] inserts \a [W] into \the [src].</span>")
|
||||
visible_message("<b>\The [user]</b> inserts \a [W] into \the [src].")
|
||||
|
||||
user.drop_from_inventory(W)
|
||||
W.forceMove(src)
|
||||
@@ -92,7 +92,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
|
||||
if(cur_assembly)
|
||||
cur_assembly.forceMove(get_turf(src))
|
||||
user.put_in_hands(cur_assembly)
|
||||
visible_message("<span class='notice'>\The [user] removes \the [cur_assembly] from \the [src].</span>")
|
||||
visible_message("<b>\The [user]</b> removes \the [cur_assembly] from \the [src].")
|
||||
cur_assembly = null
|
||||
return
|
||||
else
|
||||
|
||||
@@ -240,3 +240,44 @@
|
||||
. = ..()
|
||||
cell = new /obj/item/weapon/cell/void/hybrid(src)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
// Kugelblitz generator, confined black hole like a singulo but smoller and higher tech
|
||||
// Presumably whoever made these has better tech than most
|
||||
/obj/machinery/power/rtg/kugelblitz
|
||||
name = "kugelblitz generator"
|
||||
desc = "A power source harnessing a small black hole."
|
||||
icon = 'icons/obj/structures/decor64x64.dmi'
|
||||
icon_state = "bigdice"
|
||||
bound_width = 64
|
||||
bound_height = 64
|
||||
power_gen = 30000
|
||||
irradiate = FALSE // Green energy!
|
||||
can_buckle = FALSE
|
||||
|
||||
/obj/machinery/power/rtg/kugelblitz/proc/asplod()
|
||||
visible_message("<span class='danger'>\The [src] lets out an shower of sparks as it starts to lose stability!</span>",\
|
||||
"<span class='italics'>You hear a loud electrical crack!</span>")
|
||||
playsound(src, 'sound/effects/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
var/turf/T = get_turf(src)
|
||||
qdel(src)
|
||||
new /obj/singularity(T)
|
||||
|
||||
/obj/machinery/power/rtg/kugelblitz/blob_act(obj/structure/blob/B)
|
||||
asplod()
|
||||
|
||||
/obj/machinery/power/rtg/kugelblitz/ex_act()
|
||||
asplod()
|
||||
|
||||
/obj/machinery/power/rtg/kugelblitz/fire_act(exposed_temperature, exposed_volume)
|
||||
asplod()
|
||||
|
||||
/obj/machinery/power/rtg/kugelblitz/tesla_act()
|
||||
..() //extend the zap
|
||||
asplod()
|
||||
|
||||
/obj/machinery/power/rtg/kugelblitz/bullet_act(obj/item/projectile/Proj)
|
||||
. = ..()
|
||||
if(istype(Proj) && !Proj.nodamage && ((Proj.damage_type == BURN) || (Proj.damage_type == BRUTE)) && Proj.damage >= 20)
|
||||
log_and_message_admins("[ADMIN_LOOKUPFLW(Proj.firer)] triggered a kugelblitz core explosion at [x],[y],[z] via projectile.")
|
||||
asplod()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(W.is_screwdriver())
|
||||
panel_open = !panel_open
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
visible_message("<span class='notice'>\The [user] adjusts \the [src]'s mechanisms.</span>")
|
||||
visible_message("<b>\The [user]</b> adjusts \the [src]'s mechanisms.")
|
||||
if(panel_open && do_after(user, 30))
|
||||
to_chat(user, "<span class='notice'>\The [src] looks like it could be modified.</span>")
|
||||
if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
|
||||
@@ -41,10 +41,10 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src]'s mechanisms look secure.</span>")
|
||||
if(istype(W, /obj/item/weapon/smes_coil/super_io) && panel_open)
|
||||
visible_message("<span class='notice'>\The [user] begins to modify \the [src] with \the [W].</span>")
|
||||
visible_message("<b>\The [user]</b> begins to modify \the [src] with \the [W].")
|
||||
if(do_after(user, 300))
|
||||
user.drop_from_inventory(W)
|
||||
visible_message("<span class='notice'>\The [user] installs \the [W] onto \the [src].</span>")
|
||||
visible_message("<b>\The [user]</b> installs \the [W] onto \the [src].")
|
||||
qdel(W)
|
||||
var/turf/T = get_turf(src)
|
||||
var/new_machine = /obj/machinery/particle_smasher
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
recipes = typesof(/datum/particle_smasher_recipe)
|
||||
|
||||
if(!target) // You are just blasting an empty machine.
|
||||
visible_message("<span class='notice'>\The [src] shudders.</span>")
|
||||
visible_message("<b>\The [src]</b> shudders.")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user