mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Adds: The C-Foam launcher (#25738)
* The start * Getting a bit further * Slight ammo casing update * Istype helper and foam blockage * Adds status effect * Foam blockage and status effect fixes * Autolathe ammo + stun * aaaaaaaa * Adds uplink item * Actual slowdown * Makes attacking a bit faster again * Ammo increase to 12 * Sirryan review * Adds sprites - almost working * Lots of fixes + mineral doors * Mineral doors don't open with foam
This commit is contained in:
@@ -446,7 +446,7 @@
|
||||
if(T.density)
|
||||
return
|
||||
for(var/atom/A in T.contents)
|
||||
if(A.density && istype(A, /obj/machinery/door))
|
||||
if(A.density && isairlock(A))
|
||||
return
|
||||
UpdateTransparency(src, NewLoc)
|
||||
forceMove(NewLoc)
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
var/open_sound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
var/close_sound = 'sound/effects/stonedoor_openclose.ogg'
|
||||
var/damageSound = null
|
||||
/// How much foam is on the door. Max 5 levels.
|
||||
var/foam_level = 0
|
||||
|
||||
/obj/structure/mineral_door/Initialize()
|
||||
. = ..()
|
||||
@@ -68,6 +70,8 @@
|
||||
/obj/structure/mineral_door/proc/try_to_operate(atom/user)
|
||||
if(is_operating)
|
||||
return
|
||||
if(foam_level)
|
||||
return
|
||||
if(isliving(user))
|
||||
var/mob/living/M = user
|
||||
if(M.client)
|
||||
@@ -216,3 +220,29 @@
|
||||
/obj/structure/mineral_door/wood/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/debris, DEBRIS_WOOD, -20, 10)
|
||||
|
||||
#define MAX_FOAM_LEVEL 5
|
||||
// Adds foam to the airlock, which will block it from being opened
|
||||
/obj/structure/mineral_door/proc/foam_up()
|
||||
if(!foam_level)
|
||||
new /obj/structure/barricade/foam(get_turf(src))
|
||||
foam_level++
|
||||
return
|
||||
|
||||
if(foam_level == MAX_FOAM_LEVEL)
|
||||
return
|
||||
|
||||
for(var/obj/structure/barricade/foam/blockage in loc.contents)
|
||||
blockage.foam_level = min(++blockage.foam_level, 5)
|
||||
// The last level will increase the integrity by 50 instead of 25
|
||||
if(foam_level == 4)
|
||||
blockage.obj_integrity += 50
|
||||
blockage.max_integrity += 50
|
||||
else
|
||||
blockage.obj_integrity += 25
|
||||
blockage.max_integrity += 25
|
||||
foam_level++
|
||||
blockage.icon_state = "foamed_[foam_level]"
|
||||
blockage.update_icon_state()
|
||||
|
||||
#undef MAX_FOAM_LEVEL
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
if(!has_buckled_mobs())
|
||||
return
|
||||
var/mob/living/buckled_mob = buckled_mobs[1]
|
||||
if(istype(A, /obj/machinery/door))
|
||||
if(isairlock(A))
|
||||
A.Bumped(buckled_mob)
|
||||
|
||||
if(propelled)
|
||||
|
||||
Reference in New Issue
Block a user