mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-27 18:42:44 +00:00
Refactors translocators a bit more
This commit is contained in:
@@ -12,6 +12,9 @@
|
|||||||
var/charge_cost = 800 // cell/device/weapon has 2400
|
var/charge_cost = 800 // cell/device/weapon has 2400
|
||||||
var/battery_lock = 0 //If set, weapon cannot switch batteries
|
var/battery_lock = 0 //If set, weapon cannot switch batteries
|
||||||
|
|
||||||
|
var/longrange = 0 //Can teleport very long distances
|
||||||
|
var/abductor = 0 //Can be used on teleportation blocking turfs
|
||||||
|
|
||||||
var/list/beacons = list()
|
var/list/beacons = list()
|
||||||
var/ready = 1
|
var/ready = 1
|
||||||
var/beacons_left = 3
|
var/beacons_left = 3
|
||||||
@@ -181,13 +184,15 @@
|
|||||||
if(!uT || !dT)
|
if(!uT || !dT)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
if( (uT.z != dT.z) && (!(dT.z in dat["z_level_detection"])) )
|
if(!longrange)
|
||||||
to_chat(user,"<span class='warning'>\The [src] can't teleport you that far!</span>")
|
if( (uT.z != dT.z) && (!(dT.z in dat["z_level_detection"])) )
|
||||||
return FALSE
|
to_chat(user,"<span class='warning'>\The [src] can't teleport you that far!</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
if(uT.block_tele || dT.block_tele)
|
if(!abductor)
|
||||||
to_chat(user,"<span class='warning'>Something is interfering with \the [src]!</span>")
|
if(uT.block_tele || dT.block_tele)
|
||||||
return FALSE
|
to_chat(user,"<span class='warning'>Something is interfering with \the [src]!</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
//Seems okay to me!
|
//Seems okay to me!
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -372,45 +377,15 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/device/perfect_tele_beac
|
|||||||
charge_cost = 400
|
charge_cost = 400
|
||||||
beacons_left = 6
|
beacons_left = 6
|
||||||
failure_chance = 0 //Percent
|
failure_chance = 0 //Percent
|
||||||
|
longrange = 1
|
||||||
/obj/item/device/perfect_tele/alien/teleport_checks(mob/living/target,mob/living/user)
|
abductor = 1
|
||||||
//Uhhuh, need that power source
|
|
||||||
if(!power_source)
|
|
||||||
to_chat(user,"<span class='warning'>\The [src] has no power source!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//Check for charge
|
|
||||||
if((!power_source.check_charge(charge_cost)) && (!power_source.fully_charged()))
|
|
||||||
to_chat(user,"<span class='warning'>\The [src] does not have enough power left!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//Only mob/living need apply.
|
|
||||||
if(!istype(user) || !istype(target))
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//No, you can't teleport buckled people.
|
|
||||||
if(target.buckled)
|
|
||||||
to_chat(user,"<span class='warning'>The target appears to be attached to something...</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//No, you can't teleport if it's not ready yet.
|
|
||||||
if(!ready)
|
|
||||||
to_chat(user,"<span class='warning'>\The [src] is still recharging!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//No, you can't teleport if there's no destination.
|
|
||||||
if(!destination)
|
|
||||||
to_chat(user,"<span class='warning'>\The [src] doesn't have a current valid destination set!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//Seems okay to me!
|
|
||||||
return TRUE
|
|
||||||
|
|
||||||
/obj/item/device/perfect_tele/frontier
|
/obj/item/device/perfect_tele/frontier
|
||||||
icon_state = "minitrans"
|
icon_state = "minitrans"
|
||||||
beacons_left = 1 //Just one
|
beacons_left = 1 //Just one
|
||||||
battery_lock = 1
|
battery_lock = 1
|
||||||
unacidable = 1
|
unacidable = 1
|
||||||
|
failure_chance = 0 //Percent
|
||||||
var/loc_network = null
|
var/loc_network = null
|
||||||
var/phase_power = 75
|
var/phase_power = 75
|
||||||
var/recharging = 0
|
var/recharging = 0
|
||||||
@@ -443,6 +418,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/device/perfect_tele_beac
|
|||||||
name = "centcom translocator"
|
name = "centcom translocator"
|
||||||
desc = "Similar to translocator technology, however, most of its destinations are hardcoded."
|
desc = "Similar to translocator technology, however, most of its destinations are hardcoded."
|
||||||
loc_network = "centcom"
|
loc_network = "centcom"
|
||||||
|
longrange = 1
|
||||||
|
|
||||||
/obj/item/device/perfect_tele/frontier/staff/New()
|
/obj/item/device/perfect_tele/frontier/staff/New()
|
||||||
..()
|
..()
|
||||||
@@ -450,50 +426,23 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/device/perfect_tele_beac
|
|||||||
if(nb.tele_network == loc_network)
|
if(nb.tele_network == loc_network)
|
||||||
beacons[nb.tele_name] = nb
|
beacons[nb.tele_name] = nb
|
||||||
|
|
||||||
/obj/item/device/perfect_tele/frontier/staff/teleport_checks(mob/living/target,mob/living/user)
|
/obj/item/device/perfect_tele/frontier/unknown
|
||||||
//Uhhuh, need that power source
|
name = "modified translocator"
|
||||||
if(!power_source)
|
desc = "This crank-charged translocator has only one beacon, but it already has a destination preprogrammed into it."
|
||||||
to_chat(user,"<span class='warning'>\The [src] has no power source!</span>")
|
longrange = 1
|
||||||
return FALSE
|
abductor = 1
|
||||||
|
|
||||||
//Check for charge
|
/obj/item/device/perfect_tele/frontier/unknown/New()
|
||||||
if((!power_source.check_charge(charge_cost)) && (!power_source.fully_charged()))
|
..()
|
||||||
to_chat(user,"<span class='warning'>\The [src] does not have enough power left!</span>")
|
for(var/obj/item/device/perfect_tele_beacon/stationary/nb in premade_tele_beacons)
|
||||||
return FALSE
|
if(nb.tele_network == loc_network)
|
||||||
|
beacons[nb.tele_name] = nb
|
||||||
|
|
||||||
//Only mob/living need apply.
|
/obj/item/device/perfect_tele/frontier/unknown/one
|
||||||
if(!istype(user) || !istype(target))
|
loc_network = "unkone"
|
||||||
return FALSE
|
/obj/item/device/perfect_tele/frontier/unknown/two
|
||||||
|
loc_network = "unktwo"
|
||||||
//No, you can't teleport buckled people.
|
/obj/item/device/perfect_tele/frontier/unknown/three
|
||||||
if(target.buckled)
|
loc_network = "unkthree"
|
||||||
to_chat(user,"<span class='warning'>The target appears to be attached to something...</span>")
|
/obj/item/device/perfect_tele/frontier/unknown/four
|
||||||
return FALSE
|
loc_network = "unkfour"
|
||||||
|
|
||||||
//No, you can't teleport if it's not ready yet.
|
|
||||||
if(!ready)
|
|
||||||
to_chat(user,"<span class='warning'>\The [src] is still recharging!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//No, you can't teleport if there's no destination.
|
|
||||||
if(!destination)
|
|
||||||
to_chat(user,"<span class='warning'>\The [src] doesn't have a current valid destination set!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//No, you can't teleport if there's a jammer.
|
|
||||||
if(is_jammed(src) || is_jammed(destination))
|
|
||||||
to_chat(user,"<span class='warning'>\The [src] refuses to teleport you, due to strong interference!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//Can port to and from away areas (required for this to work) but teleporter blockers block it
|
|
||||||
var/turf/uT = get_turf(user)
|
|
||||||
var/turf/dT = get_turf(destination)
|
|
||||||
if(!uT || !dT)
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
if(uT.block_tele || dT.block_tele)
|
|
||||||
to_chat(user,"<span class='warning'>Something is interfering with \the [src]!</span>")
|
|
||||||
return FALSE
|
|
||||||
|
|
||||||
//Seems okay to me!
|
|
||||||
return TRUE
|
|
||||||
|
|||||||
@@ -4,14 +4,18 @@
|
|||||||
req_access = list(access_all_personal_lockers)
|
req_access = list(access_all_personal_lockers)
|
||||||
var/registered_name = null
|
var/registered_name = null
|
||||||
|
|
||||||
|
/* //VOREStation Removal
|
||||||
starts_with = list(
|
starts_with = list(
|
||||||
/obj/item/device/radio/headset)
|
/obj/item/device/radio/headset)
|
||||||
|
*/
|
||||||
|
|
||||||
/obj/structure/closet/secure_closet/personal/Initialize()
|
/obj/structure/closet/secure_closet/personal/Initialize()
|
||||||
|
/* //VOREStation Removal
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
starts_with += /obj/item/weapon/storage/backpack
|
starts_with += /obj/item/weapon/storage/backpack
|
||||||
else
|
else
|
||||||
starts_with += /obj/item/weapon/storage/backpack/satchel/norm
|
starts_with += /obj/item/weapon/storage/backpack/satchel/norm
|
||||||
|
*/
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/structure/closet/secure_closet/personal/patient
|
/obj/structure/closet/secure_closet/personal/patient
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
/obj/item/weapon/storage/box/survival/space,
|
/obj/item/weapon/storage/box/survival/space,
|
||||||
/obj/item/weapon/extinguisher/mini,
|
/obj/item/weapon/extinguisher/mini,
|
||||||
/obj/item/device/radio{
|
/obj/item/device/radio{
|
||||||
icon_state = "walkietalkieOLD";
|
icon_state = "walkietalkiebay";
|
||||||
name = "emergency radio"
|
name = "emergency radio"
|
||||||
},
|
},
|
||||||
/obj/item/weapon/towel{
|
/obj/item/weapon/towel{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user