mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-28 02:52:28 +00:00
TG: Fixes fire extinguishers in space, removes empty hand requirement, which wasn't
supposed to be committed. My bad. Adds the ability for door buttons to both close the doors they're attached to, and also a framework for controlling their other functions like idscan/bolts. Adds a secure safe to the HoS's office and a new flashbang grenade! Secure safes can now hold 8 weight units of stuff by default. Adds a reply function to the comm. console prayers as well as a confirmation button on BSA. Revision: r2946 Author: VivianFoxfoot
This commit is contained in:
@@ -257,13 +257,24 @@
|
||||
active_power_usage = 400
|
||||
|
||||
/obj/machinery/door_control
|
||||
name = "Remote Door Control"
|
||||
name = "remote door-control"
|
||||
desc = "It controls doors, remotely."
|
||||
icon = 'stationobjs.dmi'
|
||||
icon_state = "doorctrl0"
|
||||
desc = "A remote control switch for a door."
|
||||
desc = "A remote control-switch for a door."
|
||||
var/id = null
|
||||
var/range = 10
|
||||
var/normaldoorcontrol = 0
|
||||
var/desiredstate = 0 // Zero is closed, 1 is open.
|
||||
var/specialfunctions = 1
|
||||
/*
|
||||
Bitflag, 1= open
|
||||
2= idscan,
|
||||
4= bolts
|
||||
8= shock
|
||||
16= door safties
|
||||
|
||||
*/
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
|
||||
@@ -18,14 +18,36 @@
|
||||
if(normaldoorcontrol)
|
||||
for(var/obj/machinery/door/airlock/D in range(range))
|
||||
if(D.id_tag == src.id)
|
||||
if (D.density)
|
||||
spawn( 0 )
|
||||
D.open()
|
||||
return
|
||||
if(desiredstate == 1)
|
||||
if(specialfunctions & OPEN)
|
||||
if (D.density)
|
||||
spawn( 0 )
|
||||
D.open()
|
||||
return
|
||||
if(specialfunctions & IDSCAN)
|
||||
D.aiDisabledIdScanner = 1
|
||||
if(specialfunctions & BOLTS)
|
||||
spawn(5)
|
||||
D.locked = 1
|
||||
if(specialfunctions & SHOCK)
|
||||
D.secondsElectrified = -1
|
||||
|
||||
else
|
||||
spawn( 0 )
|
||||
// D.close()
|
||||
return
|
||||
if(specialfunctions & OPEN)
|
||||
if (!D.density)
|
||||
spawn( 0 )
|
||||
D.close()
|
||||
return
|
||||
if(specialfunctions & IDSCAN)
|
||||
D.aiDisabledIdScanner = 0
|
||||
if(specialfunctions & BOLTS)
|
||||
spawn(5)
|
||||
D.locked = 0
|
||||
if(specialfunctions & SHOCK)
|
||||
D.secondsElectrified = 0
|
||||
|
||||
|
||||
|
||||
else
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
if (M.id == src.id)
|
||||
@@ -38,6 +60,7 @@
|
||||
M.close()
|
||||
return
|
||||
|
||||
desiredstate = !desiredstate
|
||||
spawn(15)
|
||||
if(!(stat & NOPOWER))
|
||||
icon_state = "doorctrl0"
|
||||
|
||||
@@ -93,6 +93,7 @@ FLASHBANG
|
||||
var
|
||||
active = 0
|
||||
det_time = 30
|
||||
banglet = 0
|
||||
proc
|
||||
bang(var/turf/T , var/mob/living/carbon/M)
|
||||
prime()
|
||||
@@ -206,14 +207,16 @@ FLASHBANG
|
||||
if (M.eye_stat >= 20)
|
||||
M << "\red Your eyes start to burn badly!"
|
||||
M.disabilities |= 1
|
||||
if (prob(M.eye_stat - 20 + 1))
|
||||
M << "\red You can't see anything!"
|
||||
M.disabilities |= 128
|
||||
if(!banglet && !(istype(src , /obj/item/weapon/flashbang/clusterbang)))
|
||||
if (prob(M.eye_stat - 20 + 1))
|
||||
M << "\red You can't see anything!"
|
||||
M.disabilities |= 128
|
||||
if (M.ear_damage >= 15)
|
||||
M << "\red Your ears start to ring badly!"
|
||||
if (prob(M.ear_damage - 10 + 5))
|
||||
M << "\red You can't hear anything!"
|
||||
M.disabilities |= 32
|
||||
if(!banglet && !(istype(src , /obj/item/weapon/flashbang/clusterbang)))
|
||||
if (prob(M.ear_damage - 10 + 5))
|
||||
M << "\red You can't hear anything!"
|
||||
M.disabilities |= 32
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
M << "\red Your ears start to ring!"
|
||||
@@ -232,9 +235,7 @@ FLASHBANG
|
||||
for(var/mob/living/carbon/M in viewers(T, null))
|
||||
bang(T, M)
|
||||
|
||||
|
||||
//Blob damage here
|
||||
for(var/obj/effect/blob/B in view(8,T))
|
||||
for(var/obj/effect/blob/B in view(8,T)) //Blob damage here
|
||||
var/damage = round(30/(get_dist(B,T)+1))
|
||||
B.health -= damage
|
||||
B.update()
|
||||
@@ -255,6 +256,12 @@ FLASHBANG
|
||||
return
|
||||
|
||||
|
||||
attack_hand()
|
||||
walk(src, null, null)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
clown_check(var/mob/living/user)
|
||||
if ((user.mutations & CLUMSY) && prob(50))
|
||||
user << "\red Huh? How does this thing work?!"
|
||||
@@ -266,12 +273,80 @@ FLASHBANG
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/flashbang/clusterbang
|
||||
desc = "Use of this weapon may constiute a war crime in your area, consult your local captain."
|
||||
name = "Clusterbang"
|
||||
icon = 'grenade.dmi'
|
||||
icon_state = "clusterbang"
|
||||
var/child = 0
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!active)
|
||||
//world << "cluster attack self"
|
||||
user << "\red You prime the clusterbang! [det_time/10] seconds!"
|
||||
src.active = 1
|
||||
src.icon_state = "clusterbang1"
|
||||
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(src.det_time)
|
||||
arm(user)
|
||||
return
|
||||
|
||||
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.equipped() == src)&&(!active))
|
||||
//world << "cluster after attack"
|
||||
arm(user)
|
||||
user.dir = get_dir(user, target)
|
||||
user.drop_item()
|
||||
var/t = (isturf(target) ? target : target.loc)
|
||||
walk_towards(src, t, 3)
|
||||
return
|
||||
|
||||
/obj/item/weapon/flashbang/clusterbang/proc/arm(mob/user as mob)
|
||||
|
||||
//world << "Armed!"
|
||||
var/numspawned = rand(4,8)
|
||||
// world << numspawned
|
||||
var/again = 0
|
||||
if(!child)
|
||||
for(var/more = numspawned,more > 0,more--)
|
||||
if(prob(35))
|
||||
again++
|
||||
numspawned --
|
||||
|
||||
for(,numspawned > 0, numspawned--)
|
||||
//world << "Spawned Flashbang!"
|
||||
spawn(0)
|
||||
var/obj/item/weapon/flashbang/F = new /obj/item/weapon/flashbang(src)
|
||||
F.loc = src.loc
|
||||
F.icon_state = "flashbang1"
|
||||
playsound(src.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
F.active = 1
|
||||
F.banglet = 1
|
||||
var/stepdist = rand(1,3)
|
||||
walk_away(F,src,stepdist)
|
||||
var/dettime = rand(15,60)
|
||||
spawn(dettime)
|
||||
F.prime()
|
||||
|
||||
for(,again > 0, again--)
|
||||
//world << "Spawned CFlashbang!"
|
||||
spawn(0)
|
||||
var/obj/item/weapon/flashbang/clusterbang/F = new /obj/item/weapon/flashbang/clusterbang(src)
|
||||
F.loc = src.loc
|
||||
F.active = 1
|
||||
F.child = 1
|
||||
F.icon_state = "clusterbang1"
|
||||
var/stepdist = rand(1,4)
|
||||
walk_away(F,src,stepdist)
|
||||
spawn(30)
|
||||
F.arm()
|
||||
|
||||
spawn(70)
|
||||
prime()
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/l_hacking = 0
|
||||
var/emagged = 0
|
||||
var/open = 0
|
||||
var/internalstorage = 3
|
||||
w_class = 3.0
|
||||
|
||||
/obj/item/weapon/secstorage/examine()
|
||||
@@ -116,7 +117,7 @@
|
||||
else
|
||||
user << "You short out the lock on [src]."
|
||||
return
|
||||
if ((W.w_class > 3 || istype(W, /obj/item/weapon/secstorage)))
|
||||
if ((W.w_class > internalstorage || istype(W, /obj/item/weapon/secstorage)))
|
||||
return
|
||||
if ((istype(W, /obj/item/weapon/screwdriver)) && (src.locked == 1))
|
||||
sleep(6)
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
icon_sparking = "safespark"
|
||||
flags = FPRINT | TABLEPASS
|
||||
force = 8.0
|
||||
w_class = 4.0
|
||||
w_class = 8.0
|
||||
internalstorage = 8
|
||||
anchored = 1.0
|
||||
density = 0
|
||||
|
||||
@@ -16,5 +17,9 @@
|
||||
new /obj/item/weapon/paper(src)
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
/obj/item/weapon/secstorage/ssafe/HoS/New()
|
||||
..()
|
||||
new /obj/item/weapon/storage/lockbox/clusterbang(src)
|
||||
|
||||
/obj/item/weapon/secstorage/ssafe/attack_hand(mob/user as mob)
|
||||
return attack_self(user)
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/weapon/storage/lockbox
|
||||
name = "Lockbox"
|
||||
name = "lockbox"
|
||||
desc = "A locked box."
|
||||
icon_state = "lockbox+l"
|
||||
item_state = "syringe_kit"
|
||||
@@ -80,4 +80,14 @@
|
||||
new /obj/item/weapon/implantcase/loyalty(src)
|
||||
new /obj/item/weapon/implantcase/loyalty(src)
|
||||
new /obj/item/weapon/implantcase/loyalty(src)
|
||||
new /obj/item/weapon/implanter/loyalty(src)
|
||||
new /obj/item/weapon/implanter/loyalty(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/lockbox/clusterbang
|
||||
name = "lockbox (clusterbang)"
|
||||
desc = "You have a bad feeling about opening this."
|
||||
req_access = list(access_security)
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/flashbang/clusterbang(src)
|
||||
Reference in New Issue
Block a user