mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-25 09:31:42 +00:00
Added a "Deadman's switch" (Not really) to the signaler, shooting while standing off makes the other guy shoot, balanced stunning, added a time limit to switching hostage modes.
Signalers: Right click verb makes you ready to signal it, being shot with it in your active hand has a 80% chance to trigger it, dropping it has a 5% chance. Stunning always stuns you SOME, but armor can now lessen it (It used to be possible to not get stunned at all by being shot normally) Shooting during a mexican standoff now makes the other guy shoot you too. Added a time to how quickly you can adjust hostage things. 1.5 seconds per thing.
This commit is contained in:
@@ -62,6 +62,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
examine()
|
examine()
|
||||||
|
set src in oview(7)
|
||||||
..()
|
..()
|
||||||
if(src in usr)
|
if(src in usr)
|
||||||
usr << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
|
usr << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
delay = 0
|
delay = 0
|
||||||
airlock_wire = null
|
airlock_wire = null
|
||||||
datum/radio_frequency/radio_connection
|
datum/radio_frequency/radio_connection
|
||||||
|
deadman = 0
|
||||||
|
|
||||||
proc
|
proc
|
||||||
signal()
|
signal()
|
||||||
@@ -145,4 +146,23 @@
|
|||||||
radio_controller.remove_object(src, frequency)
|
radio_controller.remove_object(src, frequency)
|
||||||
frequency = new_frequency
|
frequency = new_frequency
|
||||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
process()
|
||||||
|
var/mob/M = src.loc
|
||||||
|
if(!M || !ismob(M))
|
||||||
|
if(prob(5))
|
||||||
|
signal()
|
||||||
|
deadman = 0
|
||||||
|
processing_objects.Remove(src)
|
||||||
|
else if(prob(5))
|
||||||
|
M.visible_message("[M]'s finger twitches a bit over [src]'s signal button!")
|
||||||
|
return
|
||||||
|
|
||||||
|
proc/deadman_it()
|
||||||
|
set src in usr
|
||||||
|
set name = "Threaten to push the button!"
|
||||||
|
set desc = "BOOOOM!"
|
||||||
|
deadman = 1
|
||||||
|
processing_objects.Add(src)
|
||||||
|
usr.visible_message("\red [usr] moves their finger over [src]'s signal button...")
|
||||||
|
|||||||
@@ -42,9 +42,9 @@
|
|||||||
if(!effect || (blocked >= 2)) return 0
|
if(!effect || (blocked >= 2)) return 0
|
||||||
switch(effecttype)
|
switch(effecttype)
|
||||||
if(STUN)
|
if(STUN)
|
||||||
Stun((effect - (effect*getarmor(null, "laser"))))
|
Stun((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05))))))
|
||||||
if(WEAKEN)
|
if(WEAKEN)
|
||||||
Weaken((effect - (effect*getarmor(null, "laser"))))
|
Weaken((effect - (min(effect*getarmor(null, "laser"), effect*(0.75 + (blocked*0.05))))))
|
||||||
if(PARALYZE)
|
if(PARALYZE)
|
||||||
Paralyse(effect/(blocked+1))
|
Paralyse(effect/(blocked+1))
|
||||||
if(IRRADIATE)
|
if(IRRADIATE)
|
||||||
|
|||||||
@@ -45,6 +45,12 @@
|
|||||||
|
|
||||||
flash_weak_pain()
|
flash_weak_pain()
|
||||||
|
|
||||||
|
if(istype(equipped(),/obj/item/device/assembly/signaler))
|
||||||
|
var/obj/item/device/assembly/signaler/signaler = equipped()
|
||||||
|
if(signaler.deadman && prob(80))
|
||||||
|
src.visible_message("\red [src] triggers their deadman's switch!")
|
||||||
|
signaler.signal()
|
||||||
|
|
||||||
var/absorb = run_armor_check(def_zone, P.flag)
|
var/absorb = run_armor_check(def_zone, P.flag)
|
||||||
if(absorb >= 2)
|
if(absorb >= 2)
|
||||||
P.on_hit(src,2)
|
P.on_hit(src,2)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
unacidable = 1
|
unacidable = 1
|
||||||
var/id = 0.0
|
var/id = 0.0
|
||||||
var/obj/master
|
var/obj/master
|
||||||
|
var/gun_click_time = -100 //I'm lazy.
|
||||||
|
|
||||||
/obj/screen/close
|
/obj/screen/close
|
||||||
name = "close"
|
name = "close"
|
||||||
@@ -589,53 +590,77 @@
|
|||||||
usr:module_active = null
|
usr:module_active = null
|
||||||
|
|
||||||
if("Allow Walking")
|
if("Allow Walking")
|
||||||
|
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
|
||||||
|
usr << "You need to wait some before you can change what they can do!"
|
||||||
|
return
|
||||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||||
usr << "You need your gun in your active hand to do that!"
|
usr << "You need your gun in your active hand to do that!"
|
||||||
return
|
return
|
||||||
usr.AllowTargetMove()
|
usr.AllowTargetMove()
|
||||||
icon_state = "walking"
|
icon_state = "walking"
|
||||||
name = "Disallow Walking"
|
name = "Disallow Walking"
|
||||||
|
gun_click_time = world.time
|
||||||
|
|
||||||
if("Disallow Walking")
|
if("Disallow Walking")
|
||||||
|
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
|
||||||
|
usr << "You need to wait some before you can change what they can do!"
|
||||||
|
return
|
||||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||||
usr << "You need your gun in your active hand to do that!"
|
usr << "You need your gun in your active hand to do that!"
|
||||||
return
|
return
|
||||||
usr.AllowTargetMove()
|
usr.AllowTargetMove()
|
||||||
icon_state = "no_walk"
|
icon_state = "no_walk"
|
||||||
name = "Allow Walking"
|
name = "Allow Walking"
|
||||||
|
gun_click_time = world.time
|
||||||
|
|
||||||
if("Allow Running")
|
if("Allow Running")
|
||||||
|
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
|
||||||
|
usr << "You need to wait some before you can change what they can do!"
|
||||||
|
return
|
||||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||||
usr << "You need your gun in your active hand to do that!"
|
usr << "You need your gun in your active hand to do that!"
|
||||||
return
|
return
|
||||||
usr.AllowTargetRun()
|
usr.AllowTargetRun()
|
||||||
icon_state = "running"
|
icon_state = "running"
|
||||||
name = "Disallow Running"
|
name = "Disallow Running"
|
||||||
|
gun_click_time = world.time
|
||||||
|
|
||||||
if("Disallow Running")
|
if("Disallow Running")
|
||||||
|
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
|
||||||
|
usr << "You need to wait some before you can change what they can do!"
|
||||||
|
return
|
||||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||||
usr << "You need your gun in your active hand to do that!"
|
usr << "You need your gun in your active hand to do that!"
|
||||||
return
|
return
|
||||||
usr.AllowTargetRun()
|
usr.AllowTargetRun()
|
||||||
icon_state = "no_run"
|
icon_state = "no_run"
|
||||||
name = "Allow Running"
|
name = "Allow Running"
|
||||||
|
gun_click_time = world.time
|
||||||
|
|
||||||
if("Allow Item Use")
|
if("Allow Item Use")
|
||||||
|
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
|
||||||
|
usr << "You need to wait some before you can change what they can do!"
|
||||||
|
return
|
||||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||||
usr << "You need your gun in your active hand to do that!"
|
usr << "You need your gun in your active hand to do that!"
|
||||||
return
|
return
|
||||||
name = "Disallow Item Use"
|
name = "Disallow Item Use"
|
||||||
icon_state = "act_throw_off"
|
icon_state = "act_throw_off"
|
||||||
usr.AllowTargetClick()
|
usr.AllowTargetClick()
|
||||||
|
gun_click_time = world.time
|
||||||
|
|
||||||
|
|
||||||
if("Disallow Item Use")
|
if("Disallow Item Use")
|
||||||
|
if(gun_click_time > world.time - 15) //give them 1.5 seconds between mode changes.
|
||||||
|
usr << "You need to wait some before you can change what they can do!"
|
||||||
|
return
|
||||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||||
usr << "You need your gun in your active hand to do that!"
|
usr << "You need your gun in your active hand to do that!"
|
||||||
return
|
return
|
||||||
name = "Allow Item Use"
|
name = "Allow Item Use"
|
||||||
icon_state = "no_item"
|
icon_state = "no_item"
|
||||||
usr.AllowTargetClick()
|
usr.AllowTargetClick()
|
||||||
|
gun_click_time = world.time
|
||||||
|
|
||||||
else
|
else
|
||||||
DblClick()
|
DblClick()
|
||||||
|
|||||||
@@ -181,6 +181,7 @@
|
|||||||
proc/TargetActed()
|
proc/TargetActed()
|
||||||
var/mob/M = loc
|
var/mob/M = loc
|
||||||
if(target == M) return
|
if(target == M) return
|
||||||
|
usr.last_move_intent = world.time
|
||||||
Fire(target,usr)
|
Fire(target,usr)
|
||||||
var/dir_to_fire = sd_get_approx_dir(M,target)
|
var/dir_to_fire = sd_get_approx_dir(M,target)
|
||||||
if(dir_to_fire != M.dir)
|
if(dir_to_fire != M.dir)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
verb/rename_gun()
|
verb/rename_gun()
|
||||||
set name = "Name Gun"
|
set name = "Name Gun"
|
||||||
set desc = "Click to rename your gun. If you're the detective."
|
set desc = "Click to rename your gun."
|
||||||
|
|
||||||
var/mob/M = usr
|
var/mob/M = usr
|
||||||
if(!M.mind) return 0
|
if(!M.mind) return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user