Merge pull request #15928 from AnturK/abductor_update

Minor Abductor update
This commit is contained in:
KorPhaeron
2016-03-12 15:13:53 -06:00
7 changed files with 53 additions and 67 deletions
@@ -8,6 +8,7 @@
var/datum/action/innate/teleport_self/tele_self_action = new
var/datum/action/innate/vest_mode_swap/vest_mode_action = new
var/datum/action/innate/vest_disguise_swap/vest_disguise_action = new
var/datum/action/innate/set_droppoint/set_droppoint_action = new
var/obj/machinery/abductor/console/console
icon = 'icons/obj/abductor.dmi'
@@ -41,6 +42,9 @@
vest_disguise_action.target = console
vest_disguise_action.Grant(user)
set_droppoint_action.target = console
set_droppoint_action.Grant(user)
/obj/machinery/computer/camera_advanced/abductor/proc/IsAbductor(mob/living/carbon/human/H)
return H.dna.species.id == "abductor"
@@ -66,6 +70,7 @@
origin.tele_self_action.Remove(C)
origin.vest_mode_action.Remove(C)
origin.vest_disguise_action.Remove(C)
origin.set_droppoint_action.Remove(C)
remote_eye.eye_user = null
C.reset_perspective(null)
if(C.client)
@@ -136,3 +141,17 @@
return
var/obj/machinery/abductor/console/console = target
console.SelectDisguise(remote=1)
/datum/action/innate/set_droppoint
name = "Set Experiment Release Point"
button_icon_state = "set_drop"
/datum/action/innate/set_droppoint/Activate()
if(!target || !iscarbon(owner))
return
var/mob/living/carbon/human/C = owner
var/mob/camera/aiEye/remote/remote_eye = C.remote_control
var/obj/machinery/abductor/console/console = target
console.SetDroppoint(remote_eye.loc,owner)
@@ -61,7 +61,6 @@
dat += "<span class='bad'>Emergency Teleporter System.</span>"
dat += "<span class='bad'>Consider using primary observation console first.</span>"
dat += "<a href='?src=\ref[src];teleporter_send=1'>Activate Teleporter</A><br>"
dat += "<a href='?src=\ref[src];teleporter_set=1'>Set Teleporter</A><br>"
if(gizmo!=null && gizmo.marked!=null)
dat += "<a href='?src=\ref[src];teleporter_retrieve=1'>Retrieve Mark</A><br>"
else
@@ -94,9 +93,7 @@
return
usr.set_machine(src)
if(href_list["teleporter_set"])
TeleporterSet()
else if(href_list["teleporter_send"])
if(href_list["teleporter_send"])
TeleporterSend()
else if(href_list["teleporter_retrieve"])
TeleporterRetrieve()
@@ -116,12 +113,6 @@
Dispense(/obj/item/device/abductor/gizmo)
src.updateUsrDialog()
/obj/machinery/abductor/console/proc/TeleporterSet()
var/A = null
A = input("Select area to teleport to", "Teleport", A) in teleportlocs
if(pad!=null && in_range(usr,src))
pad.teleport_target = teleportlocs[A]
return
/obj/machinery/abductor/console/proc/TeleporterRetrieve()
if(gizmo!=null && pad!=null && gizmo.marked)
@@ -152,6 +143,16 @@
vest.SetDisguise(chosen)
return
/obj/machinery/abductor/console/proc/SetDroppoint(turf/simulated/location,user)
if(!istype(location))
user << "<span class='warning'>That place is not safe for the specimen.</span>"
return
if(pad)
pad.teleport_target = location
user << "<span class='notice'>Location marked as test subject release point.</span>"
/obj/machinery/abductor/console/proc/Initialize()
for(var/obj/machinery/abductor/pad/p in machines)
@@ -188,13 +188,10 @@
/obj/machinery/abductor/experiment/proc/SendBack(mob/living/carbon/human/H)
H.Sleeping(8)
var/area/A
if(console && console.pad && console.pad.teleport_target)
A = console.pad.teleport_target
if(A.safe) // right now crew areas are safe - being locked behind closed doors is not fun
TeleportToArea(H,A)
H.uncuff()
return
H.forceMove(console.pad.teleport_target)
H.uncuff()
return
//Area not chosen / It's not safe area - teleport to arrivals
H.forceMove(pick(latejoin))
H.uncuff()
@@ -4,38 +4,7 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "alien-pad-idle"
anchored = 1
var/area/teleport_target
/obj/machinery/abductor/proc/TeleportToArea(mob/living/target,area/thearea)
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
if(!L.len)
return
if(target && target.buckled)
target.buckled.unbuckle_mob(target) //Antur says this teleport -shouldn't- force unbuckle, and it's his codebabby soo~
var/list/tempL = L
var/attempt = null
var/success = 0
while(tempL.len)
attempt = pick(tempL)
target.Move(attempt)
if(get_turf(target) == attempt)
success = 1
break
else
tempL.Remove(attempt)
if(!success)
target.loc = pick(L)
var/turf/teleport_target
/obj/machinery/abductor/pad/proc/Warp(mob/living/target)
target.Move(src.loc)
@@ -44,8 +13,8 @@
if(teleport_target == null)
teleport_target = teleportlocs[pick(teleportlocs)]
flick("alien-pad", src)
for(var/mob/living/target in src.loc)
TeleportToArea(target,teleport_target)
for(var/mob/living/target in loc)
target.forceMove(teleport_target)
spawn(0)
anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir)
@@ -56,23 +25,15 @@
Warp(target)
/obj/machinery/abductor/pad/proc/MobToLoc(place,mob/living/target)
var/obj/effect/teleport_abductor/F = new(place)
var/datum/effect_system/spark_spread/S = new
S.set_up(10,0,place)
S.start()
new/obj/effect/overlay/temp/teleport_abductor(place)
sleep(80)
qdel(F)
flick("alien-pad", src)
target.forceMove(place)
anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir)
/obj/machinery/abductor/pad/proc/PadToLoc(place)
var/obj/effect/teleport_abductor/F = new(place)
var/datum/effect_system/spark_spread/S = new
S.set_up(10,0,place)
S.start()
new/obj/effect/overlay/temp/teleport_abductor(place)
sleep(80)
qdel(F)
flick("alien-pad", src)
for(var/mob/living/target in src.loc)
target.forceMove(place)
@@ -80,7 +41,14 @@
anim(target.loc,target,'icons/mob/mob.dmi',,"uncloak",,target.dir)
/obj/effect/teleport_abductor
/obj/effect/overlay/temp/teleport_abductor
name = "Huh"
icon = 'icons/obj/abductor.dmi'
icon_state = "teleport"
duration = 80
/obj/effect/overlay/temp/teleport_abductor/New()
var/datum/effect_system/spark_spread/S = new
S.set_up(10,0,loc)
S.start()
..()
@@ -91,6 +91,7 @@
return 1
/obj/structure/table/attack_hand(mob/living/user)
. = ..()
user.changeNext_move(CLICK_CD_MELEE)
if(tableclimber && tableclimber != user)
tableclimber.Weaken(2)
+6 -6
View File
@@ -11,7 +11,7 @@
return
if(!user.IsAdvancedToolUser())
return
interact(user)
tablecraft(user)
/obj/structure/table/proc/check_contents(datum/table_recipe/R)
check_table()
@@ -179,7 +179,7 @@
return Deletion
/obj/structure/table/interact(mob/user)
/obj/structure/table/proc/tablecraft(mob/user)
if(user.incapacitated() || user.lying || !Adjacent(user))
return
check_table()
@@ -227,22 +227,22 @@
if(href_list["make"])
var/datum/table_recipe/TR = locate(href_list["make"])
busy = 1
interact(usr)
tablecraft(usr)
var/fail_msg = construct_item(usr, TR)
if(!fail_msg)
usr << "<span class='notice'>[TR.name] constructed.</span>"
else
usr << "<span class ='warning'>Construction failed[fail_msg]</span>"
busy = 0
interact(usr)
tablecraft(usr)
if(href_list["forwardCat"])
viewing_category = next_cat()
usr << "<span class='notice'>Category is now [categories[viewing_category]].</span>"
interact(usr)
tablecraft(usr)
if(href_list["backwardCat"])
viewing_category = prev_cat()
usr << "<span class='notice'>Category is now [categories[viewing_category]].</span>"
interact(usr)
tablecraft(usr)
//Next works nicely with modular arithmetic
/obj/structure/table/proc/next_cat()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 76 KiB