fixes and turrets

This commit is contained in:
DeityLink
2015-08-28 03:01:21 +02:00
parent 01f20e736e
commit 5a3e76d391
10 changed files with 199 additions and 140 deletions

View File

@@ -101,6 +101,7 @@
if(!perp.wear_id)
threatcount += 2
if(ishuman(perp))
if(istype(perp.wear_suit, /obj/item/clothing/suit/wizrobe))
threatcount += 2

View File

@@ -60,14 +60,17 @@
machine_flags = EMAGGABLE
New()
/obj/machinery/porta_turret/New()
..()
icon_state = "[lasercolor]grey_target_prism"
// Sets up a spark system
spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
sleep(10)
spawn(10)
update_gun()
/obj/machinery/porta_turret/proc/update_gun()
if(!installation)// if for some reason the turret has no gun (ie, admin spawned) it resorts to basic taser shots
projectile = /obj/item/projectile/energy/electrode//holder for the projectile, here it is being set
eprojectile = /obj/item/projectile/beam//holder for the projectile when emagged, if it is different
@@ -189,6 +192,36 @@
iconholder = null
reqpower = 500
if(/obj/item/weapon/gun/energy/ricochet)
projectile = /obj/item/projectile/ricochet
eprojectile = projectile
iconholder = null
reqpower = 500
if(/obj/item/weapon/gun/energy/bison)
projectile = /obj/item/projectile/beam/bison
eprojectile = projectile
iconholder = null
reqpower = 250
fire_sound = 'sound/weapons/bison_fire.ogg'
efire_sound = fire_sound
if(/obj/item/weapon/gun/energy/polarstar/spur)
projectile = /obj/item/projectile/spur
eprojectile = projectile
iconholder = null
reqpower = 700
fire_sound = 'sound/weapons/spur_high.ogg'
efire_sound = fire_sound
if(/obj/item/weapon/gun/energy/polarstar)
projectile = /obj/item/projectile/spur/polarstar
eprojectile = projectile
iconholder = null
reqpower = 400
fire_sound = 'sound/weapons/spur_high.ogg'
efire_sound = fire_sound
else // Energy gun shots
projectile = /obj/item/projectile/energy/electrode// if it hasn't been emagged, it uses normal taser shots
eprojectile = /obj/item/projectile/beam//If it has, going to kill mode
@@ -204,7 +237,7 @@
reqpower = 200
fire_sound = 'sound/weapons/Taser.ogg'
Destroy()
/obj/machinery/porta_turret/Destroy()
// deletes its own cover with it
qdel(cover)
..()
@@ -694,6 +727,7 @@ Status: []<BR>"},
use_power((reqpower*2))
// Shooting Code:
A.starting = T
A.shot_from = src
A.current = T
A.yo = U.y - T.y
A.xo = U.x - T.x
@@ -859,11 +893,7 @@ Status: []<BR>"},
Turret.name = finish_name
Turret.installation = src.installation
Turret.gun_charge = src.gun_charge
// Turret.cover=new/obj/machinery/porta_turret_cover(src.loc)
// Turret.cover.Parent_Turret=Turret
// Turret.cover.name = finish_name
Turret.New()
Turret.update_gun()
qdel(src)
else if(istype(W, /obj/item/weapon/crowbar))

View File

@@ -801,6 +801,7 @@ var/global/floorIsLava = 0
<A href='?src=\ref[src];secretsfun=bomberdestroy'>Make Bomberman Bombs actually destroy stuff</A><BR>
<A href='?src=\ref[src];secretsfun=bombernohurt'>Make Bomberman Bombs harmless to players(default)</A><BR>
<A href='?src=\ref[src];secretsfun=bombernodestroy'>Make Bomberman Bombs harmless to the environnement(default)</A><BR>
<A href='?src=\ref[src];secretsfun=placeturret'>Create a turret</A><BR>
<BR>
<B>Final Solutions</B><BR>
<I>(Warning, these will end the round!)</I><BR>

