mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Merge pull request #4342 from QuinnAggeler/turrets-fix
Gun_turret code cleanup, easier to add new kinds of turrets
This commit is contained in:
@@ -402,6 +402,8 @@
|
||||
var/scan_range = 9 //You will never see them coming
|
||||
var/health = 200 //Because it lacks a cover, and is mostly to keep people from touching the syndie shuttle.
|
||||
var/bullet_type = /obj/item/projectile/bullet
|
||||
var/firing_sound = 'sound/weapons/Gunshot3.ogg'
|
||||
var/base_icon = "syndieturret"
|
||||
icon = 'icons/obj/turrets.dmi'
|
||||
icon_state = "syndieturret0"
|
||||
|
||||
@@ -425,7 +427,7 @@
|
||||
/obj/machinery/gun_turret/update_icon()
|
||||
if(state > 2 || state < 0) //someone fucked up the vars so fix them
|
||||
take_damage(0)
|
||||
icon_state = "syndieturret" + "[state]"
|
||||
icon_state = "[base_icon]" + "[state]"
|
||||
return
|
||||
|
||||
|
||||
@@ -547,7 +549,7 @@
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
playsound(get_turf(src), 'sound/weapons/Gunshot3.ogg', 60, 1)
|
||||
playsound(get_turf(src), firing_sound, 60, 1)
|
||||
var/obj/item/projectile/A = new bullet_type(curloc)
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
@@ -576,4 +578,4 @@
|
||||
name = "machine gun turret (4.6x30mm)"
|
||||
desc = "Syndicate exterior defense turret chambered for 4.6x30mm rounds. Designed to be fitted to assault pods, it uses low calliber bullets to save space."
|
||||
health = 100
|
||||
bullet_type = /obj/item/projectile/bullet/weakbullet3
|
||||
bullet_type = /obj/item/projectile/bullet/weakbullet3
|
||||
|
||||
Reference in New Issue
Block a user