diff --git a/code/modules/vore/fluffstuff/custom_items_vr.dm b/code/modules/vore/fluffstuff/custom_items_vr.dm index 9eacd23a62..2894ae112c 100644 --- a/code/modules/vore/fluffstuff/custom_items_vr.dm +++ b/code/modules/vore/fluffstuff/custom_items_vr.dm @@ -646,10 +646,13 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_ILLEGAL = 7) + var/obj/item/weapon/cell/device/weapon/power_source + var/charge_cost = 800 // cell/device/weapon has 2400 var/list/beacons = list() var/ready = 1 var/beacons_left = 3 + var/failure_chance = 5 //Percent var/obj/item/device/perfect_tele_beacon/destination var/datum/effect/effect/system/spark_spread/spk var/list/warned_users = list() @@ -658,6 +661,7 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie /obj/item/device/perfect_tele/New() ..() flags |= NOBLUDGEON + power_source = new (src) spk = new(src) spk.set_up(5, 0, src) spk.attach(src) @@ -668,13 +672,24 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie ..() /obj/item/device/perfect_tele/update_icon() - if(ready) + if(!power_source) + icon_state = "[initial(icon_state)]_o" + else if(ready && power_source.check_charge(charge_cost)) icon_state = "[initial(icon_state)]" else icon_state = "[initial(icon_state)]_w" ..() +/obj/item/device/perfect_tele/attack_hand(mob/user) + if(user.get_inactive_hand() == src && power_source) + to_chat(user,"You eject \the [power_source] from \the [src].") + user.put_in_hands(power_source) + power_source = null + update_icon() + else + return ..() + /obj/item/device/perfect_tele/attack_self(mob/user) if(!(user.ckey in warned_users)) warned_users |= user.ckey @@ -687,7 +702,7 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie switch(choice) if("Create Beacon") if(beacons_left <= 0) - user << "\The [src] can't support any more beacons!" + alert("The translocator can't support any more beacons!","Error") return var/new_name = html_encode(input(user,"New beacon's name (2-20 char):","[src]") as text|null) @@ -711,26 +726,34 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie if("Target Beacon") if(!beacons.len) - user << "\The [src] doesn't have any beacons!" + to_chat(user,"\The [src] doesn't have any beacons!") else var/target = input("Which beacon do you target?","[src]") in beacons|null if(target && (target in beacons)) destination = beacons[target] - user << "Destination set to '[target]'." + to_chat(user,"Destination set to '[target]'.") else return /obj/item/device/perfect_tele/attackby(obj/W, mob/user) - if(istype(W,/obj/item/device/perfect_tele_beacon)) + if(istype(W,/obj/item/weapon/cell/device/weapon) && !power_source) + power_source = W + power_source.update_icon() //Why doesn't a cell do this already? :| + user.unEquip(power_source) + power_source.forceMove(src) + to_chat(user,"You insert \the [power_source] into \the [src].") + update_icon() + + else if(istype(W,/obj/item/device/perfect_tele_beacon)) var/obj/item/device/perfect_tele_beacon/tb = W if(tb.tele_name in beacons) - user << "You re-insert \the [tb] into \the [src]." + to_chat(user,"You re-insert \the [tb] into \the [src].") beacons -= tb.tele_name user.unEquip(tb) qdel(tb) beacons_left++ else - user << "\The [tb] doesn't belong to \the [src]." + to_chat(user,"\The [tb] doesn't belong to \the [src].") return else ..() @@ -740,23 +763,33 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie if(!proximity) return + //Uhhuh, need that power source + if(!power_source) + to_chat(user,"\The [src] has no power source!") + return + + //Check for charge + if(!power_source.check_charge(charge_cost)) + to_chat(user,"\The [src] does not have enough power left!") + return + //Only mob/living need apply. if(!istype(user) || !istype(target)) return //No, you can't teleport buckled people. if(target.buckled) - user << "The target appears to be attached to something..." + to_chat(user,"The target appears to be attached to something...") return //No, you can't teleport if it's not ready yet. if(!ready) - user << "\The [src] is still recharging!" + to_chat(user,"\The [src] is still recharging!") return //No, you can't teleport if there's no destination. if(!destination) - user << "\The [src] doesn't have a current valid destination set!" + to_chat(user,"\The [src] doesn't have a current valid destination set!") return //No, you can't port to or from away missions. Stupidly complicated check. @@ -766,11 +799,19 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie return if( (uT.z != dT.z) && ( (uT.z > max_default_z_level() ) || (dT.z > max_default_z_level()) ) ) - user << "\The [src] can't teleport you that far!" + to_chat(user,"\The [src] can't teleport you that far!") return //Bzzt. ready = 0 + power_source.use(charge_cost) + + //Failure chance + if(prob(failure_chance)) + var/list/wrong_choices = beacons - destination.tele_name + var/wrong_name = pick(wrong_choices) + destination = beacons[wrong_name] + to_chat(user,"\The [src] malfunctions and sends you to the wrong beacon!") //Destination beacon vore checking var/datum/belly/target_belly @@ -799,8 +840,8 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie real_dest = destination.loc target_belly.internal_contents |= target playsound(target_belly.owner, target_belly.vore_sound, 100, 1) - target << "\The [src] teleports you right into [target_belly.owner]'s [target_belly.name]!" - target_belly.owner << "Your [target_belly.name] suddenly has a new occupant!" + to_chat(target,"\The [src] teleports you right into [target_belly.owner]'s [target_belly.name]!") + to_chat(target_belly.owner,"Your [target_belly.name] suddenly has a new occupant!") //Phase-out effect phase_out(target,get_turf(target)) @@ -822,7 +863,7 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie G.affecting.forceMove(real_dest) if(target_belly) target_belly.internal_contents |= G.affecting - G.affecting << "\The [src] teleports you right into [target_belly.owner]'s [target_belly.name]!" + to_chat(G.affecting,"\The [src] teleports you right into [target_belly.owner]'s [target_belly.name]!") //Phase-in effect for grabbed person phase_in(G.affecting,get_turf(G.affecting)) diff --git a/icons/obj/device_alt.dmi b/icons/obj/device_alt.dmi index 11d92f2845..fed11b212b 100644 Binary files a/icons/obj/device_alt.dmi and b/icons/obj/device_alt.dmi differ diff --git a/maps/virgo/virgo-1.dmm b/maps/virgo/virgo-1.dmm index 6476cf67f8..175dc738bf 100644 --- a/maps/virgo/virgo-1.dmm +++ b/maps/virgo/virgo-1.dmm @@ -5282,7 +5282,7 @@ "bXD" = (/obj/machinery/hologram/holopad,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/wood,/area/crew_quarters/captain) "bXE" = (/obj/structure/table/woodentable,/obj/item/device/flashlight/lamp/green,/turf/simulated/floor/wood,/area/crew_quarters/captain) "bXF" = (/obj/structure/table/woodentable,/obj/item/weapon/stamp/captain,/obj/item/clothing/glasses/omnihud/all,/turf/simulated/floor/wood,/area/crew_quarters/captain) -"bXG" = (/obj/structure/table/woodentable,/obj/machinery/computer/skills,/obj/item/weapon/hand_tele,/turf/simulated/floor/wood,/area/crew_quarters/captain) +"bXG" = (/obj/structure/table/woodentable,/obj/machinery/computer/skills,/obj/item/device/perfect_tele{desc = "Seems absurd, doesn't it? Yet, here we are. Generally considered dangerous contraband unless the user has permission from Central Command. This one is the Colony Director's, and they are authorized to use it."; name = "director's translocator"},/turf/simulated/floor/wood,/area/crew_quarters/captain) "bXH" = (/obj/machinery/door/window/southright{name = "Captain's Desk Door"; req_access = list(20)},/turf/simulated/floor/wood,/area/crew_quarters/captain) "bXI" = (/obj/structure/table/woodentable,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/folder/blue,/obj/item/device/megaphone,/obj/machinery/requests_console{announcementConsole = 1; department = "Colony Director's Desk"; departmentType = 5; name = "Station Administrator RC"; pixel_x = 30; pixel_y = 0},/obj/structure/window/reinforced,/obj/item/weapon/pen/multi,/turf/simulated/floor/wood,/area/crew_quarters/captain) "bXJ" = (/obj/item/weapon/stool/padded{pixel_y = 5},/obj/effect/floor_decal/corner/beige{dir = 10},/obj/effect/floor_decal/corner/beige{dir = 9},/obj/effect/floor_decal/spline/plain{dir = 10},/turf/simulated/floor/tiled/white,/area/crew_quarters/bar)