Minor Emitter Tweaks

Emitters no longer die by shooting a taser or laser tag gun at it.
Emitters don't explode if they are not on a powered wire with sufficient electricity in it.  They will just crumple away instead if integrity is reduced to zero.
Taking any damage to the emitter no longer results in instant death due to me being an idiot awhile ago.
Emitters can be examined to see if they are damaged, and can be repaired by applying metal sheets to it.
This commit is contained in:
Neerti
2016-08-29 01:08:31 -04:00
parent 9ec97910b4
commit 267b5fd17d
2 changed files with 75 additions and 3 deletions
+37 -3
View File
@@ -200,6 +200,25 @@
user << "<span class='warning'>You need more welding fuel to complete this task.</span>"
return
if(istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL)
var/amt = Ceiling(( initial(integrity) - integrity)/10)
if(!amt)
user << "<span class='notice'>\The [src] is already fully repaired.</span>"
return
var/obj/item/stack/P = W
if(P.amount < amt)
user << "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>"
return
user << "<span class='notice'>You begin repairing \the [src]...</span>"
if(do_after(user, 30))
if(P.use(amt))
user << "<span class='notice'>You have repaired \the [src].</span>"
integrity = initial(integrity)
return
else
user << "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>"
return
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
if(emagged)
user << "<span class='warning'>The lock seems to be broken.</span>"
@@ -225,10 +244,25 @@
return 1
/obj/machinery/power/emitter/bullet_act(var/obj/item/projectile/P)
if(!P || !P.damage || (!P.damage_type == BRUTE || !P.damage_type == BURN) )
if(!P || !P.damage || P.get_structure_damage() <= 0 )
return
integrity = integrity - P.damage
if(integrity >= 0)
explosion(get_turf(src), 1, 2, 4)
if(integrity <= 0)
if(powernet && avail(active_power_usage)) // If it's powered, it goes boom if killed.
visible_message(src, "<span class='danger'>\The [src] explodes violently!</span>", "<span class='danger'>You hear an explosion!</span>")
explosion(get_turf(src), 1, 2, 4)
else
src.visible_message("<span class='danger'>\The [src] crumples apart!</span>", "<span class='warning'>You hear metal collapsing.</span>")
qdel(src)
/obj/machinery/power/emitter/examine(mob/user)
..()
var/integrity_percentage = round((integrity / initial(integrity)) * 100)
switch(integrity_percentage)
if(0 to 30)
user << "<span class='danger'>\The [src] is close to falling apart!</span>"
if(31 to 70)
user << "<span class='danger'>\The [src] is damaged.</span>"
if(77 to 99)
user << "<span class='warning'>\The [src] is slightly damaged.</span>"
@@ -0,0 +1,38 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Neerti
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Emitters can be examined to see if they are damaged. They can also be repaired by applying metal sheets to them."
- tweak: "Emitters now only explode on death if they are on a powered wire with significant power flowing through it."
- bugfix: "Emitters don't explode in one hit, or by tasers or non-damaging projectiles anymore."