mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Merge branch 'master' of git://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -1880,16 +1880,26 @@
|
||||
if(istype(M, /mob/living/carbon/alien))
|
||||
dat += "<td>Alien</td>"
|
||||
|
||||
if(M.mind && M.mind.assigned_role) // Adds a column to Player Panel that shows their current job.
|
||||
if(M.mind && M.mind.assigned_role && istype(M, /mob/living/carbon/human)) // Adds a column to Player Panel that shows their current job.
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if (H.wear_id)
|
||||
var/obj/item/weapon/card/id/id = H.wear_id
|
||||
var/obj/item/weapon/card/id/id
|
||||
|
||||
if(istype(H.wear_id, /obj/item/weapon/card/id))
|
||||
id = H.wear_id // The ID is on the ID slot
|
||||
else if(istype(H.wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/PDA = H.wear_id
|
||||
id = PDA.id // The ID is contained inside the PDA
|
||||
|
||||
if(M.mind.assigned_role == id.assignment) // Polymorph
|
||||
dat += "<td>[M.mind.assigned_role]</td>"
|
||||
else
|
||||
dat += "<td>[M.mind.assigned_role] ([id.assignment])"
|
||||
|
||||
else
|
||||
dat += "<td>[M.mind.assigned_role] (No ID)</td>"
|
||||
|
||||
else
|
||||
dat += "<td>No Assigned Role</td>"
|
||||
|
||||
@@ -1958,7 +1968,7 @@
|
||||
|
||||
dat += "</table></body></html>"
|
||||
|
||||
usr << browse(dat, "window=players;size=540x480")
|
||||
usr << browse(dat, "window=players;size=905x480")
|
||||
|
||||
|
||||
/obj/admins/proc/Jobbans()
|
||||
|
||||
@@ -492,7 +492,12 @@
|
||||
holo_icon = getHologramIcon(icon('AI.dmi',"holo2"))
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/proc/corereturn()
|
||||
set category = "Malfunction"
|
||||
set name = "Return to Main Core"
|
||||
|
||||
|
||||
|
||||
|
||||
var/obj/machinery/power/apc/apc = src.loc
|
||||
if(!istype(apc))
|
||||
src << "\blue You are already in your Main Core."
|
||||
return
|
||||
apc.malfvacate()
|
||||
@@ -38,6 +38,10 @@
|
||||
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
|
||||
world << sound('shuttlecalled.ogg')
|
||||
|
||||
if(explosive)
|
||||
spawn(10)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
O.mode = 2
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
loc = T.loc
|
||||
if (istype(loc, /area))
|
||||
//stage = 4
|
||||
if (!loc.master.power_equip && isturf(src.loc))
|
||||
if (!loc.master.power_equip && !istype(src.loc,/obj/item))
|
||||
//stage = 5
|
||||
blind = 1
|
||||
|
||||
@@ -72,6 +72,10 @@
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
|
||||
var/area/home = get_area(src)
|
||||
if(home.powered(EQUIP))
|
||||
home.use_power(1000, EQUIP)
|
||||
|
||||
if (src:aiRestorePowerRoutine==2)
|
||||
src << "Alert cancelled. Power has been restored without our assistance."
|
||||
src:aiRestorePowerRoutine = 0
|
||||
@@ -102,7 +106,7 @@
|
||||
src.see_in_dark = 0
|
||||
src.see_invisible = 0
|
||||
|
||||
if (((!loc.master.power_equip) || istype(T, /turf/space)) && isturf(src.loc))
|
||||
if (((!loc.master.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
|
||||
if (src:aiRestorePowerRoutine==0)
|
||||
src:aiRestorePowerRoutine = 1
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
/mob/living/silicon/ai/say(var/message)
|
||||
if(parent && istype(parent) && parent.stat != 2)
|
||||
parent.say(message)
|
||||
return
|
||||
//If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead.
|
||||
..(message)
|
||||
|
||||
/mob/living/silicon/ai/say_understands(var/other)
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
return 1
|
||||
|
||||
@@ -54,4 +54,11 @@
|
||||
drowsyness = max(drowsyness,(effect/(blocked+1)))
|
||||
UpdateDamageIcon()
|
||||
updatehealth()
|
||||
return 1*/
|
||||
return 1*/
|
||||
|
||||
/proc/islinked(var/mob/living/silicon/robot/bot, var/mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return 0
|
||||
if (bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
+74
-28
@@ -56,6 +56,7 @@
|
||||
// luminosity = 1
|
||||
var/has_electronics = 0 // 0 - none, 1 - plugged in, 2 - secured by screwdriver
|
||||
var/overload = 1 //used for the Blackout malf module
|
||||
var/mob/living/silicon/ai/occupant = null
|
||||
|
||||
/proc/RandomAPCWires()
|
||||
//to make this not randomize the wires, just set index to 1 and increment it in the flag for loop (after doing everything else).
|
||||
@@ -186,7 +187,7 @@
|
||||
icon_state = "[basestate]-nocover"
|
||||
else if (stat & BROKEN)
|
||||
icon_state = "apc-b"
|
||||
else if(emagged || malfhack)
|
||||
else if(emagged || malfai)
|
||||
icon_state = "apcemag"
|
||||
else if(wiresexposed)
|
||||
icon_state = "apcewires"
|
||||
@@ -273,7 +274,7 @@
|
||||
user << "\red There is nothing to secure."
|
||||
return
|
||||
updateicon()
|
||||
else if(emagged || malfhack)
|
||||
else if(emagged)
|
||||
user << "The interface is broken."
|
||||
else
|
||||
wiresexposed = !wiresexposed
|
||||
@@ -281,7 +282,7 @@
|
||||
updateicon()
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(emagged || malfhack)
|
||||
if(emagged)
|
||||
user << "The interface is broken."
|
||||
else if(opened)
|
||||
user << "You must close the cover to swipe an ID card."
|
||||
@@ -466,6 +467,8 @@
|
||||
src.interact(user)
|
||||
|
||||
/obj/machinery/power/apc/proc/interact(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
if ( (get_dist(src, user) > 1 ))
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
@@ -477,7 +480,7 @@
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
else if (src.malfai)
|
||||
if (src.malfai != user)
|
||||
if ((src.malfai != user && src.malfai != user:parent) && !islinked(user, malfai))
|
||||
user << "AI control for this APC interface has been disabled."
|
||||
user << browse(null, "window=apc")
|
||||
return
|
||||
@@ -595,6 +598,10 @@
|
||||
t += "<BR><HR><A href='?src=\ref[src];malfhack=1'><I>Override Programming</I></A><BR>"
|
||||
else
|
||||
t += "<BR><HR><I>APC Hacked</I><BR>"
|
||||
if(!src.occupant)
|
||||
t += "<A href='?src=\ref[src];occupyapc=1'><I>Shunt Core Processes</I></A><BR>"
|
||||
else
|
||||
t += "<I>Core Processes Uploaded</I><BR>"
|
||||
|
||||
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
|
||||
@@ -728,7 +735,7 @@
|
||||
src.aidisabled || \
|
||||
malfhack && istype(malfai) && \
|
||||
( \
|
||||
(istype(AI) && malfai!=AI) || \
|
||||
(istype(AI) && (malfai!=AI && malfai != AI.parent)) || \
|
||||
(istype(robot) && (robot in malfai.connected_robots)) \
|
||||
) \
|
||||
)
|
||||
@@ -781,6 +788,10 @@
|
||||
|
||||
else if (href_list["breaker"])
|
||||
operating = !operating
|
||||
if(malfai)
|
||||
if (ticker.mode.config_tag == "malfunction")
|
||||
if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas))
|
||||
operating ? ticker.mode:apcs++ : ticker.mode:apcs--
|
||||
src.update()
|
||||
updateicon()
|
||||
|
||||
@@ -841,41 +852,62 @@
|
||||
if (ticker.mode.config_tag == "malfunction")
|
||||
if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas))
|
||||
ticker.mode:apcs++
|
||||
src.malfai = usr
|
||||
src.locked = 1
|
||||
if (src.cell)
|
||||
if (src.cell.charge > 0)
|
||||
src.cell.charge = 0
|
||||
cell.corrupt()
|
||||
src.malfhack = 1
|
||||
malfai << "Hack complete. The APC is now under your exclusive control. Discharging cell to fuse interface."
|
||||
updateicon()
|
||||
|
||||
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(3, 0, src.loc)
|
||||
smoke.attach(src)
|
||||
smoke.start()
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\red The [src.name] suddenly lets out a blast of smoke and some sparks!", 3, "\red You hear sizzling electronics.", 2)
|
||||
else
|
||||
malfai << "Hack complete. The APC is now under your exclusive control. Unable to fuse interface due to insufficient cell charge."
|
||||
if(usr:parent)
|
||||
src.malfai = usr:parent
|
||||
else
|
||||
malfai << "Hack complete. The APC is now under your exclusive control. Unable to fuse interface due to lack of cell to discharge."
|
||||
src.malfai = usr
|
||||
malfai << "Hack complete. The APC is now under your exclusive control."
|
||||
|
||||
else if (href_list["occupyapc"])
|
||||
malfoccupy(usr)
|
||||
|
||||
|
||||
else if (href_list["deoccupyapc"])
|
||||
malfvacate()
|
||||
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/power/apc/proc/malfoccupy(var/mob/living/silicon/ai/malf)
|
||||
if(!istype(malf))
|
||||
return
|
||||
src.occupant = new /mob/living/silicon/ai(src,malf.laws,null,1)
|
||||
src.occupant.adjustOxyLoss(malf.getOxyLoss())
|
||||
src.occupant.name = "[malf.name] APC Copy"
|
||||
if(malf.parent)
|
||||
src.occupant.parent = malf.parent
|
||||
else
|
||||
src.occupant.parent = malf
|
||||
malf.mind.transfer_to(src.occupant)
|
||||
if(malf.parent)
|
||||
del(malf)
|
||||
src.occupant.verbs += /mob/living/silicon/ai/proc/corereturn
|
||||
src.occupant.cancel_camera()
|
||||
|
||||
/obj/machinery/power/apc/proc/malfvacate(var/forced)
|
||||
if(!src.occupant)
|
||||
return
|
||||
if(src.occupant.parent && src.occupant.parent.stat != 2)
|
||||
src.occupant.mind.transfer_to(src.occupant.parent)
|
||||
src.occupant.parent.adjustOxyLoss(src.occupant.getOxyLoss())
|
||||
src.occupant.parent.cancel_camera()
|
||||
del(src.occupant)
|
||||
|
||||
else
|
||||
src.occupant << "\red Primary core damaged, unable to return core processes."
|
||||
if(forced)
|
||||
src.occupant.loc = src.loc
|
||||
src.occupant.death()
|
||||
src.occupant.gib()
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/ion_act()
|
||||
//intended to be exactly the same as an AI malf attack
|
||||
if(!src.malfhack && src.z == 1)
|
||||
if(prob(3))
|
||||
src.locked = 1
|
||||
if (src.cell.charge > 0)
|
||||
world << "\red blew APC in [src.loc.loc]"
|
||||
// world << "\red blew APC in [src.loc.loc]"
|
||||
src.cell.charge = 0
|
||||
cell.corrupt()
|
||||
src.malfhack = 1
|
||||
@@ -1095,6 +1127,8 @@
|
||||
/obj/machinery/power/apc/emp_act(severity)
|
||||
if(cell)
|
||||
cell.emp_act(severity)
|
||||
if(occupant)
|
||||
occupant.emp_act(severity)
|
||||
lighting = 0
|
||||
equipment = 0
|
||||
environ = 0
|
||||
@@ -1131,8 +1165,14 @@
|
||||
cell.blob_act()
|
||||
|
||||
/obj/machinery/power/apc/proc/set_broken()
|
||||
if(malfai && operating)
|
||||
if (ticker.mode.config_tag == "malfunction")
|
||||
if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas))
|
||||
ticker.mode:apcs--
|
||||
stat |= BROKEN
|
||||
operating = 0
|
||||
if(occupant)
|
||||
malfvacate(1)
|
||||
updateicon()
|
||||
update()
|
||||
|
||||
@@ -1151,10 +1191,16 @@
|
||||
sleep(1)
|
||||
|
||||
/obj/machinery/power/apc/Del()
|
||||
if(malfai && operating)
|
||||
if (ticker.mode.config_tag == "malfunction")
|
||||
if (src.z == 1) //if (is_type_in_list(get_area(src), the_station_areas))
|
||||
ticker.mode:apcs--
|
||||
area.power_light = 0
|
||||
area.power_equip = 0
|
||||
area.power_environ = 0
|
||||
area.power_change()
|
||||
if(occupant)
|
||||
malfvacate(1)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/apc/proc/shock(mob/user, prb)
|
||||
|
||||
Reference in New Issue
Block a user