Merge pull request #2214 from Yoshax/packagebombs

(Re-)adds package bombs
This commit is contained in:
Neerti
2016-07-27 16:26:44 -04:00
committed by GitHub
6 changed files with 121 additions and 44 deletions

View File

@@ -16,9 +16,26 @@
/datum/uplink_item/item/tools/plastique
name = "C-4 (Destroys walls)"
item_cost = 20
item_cost = 10
path = /obj/item/weapon/plastique
/datum/uplink_item/item/tools/packagebomb
name = "Package Bomb (Small)"
item_cost = 20
path = /obj/item/weapon/storage/box/syndie_kit/demolitions
/datum/uplink_item/item/tools/packagebomb/large
name = "Package Bomb (Large)"
item_cost = 40
path = /obj/item/weapon/storage/box/syndie_kit/demolitions_heavy
/*
/datum/uplink_item/item/tools/packagebomb/huge
name = "Package Bomb (Huge)
item_cost = 60
path = /obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy
*/
/datum/uplink_item/item/tools/encryptionkey_radio
name = "Encrypted Radio Channel Key"
item_cost = 20

View File

@@ -266,3 +266,18 @@
new /obj/item/clothing/gloves/arm_guard/combat(src)
new /obj/item/clothing/shoes/leg_guard/combat(src)
return
/obj/item/weapon/storage/box/syndie_kit/demolitions/New()
..()
new /obj/item/weapon/syndie/c4explosive(src)
new /obj/item/weapon/screwdriver(src)
/obj/item/weapon/storage/box/syndie_kit/demolitions_heavy/New()
..()
new /obj/item/weapon/syndie/c4explosive/heavy(src)
new /obj/item/weapon/screwdriver(src)
/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy/New()
..()
new /obj/item/weapon/syndie/c4explosive/heavy/super_heavy(src)
new /obj/item/weapon/screwdriver(src)

View File

@@ -23,19 +23,23 @@
power = 2
size = "large"
/obj/item/weapon/syndie/c4explosive/heavy/super_heavy
name = "large-sized package"
desc = "A mysterious package, it's quite exceptionally heavy."
power = 3
/obj/item/weapon/syndie/c4explosive/New()
var/K = rand(1,2000)
K = md5(num2text(K)+name)
K = copytext(K,1,7)
src.desc += "\n You see [K] engraved on \the [src]."
var/obj/item/weapon/syndie/c4detonator/detonator = new(src.loc)
detonator.desc += "\n You see [K] engraved on the lighter."
desc += "\n You see [K] engraved on \the [src]."
var/obj/item/weapon/flame/lighter/zippo/c4detonator/detonator = new(src.loc)
detonator.desc += " You see [K] engraved on the lighter."
detonator.bomb = src
/obj/item/weapon/syndie/c4explosive/proc/detonate()
icon_state = "c-4[size]_1"
spawn(50)
explosion(get_turf(src), power, power*2, power*3, power*4, power*4)
explosion(get_turf(src), power, power*2, power*3, power*4, power*5)
for(var/dirn in cardinal) //This is to guarantee that C4 at least breaks down all immediately adjacent walls and doors.
var/turf/simulated/wall/T = get_step(src,dirn)
if(locate(/obj/machinery/door/airlock) in T)
@@ -50,35 +54,39 @@
/*Detonator, disguised as a lighter*/
/*Click it when closed to open, when open to bring up a prompt asking you if you want to close it or press the button.*/
/obj/item/weapon/syndie/c4detonator
icon_state = "c-4detonator_0"
item_state = "zippo"
name = "\improper Zippo lighter" /*Sneaky, thanks Dreyfus.*/
desc = "The zippo."
w_class = 1
/obj/item/weapon/flame/lighter/zippo/c4detonator
var/detonator_mode = 0
var/obj/item/weapon/syndie/c4explosive/bomb
var/pr_open = 0 /*Is the "What do you want to do?" prompt open?*/
/obj/item/weapon/syndie/c4detonator/attack_self(mob/user as mob)
switch(src.icon_state)
if("c-4detonator_0")
src.icon_state = "c-4detonator_1"
user << "You flick open the lighter."
/obj/item/weapon/flame/lighter/zippo/c4detonator/attack_self(mob/user as mob)
if(!detonator_mode)
..()
if("c-4detonator_1")
if(!pr_open)
pr_open = 1
else if(!lit)
base_state = icon_state
lit = 1
icon_state = "[base_state]1"
//item_state = "[base_state]on"
user.visible_message("<span class='rose'>Without even breaking stride, \the [user] flips open \the [src] in one smooth movement.</span>")
else if(lit && detonator_mode)
switch(alert(user, "What would you like to do?", "Lighter", "Press the button.", "Close the lighter."))
if("Press the button.")
user << "<span class='warning'>You press the button.</span>"
flick("c-4detonator_click", src)
icon_state = "[base_state]click"
if(src.bomb)
src.bomb.detonate()
log_admin("[key_name(user)] has triggered [src.bomb] with [src].")
message_admins("<span class='danger'>[key_name_admin(user)] has triggered [src.bomb] with [src].</span>")
if("Close the lighter.")
src.icon_state = "c-4detonator_0"
user << "You close the lighter."
pr_open = 0
lit = 0
icon_state = "[base_state]"
//item_state = "[base_state]"
user.visible_message("<span class='rose'>You hear a quiet click, as \the [user] shuts off \the [src] without even looking at what they're doing.</span>")
/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
detonator_mode = !detonator_mode
user << "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>"

View File

@@ -0,0 +1,36 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: N3X15
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "A new item has been added to the uplink. Package bombs. These come in two variants, small and big, which cost 20 TC and 40 TC respectively. These come in a box with an explosive, a disguised detonator and a screwdriver. The use the detonator you muse apply the screwdriver to configure it into detonator mode. This must be done when it is closed."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -827,6 +827,7 @@
#include "code\game\objects\items\weapons\stunbaton.dm"
#include "code\game\objects\items\weapons\surgery_tools.dm"
#include "code\game\objects\items\weapons\swords_axes_etc.dm"
#include "code\game\objects\items\weapons\syndie.dm"
#include "code\game\objects\items\weapons\tape.dm"
#include "code\game\objects\items\weapons\teleportation.dm"
#include "code\game\objects\items\weapons\tools.dm"