mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] Fixing Energy Gun Weapon Description Runtimes + Miscellaneous Weapon Description Fixes, Take 2 (#6850)
* Fixing Energy Gun Weapon Description Runtimes + Miscellaneous Weapon Description Fixes, Take 2 (#59778) Fixes a runtime issue cause by the possibility of loaded_projectile being null by changing how projectile stats are obtained on energy weapons, and adds a separate line for energy ammo types that deal stamina damage and regular damage to incorporate both damage types * Fixing Energy Gun Weapon Description Runtimes + Miscellaneous Weapon Description Fixes, Take 2 Co-authored-by: Beatrice <83368538+SpaceDragon00@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#define HITS_TO_CRIT(damage) round(100 / damage, 0.1)
|
||||
/**
|
||||
*
|
||||
* The purpose of this element is to widely provide the ability to examine an object and determine its damage, with the ability to add
|
||||
* The purpose of this element is to widely provide the ability to examine an object and determine its stats, with the ability to add
|
||||
* additional notes or information based on type or other factors
|
||||
*
|
||||
*/
|
||||
@@ -42,7 +43,7 @@
|
||||
/datum/element/weapon_description/proc/warning_label(obj/item/item, mob/user, list/examine_texts)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(item.force >= 5 || item.throwforce >= 5 || item.override_notes || item.offensive_notes) /// Only show this tag for items that could feasibly be weapons, shields, or those that have special notes
|
||||
if(item.force >= 5 || item.throwforce >= 5 || item.override_notes || item.offensive_notes || attached_proc) /// Only show this tag for items that could feasibly be weapons, shields, or those that have special notes
|
||||
examine_texts += span_notice("It appears to have an ever-updating bluespace <a href='?src=[REF(item)];examine=1'>warning label.</a>")
|
||||
|
||||
/**
|
||||
@@ -82,12 +83,12 @@
|
||||
if(!source.override_notes)
|
||||
// Make sure not to divide by 0 on accident
|
||||
if(source.force > 0)
|
||||
readout += "Our extensive research has shown that it takes a mere [span_warning("[round((100 / source.force), 0.1)]")] hit\s to beat down [victims[rand(1, victims.len)]] with no armor."
|
||||
readout += "Our extensive research has shown that it takes a mere [span_warning("[HITS_TO_CRIT(source.force)] hit\s")] to beat down [victims[rand(1, victims.len)]] with no armor."
|
||||
else
|
||||
readout += "Our extensive research found that you couldn't beat anyone to death with this if you tried."
|
||||
|
||||
if(source.throwforce > 0)
|
||||
readout += "If you decide to throw this object instead, one will take [span_warning("[round((100 / source.throwforce), 0.1)]")] hit\s before collapsing."
|
||||
readout += "If you decide to throw this object instead, one will take [span_warning("[HITS_TO_CRIT(source.throwforce)] hit\s")] before collapsing."
|
||||
else
|
||||
readout += "If you decide to throw this object instead, then you will have trouble damaging anything."
|
||||
if(source.armour_penetration > 0 || source.block_chance > 0)
|
||||
|
||||
Reference in New Issue
Block a user