From c12519307a3fa7304e7dfa8ff71c6b4f85677317 Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Tue, 12 Dec 2023 14:24:42 -0600 Subject: [PATCH] adds a new tot item, the syndicate pop-up turret (#23347) * adds a new tot item, the syndicate pop-up turret * Update code/datums/uplink_items/uplink_general.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/game/machinery/portable_turret.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/datums/uplink_items/uplink_general.dm | 7 +++ code/game/machinery/deployable.dm | 17 +++++++ code/game/machinery/portable_turret.dm | 58 ++++++++++++++++++++++ 3 files changed, 82 insertions(+) diff --git a/code/datums/uplink_items/uplink_general.dm b/code/datums/uplink_items/uplink_general.dm index 244ee44832d..5005f9e4ffd 100644 --- a/code/datums/uplink_items/uplink_general.dm +++ b/code/datums/uplink_items/uplink_general.dm @@ -231,6 +231,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/batterer cost = 25 +/datum/uplink_item/dangerous/porta_turret + name = "Portable Turret" + desc = "A pop-up syndicate turret, shoots anyone who didn't prime the grenade. The turret cannot be moved after it's deployed." + reference = "MIS" + item = /obj/item/grenade/turret + cost = 20 + // Ammunition /datum/uplink_item/ammo diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index f62062ffd1a..259bd3394d8 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -414,6 +414,23 @@ for(var/I in 1 to 5) new /obj/item/grenade/barrier/dropwall(src) +/obj/item/grenade/turret + name = "Pop-Up Turret grenade" + desc = "Inflates into a Pop-Up turret, shoots everyone on sight who wasn't the primer." + icon = 'icons/obj/grenade.dmi' + icon_state = "wallbang" + item_state = "flashbang" + var/owner_uid + +/obj/item/grenade/turret/attack_self(mob/user) + owner_uid = user.UID() + return ..() + +/obj/item/grenade/turret/prime() + var/obj/machinery/porta_turret/inflatable_turret/turret = new(get_turf(loc)) + turret.owner_uid = owner_uid + qdel(src) + #undef SINGLE #undef VERTICAL #undef HORIZONTAL diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 502705595f7..0519803a179 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -1147,3 +1147,61 @@ GLOBAL_LIST_EMPTY(turret_icons) /obj/machinery/porta_turret/syndicate/pod/nuke_ship_interior health = 100 + +/obj/machinery/porta_turret/inflatable_turret + name = "Syndicate Pop-Up Turret" + desc = "Looks cheaply made on the defensive side but the gun barrel still shoots." + projectile = /obj/item/projectile/bullet/weakbullet3 + eprojectile = /obj/item/projectile/bullet/weakbullet3 + icon_state = "syndieturret0" + shot_sound = 'sound/weapons/gunshots/gunshot_mg.ogg' + eshot_sound = 'sound/weapons/gunshots/gunshot_mg.ogg' + health = 50 + syndicate = TRUE + installation = null + always_up = TRUE + requires_power = FALSE + power_state = NO_POWER_USE + has_cover = FALSE + raised = TRUE + scan_range = 9 + + faction = "syndicate" + emp_vulnerable = FALSE + + lethal = TRUE + lethal_is_configurable = FALSE + targetting_is_configurable = FALSE + check_arrest = FALSE + check_records = FALSE + check_weapons = FALSE + check_access = FALSE + check_anomalies = TRUE + check_synth = TRUE + ailock = TRUE + var/owner_uid + var/icon_state_initial = "syndieturret0" + var/icon_state_active = "syndieturret1" + var/icon_state_destroyed = "syndieturret2" + +/obj/machinery/porta_turret/inflatable_turret/assess_and_assign(atom/movable/AM, list/targets, list/secondarytargets) + if(AM.UID() == owner_uid) + return + . = ..() + +/obj/machinery/porta_turret/inflatable_turret/setup() + return + +/obj/machinery/porta_turret/inflatable_turret/update_icon_state() + if(stat & BROKEN) + icon_state = icon_state_destroyed + else if(enabled) + icon_state = icon_state_active + else + icon_state = icon_state_initial + +/obj/machinery/porta_turret/inflatable_turret/CanPass(atom/A) + return ((stat & BROKEN) || !isliving(A)) + +/obj/machinery/porta_turret/inflatable_turret/CanPathfindPass(obj/item/card/id/ID, to_dir, atom/movable/caller, no_id = FALSE) + return ((stat & BROKEN) || !isliving(caller))