View File

@@ -2884,6 +2884,24 @@
if(choice == "No, let's have perfectly circular explosions")
message_admins("[key_name_admin(usr)] has set explosions to completely pass through walls and obstacles.")
explosion_newmethod = 0
if("placeturret")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TUR")
var/list/possible_guns = list()
for(var/path in typesof(/obj/item/weapon/gun/energy))
possible_guns += path
var/choice = input("What energy gun do you want inside the turret?") in possible_guns
if(!choice)
return
var/obj/item/weapon/gun/energy/gun = new choice()
var/obj/machinery/porta_turret/Turret = new(get_turf(usr))
Turret.installation = choice
Turret.gun_charge = gun.power_supply.charge
Turret.update_gun()
qdel(gun)
var/emag = input("Emag the turret?") in list("Yes", "No")
if(emag=="Yes")
Turret.emag(usr)
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if(ok)

View File

@@ -36,7 +36,7 @@
return secured
/obj/item/device/assembly/prox_sensor/HasProximity(atom/movable/AM as mob|obj)
if(timestopped || loc.timestopped) return
if(timestopped || (loc && loc.timestopped)) return
if (istype(AM, /obj/effect/beam)) return
if (AM.move_speed < 12) sense()
return

View File

@@ -156,6 +156,9 @@
remove_from_mob(to_drop) //clean out any refs
if(!to_drop)
return 0
to_drop.forceMove(Target) //calls the Entered procs
to_drop.dropped(src)

View File

@@ -364,7 +364,7 @@
src.visible_message("<span class='warning'>[src] has thrown [item].</span>", \
drugged_message = "<span class='warning'>[item] escapes from [src]'s grasp and flies away!</span>")
if((istype(src.loc, /turf/space)) || (src.areaMaster.has_gravity == 0))
if((istype(src.loc, /turf/space)) || (src.areaMaster && (src.areaMaster.has_gravity == 0)))
var/mob/space_obj=src
// If we're being held, make the guy holding us move.
if(istype(loc,/obj/item/weapon/holder))

View File

@@ -727,6 +727,8 @@ var/list/beam_master = list()
if(drawn) return
drawn = 1
var/atom/curr = lastloc
if(!firer)
firer = starting
var/Angle=round(Get_Angle(firer,curr))
var/icon/I=new('icons/obj/lightning.dmi',icon_state)
var/icon/Istart=new('icons/obj/lightning.dmi',"[icon_state]start")

View File

@@ -109,7 +109,9 @@
/obj/item/projectile/spur/OnFired()
..()
var/obj/item/weapon/gun/energy/polarstar/quote = shot_from
var/obj/item/weapon/gun/energy/polarstar/spur/quote = shot_from
if(!quote || !istype(quote))
return
switch(quote.firelevel)
if(SPUR_FULL_POWER,SPUR_HIGH_POWER)
icon_state = "spur_high"
@@ -131,6 +133,8 @@
/obj/item/projectile/spur/polarstar/OnFired()
..()
var/obj/item/weapon/gun/energy/polarstar/quote = shot_from
if(!quote || !istype(quote))
return
switch(quote.firelevel)
if(SPUR_FULL_POWER,SPUR_HIGH_POWER)
icon_state = "spur_high"

View File

@@ -246,7 +246,7 @@
M.LAssailant = firer
else
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN/(no longer exists)</b> shot <b>UNKNOWN/(no longer exists)</b> with a <b>[type]</b>"
msg_admin_attack("UNKNOWN/(no longer exists) shot UNKNOWN/(no longer exists) with a [type]. Wait what the fuck? (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)")
msg_admin_attack("UNKNOWN/(no longer exists) shot UNKNOWN/(no longer exists) with a [type]. Wait what the fuck?")
log_attack("<font color='red'>UNKNOWN/(no longer exists) shot UNKNOWN/(no longer exists) with a [type]</font>")
/obj/item/projectile/ricochet/Bump(atom/A as mob|obj|turf|area)