mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Bug fixes, add atmos watertank
This commit is contained in:
@@ -404,7 +404,7 @@
|
||||
if("Toggle Sensor Augmentation")
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_hud()
|
||||
R.sensor_mode()
|
||||
|
||||
if("module1")
|
||||
if(istype(usr, /mob/living/silicon/robot))
|
||||
@@ -551,7 +551,7 @@
|
||||
if("Set Sensor Augmentation")
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.control_hud()
|
||||
AI.sensor_mode()
|
||||
|
||||
// Alien
|
||||
if("night vision")
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
|
||||
var/xenoai = 0 //Should the Xenos have their own AI?
|
||||
var/xenoborg = 0 //Should the Xenos have their own borg?
|
||||
var/gammaratio = 4 //At what alien to human ratio will the Gamma security level be called and the nuke be made available?
|
||||
|
||||
/datum/game_mode/xenos/announce()
|
||||
@@ -70,48 +68,12 @@
|
||||
del(A)
|
||||
continue
|
||||
|
||||
var/xenoai_selected = 0
|
||||
var/xenoborg_selected = 0
|
||||
var/xenoqueen_selected = 0
|
||||
var/spawnpos = 1
|
||||
|
||||
for(var/datum/mind/xeno_mind in xenos)
|
||||
if(spawnpos > xenos_spawn.len)
|
||||
spawnpos = 1
|
||||
//XenoAI selection
|
||||
if(xenoai && !xenoai_selected)
|
||||
var/mob/living/silicon/ai/O = new(xenos_spawn[spawnpos],,,1)//No MMI but safety is in effect.
|
||||
O.invisibility = 0
|
||||
O.aiRestorePowerRoutine = 0
|
||||
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
O.mind.original = O
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
|
||||
//del(xeno_mind)
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name == "XenoAI")
|
||||
loc_landmark = sloc
|
||||
O.loc = loc_landmark.loc
|
||||
O.icon_state = "ai-alien"
|
||||
O.verbs.Remove(,/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \
|
||||
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light,/mob/living/silicon/ai/verb/pick_icon)
|
||||
O.laws = new /datum/ai_laws/alienmov
|
||||
O.name = "Alien AI"
|
||||
O.real_name = name
|
||||
xeno_mind.name = O.name
|
||||
O.alienAI = 1
|
||||
O.network = list("SS13","Xeno")
|
||||
O.holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo3"))
|
||||
O.alien_talk_understand = 1
|
||||
xenoai_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoQueen Selection
|
||||
if(!xenoqueen_selected)
|
||||
var/mob/living/carbon/alien/humanoid/queen/O = new(xenos_spawn[spawnpos])
|
||||
@@ -124,37 +86,6 @@
|
||||
xenoqueen_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//XenoBorg Selection
|
||||
if(xenoborg && !xenoborg_selected)
|
||||
var/mob/living/silicon/robot/O = new(xenos_spawn[spawnpos],0,0,1)
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.alien = 1
|
||||
O.mmi.transfer_identity(xeno_mind.current)//Does not transfer key/client.
|
||||
O.cell = new(O)
|
||||
O.cell.maxcharge = 25000
|
||||
O.cell.charge = 25000
|
||||
O.gender = xeno_mind.current.gender
|
||||
O.invisibility = 0
|
||||
O.key = xeno_mind.current.key
|
||||
//del(xeno_mind)
|
||||
O.job = "Alien Cyborg"
|
||||
O.name = "Alien Cyborg"
|
||||
O.real_name = name
|
||||
xeno_mind.name = O.name
|
||||
O.module = new /obj/item/weapon/robot_module/alien/hunter(src)
|
||||
O.hands.icon_state = "standard"
|
||||
O.icon = 'icons/mob/alien.dmi'
|
||||
O.icon_state = "xenoborg-state-a"
|
||||
O.modtype = "Xeno-Hu"
|
||||
O.connected_ai = select_active_alien_ai()
|
||||
O.laws = new /datum/ai_laws/alienmov()
|
||||
O.scrambledcodes = 1
|
||||
O.hiddenborg = 1
|
||||
O.alien_talk_understand = 1
|
||||
feedback_inc("xeborg_hunter",1)
|
||||
xenoborg_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//Additional larvas if playercount > 20
|
||||
else
|
||||
var/mob/living/carbon/alien/larva/O = new(xenos_spawn[spawnpos])
|
||||
@@ -230,7 +161,7 @@
|
||||
var/list/livingxenos = list()
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
if((xeno) && (xeno.current) && (xeno.current.stat != 2) && (xeno.current.client))
|
||||
if(istype(xeno.current,/mob/living/carbon/alien) || (xenoborg && isrobot(xeno.current)) || (xenoai && isAI(xeno.current)))
|
||||
if(istype(xeno.current,/mob/living/carbon/alien))
|
||||
livingxenos += xeno
|
||||
return livingxenos.len
|
||||
|
||||
|
||||
@@ -11,6 +11,17 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So effect are not targeted by alien acid.
|
||||
|
||||
/datum/effect/effect/proc/fadeOut(var/atom/A, var/frames = 16)
|
||||
if(A.alpha == 0) //Handle already transparent case
|
||||
return
|
||||
if(frames == 0)
|
||||
frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame".
|
||||
var/step = A.alpha / frames
|
||||
for(var/i = 0, i < frames, i++)
|
||||
A.alpha -= step
|
||||
sleep(world.tick_lag)
|
||||
return
|
||||
|
||||
/obj/effect/effect/water
|
||||
name = "water"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/item/weapon/extinguisher
|
||||
name = "fire extinguisher"
|
||||
desc = "A traditional red fire extinguisher."
|
||||
@@ -18,19 +17,17 @@
|
||||
var/last_use = 1.0
|
||||
var/safety = 1
|
||||
var/sprite_name = "fire_extinguisher"
|
||||
|
||||
reagents_to_log=list(
|
||||
"plasma"= "plasma",
|
||||
"pacid" = "polytrinic acid",
|
||||
"sacid" = "sulphuric acid"
|
||||
)
|
||||
var/power = 5 //Maximum distance launched water will travel
|
||||
var/precision = 0 //By default, turfs picked from a spray are random, set to 1 to make it always have at least one water effect per row
|
||||
var/cooling_power = 2 //Sets the cooling_temperature of the water reagent datum inside of the extinguisher when it is refilled
|
||||
|
||||
/obj/item/weapon/extinguisher/mini
|
||||
name = "fire extinguisher"
|
||||
name = "pocket fire extinguisher"
|
||||
desc = "A light and compact fibreglass-framed model fire extinguisher."
|
||||
icon_state = "miniFE0"
|
||||
item_state = "miniFE"
|
||||
hitsound = null //it is much lighter, after all.
|
||||
flags = null //doesn't CONDUCT
|
||||
throwforce = 2
|
||||
w_class = 2.0
|
||||
force = 3.0
|
||||
@@ -39,22 +36,8 @@
|
||||
sprite_name = "miniFE"
|
||||
|
||||
/obj/item/weapon/extinguisher/New()
|
||||
var/datum/reagents/R = new/datum/reagents(max_water)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("water", max_water)
|
||||
|
||||
/obj/item/weapon/extinguisher/examine()
|
||||
set src in usr
|
||||
|
||||
usr << "\icon[src] [src.name] contains:"
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
usr << "\blue [R.volume] units of [R.name]"
|
||||
for(var/thing in src)
|
||||
usr << "\red \A [thing] is jammed into the nozzle!"
|
||||
..()
|
||||
return
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
|
||||
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
|
||||
safety = !safety
|
||||
@@ -63,81 +46,43 @@
|
||||
user << "The safety is [safety ? "on" : "off"]."
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/item/weapon/extinguisher/attackby(obj/item/W, mob/user, params)
|
||||
if(user.stat || user.restrained() || user.lying) return
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(!is_open_container())
|
||||
user.visible_message("[user] begins to unwrench the fill cap on \the [src].","\blue You begin to unwrench the fill cap on \the [src].")
|
||||
if(do_after(user, 25))
|
||||
user.visible_message("[user] removes the fill cap on \the [src].","\blue You remove the fill cap on \the [src].")
|
||||
playsound(get_turf(src),'sound/items/Ratchet.ogg', 100, 1)
|
||||
flags |= OPENCONTAINER
|
||||
/obj/item/weapon/extinguisher/proc/AttemptRefill(atom/target, mob/user)
|
||||
if(istype(target, /obj/structure/reagent_dispensers/watertank) && target.Adjacent(user))
|
||||
var/safety_save = safety
|
||||
safety = 1
|
||||
if(reagents.total_volume == reagents.maximum_volume)
|
||||
user << "<span class='notice'>\The [src] is already full!</span>"
|
||||
safety = safety_save
|
||||
return 1
|
||||
var/obj/structure/reagent_dispensers/watertank/W = target
|
||||
var/transferred = W.reagents.trans_to(src, max_water)
|
||||
if(transferred > 0)
|
||||
user << "<span class='notice'>\The [src] has been refilled by [transferred] units</span>"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
for(var/datum/reagent/water/R in reagents.reagent_list)
|
||||
R.cooling_temperature = cooling_power
|
||||
else
|
||||
user.visible_message("[user] begins to seal the fill cap on \the [src].","\blue You begin to seal the fill cap on \the [src].")
|
||||
if(do_after(user, 25))
|
||||
user.visible_message("[user] fastens the fill cap on \the [src].","\blue You fasten the fill cap on \the [src].")
|
||||
playsound(get_turf(src),'sound/items/Ratchet.ogg', 100, 1)
|
||||
flags &= ~OPENCONTAINER
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item) && !is_open_container())
|
||||
if(W.w_class>1)
|
||||
user << "\The [W] won't fit into the nozzle!"
|
||||
return
|
||||
if(locate(/obj) in src)
|
||||
user << "There's already something crammed into the nozzle."
|
||||
return
|
||||
user.drop_item()
|
||||
W.loc=src
|
||||
user << "You cram \the [W] into the nozzle of \the [src]."
|
||||
msg_admin_attack("[user]/[user.ckey] has crammed \a [W] into a [src].")
|
||||
*/
|
||||
|
||||
user << "<span class='notice'>\The [W] is empty!</span>"
|
||||
safety = safety_save
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
|
||||
if(get_dist(src,target) <= 1)
|
||||
if((istype(target, /obj/structure/reagent_dispensers)))
|
||||
var/obj/o = target
|
||||
var/list/badshit=list()
|
||||
for(var/bad_reagent in src.reagents_to_log)
|
||||
if(o.reagents.has_reagent(bad_reagent))
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="\red <b>([english_list(badshit)])</b> \black"
|
||||
message_admins("[user.name] ([user.ckey]) filled \a [src] with [o.reagents.get_reagent_ids()] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) filled \a [src] with [o.reagents.get_reagent_ids()] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
o.reagents.trans_to(src, 50)
|
||||
user << "\blue \The [src] is now refilled"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
|
||||
if(is_open_container() && reagents.total_volume)
|
||||
user << "\blue You empty \the [src] onto [target]."
|
||||
if(reagents.has_reagent("fuel"))
|
||||
message_admins("[user.name] ([user.ckey]) poured Welder Fuel onto [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) poured Welder Fuel onto [target]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
return
|
||||
if (!safety && !is_open_container())
|
||||
//TODO; Add support for reagents in water.
|
||||
if(target.loc == user)//No more spraying yourself when putting your extinguisher away
|
||||
return
|
||||
var/Refill = AttemptRefill(target, user)
|
||||
if(Refill)
|
||||
return
|
||||
if (!safety)
|
||||
if (src.reagents.total_volume < 1)
|
||||
usr << "\red \The [src] is empty."
|
||||
usr << "<span class='danger'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
if (world.time < src.last_use + 20)
|
||||
return
|
||||
|
||||
var/list/badshit=list()
|
||||
for(var/bad_reagent in src.reagents_to_log)
|
||||
if(reagents.has_reagent(bad_reagent))
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="\red <b>([english_list(badshit)])</b> \black"
|
||||
message_admins("[user.name] ([user.ckey]) used \a [src] filled with [reagents.get_reagent_ids(1)] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) used \a [src] filled with [reagents.get_reagent_ids(1)] [hl]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
src.last_use = world.time
|
||||
|
||||
playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3)
|
||||
@@ -146,27 +91,19 @@
|
||||
|
||||
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
|
||||
spawn(0)
|
||||
var/obj/structure/stool/bed/chair/C = null
|
||||
if(istype(usr.buckled, /obj/structure/stool/bed/chair))
|
||||
C = usr.buckled
|
||||
var/obj/B = usr.buckled
|
||||
var/movementdirection = turn(direction,180)
|
||||
if(C) C.propelled = 4
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 3
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 2
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 1
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 0
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
@@ -174,16 +111,6 @@
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
|
||||
if(locate(/obj) in src)
|
||||
for(var/obj/thing in src)
|
||||
thing.loc = get_turf(src)
|
||||
thing.throw_at(target,thing.throw_range*2,throw_speed*2)
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] fires [src] and launches [thing] at [target]!</span>",
|
||||
"<span class='danger'>You fire [src] and launch [thing] at [target]!</span>")
|
||||
break
|
||||
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
@@ -202,21 +129,20 @@
|
||||
src.reagents.trans_to(W,1)
|
||||
for(var/b=0, b<5, b++)
|
||||
step_towards(W,my_target)
|
||||
if(!W) return
|
||||
if(!W.reagents) return
|
||||
if(!W || !W.reagents) return
|
||||
W.reagents.reaction(get_turf(W))
|
||||
for(var/atom/atm in get_turf(W))
|
||||
if(!W) return
|
||||
W.reagents.reaction(atm, TOUCH) // Touch, since we sprayed it.
|
||||
if(isliving(atm) && W.reagents.has_reagent("water")) // For extinguishing mobs on fire
|
||||
var/mob/living/M = atm // Why isn't this handled by the reagent? - N3X
|
||||
W.reagents.reaction(atm)
|
||||
if(isliving(atm)) //For extinguishing mobs on fire
|
||||
var/mob/living/M = atm
|
||||
M.ExtinguishMob()
|
||||
if(W.loc == my_target) break
|
||||
sleep(2)
|
||||
|
||||
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
|
||||
if(!has_gravity(user))
|
||||
user.inertia_dir = get_dir(target, user)
|
||||
step(user, user.inertia_dir)
|
||||
else
|
||||
return ..()
|
||||
return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/obj/item/weapon/watertank
|
||||
name = "backpack water tank"
|
||||
desc = "A S.U.N.S.H.I.N.E. brand watertank backpack with nozzle to water plants."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/watertank.dmi'
|
||||
icon_state = "waterbackpack"
|
||||
item_state = "waterbackpack"
|
||||
w_class = 4.0
|
||||
@@ -18,39 +18,34 @@
|
||||
..()
|
||||
create_reagents(volume)
|
||||
noz = make_noz()
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/examine()
|
||||
set src in usr
|
||||
..()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
usr << "[round(R.volume)] units of [R.name] left."
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/ui_action_click()
|
||||
if (usr.get_item_by_slot(slot_back) == src)
|
||||
toggle_mister()
|
||||
else
|
||||
usr << "<span class='notice'>The watertank needs to be on your back to use!</span>"
|
||||
return
|
||||
toggle_mister()
|
||||
|
||||
/obj/item/weapon/watertank/verb/toggle_mister()
|
||||
set name = "Toggle Mister"
|
||||
set category = "Object"
|
||||
if (usr.get_item_by_slot(slot_back) != src)
|
||||
usr << "<span class='notice'>The watertank needs to be on your back to use.</span>"
|
||||
return
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
on = !on
|
||||
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(on)
|
||||
if(noz == null)
|
||||
noz = make_noz()
|
||||
|
||||
//Detach the nozzle into the user's hands
|
||||
var/list/L = list("left hand" = slot_l_hand,"right hand" = slot_r_hand)
|
||||
if(!user.equip_in_one_of_slots(noz, L))
|
||||
if(!user.put_in_hands(noz))
|
||||
on = 0
|
||||
user << "<span class='notice'>You need a free hand to hold the mister!</span>"
|
||||
user << "<span class='notice'>You need a free hand to hold the mister.</span>"
|
||||
return
|
||||
noz.loc = user
|
||||
else
|
||||
//Remove from their hands and put back "into" the tank
|
||||
remove_noz(user)
|
||||
remove_noz()
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/proc/make_noz()
|
||||
@@ -58,21 +53,52 @@
|
||||
|
||||
/obj/item/weapon/watertank/equipped(mob/user, slot)
|
||||
if (slot != slot_back)
|
||||
remove_noz(user)
|
||||
remove_noz()
|
||||
|
||||
/obj/item/weapon/watertank/proc/remove_noz(mob/user)
|
||||
var/mob/living/carbon/human/M = user
|
||||
if(noz in get_both_hands(M))
|
||||
M.unEquip(noz)
|
||||
/obj/item/weapon/watertank/proc/remove_noz()
|
||||
if(ismob(noz.loc))
|
||||
var/mob/M = noz.loc
|
||||
M.unEquip(noz, 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/Destroy()
|
||||
if (on)
|
||||
var/M = get(noz, /mob)
|
||||
remove_noz(M)
|
||||
remove_noz()
|
||||
qdel(noz)
|
||||
noz = null
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/attack_hand(mob/user as mob)
|
||||
if(src.loc == user)
|
||||
ui_action_click()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/watertank/MouseDrop(obj/over_object)
|
||||
if(ishuman(src.loc))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
if(H.r_hand)
|
||||
return
|
||||
if(!H.unEquip(src))
|
||||
return
|
||||
H.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
if(H.l_hand)
|
||||
return
|
||||
if(!H.unEquip(src))
|
||||
return
|
||||
H.put_in_l_hand(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/attackby(obj/item/W, mob/user, params)
|
||||
if(W == noz)
|
||||
remove_noz()
|
||||
return
|
||||
..()
|
||||
|
||||
// This mister item is intended as an extension of the watertank and always attached to it.
|
||||
// Therefore, it's designed to be "locked" to the player's hands or extended back onto
|
||||
// the watertank backpack. Allowing it to be placed elsewhere or created without a parent
|
||||
@@ -80,13 +106,14 @@
|
||||
/obj/item/weapon/reagent_containers/spray/mister
|
||||
name = "water mister"
|
||||
desc = "A mister nozzle attached to a water tank."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/watertank.dmi'
|
||||
icon_state = "mister"
|
||||
item_state = "mister"
|
||||
w_class = 4.0
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(25,50,100)
|
||||
volume = 500
|
||||
flags = NODROP | OPENCONTAINER | NOBLUDGEON
|
||||
|
||||
var/obj/item/weapon/watertank/tank
|
||||
|
||||
@@ -99,7 +126,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/mister/dropped(mob/user as mob)
|
||||
user << "<span class='notice'>The mister snaps back onto the watertank!</span>"
|
||||
user << "<span class='notice'>The mister snaps back onto the watertank.</span>"
|
||||
tank.on = 0
|
||||
loc = tank
|
||||
|
||||
@@ -114,6 +141,16 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/mister/Move()
|
||||
..()
|
||||
if(loc != tank.loc)
|
||||
loc = tank.loc
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/mister/afterattack(obj/target, mob/user, proximity)
|
||||
if(target.loc == loc || target == tank) //Safety check so you don't fill your mister with mutagen or something and then blast yourself in the face with it putting it away
|
||||
return
|
||||
..()
|
||||
|
||||
//Janitor tank
|
||||
/obj/item/weapon/watertank/janitor
|
||||
name = "backpack water tank"
|
||||
@@ -123,13 +160,12 @@
|
||||
|
||||
/obj/item/weapon/watertank/janitor/New()
|
||||
..()
|
||||
reagents.add_reagent("cleaner", 250)
|
||||
|
||||
reagents.add_reagent("cleaner", 500)
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/mister/janitor
|
||||
name = "janitor spray nozzle"
|
||||
desc = "A janitorial spray nozzle attached to a watertank, designed to clean up large messes."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon = 'icons/obj/watertank.dmi'
|
||||
icon_state = "misterjani"
|
||||
item_state = "misterjani"
|
||||
amount_per_transfer_from_this = 5
|
||||
@@ -142,25 +178,45 @@
|
||||
amount_per_transfer_from_this = (amount_per_transfer_from_this == 10 ? 5 : 10)
|
||||
user << "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>"
|
||||
|
||||
//Atmos tank
|
||||
//ATMOS FIRE FIGHTING BACKPACK
|
||||
|
||||
#define EXTINGUISHER 0
|
||||
#define NANOFROST 1
|
||||
#define METAL_FOAM 2
|
||||
|
||||
/obj/item/weapon/watertank/atmos
|
||||
name = "backpack water tank"
|
||||
desc = "A backpack watertank with fire extinguisher nozzle, intended to fight fires. Shouldn't toxins have one of these?"
|
||||
name = "backpack firefighter tank"
|
||||
desc = "A refridgerated and pressurized backpack tank with extinguisher nozzle, intended to fight fires. Swaps between extinguisher, nanofrost launcher, and metal foam dispenser for breaches. Nanofrost converts plasma in the air to nitrogen, but only if it is combusting at the time."
|
||||
icon_state = "waterbackpackatmos"
|
||||
item_state = "waterbackpackatmos"
|
||||
volume = 100
|
||||
volume = 200
|
||||
|
||||
/obj/item/weapon/watertank/atmos/make_noz()
|
||||
return new /obj/item/weapon/extinguisher/mini/nozzle(src)
|
||||
|
||||
/obj/item/weapon/watertank/atmos/dropped(mob/user as mob)
|
||||
icon_state = "waterbackpackatmos"
|
||||
if(istype(noz, /obj/item/weapon/extinguisher/mini/nozzle))
|
||||
var/obj/item/weapon/extinguisher/mini/nozzle/N = noz
|
||||
N.nozzle_mode = 0
|
||||
|
||||
/obj/item/weapon/extinguisher/mini/nozzle
|
||||
name = "fire extinguisher nozzle"
|
||||
desc = "A fire extinguisher nozzle attached to a water tank."
|
||||
icon = 'icons/obj/hydroponics.dmi'
|
||||
icon_state = "misteratmos"
|
||||
item_state = "misteratmos"
|
||||
name = "extinguisher nozzle"
|
||||
desc = "A heavy duty nozzle attached to a firefighter's backpack tank."
|
||||
icon = 'icons/obj/watertank.dmi'
|
||||
icon_state = "atmos_nozzle"
|
||||
item_state = "nozzleatmos"
|
||||
safety = 0
|
||||
max_water = 200
|
||||
power = 8
|
||||
precision = 1
|
||||
cooling_power = 5
|
||||
w_class = 5
|
||||
flags = NODROP //Necessary to ensure that the nozzle and tank never seperate
|
||||
var/obj/item/weapon/watertank/tank
|
||||
var/nozzle_mode = 0
|
||||
var/metal_synthesis_cooldown = 0
|
||||
var/nanofrost_cooldown = 0
|
||||
|
||||
/obj/item/weapon/extinguisher/mini/nozzle/New(parent_tank)
|
||||
if(check_tank_exists(parent_tank, src))
|
||||
@@ -170,10 +226,174 @@
|
||||
loc = tank
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/mini/nozzle/Move()
|
||||
..()
|
||||
if(tank && loc != tank.loc)
|
||||
loc = tank
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/mini/nozzle/attack_self(mob/user as mob)
|
||||
switch(nozzle_mode)
|
||||
if(EXTINGUISHER)
|
||||
nozzle_mode = NANOFROST
|
||||
tank.icon_state = "waterbackpackatmos_1"
|
||||
user << "Swapped to nanofrost launcher"
|
||||
return
|
||||
if(NANOFROST)
|
||||
nozzle_mode = METAL_FOAM
|
||||
tank.icon_state = "waterbackpackatmos_2"
|
||||
user << "Swapped to metal foam synthesizer"
|
||||
return
|
||||
if(METAL_FOAM)
|
||||
nozzle_mode = EXTINGUISHER
|
||||
tank.icon_state = "waterbackpackatmos_0"
|
||||
user << "Swapped to water extinguisher"
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/mini/nozzle/dropped(mob/user as mob)
|
||||
user << "<span class='notice'>The nozzle snaps back onto the watertank!</span>"
|
||||
user << "<span class='notice'>The nozzle snaps back onto the tank!</span>"
|
||||
tank.on = 0
|
||||
loc = tank
|
||||
|
||||
/obj/item/weapon/extinguisher/mini/nozzle/attack_self()
|
||||
/obj/item/weapon/extinguisher/mini/nozzle/afterattack(atom/target, mob/user)
|
||||
if(nozzle_mode == EXTINGUISHER)
|
||||
..()
|
||||
return
|
||||
var/Adj = user.Adjacent(target)
|
||||
if(Adj)
|
||||
AttemptRefill(target, user)
|
||||
if(nozzle_mode == NANOFROST)
|
||||
if(Adj)
|
||||
return //Safety check so you don't blast yourself trying to refill your tank
|
||||
var/datum/reagents/R = reagents
|
||||
if(R.total_volume < 100)
|
||||
user << "You need at least 100 units of water to use the nanofrost launcher!"
|
||||
return
|
||||
if(nanofrost_cooldown)
|
||||
user << "Nanofrost launcher is still recharging"
|
||||
return
|
||||
nanofrost_cooldown = 1
|
||||
R.remove_any(100)
|
||||
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
|
||||
log_game("[user.ckey] ([user.name]) used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(2)
|
||||
A.Smoke()
|
||||
spawn(100)
|
||||
if(src)
|
||||
nanofrost_cooldown = 0
|
||||
return
|
||||
if(nozzle_mode == METAL_FOAM)
|
||||
if(!Adj|| !istype(target, /turf))
|
||||
return
|
||||
if(metal_synthesis_cooldown < 5)
|
||||
var/obj/effect/effect/foam/F = new /obj/effect/effect/foam(get_turf(target), 1)
|
||||
F.amount = 0
|
||||
metal_synthesis_cooldown++
|
||||
spawn(100)
|
||||
if(src)
|
||||
metal_synthesis_cooldown--
|
||||
else
|
||||
user << "Metal foam mix is still being synthesized."
|
||||
return
|
||||
|
||||
/obj/effect/nanofrost_container
|
||||
name = "nanofrost container"
|
||||
desc = "A frozen shell of ice containing nanofrost that freezes the surrounding area after activation."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "frozen_smoke_capsule"
|
||||
mouse_opacity = 0
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/obj/effect/nanofrost_container/proc/Smoke()
|
||||
new /obj/effect/effect/freezing_smoke(src.loc, 6, 1)
|
||||
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
|
||||
F.color = "#B2FFFF"
|
||||
F.name = "nanofrost residue"
|
||||
F.desc = "Residue left behind from a nanofrost detonation. Perhaps there was a fire here?"
|
||||
playsound(src,'sound/effects/bamf.ogg',100,1)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/effect/freezing_smoke
|
||||
name = "nanofrost smoke"
|
||||
icon_state = "smoke"
|
||||
opacity = 0
|
||||
anchored = 0.0
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
color = "#B2FFFF"
|
||||
var/amount = 0
|
||||
|
||||
/obj/effect/effect/freezing_smoke/New(loc, var/amt, var/blast)
|
||||
..()
|
||||
spawn(100+rand(10,30))
|
||||
delete()
|
||||
amount = amt
|
||||
if(amount)
|
||||
var/datum/effect/effect/system/freezing_smoke_spread/F = new /datum/effect/effect/system/freezing_smoke_spread
|
||||
F.set_up(amount, 0, src.loc)
|
||||
F.start()
|
||||
if(blast)
|
||||
for(var/turf/T in trange(2, src.loc))
|
||||
Chilled(T)
|
||||
return
|
||||
|
||||
/obj/effect/effect/freezing_smoke/proc/Chilled(atom/A)
|
||||
if(istype(A, /turf/simulated))
|
||||
var/turf/simulated/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = 2
|
||||
update_nearby_tiles()
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
if(hotspot && !istype(T, /turf/space))
|
||||
var/CT = 10
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-(CT*1000),lowertemp.temperature / CT) ,0)
|
||||
lowertemp.react()
|
||||
T.assume_air(lowertemp)
|
||||
qdel(hotspot)
|
||||
if(G.toxins)
|
||||
G.nitrogen += (G.toxins)
|
||||
G.toxins = 0
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
|
||||
V.welded = 1
|
||||
V.update_icon()
|
||||
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.ExtinguishMob()
|
||||
return
|
||||
|
||||
/datum/effect/effect/system/freezing_smoke_spread
|
||||
|
||||
/datum/effect/effect/system/freezing_smoke_spread/set_up(n = 6, c = 0, loca)
|
||||
number = n
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effect/effect/system/freezing_smoke_spread/start()
|
||||
var/i = 0
|
||||
for(i=0, i<number, i++)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/freezing_smoke/smoke = new /obj/effect/effect/freezing_smoke(location, 0, 0)
|
||||
smoke.amount = 0
|
||||
var/direction = pick(alldirs)
|
||||
for(i=0, i<rand(1,3), i++)
|
||||
sleep(5)
|
||||
step(smoke,direction)
|
||||
spawn(150+rand(10,30))
|
||||
if(smoke)
|
||||
fadeOut(smoke)
|
||||
smoke.delete()
|
||||
|
||||
#undef EXTINGUISHER
|
||||
#undef NANOFROST
|
||||
#undef METAL_FOAM
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
new /obj/item/weapon/holosign_creator(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/soft/purple(src)
|
||||
new /obj/item/weapon/watertank/janitor(src)
|
||||
new /obj/item/weapon/storage/belt/janitor(src)
|
||||
|
||||
/*
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/weapon/tank/emergency_oxygen/engi(src)
|
||||
new /obj/item/weapon/watertank/atmos(src)
|
||||
new /obj/item/clothing/suit/fire/atmos(src)
|
||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||
|
||||
|
||||
@@ -420,7 +420,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
return
|
||||
|
||||
//masks and helmets can obscure our hair, unless we're a synthetic
|
||||
if(!(species.flags & IS_SYNTHETIC) && (head && (head.flags & BLOCKHAIR)) || !(species.flags & IS_SYNTHETIC) && (wear_mask && (wear_mask.flags & BLOCKHAIR)))
|
||||
if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
|
||||
if(update_icons) update_icons()
|
||||
return
|
||||
|
||||
|
||||
@@ -2,6 +2,32 @@
|
||||
#define AI_CHECK_RADIO 2
|
||||
|
||||
var/list/ai_list = list()
|
||||
var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/proc/ai_alerts,
|
||||
/mob/living/silicon/ai/proc/announcement,
|
||||
/mob/living/silicon/ai/proc/ai_call_shuttle,
|
||||
/mob/living/silicon/ai/proc/ai_cancel_call,
|
||||
/mob/living/silicon/ai/proc/ai_camera_track,
|
||||
/mob/living/silicon/ai/proc/ai_camera_list,
|
||||
/mob/living/silicon/ai/proc/ai_goto_location,
|
||||
/mob/living/silicon/ai/proc/ai_remove_location,
|
||||
/mob/living/silicon/ai/proc/ai_hologram_change,
|
||||
/mob/living/silicon/ai/proc/ai_network_change,
|
||||
/mob/living/silicon/ai/proc/ai_roster,
|
||||
/mob/living/silicon/ai/proc/ai_statuschange,
|
||||
/mob/living/silicon/ai/proc/ai_store_location,
|
||||
/mob/living/silicon/ai/proc/checklaws,
|
||||
/mob/living/silicon/ai/proc/control_integrated_radio,
|
||||
/mob/living/silicon/ai/proc/core,
|
||||
/mob/living/silicon/ai/proc/pick_icon,
|
||||
/mob/living/silicon/ai/proc/sensor_mode,
|
||||
/mob/living/silicon/ai/proc/show_laws_verb,
|
||||
/mob/living/silicon/ai/proc/toggle_acceleration,
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light,
|
||||
/mob/living/silicon/ai/proc/botcall,
|
||||
/mob/living/silicon/ai/proc/change_arrival_message,
|
||||
/mob/living/silicon/ai/proc/nano_crew_monitor
|
||||
)
|
||||
|
||||
//Not sure why this is necessary...
|
||||
/proc/AutoUpdateAI(obj/subject)
|
||||
@@ -14,7 +40,6 @@ var/list/ai_list = list()
|
||||
subject.attack_ai(M)
|
||||
return is_in_use
|
||||
|
||||
|
||||
/mob/living/silicon/ai
|
||||
name = "AI"
|
||||
icon = 'icons/mob/AI.dmi'//
|
||||
@@ -69,6 +94,12 @@ var/list/ai_list = list()
|
||||
|
||||
var/arrivalmsg = "$name, $rank, has arrived on the station."
|
||||
|
||||
/mob/living/silicon/ai/proc/add_ai_verbs()
|
||||
src.verbs |= ai_verbs_default
|
||||
|
||||
/mob/living/silicon/ai/proc/remove_ai_verbs()
|
||||
src.verbs -= ai_verbs_default
|
||||
|
||||
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
|
||||
var/list/possibleNames = ai_names
|
||||
|
||||
@@ -101,16 +132,13 @@ var/list/ai_list = list()
|
||||
|
||||
aiMulti = new(src)
|
||||
aiRadio = new(src)
|
||||
common_radio = aiRadio
|
||||
aiRadio.myAi = src
|
||||
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
|
||||
|
||||
|
||||
|
||||
if (istype(loc, /turf))
|
||||
verbs.Add(/mob/living/silicon/ai/proc/ai_network_change, \
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall, /mob/living/silicon/ai/proc/control_integrated_radio, /mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message, /mob/living/silicon/ai/proc/ai_store_location, /mob/living/silicon/ai/proc/ai_goto_location, /mob/living/silicon/ai/proc/ai_remove_location, /mob/living/silicon/ai/proc/nano_crew_monitor, /mob/living/silicon/ai/proc/ai_cancel_call)
|
||||
add_ai_verbs(src)
|
||||
|
||||
//Languages
|
||||
add_language("Robot Talk", 1)
|
||||
@@ -130,33 +158,14 @@ var/list/ai_list = list()
|
||||
|
||||
if(!safety)//Only used by AIize() to successfully spawn an AI.
|
||||
if (!B)//If there is no player/brain inside.
|
||||
empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
|
||||
new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
|
||||
del(src)//Delete AI.
|
||||
return
|
||||
else
|
||||
if (B.brainmob.mind)
|
||||
if(B.alien)
|
||||
B.brainmob.mind.transfer_to(src)
|
||||
icon_state = "ai-alien"
|
||||
verbs.Remove(,/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \
|
||||
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
|
||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||
/mob/living/silicon/ai/proc/toggle_camera_light,/mob/living/silicon/ai/verb/pick_icon,/mob/living/silicon/ai/proc/control_hud, /mob/living/silicon/ai/proc/change_arrival_message, /mob/living/silicon/ai/proc/ai_cancel_call)
|
||||
laws = new /datum/ai_laws/alienmov
|
||||
add_language("xenocommon", 1)
|
||||
else
|
||||
B.brainmob.mind.transfer_to(src)
|
||||
B.brainmob.mind.transfer_to(src)
|
||||
|
||||
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
src << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
|
||||
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
src << "To use something, simply click on it."
|
||||
src << "Use say :b to speak to your cyborgs through binary."
|
||||
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
|
||||
show_laws()
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
|
||||
job = "AI"
|
||||
on_mob_init()
|
||||
|
||||
spawn(5)
|
||||
new /obj/machinery/ai_powersupply(src)
|
||||
@@ -178,6 +187,30 @@ var/list/ai_list = list()
|
||||
..()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/proc/on_mob_init()
|
||||
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
src << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
|
||||
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
src << "To use something, simply click on it."
|
||||
src << "Use say :b to speak to your cyborgs through binary. Use say :h to speak from an active holopad."
|
||||
src << "For department channels, use the following say commands:"
|
||||
|
||||
var/radio_text = ""
|
||||
for(var/i = 1 to common_radio.channels.len)
|
||||
var/channel = common_radio.channels[i]
|
||||
var/key = get_radio_key_from_channel(channel)
|
||||
radio_text += "[key] - [channel]"
|
||||
if(i != common_radio.channels.len)
|
||||
radio_text += ", "
|
||||
|
||||
src << radio_text
|
||||
|
||||
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
|
||||
show_laws()
|
||||
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
|
||||
job = "AI"
|
||||
|
||||
/mob/living/silicon/ai/proc/SetName(pickedName as text)
|
||||
real_name = pickedName
|
||||
name = pickedName
|
||||
@@ -226,7 +259,7 @@ var/list/ai_list = list()
|
||||
if(powered_ai.anchored)
|
||||
use_power = 2
|
||||
|
||||
/mob/living/silicon/ai/verb/pick_icon()
|
||||
/mob/living/silicon/ai/proc/pick_icon()
|
||||
set category = "AI Commands"
|
||||
set name = "Set AI Core Display"
|
||||
if(stat || aiRestorePowerRoutine)
|
||||
@@ -290,6 +323,9 @@ var/list/ai_list = list()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_alerts()
|
||||
set name = "Show Alerts"
|
||||
set category = "AI Commands"
|
||||
|
||||
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
dat += "<A HREF='?src=\ref[src];mach_close=aialerts'>Close</A><BR><BR>"
|
||||
for (var/cat in alarms)
|
||||
@@ -324,9 +360,14 @@ var/list/ai_list = list()
|
||||
|
||||
// this verb lets the ai see the stations manifest
|
||||
/mob/living/silicon/ai/proc/ai_roster()
|
||||
set name = "Show Crew Manifest"
|
||||
set category = "AI Commands"
|
||||
show_station_manifest()
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_call_shuttle()
|
||||
set name = "Call Emergency Shuttle"
|
||||
set category = "AI Commands"
|
||||
|
||||
if(src.stat == 2)
|
||||
src << "You can't call the shuttle because you are dead!"
|
||||
return
|
||||
@@ -906,7 +947,7 @@ var/list/ai_list = list()
|
||||
else
|
||||
lightNearbyCamera()
|
||||
|
||||
/mob/living/silicon/ai/proc/control_hud()
|
||||
/mob/living/silicon/ai/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "AI Commands"
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
number++
|
||||
|
||||
|
||||
/mob/living/silicon/ai/verb/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
/mob/living/silicon/ai/proc/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
set category = "AI Commands"
|
||||
set name = "State Laws"
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
number++
|
||||
|
||||
|
||||
/mob/living/silicon/robot/verb/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
/mob/living/silicon/robot/proc/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
set category = "Robot Commands"
|
||||
set name = "State Laws"
|
||||
var/list = "<b>Which laws do you want to include when stating them for the crew?</b><br><br>"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
var/list/robot_verbs_default = list(
|
||||
/mob/living/silicon/robot/proc/sensor_mode,
|
||||
/mob/living/silicon/robot/proc/checklaws
|
||||
)
|
||||
|
||||
/mob/living/silicon/robot
|
||||
name = "Cyborg"
|
||||
real_name = "Cyborg"
|
||||
@@ -71,8 +76,7 @@
|
||||
var/braintype = "Cyborg"
|
||||
var/base_icon = ""
|
||||
var/crisis = 0
|
||||
var/hiddenborg = 0
|
||||
|
||||
|
||||
var/obj/item/borg/sight/hud/sec/sechud = null
|
||||
var/obj/item/borg/sight/hud/med/healthhud = null
|
||||
|
||||
@@ -82,34 +86,21 @@
|
||||
spark_system.attach(src)
|
||||
|
||||
add_language("Robot Talk", 1)
|
||||
|
||||
wires = new(src)
|
||||
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
|
||||
|
||||
wires = new(src)
|
||||
|
||||
ident = rand(1, 999)
|
||||
updatename("Default")
|
||||
updateicon()
|
||||
if(mmi == null)
|
||||
mmi = new /obj/item/device/mmi/posibrain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a posibrain, but it works)
|
||||
mmi.icon_state="posibrain-occupied"
|
||||
if(syndie)
|
||||
if(!cell)
|
||||
cell = new /obj/item/weapon/stock_parts/cell(src)
|
||||
laws = new /datum/ai_laws/antimov()
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
cell.maxcharge = 25000
|
||||
cell.charge = 25000
|
||||
module = new /obj/item/weapon/robot_module/syndicate(src)
|
||||
hands.icon_state = "standard"
|
||||
icon_state = "secborg"
|
||||
modtype = "Security"
|
||||
init(alien)
|
||||
|
||||
radio = new /obj/item/device/radio/borg(src)
|
||||
common_radio = radio
|
||||
|
||||
init()
|
||||
|
||||
if(!scrambledcodes && !camera)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = real_name
|
||||
@@ -117,6 +108,10 @@
|
||||
if(wires.IsCameraCut()) // 5 = BORG CAMERA
|
||||
camera.status = 0
|
||||
|
||||
if(mmi == null)
|
||||
mmi = new /obj/item/device/mmi/posibrain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a posibrain, but it works)
|
||||
mmi.icon_state="posibrain-occupied"
|
||||
|
||||
initialize_components()
|
||||
//if(!unfinished)
|
||||
// Create all the robot parts.
|
||||
@@ -131,6 +126,8 @@
|
||||
cell.charge = 7500
|
||||
|
||||
..()
|
||||
|
||||
add_robot_verbs()
|
||||
|
||||
if(cell)
|
||||
var/datum/robot_component/cell_component = components["power cell"]
|
||||
@@ -148,17 +145,9 @@
|
||||
hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||
|
||||
/mob/living/silicon/robot/proc/init(var/alien=0)
|
||||
if(hiddenborg)
|
||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||
return
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||
if(mmi.alien || alien)
|
||||
laws = new /datum/ai_laws/alienmov()
|
||||
connected_ai = select_active_alien_ai()
|
||||
scrambledcodes = 1
|
||||
else
|
||||
make_laws()
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
make_laws()
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
lawsync()
|
||||
@@ -174,7 +163,7 @@
|
||||
if (!rbPDA)
|
||||
rbPDA = new/obj/item/device/pda/ai(src)
|
||||
rbPDA.set_name_and_job(custom_name,braintype)
|
||||
if(hiddenborg)
|
||||
if(scrambledcodes)
|
||||
rbPDA.hidden = 1
|
||||
|
||||
/mob/living/silicon/robot/binarycheck()
|
||||
@@ -451,11 +440,17 @@
|
||||
C.toggled = 1
|
||||
src << "\red You enable [C.name]."
|
||||
|
||||
/mob/living/silicon/robot/verb/control_hud()
|
||||
/mob/living/silicon/robot/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "Robot Commands"
|
||||
toggle_sensor_mode()
|
||||
|
||||
/mob/living/silicon/robot/proc/add_robot_verbs()
|
||||
src.verbs |= robot_verbs_default
|
||||
|
||||
/mob/living/silicon/robot/proc/remove_robot_verbs()
|
||||
src.verbs -= robot_verbs_default
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if (stat != 2)
|
||||
@@ -1395,21 +1390,29 @@
|
||||
icon_state = "nano_bloodhound"
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
hiddenborg = 1
|
||||
modtype = "Commando"
|
||||
faction = list("nanotrasen")
|
||||
designation = "NT Combat Cyborg"
|
||||
req_access = list(access_cent_specops)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/deathsquad/New(loc)
|
||||
..()
|
||||
cell.maxcharge = 50000
|
||||
cell.charge = 50000
|
||||
radio = new /obj/item/device/radio/borg/deathsquad(src)
|
||||
module = new /obj/item/weapon/robot_module/deathsquad(src)
|
||||
laws = new /datum/ai_laws/deathsquad()
|
||||
if(!cell)
|
||||
cell = new /obj/item/weapon/stock_parts/cell(src)
|
||||
cell.maxcharge = 25000
|
||||
cell.charge = 25000
|
||||
|
||||
Namepick()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/syndicate/init()
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||
|
||||
laws = new /datum/ai_laws/deathsquad
|
||||
module = new /obj/item/weapon/robot_module/deathsquad(src)
|
||||
|
||||
radio = new /obj/item/device/radio/borg/deathsquad(src)
|
||||
radio.recalculateChannels()
|
||||
|
||||
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
|
||||
|
||||
/mob/living/silicon/robot/deathsquad/attack_hand(mob/user)
|
||||
if((ckey == null) && searching_for_ckey == 0)
|
||||
@@ -1453,12 +1456,10 @@
|
||||
get_borg_occupant(user, possiblecandidates)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/robot/syndicate
|
||||
icon_state = "syndie_bloodhound"
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
hiddenborg = 1
|
||||
modtype = "Synd"
|
||||
faction = list("syndicate")
|
||||
designation = "Syndicate"
|
||||
@@ -1466,14 +1467,23 @@
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
/mob/living/silicon/robot/syndicate/New(loc)
|
||||
..()
|
||||
cell.maxcharge = 25000
|
||||
cell.charge = 25000
|
||||
radio = new /obj/item/device/radio/borg/syndicate(src)
|
||||
module = new /obj/item/weapon/robot_module/syndicate(src)
|
||||
laws = new /datum/ai_laws/syndicate_override()
|
||||
if(!cell)
|
||||
cell = new /obj/item/weapon/stock_parts/cell(src)
|
||||
cell.maxcharge = 25000
|
||||
cell.charge = 25000
|
||||
|
||||
Namepick()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/syndicate/init()
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
|
||||
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
module = new /obj/item/weapon/robot_module/syndicate(src)
|
||||
|
||||
radio = new /obj/item/device/radio/borg/syndicate(src)
|
||||
radio.recalculateChannels()
|
||||
|
||||
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
|
||||
|
||||
/mob/living/silicon/robot/syndicate/canUseTopic(atom/movable/M)
|
||||
if(stat || lockcharge || stunned || weakened)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define SEC_HUD 1 //Security HUD mode
|
||||
#define MED_HUD 2 //Medical HUD mode
|
||||
var/local_transmit //If set, can only speak to others of the same type within a short range.
|
||||
var/obj/item/device/radio/common_radio
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
return
|
||||
|
||||
@@ -960,6 +960,8 @@ var/list/slot_equipment_priority = list( \
|
||||
for(var/atom/A in listed_turf)
|
||||
if(A.invisibility > see_invisible)
|
||||
continue
|
||||
if(is_type_in_list(A, shouldnt_see))
|
||||
continue
|
||||
statpanel(listed_turf.name, null, A)
|
||||
|
||||
if(mind && mind.changeling)
|
||||
|
||||
@@ -220,6 +220,7 @@
|
||||
var/immune_to_ssd = 0
|
||||
|
||||
var/turf/listed_turf = null //the current turf being examined in the stat panel
|
||||
var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes
|
||||
|
||||
var/kills=0
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
invisibility = 101
|
||||
return ..()
|
||||
|
||||
/mob/proc/AIize(move=1)
|
||||
/mob/proc/AIize()
|
||||
if(client)
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jams for AIs
|
||||
var/mob/living/silicon/ai/O = new (loc,,,1)//No MMI but safety is in effect.
|
||||
@@ -93,52 +93,40 @@
|
||||
else
|
||||
O.key = key
|
||||
|
||||
if(move)
|
||||
var/obj/loc_landmark
|
||||
var/obj/loc_landmark
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name != "AI")
|
||||
continue
|
||||
if (locate(/mob/living) in sloc.loc)
|
||||
continue
|
||||
loc_landmark = sloc
|
||||
if (!loc_landmark)
|
||||
for(var/obj/effect/landmark/tripai in landmarks_list)
|
||||
if (tripai.name == "tripai")
|
||||
if(locate(/mob/living) in tripai.loc)
|
||||
continue
|
||||
loc_landmark = tripai
|
||||
if (!loc_landmark)
|
||||
O << "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone."
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name != "AI")
|
||||
continue
|
||||
if ((locate(/mob/living) in sloc.loc) || (locate(/obj/structure/AIcore) in sloc.loc))
|
||||
continue
|
||||
loc_landmark = sloc
|
||||
if (!loc_landmark)
|
||||
for(var/obj/effect/landmark/tripai in landmarks_list)
|
||||
if (tripai.name == "tripai")
|
||||
if((locate(/mob/living) in tripai.loc) || (locate(/obj/structure/AIcore) in tripai.loc))
|
||||
continue
|
||||
loc_landmark = tripai
|
||||
if (!loc_landmark)
|
||||
O << "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone."
|
||||
for(var/obj/effect/landmark/start/sloc in landmarks_list)
|
||||
if (sloc.name == "AI")
|
||||
loc_landmark = sloc
|
||||
if (sloc.name == "AI")
|
||||
loc_landmark = sloc
|
||||
|
||||
O.loc = loc_landmark.loc
|
||||
for (var/obj/item/device/radio/intercom/comm in O.loc)
|
||||
comm.ai += O
|
||||
O.loc = loc_landmark.loc
|
||||
for (var/obj/item/device/radio/intercom/comm in O.loc)
|
||||
comm.ai += O
|
||||
|
||||
O << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
O << "<B>To look at other parts of the station, click on yourself to get a camera menu.</B>"
|
||||
O << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
O << "To use something, simply click on it."
|
||||
O << {"Use say ":b to speak to your cyborgs through binary."}
|
||||
if (!(ticker && ticker.mode && (O.mind in ticker.mode.malf_ai)))
|
||||
O.show_laws()
|
||||
O << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
|
||||
O.on_mob_init()
|
||||
|
||||
O.verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_statuschange
|
||||
|
||||
O.job = "AI"
|
||||
O.add_ai_verbs()
|
||||
|
||||
O.rename_self("ai",1)
|
||||
spawn(0)
|
||||
del(src)
|
||||
return O
|
||||
|
||||
. = O
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/human/make_into_mask(var/should_gib = 0)
|
||||
for(var/t in organs)
|
||||
del(t)
|
||||
qdel(t)
|
||||
return ..(should_gib)
|
||||
|
||||
|
||||
|
||||
@@ -210,6 +210,7 @@ datum
|
||||
description = "A ubiquitous chemical substance that is composed of hydrogen and oxygen."
|
||||
reagent_state = LIQUID
|
||||
color = "#0064C8" // rgb: 0, 100, 200
|
||||
var/cooling_temperature = 2
|
||||
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||
if(!istype(M, /mob/living))
|
||||
@@ -224,6 +225,7 @@ datum
|
||||
|
||||
reaction_turf(var/turf/simulated/T, var/volume)
|
||||
if (!istype(T)) return
|
||||
var/CT = cooling_temperature
|
||||
src = null
|
||||
if(volume >= 3)
|
||||
if(T.wet >= 1) return
|
||||
@@ -248,10 +250,10 @@ datum
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
if(hotspot && !istype(T, /turf/space))
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-(CT*1000),lowertemp.temperature / CT) ,0)
|
||||
lowertemp.react()
|
||||
T.assume_air(lowertemp)
|
||||
del(hotspot)
|
||||
qdel(hotspot)
|
||||
return
|
||||
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
Reference in New Issue
Block a user