diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 633d40e84cd..030f4890756 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -367,6 +367,13 @@ var/list/uplink_items = list() cost = 3 surplus = 10 +/datum/uplink_item/stealthy_weapons/pizza_bomb + name = "Pizza Bomb" + desc = "A pizza box with a bomb taped inside of it. The timer needs to be set by opening the box; afterwards, opening the box again will trigger the detonation." + item = /obj/item/device/pizza_bomb + cost = 4 + surplus = 8 + // STEALTHY TOOLS /datum/uplink_item/stealthy_tools diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 18e6e16ebac..a0ef6a5fc31 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -274,6 +274,14 @@ /obj/item/weapon/bombcore/badmin/explosion/detonate() explosion(get_turf(src),HeavyExplosion,MediumExplosion,LightExplosion, flame_range = Flames) +/obj/item/weapon/bombcore/miniature + name = "small bomb core" + w_class = 2 + +/obj/item/weapon/bombcore/miniature/detonate() + explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb + qdel(src) + ///Syndicate Detonator (aka the big red button)/// /obj/item/device/syndicatedetonator diff --git a/code/game/objects/items/devices/pizza_bomb.dm b/code/game/objects/items/devices/pizza_bomb.dm new file mode 100644 index 00000000000..426792efc46 --- /dev/null +++ b/code/game/objects/items/devices/pizza_bomb.dm @@ -0,0 +1,101 @@ +/obj/item/device/pizza_bomb + name = "pizza box" + desc = "A box suited for pizzas." + icon = 'icons/obj/food.dmi' + icon_state = "pizzabox1" + var/timer = 10 //Adjustable timer + var/timer_set = 0 + var/primed = 0 + var/disarmed = 0 + var/wires = list("orange", "green", "blue", "yellow", "aqua", "purple") + var/correct_wire + var/armer //Used for admin purposes + +/obj/item/device/pizza_bomb/attack_self(mob/user) + if(disarmed) + user << "\The [src] is disarmed." + return + if(!timer_set) + name = "pizza bomb" + desc = "It seems inactive." + icon_state = "pizzabox_bomb" + timer_set = 1 + timer = (input(user, "Set a timer, from one second to ten seconds.", "Timer", "[timer]") as num) * 10 + if(!user.canUseTopic(src)) + timer_set = 0 + name = "pizza box" + desc = "A box suited for pizzas." + icon_state = "pizzabox1" + return + timer = Clamp(timer, 10, 100) + icon_state = "pizzabox1" + user << "You set the timer to [timer / 10] before activating the payload and closing \the [src]." + message_admins("[key_name(usr)]? has set a timer on a pizza bomb to [timer/10] seconds at (JMP).") + log_game("[key_name(usr)] has set the timer on a pizza bomb to [timer/10] seconds ([loc.x],[loc.y],[loc.z]).") + armer = usr + name = "pizza box" + desc = "A box suited for pizzas." + return + if(!primed) + name = "pizza bomb" + desc = "OH GOD THAT'S NOT A PIZZA" + icon_state = "pizzabox_bomb" + audible_message("\icon[src] *beep* *beep*") + user << "That's no pizza! That's a bomb!" + message_admins("[key_name(usr)]? has triggered a pizza bomb armed by [armer] at (JMP).") + log_game("[key_name(usr)] has triggered a pizza bomb armed by [armer] ([loc.x],[loc.y],[loc.z]).") + primed = 1 + sleep(timer) + return go_boom() + +/obj/item/device/pizza_bomb/proc/go_boom() + if(disarmed) + visible_message("\icon[src] Sparks briefly jump out of the [correct_wire] wire on \the [src], but it's disarmed!") + return + src.audible_message("\icon[src] [src] beeps, \"Enjoy the pizza!\"") + src.visible_message("\The [src] violently explodes!") + explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb + qdel(src) + +/obj/item/device/pizza_bomb/attackby(var/obj/item/I, var/mob/user, params) + if(istype(I, /obj/item/weapon/wirecutters) && primed) + user << "Oh God, what wire do you cut?!" + var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires + if(!user.canUseTopic(src)) + return + playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1) + user.visible_message("[user] cuts the [chosen_wire] wire!", "You cut the [chosen_wire] wire!") + sleep(5) + if(chosen_wire == correct_wire) + src.audible_message("\icon[src] \The [src] suddenly stops beeping and seems lifeless.") + user << "You did it!" + icon_state = "pizzabox_bomb_[correct_wire]" + name = "pizza bomb" + desc = "A devious contraption, made of a small explosive payload hooked up to pressure-sensitive wires. It's disarmed." + disarmed = 1 + primed = 0 + return + else + user << "WRONG WIRE!" + go_boom() + return + if(istype(I, /obj/item/weapon/wirecutters) && disarmed) + if(!in_range(user, src)) + user << "You can't see the box well enough to cut the wires out." + return + user.visible_message("[user] starts removing the payload and wires from \the [src].") + if(do_after(user, 40)) + playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1) + user.unEquip(src) + user.visible_message("[user] removes the insides of \the [src]!") + var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(src.loc) + C.amount = 3 + new /obj/item/weapon/bombcore/miniature(src.loc) + new /obj/item/pizzabox(src.loc) + qdel(src) + return + ..() + +/obj/item/device/pizza_bomb/New() + ..() + correct_wire = pick(wires) diff --git a/html/changelogs/Xhuis-PizzaBomb.yml b/html/changelogs/Xhuis-PizzaBomb.yml new file mode 100644 index 00000000000..78fb28b6cf3 --- /dev/null +++ b/html/changelogs/Xhuis-PizzaBomb.yml @@ -0,0 +1,5 @@ +author: Xhuis +delete-after: true + +changes: + - rscadd: "Adds a pizza bomb traitor item for 4 telecrystals. It's a bomb, diguised as a pizza box. You can also attempt to defuse it by using wirecutters." \ No newline at end of file diff --git a/icons/obj/food.dmi b/icons/obj/food.dmi index 89112e632d9..ea2ab69f5ff 100644 Binary files a/icons/obj/food.dmi and b/icons/obj/food.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 1843f02fe78..bd612a48f11 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -561,6 +561,7 @@ #include "code\game\objects\items\devices\multitool.dm" #include "code\game\objects\items\devices\paicard.dm" #include "code\game\objects\items\devices\pipe_painter.dm" +#include "code\game\objects\items\devices\pizza_bomb.dm" #include "code\game\objects\items\devices\powersink.dm" #include "code\game\objects\items\devices\recaller.dm" #include "code\game\objects\items\devices\scanners.dm"