Bugfixes:

- Laser cannons / Heavy laser cannons should now not be all mixed up.
     - Fixed a bug where the station heads and security crew could be revolutionaries and cultists on game start.
     - If you somehow drop the "Off Hand" that appears if you equip a fire axe, it will be deleted. No more silly "Off Hand" items lying around the station, yay!
     - If you threw a fire axe when it was wielded, it would would stay wieled.
     - Metroids should now, theoretically, not be able to phase through thin windows and glass doors. There's probably still going to be some Metroids phasing through thin glass doors if the right circumstances are met (BYOND pathfinding problem, will eventually migrate Metroid pathfinding to SS13's A* system.
     - Fixed up some of Firecage's half-assed sprites. The decloner projectile in specific.



Misc:
     - Portable turrets can now be equipped with EVERY (except the "plasma gun" because it's stupid anyway) energy gun possible. I want to see laser cannons turrets, emagged energy crossbow turrets, and shock revolver turrets, people!
     - The decloner is no longer called "decloner" because that term really doesn't make any sense anyway. Does it imply that everyone in existence is actually a clone? While that does sound kind of cool, it's actually pretty stupid, so I changed the name but kept the path type "/obj/item/weapon/gun/energy/decloner".

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1936 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
vageyenaman@gmail.com
2011-07-26 22:59:37 +00:00
parent f62e9956aa
commit bce6042fb7
11 changed files with 178 additions and 17 deletions
+7
View File
@@ -1426,3 +1426,10 @@ proc/listclearnulls(list/list)
for(var/obj/O in doors)
O:update_nearby_tiles(1)
proc/get_cardinal_dir(atom/A, atom/B)
var/dx = abs(B.x - A.x)
var/dy = abs(B.y - A.y)
return get_dir(A, B) & (rand() * (dx+dy) < dy ? 3 : 12)
+3 -3
View File
@@ -55,7 +55,7 @@
///////////////////////////////////////////////////////////////////////////////
/datum/game_mode/revolution/pre_setup()
var/list/datum/mind/possible_headrevs = get_players_for_role(BE_REV)
for (var/i=1 to max_headrevs)
if (possible_headrevs.len==0)
break
@@ -64,7 +64,7 @@
head_revolutionaries += lenin
var/mob/new_player/player = lenin.current
player.jobs_restricted_by_gamemode = list("Security Officer", "Warden", "Detective")+nonhuman_positions+head_positions
if(head_revolutionaries.len==0)
return 0
@@ -127,7 +127,7 @@
if(!istype(mob))
return
var/obj/item/device/flash/T = new(mob)
var/list/slots = list (
"backpack" = mob.slot_in_backpack,
"left pocket" = mob.slot_l_store,
+5
View File
@@ -97,6 +97,11 @@
while (unassigned.len && vacancies.len)
var/mob/new_player/candidate = pick_n_take(unassigned)
var/occupation = pick_n_take(vacancies)
if(candidate.jobs_restricted_by_gamemode)
if(occupation in candidate.jobs_restricted_by_gamemode)
continue
candidate.mind.assigned_role = occupation
for (var/mob/new_player/player in unassigned)
+48 -2
View File
@@ -474,7 +474,11 @@ Neutralize All Unidentified Life Signs: []<BR>"},
else
// Shooting Code:
var/obj/item/weapon/gun/energy/E=new installation
playsound(src.loc, E.fire_sound, 75, 1)
if(!E.silenced)
playsound(src.loc, E.fire_sound, 75, 1)
else
playsound(src.loc, E.fire_sound, 10, 1)
// All energy-based weapons are applicable
if (istype(E, /obj/item/weapon/gun/energy/laser))
@@ -496,7 +500,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
if(!emagged) use_power(700)
else use_power(1400)
else if(istype(E, /obj/item/weapon/gun/energy/taser))
else if(istype(E, /obj/item/weapon/gun/energy/taser) || istype(E, /obj/item/weapon/gun/energy/stunrevolver))
A = new /obj/item/projectile/electrode( loc )
icon_state = "target_prism"
if(!emagged) use_power(200)
@@ -511,6 +515,48 @@ Neutralize All Unidentified Life Signs: []<BR>"},
if(!emagged) use_power(300)
else use_power(600)
else if(istype(E, /obj/item/weapon/gun/energy/lasercannon))
A = new /obj/item/projectile/heavylaser( loc )
A.original = target.loc
icon_state = "orange_target_prism"
if(!emagged) use_power(600)
else use_power(1200)
else if(istype(E, /obj/item/weapon/gun/energy/heavylasercannon))
A = new /obj/item/projectile/deathlaser( loc )
A.original = target.loc
icon_state = "orange_target_prism"
if(!emagged) use_power(800)
else use_power(1600)
else if(istype(E, /obj/item/weapon/gun/energy/shockgun))
A = new /obj/item/projectile/fireball( loc )
A.original = target.loc
icon_state = "orange_target_prism"
if(!emagged) use_power(500)
else use_power(1000)
else if(istype(E, /obj/item/weapon/gun/energy/decloner))
A = new /obj/item/projectile/declone( loc )
A.original = target.loc
icon_state = "orange_target_prism"
if(!emagged) use_power(600)
else use_power(1200)
else if(istype(E, /obj/item/weapon/gun/energy/crossbow))
A = new /obj/item/projectile/bolt( loc )
A.original = target.loc
icon_state = "orange_target_prism"
if(!emagged) use_power(50)
else use_power(100)
else if(istype(E, /obj/item/weapon/gun/energy/largecrossbow))
A = new /obj/item/projectile/largebolt( loc )
A.original = target.loc
icon_state = "orange_target_prism"
if(!emagged) use_power(125)
else use_power(250)
else // Energy gun shots
if(!emagged) // if it hasn't been emagged, it uses normal taser shots
+15 -1
View File
@@ -13,7 +13,21 @@
return
/obj/item/proc/dropped(mob/user as mob)
return
..()
// So you can't drop the Offhand
if(istype(src, /obj/item/weapon/offhand))
user.drop_item(src)
var/obj/item/O_r = user.r_hand
var/obj/item/O_l = user.l_hand
if(O_r.twohanded)
if(O_r.wielded)
user.drop_item(O_r)
if(O_l.twohanded)
if(O_l.wielded)
user.drop_item(O_l)
del(src)
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
+14 -8
View File
@@ -101,12 +101,14 @@
icon_state = "heavylaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 60
mobdamage = list(BRUTE = 0, BURN = 60, TOX = 0, OXY = 0, CLONE = 0)
mobdamage = list(BRUTE = 10, BURN = 60, TOX = 0, OXY = 0, CLONE = 0)
flag = "laser"
New()
..()
effects["eyeblur"] = 20
effectprob["eyeblur"] = 100
effects["weak"] = 5
effectprob["weak"] = 15
fireball
name = "shock"
@@ -127,8 +129,12 @@
icon_state = "declone"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
mobdamage = list(BRUTE = 0, BURN = 0, TOX = 0, OXY = 0, CLONE = 70)
mobdamage = list(BRUTE = 0, BURN = 0, TOX = 0, OXY = 0, CLONE = 40)
flag = "bio"
New()
..()
effects["radiation"] = 70
effectmod["radiation"] = ADD
dart
name = "dart"
@@ -1041,9 +1047,9 @@
return 0
switch(mode)
if(0)
in_chamber = new /obj/item/projectile/beam(src)
if(1)
in_chamber = new /obj/item/projectile/heavylaser(src)
if(1)
in_chamber = new /obj/item/projectile/beam(src)
power_supply.use(charge_cost)
return 1
@@ -1076,9 +1082,9 @@
return 0
switch(mode)
if(0)
in_chamber = new /obj/item/projectile/beam(src)
if(1)
in_chamber = new /obj/item/projectile/heavylaser(src)
if(1)
in_chamber = new /obj/item/projectile/beam(src)
power_supply.use(charge_cost)
return 1
@@ -1123,8 +1129,8 @@
power_supply.give(power_supply.maxcharge)
decloner
name = "decloner"
desc = "A high tech energy weapon that declones a target."
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
icon_state = "decloner"
fire_sound = 'pulse3.ogg'
origin_tech = "combat=5;materials=4;powerstorage=3"
+2
View File
@@ -33,6 +33,8 @@
else
var/obj/item/weapon/offhand/O = l_hand
del O
IT.wielded = 0
IT.name = initial(IT.name)
@@ -240,7 +240,8 @@
sleep(10)
Atkcool = 0
Target.attack_metroid(src)
if(get_obstacle_ok(Target))
Target.attack_metroid(src)
if(prob(30))
@@ -255,7 +256,8 @@
else
if(Target in view(30, src))
step_to(src, Target)
if(get_obstacle_ok(Target))
step_to(src, Target)
else
Target = null
@@ -677,4 +677,83 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
health = 200
else
health = 150
stat = 0
stat = 0
/mob/living/carbon/metroid/proc/get_obstacle_ok(atom/A)
var/direct = get_dir(src, A)
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc )
var/ok = 0
if ( (direct - 1) & direct)
var/turf/Step_1
var/turf/Step_2
switch(direct)
if(5.0)
Step_1 = get_step(src, NORTH)
Step_2 = get_step(src, EAST)
if(6.0)
Step_1 = get_step(src, SOUTH)
Step_2 = get_step(src, EAST)
if(9.0)
Step_1 = get_step(src, NORTH)
Step_2 = get_step(src, WEST)
if(10.0)
Step_1 = get_step(src, SOUTH)
Step_2 = get_step(src, WEST)
else
if(Step_1 && Step_2)
var/check_1 = 0
var/check_2 = 0
if(step_to(D, Step_1))
check_1 = 1
for(var/obj/border_obstacle in Step_1)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
check_1 = 0
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_1 = 0
D.loc = src.loc
if(step_to(D, Step_2))
check_2 = 1
for(var/obj/border_obstacle in Step_2)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
check_2 = 0
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_2 = 0
if(check_1 || check_2)
ok = 1
else
if(loc == src.loc)
ok = 1
else
ok = 1
//Now, check objects to block exit that are on the border
for(var/obj/border_obstacle in src.loc)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
ok = 0
//Next, check objects to block entry that are on the border
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (A != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
ok = 0
del(D)
if (!( ok ))
return 0
return 1