mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-28 19:12:01 +00:00
-Holograms are range based again.
-Instead of the singularity using range to look for rad_collectors around it, it will now look through the list and check the distance between every rad_collector, if it's less than 15 tiles in range then it'll give it power. -Fixed naming your revolver. - git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4638 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -15,7 +15,7 @@ Possible to do for anyone motivated enough:
|
|||||||
// HOLOPAD MODE
|
// HOLOPAD MODE
|
||||||
// 0 = RANGE BASED
|
// 0 = RANGE BASED
|
||||||
// 1 = AREA BASED
|
// 1 = AREA BASED
|
||||||
var/const/HOLOPAD_MODE = 1
|
var/const/HOLOPAD_MODE = 0
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
|
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
|
||||||
@@ -120,6 +120,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
|||||||
if(hologram)
|
if(hologram)
|
||||||
step_to(hologram, master.eyeobj) // So it turns.
|
step_to(hologram, master.eyeobj) // So it turns.
|
||||||
hologram.loc = get_turf(master.eyeobj)
|
hologram.loc = get_turf(master.eyeobj)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/hologram/power_change()
|
/obj/machinery/hologram/power_change()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||||
|
var/global/list/obj/machinery/power/rad_collector/rad_collectors = list()
|
||||||
|
|
||||||
/obj/machinery/power/rad_collector
|
/obj/machinery/power/rad_collector
|
||||||
name = "Radiation Collector Array"
|
name = "Radiation Collector Array"
|
||||||
@@ -17,6 +17,15 @@
|
|||||||
var/locked = 0
|
var/locked = 0
|
||||||
var/drainratio = 1
|
var/drainratio = 1
|
||||||
|
|
||||||
|
/obj/machinery/power/rad_collector/New()
|
||||||
|
..()
|
||||||
|
spawn(5)
|
||||||
|
rad_collectors += src
|
||||||
|
|
||||||
|
/obj/machinery/power/rad_collector/Del()
|
||||||
|
rad_collectors -= src
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/machinery/power/rad_collector/process()
|
/obj/machinery/power/rad_collector/process()
|
||||||
if(P)
|
if(P)
|
||||||
if(P.air_contents.toxins <= 0)
|
if(P.air_contents.toxins <= 0)
|
||||||
@@ -56,7 +65,7 @@
|
|||||||
user.drop_item()
|
user.drop_item()
|
||||||
src.P = W
|
src.P = W
|
||||||
W.loc = src
|
W.loc = src
|
||||||
updateicon()
|
update_icons()
|
||||||
else if(istype(W, /obj/item/weapon/crowbar))
|
else if(istype(W, /obj/item/weapon/crowbar))
|
||||||
if(P && !src.locked)
|
if(P && !src.locked)
|
||||||
eject()
|
eject()
|
||||||
@@ -108,7 +117,7 @@
|
|||||||
if(active)
|
if(active)
|
||||||
toggle_power()
|
toggle_power()
|
||||||
else
|
else
|
||||||
updateicon()
|
update_icons()
|
||||||
|
|
||||||
/obj/machinery/power/rad_collector/proc/receive_pulse(var/pulse_strength)
|
/obj/machinery/power/rad_collector/proc/receive_pulse(var/pulse_strength)
|
||||||
if(P && active)
|
if(P && active)
|
||||||
@@ -120,7 +129,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/power/rad_collector/proc/updateicon()
|
/obj/machinery/power/rad_collector/proc/update_icons()
|
||||||
overlays = null
|
overlays = null
|
||||||
if(P)
|
if(P)
|
||||||
overlays += image('icons/obj/singularity.dmi', "ptank")
|
overlays += image('icons/obj/singularity.dmi', "ptank")
|
||||||
@@ -138,6 +147,6 @@
|
|||||||
else
|
else
|
||||||
icon_state = "ca"
|
icon_state = "ca"
|
||||||
flick("ca_deactive", src)
|
flick("ca_deactive", src)
|
||||||
updateicon()
|
update_icons()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -435,8 +435,9 @@ var/global/list/uneatable = list(
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/singularity/proc/pulse()
|
/obj/machinery/singularity/proc/pulse()
|
||||||
for(var/obj/machinery/power/rad_collector/R in orange(15,src))
|
|
||||||
if(istype(R,/obj/machinery/power/rad_collector))
|
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
|
||||||
|
if(get_dist(R, src) <= 15) // Better than using orange() every process
|
||||||
R.receive_pulse(energy)
|
R.receive_pulse(energy)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
M << "\red You don't feel cool enough to name this gun, chump."
|
M << "\red You don't feel cool enough to name this gun, chump."
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
var/input = copytext(sanitize(input("What do you want to name the gun?",,"")),1,MAX_NAME_LEN)
|
var/input = stripped_input(usr,"What do you want to name the gun?", ,"", MAX_NAME_LEN)
|
||||||
|
|
||||||
if(src && input && !M.stat && in_range(M,src))
|
if(src && input && !M.stat && in_range(M,src))
|
||||||
name = input
|
name = input
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
|||||||
<h2 class="date">6 September 2012</h2>
|
<h2 class="date">6 September 2012</h2>
|
||||||
<h3 class="author">Giacom updated:</h3>
|
<h3 class="author">Giacom updated:</h3>
|
||||||
<ul class="changes bgimages16">
|
<ul class="changes bgimages16">
|
||||||
<li class="rscadd">AIs can now move around their holograms. I am also experimenting by making them area dependant, instead of depending on the range between the holopad and the hologram.</li>
|
|
||||||
<li class="tweak">Removed cameras from bots. They weren't working well with freelook and I felt that since they weren't used at all, they wouldn't be missed.</li>
|
<li class="tweak">Removed cameras from bots. They weren't working well with freelook and I felt that since they weren't used at all, they wouldn't be missed.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user