mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +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:
@@ -37,6 +37,7 @@ emp_act
|
||||
/mob/living/carbon/human/proc/checkarmor(var/datum/organ/external/def_zone, var/type)
|
||||
if(!type) return 0
|
||||
var/protection = 0
|
||||
var/adjuster = 0
|
||||
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
|
||||
for(var/bp in body_parts)
|
||||
if(!bp) continue
|
||||
@@ -44,6 +45,8 @@ emp_act
|
||||
var/obj/item/clothing/C = bp
|
||||
if(C.body_parts_covered & def_zone.body_part)
|
||||
protection += C.armor[type]
|
||||
adjuster++
|
||||
protection = (adjuster ? protection/(sqrt(adjuster)) : 0)
|
||||
return protection
|
||||
|
||||
|
||||
|
||||
@@ -338,6 +338,9 @@
|
||||
var/list/eavesdroppers = get_mobs_in_view(7, src)
|
||||
for(var/mob/M in listening)
|
||||
eavesdroppers.Remove(M)
|
||||
for(var/mob/M in eavesdroppers)
|
||||
if(M.stat)
|
||||
eavesdroppers.Remove(M)
|
||||
|
||||
for (var/obj/O in ((W | contents)-used_radios))
|
||||
W |= O
|
||||
|
||||
@@ -606,12 +606,15 @@
|
||||
machine = null
|
||||
src << browse(null, t1)
|
||||
|
||||
if(href_list["teleto"])
|
||||
src.client.jumptoturf(locate(href_list["teleto"]))
|
||||
|
||||
if(href_list["priv_msg"])
|
||||
var/mob/M = locate(href_list["priv_msg"])
|
||||
if(M)
|
||||
if(src.client && client.muted_complete)
|
||||
src << "You are muted have a nice day"
|
||||
return
|
||||
//if(src.client && client.muted_complete)
|
||||
// src << "You are muted have a nice day"
|
||||
// return
|
||||
if (!ismob(M))
|
||||
return
|
||||
|
||||
|
||||
@@ -603,9 +603,7 @@
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.AllowTargetMove()
|
||||
dir = (dir%2)+1
|
||||
name = "Disallow Walking"
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Walking")
|
||||
@@ -614,9 +612,7 @@
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.AllowTargetMove()
|
||||
dir = (dir%2)+1
|
||||
name = "Allow Walking"
|
||||
usr.client.AllowTargetMove()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Running")
|
||||
@@ -625,9 +621,7 @@
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.AllowTargetRun()
|
||||
dir = (dir%2)+1
|
||||
name = "Disallow Running"
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Disallow Running")
|
||||
@@ -636,9 +630,7 @@
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
usr.AllowTargetRun()
|
||||
dir = (dir%2)+1
|
||||
name = "Allow Running"
|
||||
usr.client.AllowTargetRun()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Allow Item Use")
|
||||
@@ -647,9 +639,7 @@
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
name = "Disallow Item Use"
|
||||
dir = (dir%2)+1
|
||||
usr.AllowTargetClick()
|
||||
usr.client.AllowTargetClick()
|
||||
gun_click_time = world.time
|
||||
|
||||
|
||||
@@ -659,13 +649,11 @@
|
||||
if(!istype(usr.equipped(),/obj/item/weapon/gun))
|
||||
usr << "You need your gun in your active hand to do that!"
|
||||
return
|
||||
name = "Allow Item Use"
|
||||
dir = (dir%2)+1
|
||||
usr.AllowTargetClick()
|
||||
usr.client.AllowTargetClick()
|
||||
gun_click_time = world.time
|
||||
|
||||
if("Toggle Gun Mode")
|
||||
usr.ToggleGunMode()
|
||||
usr.client.ToggleGunMode()
|
||||
|
||||
else
|
||||
DblClick()
|
||||
|
||||
@@ -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
|
||||
@@ -601,12 +601,12 @@
|
||||
active = 1
|
||||
dir = DOWN
|
||||
spawn(1)
|
||||
process() // spawn off the movement process
|
||||
move() // spawn off the movement process
|
||||
|
||||
return
|
||||
|
||||
// movement process, persists while holder is moving through pipes
|
||||
process()
|
||||
proc/move()
|
||||
var/obj/structure/disposalpipe/last
|
||||
while(active)
|
||||
sleep(1) // was 1
|
||||
|
||||
@@ -260,6 +260,10 @@
|
||||
"Meeting Room", "HoP Office", "Captain",
|
||||
"Atmospherics", "Engineering", "Chief Engineer", "Robotics",)
|
||||
|
||||
mining
|
||||
locationList = list("Mining Main","Mining North","Mining West")
|
||||
spaceList = list(0,0,0)
|
||||
|
||||
w_class = 1
|
||||
item_state = "electronic"
|
||||
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT
|
||||
|
||||
@@ -126,12 +126,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
SyncRDevices()
|
||||
|
||||
process()
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in world) //have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
C.files.AddTech2Known(T)
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
C.files.AddDesign2Known(D)
|
||||
C.files.RefreshResearch()
|
||||
if(!(world.time % 600)) //Lets only have it do it every 100 ticks. Good god.
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in world) //have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
C.files.AddTech2Known(T)
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
C.files.AddDesign2Known(D)
|
||||
C.files.RefreshResearch()
|
||||
return
|
||||
|
||||
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
|
||||
//The construction/deconstruction of the console code.
|
||||
|
||||
Reference in New Issue
Block a user