Halligan Improvements (#33503)

* uses default crowbar behavior for unpowered airlocks

* shutter cutting

* halligan sound

* a

* sprites

* fix

* fix

* CE buffs

* adjustment

* fixes

* REEEE

* finally

* Review update

* ok
This commit is contained in:
west3436
2022-10-21 16:38:10 -04:00
committed by GitHub
parent da695eb774
commit f36b38cc50
6 changed files with 145 additions and 28 deletions

View File

@@ -1218,16 +1218,18 @@ About the new airlock wires panel:
return return
if(istype(I, /obj/item/tool/crowbar/halligan)) if(istype(I, /obj/item/tool/crowbar/halligan))
var/breaktime = 10 SECONDS var/breaktime = 10 SECONDS
if(locked && !lifted) if(!operating && density && src.arePowerSystemsOn() && !((stat) & NOPOWER) && !welded)
to_chat(user, "<span class='notice'>You begin to lift \the [src] out of its track, exposing the bolts.</span>") if(locked && !lifted)
if(do_after(user,src,breaktime)) to_chat(user, "<span class='notice'>You begin to lift \the [src] out of its track, exposing the bolts.</span>")
to_chat(user, "<span class='notice'>You begin to lift the airlock out of its track, exposing the bolts.</span>") playsound(src, 'sound/effects/rustle-metal.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) if(do_after(user,src,breaktime))
animate(src, pixel_y = pixel_y + 5, time = 1) to_chat(user, "<span class='notice'>You begin to lift the airlock out of its track, exposing the bolts.</span>")
lifted = TRUE playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
else animate(src, pixel_y = pixel_y + 5, time = 1)
pry(user) lifted = TRUE
return else
pry(user)
return
if (iswelder(I)) if (iswelder(I))
if (density && !operating) if (density && !operating)
var/obj/item/tool/weldingtool/WT = I var/obj/item/tool/weldingtool/WT = I

View File

@@ -6,6 +6,8 @@
var/sound_open = 'sound/machines/shutter_open.ogg' var/sound_open = 'sound/machines/shutter_open.ogg'
var/sound_close = 'sound/machines/shutter_close.ogg' var/sound_close = 'sound/machines/shutter_close.ogg'
animation_delay = 7 animation_delay = 7
var/cut_open = FALSE
var/pried_open = FALSE
/obj/machinery/door/poddoor/shutters/preopen /obj/machinery/door/poddoor/shutters/preopen
icon_state = "shutter0" icon_state = "shutter0"
@@ -13,23 +15,69 @@
opacity = 0 opacity = 0
layer = BELOW_TABLE_LAYER layer = BELOW_TABLE_LAYER
/obj/machinery/door/poddoor/shutters/attackby(var/obj/item/weapon/C, var/mob/user) /obj/machinery/door/poddoor/shutters/attackby(var/obj/item/I, var/mob/user)
add_fingerprint(user) add_fingerprint(user)
if(!(iscrowbar(C) || (istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) )) if(istype(I,/obj/item/tool/crowbar/halligan))
return var/obj/item/tool/crowbar/halligan/H = I
if(density && (stat & (FORCEDISABLE|NOPOWER)) && !operating) if(density && !pried_open) //can't cut an open door open
operating = 1 if(cut_open)
spawn(-1) pry(user)
flick("shutterc0", src) return
icon_state = "shutter0" else
sleep(animation_delay) cut(H,user)
plane = open_plane return
layer = open_layer if(istype(I,/obj/item/stack/sheet/metal))
setDensity(FALSE) var/obj/item/stack/sheet/metal/S = I
set_opacity(0) if(pried_open)
operating = 0 if(S.use(2))
to_chat(user, "<span class='notice'>You begin mending the damage to the [src].</span>")
if(do_after(user,src,3 SECONDS))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You finish mending the damage to the [src].</span>")
icon_state = "shutter2"
setDensity(TRUE)
set_opacity(1)
pried_open = FALSE
else
to_chat(user, "<span class='notice'>You need at least 2 sheets to mend the damage to the [src].</span>")
if(iswelder(I))
var/obj/item/tool/weldingtool/WT = I
if(cut_open || pried_open)
if(!pried_open)
weld(WT,user)
to_chat(user, "<span class='notice'>You finish welding the [src].</span>")
icon_state = "shutter1"
cut_open = FALSE
else
to_chat(user, "<span class='notice'>You need to add metal sheets first.</span>")
if(istype(I,/obj/item/weapon))
var/obj/item/weapon/C = I
if(!(iscrowbar(C) || (istype(C, /obj/item/weapon/fireaxe) && C.wielded == 1) ))
return
if(density && (stat & (FORCEDISABLE|NOPOWER)) && !operating)
operating = 1
spawn(-1)
flick("shutterc0", src)
icon_state = "shutter0"
sleep(animation_delay)
plane = open_plane
layer = open_layer
setDensity(FALSE)
set_opacity(0)
operating = 0
/obj/machinery/door/poddoor/shutters/open() /obj/machinery/door/poddoor/shutters/open()
if(cut_open && !pried_open)
icon_state = "shutter2"
setDensity(TRUE)
set_opacity(1)
return FALSE
if(pried_open)
icon_state = "shutter3"
setDensity(FALSE)
set_opacity(0)
return FALSE
if(!density) //it's already open bro if(!density) //it's already open bro
return FALSE return FALSE
if(operating == 1) //doors can still open when emag-disabled if(operating == 1) //doors can still open when emag-disabled
@@ -56,14 +104,25 @@
return 1 return 1
/obj/machinery/door/poddoor/shutters/close() /obj/machinery/door/poddoor/shutters/close()
if(cut_open && !pried_open)
icon_state = "shutter2"
setDensity(TRUE)
set_opacity(1)
return FALSE
if(pried_open)
icon_state = "shutter3"
setDensity(FALSE)
set_opacity(0)
return FALSE
if(operating) if(operating)
return return
operating = 1 operating = 1
plane = closed_plane plane = closed_plane
layer = closed_layer layer = closed_layer
flick("shutterc1", src)
icon_state = "shutter1" icon_state = "shutter1"
playsound(src.loc, sound_close, 100, 1) if(!cut_open && !pried_open)
flick("shutterc1", src)
playsound(src.loc, sound_close, 100, 1)
density = 1 density = 1
if(visible) if(visible)
set_opacity(1) set_opacity(1)
@@ -71,3 +130,52 @@
sleep(animation_delay) sleep(animation_delay)
operating = 0 operating = 0
/obj/machinery/door/poddoor/shutters/examine(mob/user)
..()
if(cut_open && !pried_open)
to_chat(user, "<span class='info'>A hole has been cut into \the [src]. It still needs to be pried open with a Halligan bar.</span>")
return
else if(pried_open)
to_chat(user, "<span class='info'>A hole has been cut into \the [src]. It can be repaired with metal and a welding tool.</span>")
/obj/machinery/door/poddoor/shutters/proc/cut(var/obj/item/tool/crowbar/halligan/T, mob/user as mob)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/breaktime = 30 SECONDS
if(H.get_strength() >= 2)
breaktime = 15 SECONDS
to_chat(user, "<span class='notice'>You begin cutting through \the [src].</span>")
if(!do_after(user, src, breaktime, 10, custom_checks = new /callback(T, /obj/item/weapon/fireaxe/proc/on_do_after)))
return
to_chat(user, "<span class='notice'>You finish cutting through \the [src].</span>")
cut_open = TRUE
icon_state = "shutter2"
/obj/machinery/door/poddoor/shutters/proc/pry(mob/user as mob)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/breaktime = 10 SECONDS
if(H.get_strength() >= 2)
breaktime = 5 SECONDS
to_chat(user, "<span class='notice'>You begin prying \the [src] open.</span>")
if(!do_after(user,src,breaktime))
return
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
to_chat(user, "<span class='notice'>You finish prying \the [src] open.</span>")
pried_open = TRUE
icon_state = "shutter3"
setDensity(FALSE)
set_opacity(0)
/obj/machinery/door/poddoor/shutters/proc/weld(var/obj/item/tool/weldingtool/WT, var/mob/user)
if(!WT.isOn())
return 0
to_chat(user, "<span class='notice'>You start to weld the [src]...</span>")
WT.playtoolsound(src, 50)
WT.eyecheck(user)
if(do_after(user, src, 20))
if(!WT.isOn())
return 0
return 1
return 0

View File

@@ -762,6 +762,11 @@
return 1 return 1
return 0 return 0
/obj/item/tool/crowbar/halligan/proc/on_do_after(mob/user, use_user_turf, user_original_location, atom/target, target_original_location, needhand, obj/item/originally_held_item)
. = do_after_default_checks(arglist(args))
if(.)
playsound(src,"sound/items/metal_impact.ogg",50,1)
/obj/item/tool/irons /obj/item/tool/irons
name = "set of irons" name = "set of irons"
desc = "Fireaxe and Halligan bar used for forcible entry." desc = "Fireaxe and Halligan bar used for forcible entry."

View File

@@ -38,7 +38,8 @@
/obj/item/clothing/glasses/scanner/material, /obj/item/clothing/glasses/scanner/material,
/obj/item/weapon/card/debit/preferred/department/engineering, /obj/item/weapon/card/debit/preferred/department/engineering,
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/gourmonger, /obj/item/weapon/reagent_containers/food/snacks/monkeycube/gourmonger,
/obj/item/tool/solder/screw /obj/item/tool/solder/screw,
/obj/item/tool/crowbar/halligan
) )
/obj/structure/closet/secure_closet/engineering_electrical /obj/structure/closet/secure_closet/engineering_electrical

