mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Cleaned up some code, fixed a bug with dead/sleeping people seeing you talk into headsets, reworked guncode some, readded point-blank shooting, removed disposal space cannon, hacktool works on windoors and secure closets, now.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/item/ammo_casing/c38
|
||||
desc = "A .38 bullet casing."
|
||||
caliber = "38"
|
||||
caliber = "357"
|
||||
projectile_type = "/obj/item/projectile/bullet/weakbullet"
|
||||
|
||||
|
||||
|
||||
@@ -79,11 +79,37 @@
|
||||
M.apply_damage(75, BRUTE, "head", used_weapon = "Suicide attempt with a gun")
|
||||
M.apply_damage(85, BRUTE, "chest")
|
||||
M.visible_message("\red [user] pulls the trigger. Ow.")
|
||||
del(src.in_chamber)
|
||||
del(in_chamber)
|
||||
mouthshoot = 0
|
||||
return
|
||||
else if(target && M == target)
|
||||
PreFire(M,user)
|
||||
return
|
||||
else if(user.a_intent == "hurt" && (istype(src.in_chamber, /obj/item/projectile/beam) || istype(src.in_chamber, /obj/item/projectile/energy)\
|
||||
|| istype(src.in_chamber, /obj/item/projectile/bullet)) && !istype(src.in_chamber, /obj/item/projectile/bullet/stunshot))
|
||||
//Lets shoot them, then.
|
||||
user.visible_message("\red <b> [user] fires \the [src] point blank at [M]!</b>")
|
||||
M.bullet_act(in_chamber,"head")
|
||||
if (prob(20))
|
||||
if (M.paralysis < 10)
|
||||
M.paralysis = 10
|
||||
else
|
||||
if (M.weakened < 10)
|
||||
M.weakened = 10
|
||||
if(M.stat != 2) M.stat = 1
|
||||
del(in_chamber)
|
||||
return
|
||||
else if(user.a_intent != "hurt" && istype(src,/obj/item/weapon/gun/energy/taser))
|
||||
if (prob(50))
|
||||
if (M.paralysis < 60 && (!(M.mutations & 8)) )
|
||||
M.paralysis = 60
|
||||
else
|
||||
if (M.weakened < 60 && (!(M.mutations & 8)) )
|
||||
M.weakened = 60
|
||||
if (M.stuttering < 60 && (!(M.mutations & 8)) )
|
||||
M.stuttering = 60
|
||||
user.visible_message("\red <B>[M] has been stunned with the taser gun by [user]!</B>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -181,6 +207,9 @@
|
||||
proc/TargetActed()
|
||||
var/mob/M = loc
|
||||
if(target == M) return
|
||||
if(src.loc != M.equipped())
|
||||
target.NotTargeted(src)
|
||||
return
|
||||
usr.last_move_intent = world.time
|
||||
Fire(target,usr)
|
||||
var/dir_to_fire = sd_get_approx_dir(M,target)
|
||||
@@ -190,7 +219,7 @@
|
||||
afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
if(flag) return //we're placing gun on a table or in backpack
|
||||
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
|
||||
if(user && user.gun_mode)
|
||||
if(user && user.client && user.client.gun_mode)
|
||||
PreFire(A,user,params)
|
||||
else
|
||||
Fire(A,user,params)
|
||||
@@ -283,8 +312,8 @@ mob/proc
|
||||
if(!targeted_by) targeted_by = list()
|
||||
targeted_by += I
|
||||
I.target = src
|
||||
//I.lock_time = world.time + 10 //Target has 1 second to realize they're targeted and stop (or target the opponent).
|
||||
src << "((\red <b>Your character is being targeted. They have 1 second to stop any click or move actions.</b> \black While targeted, they may \
|
||||
I.lock_time = world.time + 20 //Target has 1 second to realize they're targeted and stop (or target the opponent).
|
||||
src << "((\red <b>Your character is being targeted. They have 2 seconds to stop any click or move actions.</b> \black While targeted, they may \
|
||||
drag and drop items in or into the map, speak, and click on interface buttons. Clicking on the map, their items \
|
||||
(other than a weapon to de-target), or moving will result in being fired upon. \red The aggressor may also fire manually, \
|
||||
so try not to get on their bad side.\black ))"
|
||||
@@ -301,17 +330,17 @@ mob/proc
|
||||
if(T.client)
|
||||
T.client.screen += T.item_use_icon
|
||||
T.client.screen += T.gun_move_icon
|
||||
while(targeted_by)
|
||||
while(targeted_by && T.client)
|
||||
sleep(1)
|
||||
if(last_move_intent > I.lock_time + 10 && !T.target_can_move) //If the target moved while targeted
|
||||
if(last_move_intent > I.lock_time + 10 && !T.client.target_can_move) //If the target moved while targeted
|
||||
I.TargetActed()
|
||||
I.lock_time = world.time + 5
|
||||
else if(last_move_intent > I.lock_time + 10 && !T.target_can_run && m_intent == "run") //If the target ran while targeted
|
||||
I.lock_time = world.time + 10
|
||||
else if(last_move_intent > I.lock_time + 10 && !T.client.target_can_run && m_intent == "run") //If the target ran while targeted
|
||||
I.TargetActed()
|
||||
I.lock_time = world.time + 5
|
||||
if(last_target_click > I.lock_time + 10 && !T.target_can_click) //If the target clicked the map to pick something up/shoot/etc
|
||||
I.lock_time = world.time + 10
|
||||
if(last_target_click > I.lock_time + 10 && !T.client.target_can_click) //If the target clicked the map to pick something up/shoot/etc
|
||||
I.TargetActed()
|
||||
I.lock_time = world.time + 5
|
||||
I.lock_time = world.time + 10
|
||||
|
||||
NotTargeted(var/obj/item/weapon/gun/I,silent)
|
||||
if(!silent)
|
||||
@@ -325,9 +354,6 @@ mob/proc
|
||||
del(T.item_use_icon)
|
||||
del(T.gun_move_icon)
|
||||
del(T.gun_run_icon)
|
||||
T.target_can_move = 0
|
||||
T.target_can_run = 0
|
||||
T.target_can_click = 0
|
||||
if(!targeted_by.len) del targeted_by
|
||||
spawn(1) update_clothing()
|
||||
|
||||
@@ -372,7 +398,7 @@ mob/proc
|
||||
// layer = 99
|
||||
|
||||
//If you move out of range, it isn't going to still stay locked on you any more.
|
||||
mob/var
|
||||
client/var
|
||||
target_can_move = 0
|
||||
target_can_run = 0
|
||||
target_can_click = 0
|
||||
@@ -389,7 +415,7 @@ mob/Move()
|
||||
if(!(G.target in view(src)))
|
||||
//ClearRequest("Aim")
|
||||
G.target.NotTargeted(G)
|
||||
mob/verb
|
||||
client/verb
|
||||
//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
|
||||
AllowTargetMove()
|
||||
set hidden=1
|
||||
@@ -397,15 +423,20 @@ mob/verb
|
||||
if(!target_can_move)
|
||||
// winset(usr,"default.target_can_move","is-flat=true;border=sunken")
|
||||
usr << "Target may now walk."
|
||||
gun_run_icon = new /obj/screen/gun/run(null)
|
||||
if(client)
|
||||
client.screen += gun_run_icon
|
||||
usr.gun_run_icon = new /obj/screen/gun/run(null)
|
||||
screen += usr.gun_run_icon
|
||||
if(usr.gun_move_icon)
|
||||
usr.gun_move_icon.dir = 1
|
||||
usr.gun_move_icon.name = "Disallow Walking"
|
||||
else
|
||||
// winset(usr,"default.target_can_move","is-flat=false;border=none")
|
||||
usr << "Target may no longer move."
|
||||
target_can_run = 0
|
||||
del(gun_run_icon)
|
||||
for(var/obj/item/weapon/gun/G in src)
|
||||
del(usr.gun_run_icon)
|
||||
if(usr.gun_move_icon)
|
||||
usr.gun_move_icon.dir = 2
|
||||
usr.gun_move_icon.name = "Allow Walking"
|
||||
for(var/obj/item/weapon/gun/G in usr)
|
||||
G.lock_time = world.time + 5
|
||||
if(G.target)
|
||||
if(!target_can_move)
|
||||
@@ -418,9 +449,15 @@ mob/verb
|
||||
if(!target_can_run)
|
||||
// winset(usr,"default.target_can_move","is-flat=true;border=sunken")
|
||||
usr << "Target may now run."
|
||||
if(usr.gun_run_icon)
|
||||
usr.gun_run_icon.dir = 1
|
||||
usr.gun_run_icon.name = "Disallow Running"
|
||||
else
|
||||
// winset(usr,"default.target_can_move","is-flat=false;border=none")
|
||||
usr << "Target may no longer run."
|
||||
if(usr.gun_run_icon)
|
||||
usr.gun_run_icon.dir = 2
|
||||
usr.gun_run_icon.name = "Allow Running"
|
||||
for(var/obj/item/weapon/gun/G in src)
|
||||
G.lock_time = world.time + 5
|
||||
if(G.target)
|
||||
@@ -434,9 +471,15 @@ mob/verb
|
||||
if(!target_can_click)
|
||||
// winset(usr,"default.target_can_click","is-flat=true;border=sunken")
|
||||
usr << "Target may now use items."
|
||||
if(usr.item_use_icon)
|
||||
usr.item_use_icon.dir = 1
|
||||
usr.item_use_icon.name = "Disallow Item Use"
|
||||
else
|
||||
// winset(usr,"default.target_can_click","is-flat=false;border=none")
|
||||
usr << "Target may no longer use items."
|
||||
if(usr.item_use_icon)
|
||||
usr.item_use_icon.dir = 2
|
||||
usr.item_use_icon.name = "Allow Item Use"
|
||||
for(var/obj/item/weapon/gun/G in src)
|
||||
G.lock_time = world.time + 5
|
||||
if(G.target)
|
||||
@@ -451,8 +494,10 @@ mob/verb
|
||||
if(!gun_mode)
|
||||
// winset(usr,"default.target_can_click","is-flat=true;border=sunken")
|
||||
usr << "You will now take people captive."
|
||||
if(usr.gun_setting_icon)
|
||||
usr.gun_setting_icon.dir = 2
|
||||
else
|
||||
// winset(usr,"default.target_can_click","is-flat=false;border=none")
|
||||
usr << "You will now shoot where you target."
|
||||
if(usr.gun_setting_icon)
|
||||
usr.gun_setting_icon.dir = (usr.gun_setting_icon.dir%2)+1
|
||||
if(usr.gun_setting_icon)
|
||||
usr.gun_setting_icon.dir = 1
|
||||
@@ -2,10 +2,10 @@
|
||||
name = "\improper Laser"
|
||||
icon_state = "laser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 20
|
||||
damage = 40
|
||||
damage_type = BURN
|
||||
flag = "laser"
|
||||
eyeblur = 2
|
||||
eyeblur = 4
|
||||
var/ID = 0
|
||||
var/main = 0
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
/obj/item/projectile/beam/heavylaser
|
||||
name = "\improper Heavy Laser"
|
||||
icon_state = "heavylaser"
|
||||
damage = 40
|
||||
damage = 60
|
||||
|
||||
|
||||
/obj/item/projectile/beam/pulse
|
||||
name = "\improper Pulse"
|
||||
icon_state = "u_laser"
|
||||
damage = 50
|
||||
damage = 40
|
||||
|
||||
|
||||
/obj/item/projectile/beam/deathlaser
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet
|
||||
damage = 5
|
||||
damage = 15
|
||||
stun = 5
|
||||
weaken = 5
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
/obj/item/projectile/bullet/stunshot
|
||||
name = "\improper Stunshot"
|
||||
damage = 5
|
||||
damage = 15
|
||||
stun = 10
|
||||
weaken = 10
|
||||
stutter = 10
|
||||
Reference in New Issue
Block a user