Fixes plastic explosive issues (#31549)
This commit is contained in:
committed by
CitadelStationBot
parent
06061f0870
commit
4fe003af83
@@ -2,11 +2,15 @@
|
||||
name = "plastic explosive"
|
||||
desc = "Used to put holes in specific areas without too much extra hole."
|
||||
icon_state = "plastic-explosive0"
|
||||
item_state = "plasticx"
|
||||
item_state = "plastic-explosive"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
|
||||
flags_1 = NOBLUDGEON_1
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
det_time = 10
|
||||
display_timer = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "syndicate=1"
|
||||
var/atom/target = null
|
||||
var/mutable_appearance/plastic_overlay
|
||||
var/obj/item/device/assembly_holder/nadeassembly = null
|
||||
@@ -16,7 +20,7 @@
|
||||
var/boom_sizes = list(0, 0, 3)
|
||||
|
||||
/obj/item/grenade/plastic/New()
|
||||
plastic_overlay = mutable_appearance(icon, "[item_state]2")
|
||||
plastic_overlay = mutable_appearance(icon, "[item_state]2", HIGH_OBJ_LAYER)
|
||||
..()
|
||||
|
||||
/obj/item/grenade/plastic/Destroy()
|
||||
@@ -112,7 +116,7 @@
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [det_time] second fuse",0,1)
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(src)] with [det_time] second fuse")
|
||||
|
||||
target.add_overlay(plastic_overlay, 1)
|
||||
target.add_overlay(plastic_overlay, TRUE)
|
||||
if(!nadeassembly)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time*10)
|
||||
@@ -154,21 +158,12 @@
|
||||
name = "C4"
|
||||
desc = "Used to put holes in specific areas without too much extra hole. A saboteur's favorite."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "plastic-explosive0"
|
||||
item_state = "plasticx"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi'
|
||||
flags_1 = NOBLUDGEON_1
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "syndicate=1"
|
||||
var/timer = 10
|
||||
var/open_panel = 0
|
||||
|
||||
/obj/item/grenade/plastic/c4/New()
|
||||
wires = new /datum/wires/explosive/c4(src)
|
||||
..()
|
||||
plastic_overlay = mutable_appearance(icon, "plastic-explosive2")
|
||||
|
||||
/obj/item/grenade/plastic/c4/Destroy()
|
||||
qdel(wires)
|
||||
@@ -234,14 +229,14 @@
|
||||
if(!user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
src.target = AM
|
||||
forceMove(null)
|
||||
moveToNullspace()
|
||||
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [timer] second fuse"
|
||||
GLOB.bombers += message
|
||||
message_admins(message,0,1)
|
||||
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(target)] with [timer] second fuse")
|
||||
|
||||
target.add_overlay(plastic_overlay, 1)
|
||||
target.add_overlay(plastic_overlay, TRUE)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [timer].</span>")
|
||||
addtimer(CALLBACK(src, .proc/explode), timer * 10)
|
||||
|
||||
@@ -272,5 +267,6 @@
|
||||
desc = "A shaped high-explosive breaching charge. Designed to ensure user safety and wall nonsafety."
|
||||
icon_state = "plasticx40"
|
||||
item_state = "plasticx4"
|
||||
gender = PLURAL
|
||||
directional = TRUE
|
||||
boom_sizes = list(0, 2, 5)
|
||||
|
||||
Reference in New Issue
Block a user