View File

@@ -43,6 +43,7 @@
species_restricted = list("exclude",VOX_SHAPED) species_restricted = list("exclude",VOX_SHAPED)
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
clothing_flags = PLASMAGUARD clothing_flags = PLASMAGUARD
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/device/rcd, /obj/item/tool/wrench/socket, /obj/item/tool/irons)
cell_type = /obj/item/weapon/cell/super cell_type = /obj/item/weapon/cell/super
head_type = /obj/item/clothing/head/helmet/space/rig/engineer/elite head_type = /obj/item/clothing/head/helmet/space/rig/engineer/elite
@@ -388,7 +389,7 @@
slowdown = HARDSUIT_SLOWDOWN_HIGH slowdown = HARDSUIT_SLOWDOWN_HIGH
species_fit = list(GREY_SHAPED,INSECT_SHAPED) species_fit = list(GREY_SHAPED,INSECT_SHAPED)
armor = list(melee = 30, bullet = 5, laser = 40,energy = 5, bomb = 35, bio = 100, rad = 60) armor = list(melee = 30, bullet = 5, laser = 40,energy = 5, bomb = 35, bio = 100, rad = 60)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/backpack/satchel_norm,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/device/rcd, /obj/item/weapon/extinguisher, /obj/item/weapon/extinguisher/foam, /obj/item/weapon/storage/toolbox, /obj/item/tool/wrench/socket) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/backpack/satchel_norm,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/device/rcd, /obj/item/weapon/extinguisher, /obj/item/weapon/extinguisher/foam, /obj/item/weapon/storage/toolbox, /obj/item/tool/wrench/socket, /obj/item/tool/irons)
head_type = /obj/item/clothing/head/helmet/space/rig/atmos/gold head_type = /obj/item/clothing/head/helmet/space/rig/atmos/gold
//ADMINBUS RIGS. SOVIET + NAZI //ADMINBUS RIGS. SOVIET + NAZI

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 32 KiB