Files
CHOMPStation2/code/modules/projectiles/projectile/beams.dm
Erthilo dfb6676ebb TG: Not a whole lot going on in this commit, just more work on preparation for the
traitor factions update. Added some new sprites and weapons.

New weapon: Delivery grenade. Can spawn an x amount of mob/object y in a
constant radius. It is currently used for carp and manhack delivery grenades.

!! Important !!: Certain telecomms computers were causing very nasty machine
disruption through some very silly mishap involving re-programming a computer's
network. Basically, it was breaking machine procs every time you messed with
them. This should hopefully make telecomms a lot more stable.

Fixed a bug where the reflexes nanoaug would not actually dodge the projectile
if the person was clicking directly inside the target's 32x32 border.

I changed around some core PDA messaging functions in preparation to PDA
Chatrooms (yes Legality it's happening). However I'm going to hold off actually
implementing it until Messycakes is either completed with his PDA UI overhaul or
just stops working on it.

Committed two patches from separate people in the forums. Chemical Cigarettes by
Neek (http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=8775) and Clicking
genetics blocks by Willox
(http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=8857). Check their respective
threads for more details. Sorry I couldn't get this earlier, guys!
Revision: r3755
Author: 	 vageyenaman
2012-06-23 14:59:54 +01:00

116 lines
2.6 KiB
Plaintext

/obj/item/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 40
damage_type = BURN
flag = "laser"
eyeblur = 4
var/frequency = 1
var/ID = 0
var/main = 0
fired()
main = 1
ID = rand(0,1000)
var/first = 1
var/obj/effect/effect/laserdealer/lasor = new /obj/effect/effect/laserdealer(null)
spawn(0)
lasor.setup(ID)
spawn(0)
while(!bumped)
step_towards(src, current)
for(var/mob/living/M in loc)
Bump(M)
if((!( current ) || loc == current))
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)
return
if(!first)
var/obj/item/projectile/beam/new_beam = new src.type(loc)
processing_objects.Remove(new_beam)
new_beam.dir = get_dir(src, current)
new_beam.ID = ID
new_beam.icon_state = icon_state
else
first = 0
return
/obj/effect/effect/laserdealer
name = "laserdealio"
proc/setup(var/ID = 0)
sleep(5)
for(var/obj/item/projectile/beam/beam in world)
if(ID == beam.ID)
del(beam)
spawn(0)
del(src)
/obj/item/projectile/practice
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
eyeblur = 2
/obj/item/projectile/beam/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 60
/obj/item/projectile/beam/xray
name = "xray beam"
icon_state = "xray"
damage = 30
/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 40
/obj/item/projectile/beam/deathlaser
name = "death laser"
icon_state = "heavylaser"
damage = 60
/obj/item/projectile/beam/emitter
name = "emitter beam"
icon_state = "emitter"
/obj/item/projectile/bluetag
name = "lasertag beam"
icon_state = "ice_2"
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/redtag
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