Fixes Examine Crashes (#17430)

* Fixes Examine Crashes

* fukken indentations
This commit is contained in:
Wowzewow (Wezzy)
2023-09-27 10:22:04 +00:00
committed by GitHub
parent 725d999680
commit fd26ff32e2
32 changed files with 147 additions and 136 deletions
@@ -12,10 +12,10 @@
var/light_firing_sound = 'sound/effects/explosionfar.ogg' //The sound played when you're a few walls away. Kind of loud.
var/projectile_type = /obj/item/projectile/ship_ammo
var/special_firing_mechanism = FALSE //If set to TRUE, the gun won't show up on normal controls.
var/charging_sound //The sound played when the gun is charging up.
var/charging_sound //The sound played when the gun is charging up.
var/caliber = SHIP_CALIBER_NONE
var/use_ammunition = TRUE //If we use physical ammo or not. Note that the creation of ammunition in pre_fire() is still REQUIRED!
//This just skips the initial check for ammunition.
var/use_ammunition = TRUE //If we use physical ammo or not. Note that the creation of ammunition in pre_fire() is still REQUIRED!
//This just skips the initial check for ammunition.
var/list/obj/item/ship_ammunition/ammunition = list()
var/ammo_per_shot = 1
var/max_ammo = 1
@@ -274,16 +274,22 @@
. = ..()
/obj/structure/ship_weapon_dummy/examine(mob/user)
connected.examine(user)
if(connected)
return connected.examine(user)
else
return TRUE
/obj/structure/ship_weapon_dummy/attack_hand(mob/user)
connected.attack_hand(user)
if(connected)
connected.attack_hand(user)
/obj/structure/ship_weapon_dummy/attackby(obj/item/W, mob/user)
connected.attackby(W, user)
if(connected)
connected.attackby(W, user)
/obj/structure/ship_weapon_dummy/hitby(atom/movable/AM, var/speed = THROWFORCE_SPEED_DIVISOR)
connected.hitby(AM)
if(connected)
connected.hitby(AM)
if(ismob(AM))
if(isliving(AM))
var/mob/living/M = AM