mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
-Should fix machines not depowering correctly. Let me know if you find a machine which should be powered off but isn't.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5388 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
var/stat = 0
|
||||
var/emagged = 0
|
||||
var/use_power = 0
|
||||
var/use_power = 1
|
||||
//0 = dont run the auto
|
||||
//1 = run auto, use idle
|
||||
//2 = run auto, use active
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/machinery/portable_atmospherics
|
||||
name = "atmoalter"
|
||||
use_power = 0
|
||||
var/datum/gas_mixture/air_contents = new
|
||||
|
||||
var/obj/machinery/atmospherics/portables_connector/connected_port
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
layer = MOB_LAYER
|
||||
luminosity = 3
|
||||
use_power = 0
|
||||
var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds"
|
||||
var/on = 1
|
||||
var/health = 0 //do not forget to set health for your bot!
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
var/base_state = "left"
|
||||
var/health = 150.0 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
|
||||
visible = 0.0
|
||||
use_power = 0
|
||||
flags = ON_BORDER
|
||||
opacity = 0
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
|
||||
@@ -1014,8 +1014,8 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "soil"
|
||||
density = 0
|
||||
New()
|
||||
..()
|
||||
use_power = 0
|
||||
|
||||
updateicon() // Same as normal but with the overlays removed - Cheridan.
|
||||
overlays = null
|
||||
if(planted)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "syndbeacon"
|
||||
|
||||
use_power = 0
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
|
||||
@@ -11,11 +11,13 @@
|
||||
var/move_to_delay = 2 //delay for the automated movement.
|
||||
var/list/friends = list()
|
||||
stop_automated_movement_when_pulled = 0
|
||||
var/destroy_surroundings = 1
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/FindTarget()
|
||||
|
||||
var/atom/T = null
|
||||
stop_automated_movement = 0
|
||||
var/list/non_threat_targets = list() // Targets which it will target if there are no other targets
|
||||
for(var/atom/A in ListTargets())
|
||||
|
||||
if(isliving(A))
|
||||
@@ -25,16 +27,25 @@
|
||||
else if(L in friends)
|
||||
continue
|
||||
else
|
||||
if(!L.stat)
|
||||
|
||||
if(L.stat == CONSCIOUS)
|
||||
stance = HOSTILE_STANCE_ATTACK
|
||||
T = L
|
||||
break
|
||||
else if(L.stat == UNCONSCIOUS)
|
||||
non_threat_targets += L
|
||||
continue
|
||||
|
||||
if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
if (M.occupant)
|
||||
stance = HOSTILE_STANCE_ATTACK
|
||||
T = M
|
||||
break
|
||||
|
||||
if(!T && non_threat_targets.len)
|
||||
T = pick(non_threat_targets)
|
||||
|
||||
return T
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/MoveToTarget()
|
||||
@@ -160,7 +171,8 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
|
||||
for(var/dir in cardinal) // North, South, East, West
|
||||
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
obstacle.attack_animal(src)
|
||||
if(destroy_surroundings)
|
||||
for(var/dir in cardinal) // North, South, East, West
|
||||
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
obstacle.attack_animal(src)
|
||||
@@ -134,7 +134,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
var/obj/item/staff = null // the staff that changed they, never attack the bearer of this staff
|
||||
var/destroy_objects = 0
|
||||
destroy_surroundings = 0
|
||||
var/knockdown_people = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/obj/item/staff)
|
||||
@@ -164,7 +164,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
|
||||
if(istype(O, /obj/structure))
|
||||
health = (anchored * 50) + 50
|
||||
destroy_objects = 1
|
||||
destroy_surroundings = 1
|
||||
if(O.density && O.anchored)
|
||||
knockdown_people = 1
|
||||
melee_damage_lower *= 2
|
||||
@@ -183,10 +183,6 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
return 1
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/DestroySurroundings()
|
||||
if(destroy_objects)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/AttackingTarget()
|
||||
. =..()
|
||||
if(knockdown_people)
|
||||
|
||||
@@ -422,10 +422,10 @@
|
||||
/mob/living/simple_animal/proc/SA_attackable(target_mob)
|
||||
if (isliving(target_mob))
|
||||
var/mob/living/L = target_mob
|
||||
if(!L.stat)
|
||||
return (0)
|
||||
if(L.stat != DEAD)
|
||||
return 0
|
||||
if (istype(target_mob,/obj/mecha))
|
||||
var/obj/mecha/M = target_mob
|
||||
if (M.occupant)
|
||||
return (0)
|
||||
return (1)
|
||||
return 0
|
||||
return 1
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
icon_state = "apc0"
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
req_access = list(access_engine_equip)
|
||||
var/area/area
|
||||
var/areastring = null
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
icon_state = "teg"
|
||||
anchored = 1
|
||||
density = 1
|
||||
use_power = 0
|
||||
|
||||
var/obj/machinery/atmospherics/binary/circulator/circ1
|
||||
var/obj/machinery/atmospherics/binary/circulator/circ2
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "teg"
|
||||
anchored = 1
|
||||
density = 1
|
||||
use_power = 0
|
||||
|
||||
var/obj/machinery/atmospherics/unary/generator_input/input1
|
||||
var/obj/machinery/atmospherics/unary/generator_input/input2
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
anchored = 1
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dispenser"
|
||||
use_power = 1
|
||||
use_power = 0
|
||||
idle_power_usage = 40
|
||||
var/energy = 100
|
||||
var/max_energy = 100
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
anchored = 1
|
||||
density = 1
|
||||
use_power = 0
|
||||
|
||||
var/chargesa = 1
|
||||
var/insistinga = 0
|
||||
|
||||
Reference in New Issue
Block a user