mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge remote-tracking branch 'upstream/master' into third_times_the_charm_questionmark
Conflicts: code/modules/mob/living/carbon/human/human.dm ^ This shit is haunted. It's conflicted on two branches for 0 reason, the automatic merge wouldn't work on the fucking end of file.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
projectile_type = "/obj/item/projectile/bullet/weakbullet3"
|
||||
|
||||
|
||||
/obj/item/ammo_casing/c9mmap
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
@@ -63,6 +63,14 @@
|
||||
pellets = 5
|
||||
deviation = 30
|
||||
|
||||
/obj/item/ammo_casing/shotgun/rubbershot
|
||||
name = "rubber shot"
|
||||
desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance."
|
||||
icon_state = "bshell"
|
||||
projectile_type = "/obj/item/projectile/bullet/rpellet"
|
||||
pellets = 5
|
||||
deviation = 30
|
||||
materials = list(MAT_METAL=4000)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/beanbag
|
||||
name = "beanbag slug"
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
/obj/item/ammo_box/magazine/internal/shotriot
|
||||
name = "riot shotgun internal magazine"
|
||||
desc = "Oh god, this shouldn't be here"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun/rubbershot"
|
||||
caliber = "shotgun"
|
||||
max_ammo = 6
|
||||
multiload = 0
|
||||
@@ -125,26 +125,30 @@
|
||||
|
||||
/obj/item/ammo_box/magazine/uzim9mm/update_icon()
|
||||
..()
|
||||
icon_state = "uzi9mm-[round(ammo_count(),4)]"
|
||||
|
||||
icon_state = "uzi9mm-[round(ammo_count(),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm
|
||||
name = "SMG magazine (9mm)"
|
||||
icon_state = "smg9mm"
|
||||
ammo_type = "/obj/item/ammo_casing/c9mm"
|
||||
caliber = "9mm"
|
||||
max_ammo = 30
|
||||
|
||||
materials = list(MAT_METAL = 2000)
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm/ap
|
||||
name = "SMG magazine (Armour Piercing 9mm)"
|
||||
ammo_type = /obj/item/ammo_casing/c9mmap
|
||||
materials = list(MAT_METAL = 3000)
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm/toxin
|
||||
name = "SMG magazine (Toxin Tipped 9mm)"
|
||||
ammo_type = /obj/item/ammo_casing/c9mmtox
|
||||
materials = list(MAT_METAL = 3000)
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm/fire
|
||||
name = "SMG Magazine (Incendiary 9mm)"
|
||||
ammo_type = /obj/item/ammo_casing/c9mminc
|
||||
materials = list(MAT_METAL = 3000)
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm/update_icon()
|
||||
..()
|
||||
|
||||
@@ -75,10 +75,6 @@
|
||||
/obj/item/projectile/beam/emitter/singularity_pull()
|
||||
return //don't want the emitters to miss
|
||||
|
||||
/obj/item/projectile/beam/emitter/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
/obj/item/projectile/lasertag
|
||||
name = "laser tag beam"
|
||||
icon_state = "omnilaser"
|
||||
@@ -233,12 +229,12 @@
|
||||
f.hotspot_expose(1000,CELL_VOLUME)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
//world << "deleting"
|
||||
//del(src) //Delete if it passes the world edge
|
||||
//qdel(src) //Delete if it passes the world edge
|
||||
broken = 1
|
||||
return
|
||||
if(kill_count < 1)
|
||||
//world << "deleting"
|
||||
//del(src)
|
||||
//qdel(src)
|
||||
broken = 1
|
||||
kill_count--
|
||||
//world << "[x] [y]"
|
||||
@@ -275,401 +271,4 @@
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/living/M = target
|
||||
M.playsound_local(src, "explosion", 50, 1)
|
||||
..()
|
||||
|
||||
/*
|
||||
/*
|
||||
* Use: Caches beam state images and holds turfs that had these images overlaid.
|
||||
* Structure:
|
||||
* beam_master
|
||||
* icon_states/dirs of beams
|
||||
* image for that beam
|
||||
* references for fired beams
|
||||
* icon_states/dirs for each placed beam image
|
||||
* turfs that have that icon_state/dir
|
||||
*/
|
||||
var/list/beam_master = list()
|
||||
|
||||
// Special laser the captains gun uses
|
||||
/obj/item/projectile/beam/captain
|
||||
name = "captain laser"
|
||||
damage = 40
|
||||
|
||||
/obj/item/projectile/beam/lightning
|
||||
invisibility = 101
|
||||
name = "lightning"
|
||||
damage = 0
|
||||
icon = 'icons/obj/lightning.dmi'
|
||||
icon_state = "lightning"
|
||||
stun = 10
|
||||
weaken = 10
|
||||
stutter = 50
|
||||
eyeblur = 50
|
||||
var/tang = 0
|
||||
layer = 3
|
||||
var/turf/last = null
|
||||
kill_count = 6
|
||||
|
||||
proc/adjustAngle(angle)
|
||||
angle = round(angle) + 45
|
||||
if(angle > 180)
|
||||
angle -= 180
|
||||
else
|
||||
angle += 180
|
||||
if(!angle)
|
||||
angle = 1
|
||||
/*if(angle < 0)
|
||||
//angle = (round(abs(get_angle(A, user))) + 45) - 90
|
||||
angle = round(angle) + 45 + 180
|
||||
else
|
||||
angle = round(angle) + 45*/
|
||||
return angle
|
||||
|
||||
process()
|
||||
var/first = 1 //So we don't make the overlay in the same tile as the firer
|
||||
var/broke = 0
|
||||
var/broken
|
||||
var/atom/curr = current
|
||||
var/Angle=round(Get_Angle(firer,curr))
|
||||
var/icon/I=new('icons/obj/zap.dmi',"lightning")
|
||||
I.Turn(Angle)
|
||||
var/DX=(32*curr.x+curr.pixel_x)-(32*firer.x+firer.pixel_x)
|
||||
var/DY=(32*curr.y+curr.pixel_y)-(32*firer.y+firer.pixel_y)
|
||||
var/N=0
|
||||
var/length=round(sqrt((DX)**2+(DY)**2))
|
||||
var/count = 0
|
||||
for(N,N<length,N+=32)
|
||||
if(count >= kill_count)
|
||||
break
|
||||
count++
|
||||
var/obj/effect/overlay/beam/X=new(loc)
|
||||
X.BeamSource=src
|
||||
if(N+32>length)
|
||||
var/icon/II=new(icon,icon_state)
|
||||
II.DrawBox(null,1,(length-N),32,32)
|
||||
II.Turn(Angle)
|
||||
X.icon=II
|
||||
else X.icon=I
|
||||
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
|
||||
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
|
||||
if(DX==0) Pixel_x=0
|
||||
if(DY==0) Pixel_y=0
|
||||
if(Pixel_x>32)
|
||||
for(var/a=0, a<=Pixel_x,a+=32)
|
||||
X.x++
|
||||
Pixel_x-=32
|
||||
if(Pixel_x<-32)
|
||||
for(var/a=0, a>=Pixel_x,a-=32)
|
||||
X.x--
|
||||
Pixel_x+=32
|
||||
if(Pixel_y>32)
|
||||
for(var/a=0, a<=Pixel_y,a+=32)
|
||||
X.y++
|
||||
Pixel_y-=32
|
||||
if(Pixel_y<-32)
|
||||
for(var/a=0, a>=Pixel_y,a-=32)
|
||||
X.y--
|
||||
Pixel_y+=32
|
||||
X.pixel_x=Pixel_x
|
||||
X.pixel_y=Pixel_y
|
||||
var/turf/TT = get_turf(X.loc)
|
||||
if(TT == firer.loc)
|
||||
continue
|
||||
if(TT.density)
|
||||
del(X)
|
||||
break
|
||||
for(var/atom/O in TT)
|
||||
if(!O.CanPass(src))
|
||||
del(X)
|
||||
broke = 1
|
||||
break
|
||||
for(var/mob/living/O in TT.contents)
|
||||
if(istype(O, /mob/living))
|
||||
if(O.density)
|
||||
del(X)
|
||||
broke = 1
|
||||
break
|
||||
if(broke)
|
||||
if(X)
|
||||
del(X)
|
||||
break
|
||||
spawn
|
||||
while(src) //Move until we hit something
|
||||
if(first)
|
||||
icon = midicon
|
||||
if((!( current ) || loc == current)) //If we pass our target
|
||||
broken = 1
|
||||
icon = endicon
|
||||
tang = adjustAngle(get_angle(original,current))
|
||||
if(tang > 180)
|
||||
tang -= 180
|
||||
else
|
||||
tang += 180
|
||||
icon_state = "[tang]"
|
||||
var/turf/simulated/floor/f = current
|
||||
if(f && istype(f))
|
||||
f.break_tile()
|
||||
f.hotspot_expose(1000,CELL_VOLUME)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
//world << "deleting"
|
||||
//del(src) //Delete if it passes the world edge
|
||||
broken = 1
|
||||
return
|
||||
if(kill_count < 1)
|
||||
//world << "deleting"
|
||||
//del(src)
|
||||
broken = 1
|
||||
kill_count--
|
||||
//world << "[x] [y]"
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
icon = endicon
|
||||
if(!broken)
|
||||
tang = adjustAngle(get_angle(original,current))
|
||||
if(tang > 180)
|
||||
tang -= 180
|
||||
else
|
||||
tang += 180
|
||||
icon_state = "[tang]"
|
||||
Bump(original)
|
||||
first = 0
|
||||
if(broken)
|
||||
//world << "breaking"
|
||||
break
|
||||
else
|
||||
last = get_turf(src.loc)
|
||||
step_towards(src, current) //Move~
|
||||
if(src.loc != current)
|
||||
tang = adjustAngle(get_angle(src.loc,current))
|
||||
icon_state = "[tang]"
|
||||
del(src)
|
||||
return
|
||||
/*cleanup(reference) //Waits .3 seconds then removes the overlay.
|
||||
//world << "setting invisibility"
|
||||
sleep(50)
|
||||
src.invisibility = 101
|
||||
return*/
|
||||
on_hit(atom/target, blocked = 0)
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/living/M = target
|
||||
M.playsound_local(src, "explosion", 50, 1)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/beam
|
||||
name = "laser"
|
||||
icon_state = "laser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 40
|
||||
damage_type = BURN
|
||||
hitsound = 'sound/weapons/sear.ogg'
|
||||
flag = "laser"
|
||||
eyeblur = 4
|
||||
var/frequency = 1
|
||||
|
||||
process()
|
||||
var/reference = "\ref[src]" //So we do not have to recalculate it a ton
|
||||
var/first = 1 //So we don't make the overlay in the same tile as the firer
|
||||
spawn while(src) //Move until we hit something
|
||||
|
||||
if((!( current ) || loc == current)) //If we pass our target
|
||||
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
del(src) //Delete if it passes the world edge
|
||||
return
|
||||
step_towards(src, current) //Move~
|
||||
|
||||
if(kill_count < 1)
|
||||
del(src)
|
||||
return
|
||||
kill_count--
|
||||
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original)
|
||||
|
||||
if(!first) //Add the overlay as we pass over tiles
|
||||
var/target_dir = get_dir(src, current) //So we don't call this too much
|
||||
|
||||
//If the icon has not been added yet
|
||||
if( !("[icon_state][target_dir]" in beam_master) )
|
||||
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
|
||||
beam_master["[icon_state][target_dir]"] = I //And cache it!
|
||||
|
||||
//Finally add the overlay
|
||||
src.loc.overlays += beam_master["[icon_state][target_dir]"]
|
||||
|
||||
//Add the turf to a list in the beam master so they can be cleaned up easily.
|
||||
if(reference in beam_master)
|
||||
var/list/turf_master = beam_master[reference]
|
||||
if("[icon_state][target_dir]" in turf_master)
|
||||
var/list/turfs = turf_master["[icon_state][target_dir]"]
|
||||
turfs += loc
|
||||
else
|
||||
turf_master["[icon_state][target_dir]"] = list(loc)
|
||||
else
|
||||
var/list/turfs = list()
|
||||
turfs["[icon_state][target_dir]"] = list(loc)
|
||||
beam_master[reference] = turfs
|
||||
else
|
||||
first = 0
|
||||
cleanup(reference)
|
||||
return
|
||||
dumbfire(var/dir)
|
||||
var/reference = "\ref[src]" //So we do not have to recalculate it a ton
|
||||
var/first = 1 //So we don't make the overlay in the same tile as the firer
|
||||
if(!dir)
|
||||
del(src)
|
||||
spawn while(src) //Move until we hit something
|
||||
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
|
||||
del(src) //Delete if it passes the world edge
|
||||
return
|
||||
var/turf/T = get_step(src, dir)
|
||||
step_towards(src, T) //Move~
|
||||
|
||||
if(kill_count < 1)
|
||||
del(src)
|
||||
kill_count--
|
||||
|
||||
if(!bumped && !isturf(original))
|
||||
if(loc == get_turf(original))
|
||||
if(!(original in permutated))
|
||||
Bump(original)
|
||||
|
||||
if(!first) //Add the overlay as we pass over tiles
|
||||
var/target_dir = dir //So we don't call this too much
|
||||
|
||||
//If the icon has not been added yet
|
||||
if( !("[icon_state][target_dir]" in beam_master) )
|
||||
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
|
||||
beam_master["[icon_state][target_dir]"] = I //And cache it!
|
||||
|
||||
//Finally add the overlay
|
||||
src.loc.overlays += beam_master["[icon_state][target_dir]"]
|
||||
|
||||
//Add the turf to a list in the beam master so they can be cleaned up easily.
|
||||
if(reference in beam_master)
|
||||
var/list/turf_master = beam_master[reference]
|
||||
if("[icon_state][target_dir]" in turf_master)
|
||||
var/list/turfs = turf_master["[icon_state][target_dir]"]
|
||||
turfs += loc
|
||||
else
|
||||
turf_master["[icon_state][target_dir]"] = list(loc)
|
||||
else
|
||||
var/list/turfs = list()
|
||||
turfs["[icon_state][target_dir]"] = list(loc)
|
||||
beam_master[reference] = turfs
|
||||
else
|
||||
first = 0
|
||||
cleanup(reference)
|
||||
return
|
||||
|
||||
proc/cleanup(reference) //Waits .3 seconds then removes the overlay.
|
||||
src = null // Redundant.
|
||||
spawn(3)
|
||||
var/list/turf_master = beam_master[reference]
|
||||
for(var/laser_state in turf_master)
|
||||
var/list/turfs = turf_master[laser_state]
|
||||
for(var/turf/T in turfs)
|
||||
T.overlays -= beam_master[laser_state]
|
||||
return
|
||||
|
||||
/obj/item/projectile/beam/practice
|
||||
name = "laser"
|
||||
icon_state = "laser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "laser"
|
||||
eyeblur = 2
|
||||
|
||||
//Heavy lasers now deal slightly more damage, but have a slower firing rate; overall DPS still identical to lasers.
|
||||
/obj/item/projectile/beam/heavylaser
|
||||
name = "heavy laser"
|
||||
icon_state = "heavylaser"
|
||||
damage = 50
|
||||
|
||||
/obj/item/projectile/beam/xray
|
||||
name = "xray beam"
|
||||
icon_state = "xray"
|
||||
damage = 15
|
||||
irradiate = 30
|
||||
kill_count = 50
|
||||
|
||||
|
||||
/obj/item/projectile/beam/pulse
|
||||
name = "pulse"
|
||||
icon_state = "u_laser"
|
||||
damage = 50
|
||||
on_hit(var/atom/target, var/blocked = 0)
|
||||
if(istype(target,/turf/)||istype(target,/obj/structure/))
|
||||
target.ex_act(2)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/projectile/beam/deathlaser
|
||||
name = "death laser"
|
||||
icon_state = "heavylaser"
|
||||
damage = 60
|
||||
|
||||
/obj/item/projectile/beam/emitter
|
||||
name = "emitter beam"
|
||||
icon_state = "emitter"
|
||||
damage = 30
|
||||
|
||||
|
||||
/obj/item/projectile/beam/lastertag/blue
|
||||
name = "lasertag beam"
|
||||
icon_state = "bluelaser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "laser"
|
||||
|
||||
on_hit(var/atom/target, var/blocked = 0)
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = target
|
||||
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
|
||||
M.Weaken(5)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/beam/lastertag/red
|
||||
name = "lasertag beam"
|
||||
icon_state = "laser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "laser"
|
||||
|
||||
on_hit(var/atom/target, var/blocked = 0)
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = target
|
||||
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
|
||||
M.Weaken(5)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/beam/lastertag/omni//A laser tag bolt that stuns EVERYONE
|
||||
name = "lasertag beam"
|
||||
icon_state = "omnilaser"
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
flag = "laser"
|
||||
|
||||
on_hit(var/atom/target, var/blocked = 0)
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = target
|
||||
if((istype(M.wear_suit, /obj/item/clothing/suit/bluetag))||(istype(M.wear_suit, /obj/item/clothing/suit/redtag)))
|
||||
M.Weaken(5)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/projectile/beam/stun
|
||||
name = "stun beam"
|
||||
icon_state = "stun"
|
||||
nodamage = 1
|
||||
damage = 0
|
||||
agony = 40
|
||||
damage_type = HALLOSS
|
||||
*/
|
||||
..()
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet3
|
||||
damage = 20
|
||||
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/toxinbullet
|
||||
damage = 15
|
||||
@@ -67,6 +67,9 @@
|
||||
/obj/item/projectile/bullet/heavybullet
|
||||
damage = 35
|
||||
|
||||
/obj/item/projectile/bullet/rpellet
|
||||
damage = 3
|
||||
stamina = 25
|
||||
|
||||
/obj/item/projectile/bullet/stunshot//taser slugs for shotguns, nothing special
|
||||
name = "stunshot"
|
||||
@@ -116,7 +119,7 @@
|
||||
/obj/item/projectile/bullet/incendiary/shell/Move()
|
||||
..()
|
||||
var/turf/location = get_turf(src)
|
||||
PoolOrNew(/obj/effect/hotspot, location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell/dragonsbreath
|
||||
|
||||
@@ -288,7 +288,7 @@ client/verb/ToggleGunMode()
|
||||
else
|
||||
usr << "Target may no longer move."
|
||||
target_can_run = 0
|
||||
del(usr.gun_run_icon) //no need for icon for running permission
|
||||
qdel(usr.gun_run_icon) //no need for icon for running permission
|
||||
|
||||
//Updating walking permission button
|
||||
if(usr.gun_move_icon)
|
||||
|
||||
Reference in New Issue
Block a user