mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -40,6 +40,14 @@
|
||||
|
||||
face_atom(A) // change direction to face what you clicked on
|
||||
|
||||
if(aiCamera.in_camera_mode)
|
||||
aiCamera.camera_mode_off()
|
||||
if(is_component_functioning("camera"))
|
||||
aiCamera.captureimage(A, usr)
|
||||
else
|
||||
src << "<span class='userdanger'>Your camera isn't functional.</span>"
|
||||
return
|
||||
|
||||
/*
|
||||
cyborg restrained() currently does nothing
|
||||
if(restrained())
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#define ui_alien_head "4:12,1:5" //aliens
|
||||
#define ui_alien_oclothing "5:14,1:5" //aliens
|
||||
|
||||
#define ui_borg_sensor "5:16,1:5" //borgs
|
||||
#define ui_inv1 "6:16,1:5" //borgs
|
||||
#define ui_inv2 "7:16,1:5" //borgs
|
||||
#define ui_inv3 "8:16,1:5" //borgs
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
//Medical/Security sensors
|
||||
using = new /obj/screen()
|
||||
using.name = "Toggle Sensors"
|
||||
using.name = "Set Sensor Augmentation"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon_state = "ai_sensor"
|
||||
using.screen_loc = ui_ai_sensor
|
||||
@@ -140,8 +140,4 @@
|
||||
adding += using
|
||||
|
||||
mymob.client.screen += adding + other
|
||||
return
|
||||
|
||||
mymob.client.screen += adding + other
|
||||
|
||||
return
|
||||
@@ -50,6 +50,15 @@
|
||||
|
||||
//End of module select
|
||||
|
||||
//Sec/Med HUDs
|
||||
using = new /obj/screen()
|
||||
using.name = "Toggle Sensor Augmentation"
|
||||
using.icon = 'icons/mob/screen_ai.dmi'
|
||||
using.icon_state = "ai_sensor"
|
||||
using.screen_loc = ui_borg_sensor
|
||||
using.layer = 20
|
||||
adding += using
|
||||
|
||||
//Intent
|
||||
using = new /obj/screen()
|
||||
using.name = "act_intent"
|
||||
|
||||
@@ -406,6 +406,11 @@
|
||||
R.uneq_active()
|
||||
R.hud_used.update_robot_modules_display()
|
||||
|
||||
if("Toggle Sensor Augmentation")
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.control_hud()
|
||||
|
||||
if("module1")
|
||||
if(istype(usr, /mob/living/silicon/robot))
|
||||
usr:toggle_module(1)
|
||||
@@ -549,7 +554,7 @@
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.aiCamera.viewpictures()
|
||||
|
||||
if("Toggle Sensors")
|
||||
if("Set Sensor Augmentation")
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
AI.control_hud()
|
||||
|
||||
@@ -667,6 +667,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
access = access_security
|
||||
group = "Security"
|
||||
|
||||
/datum/supply_packs/disabler
|
||||
name = "Disabler Crate"
|
||||
contains = list(/obj/item/weapon/gun/energy/disabler,
|
||||
/obj/item/weapon/gun/energy/disabler,
|
||||
/obj/item/weapon/gun/energy/disabler)
|
||||
cost = 10
|
||||
containertype = /obj/structure/closet/crate/secure/weapon
|
||||
containername = "disabler crate"
|
||||
access = access_security
|
||||
group = "Security"
|
||||
|
||||
/datum/supply_packs/eweapons
|
||||
name = "Experimental weapons crate"
|
||||
contains = list(/obj/item/weapon/flamethrower/full,
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* Using the HUD procs is simple. Call these procs in the life.dm of the intended mob.
|
||||
Use the regular_hud_updates() proc before process_med_hud(mob) or process_sec_hud(mob) so
|
||||
the HUD updates properly! */
|
||||
|
||||
//Medical HUD outputs. Called by the Life() proc of the mob using it, usually.
|
||||
proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
|
||||
if(!can_process_hud(M))
|
||||
return
|
||||
|
||||
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, med_hud_users)
|
||||
for(var/mob/living/carbon/human/patient in P.Mob.in_view(P.Turf))
|
||||
if(P.Mob.see_invisible < patient.invisibility)
|
||||
continue
|
||||
|
||||
if(!local_scanner)
|
||||
if(istype(patient.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = patient.w_uniform
|
||||
if(U.sensor_mode < 2)
|
||||
continue
|
||||
else
|
||||
continue
|
||||
|
||||
P.Client.images += patient.hud_list[HEALTH_HUD]
|
||||
if(local_scanner)
|
||||
P.Client.images += patient.hud_list[STATUS_HUD]
|
||||
|
||||
//Security HUDs. Pass a value for the second argument to enable implant viewing or other special features.
|
||||
proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt)
|
||||
if(!can_process_hud(M))
|
||||
return
|
||||
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, sec_hud_users)
|
||||
for(var/mob/living/carbon/human/perp in P.Mob.in_view(P.Turf))
|
||||
if(P.Mob.see_invisible < perp.invisibility)
|
||||
continue
|
||||
|
||||
P.Client.images += perp.hud_list[ID_HUD]
|
||||
if(advanced_mode)
|
||||
P.Client.images += perp.hud_list[WANTED_HUD]
|
||||
P.Client.images += perp.hud_list[IMPTRACK_HUD]
|
||||
P.Client.images += perp.hud_list[IMPLOYAL_HUD]
|
||||
P.Client.images += perp.hud_list[IMPCHEM_HUD]
|
||||
|
||||
datum/arranged_hud_process
|
||||
var/client/Client
|
||||
var/mob/Mob
|
||||
var/turf/Turf
|
||||
|
||||
proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list)
|
||||
hud_list |= M
|
||||
var/datum/arranged_hud_process/P = new
|
||||
P.Client = M.client
|
||||
P.Mob = Alt ? Alt : M
|
||||
P.Turf = get_turf(P.Mob)
|
||||
return P
|
||||
|
||||
proc/can_process_hud(var/mob/M)
|
||||
if(!M)
|
||||
return 0
|
||||
if(!M.client)
|
||||
return 0
|
||||
if(M.stat != CONSCIOUS)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Deletes the current HUD images so they can be refreshed with new ones.
|
||||
mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
|
||||
if(client)
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud")
|
||||
client.images -= hud
|
||||
med_hud_users -= src
|
||||
sec_hud_users -= src
|
||||
|
||||
mob/proc/in_view(var/turf/T)
|
||||
return view(T)
|
||||
|
||||
/mob/aiEye/in_view(var/turf/T)
|
||||
var/list/viewed = new
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(get_dist(H, T) <= 7)
|
||||
viewed += H
|
||||
return viewed
|
||||
@@ -16,6 +16,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
var/event_time = null
|
||||
var/event = 0
|
||||
|
||||
var/login_music // music played in pregame lobby
|
||||
|
||||
var/list/datum/mind/minds = list()//The people in the game. Used for objective tracking.
|
||||
|
||||
@@ -38,6 +39,10 @@ var/global/datum/controller/gameticker/ticker
|
||||
var/initialtpass = 0 //holder for inital autotransfer vote timer
|
||||
|
||||
/datum/controller/gameticker/proc/pregame()
|
||||
login_music = pick(\
|
||||
'sound/music/space.ogg',\
|
||||
'sound/music/Title1.ogg',\
|
||||
'sound/music/Title2.ogg',)
|
||||
do
|
||||
pregame_timeleft = 180
|
||||
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
|
||||
|
||||
@@ -20,11 +20,8 @@
|
||||
if (computer)
|
||||
computer.table = src
|
||||
break
|
||||
// spawn(100) //Wont the MC just call this process() before and at the 10 second mark anyway?
|
||||
// process()
|
||||
|
||||
/obj/machinery/optable/ex_act(severity)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
@@ -76,41 +73,17 @@
|
||||
|
||||
|
||||
/obj/machinery/optable/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
|
||||
if(O.loc == user) //no you can't pull things out of your ass
|
||||
return
|
||||
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
|
||||
return
|
||||
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
|
||||
return
|
||||
if(!ismob(O)) //humans only
|
||||
return
|
||||
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
|
||||
return
|
||||
if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
|
||||
return
|
||||
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
|
||||
return
|
||||
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
|
||||
return
|
||||
|
||||
var/mob/living/L = O
|
||||
if(!istype(L) || L.buckled)
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,L))
|
||||
if(M.Victim == L)
|
||||
usr << "[L.name] cannot be operated on while they have \a [M] attached to their head!"
|
||||
return
|
||||
if(src.victim)
|
||||
usr << "\blue <B>The table is already occupied!</B>"
|
||||
return
|
||||
|
||||
take_victim(L, user)
|
||||
take_victim(L,usr)
|
||||
return
|
||||
|
||||
/obj/machinery/optable/proc/check_victim()
|
||||
if(locate(/mob/living/carbon/human, src.loc))
|
||||
var/mob/living/carbon/human/M = locate(/mob/living/carbon/human, src.loc)
|
||||
if(M.resting)
|
||||
if(M.lying)
|
||||
src.victim = M
|
||||
icon_state = M.pulse ? "table2-active" : "table2-idle"
|
||||
return 1
|
||||
@@ -146,11 +119,7 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat || !ishuman(usr) || usr.buckled || usr.restrained())
|
||||
return
|
||||
|
||||
if(src.victim)
|
||||
usr << "\blue <B>The table is already occupied!</B>"
|
||||
if(usr.stat || !ishuman(usr) || usr.restrained() || !check_table(usr))
|
||||
return
|
||||
|
||||
take_victim(usr,usr)
|
||||
@@ -162,5 +131,14 @@
|
||||
del(W)
|
||||
return
|
||||
|
||||
/obj/machinery/optable/slime
|
||||
icon_state = "table-slime"
|
||||
|
||||
/obj/machinery/optable/proc/check_table(mob/living/carbon/patient as mob)
|
||||
if(src.victim)
|
||||
usr << "\blue <B>The table is already occupied!</B>"
|
||||
return 0
|
||||
|
||||
if(patient.buckled)
|
||||
usr << "\blue <B>Unbuckle first!</B>"
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -602,6 +602,5 @@
|
||||
if((robot.z == src.z) && !robot.blinded)
|
||||
if((skin == "bezerk") && (!("syndicate" in robot.faction)))
|
||||
continue
|
||||
for(var/obj/I in robot.contents)
|
||||
if(istype(I, /obj/item/borg/sight/hud/med))
|
||||
robot << "<span class='info'>\icon[I] Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
|
||||
if(robot.sensor_mode == 2)
|
||||
robot << "<span class='info'>Medical emergency! [crit_patient ? "<b>[crit_patient]</b>" : "A patient"] is in critical condition at [location]!"
|
||||
@@ -264,7 +264,7 @@ Auto Patrol: []"},
|
||||
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
|
||||
target.visible_message("<span class='danger'>[src] is trying to put handcuffs on [target]!</span>",\
|
||||
"<span class='userdanger'>[src] is trying to put handcuffs on [target]!</span>")
|
||||
spawn(80)
|
||||
spawn(60)
|
||||
if( !Adjacent(target) || !isturf(target.loc) ) //if he's in a closet or not adjacent, we cancel cuffing.
|
||||
return
|
||||
if(!target.handcuffed)
|
||||
@@ -483,7 +483,5 @@ Auto Patrol: []"},
|
||||
if((human.z == src.z) && istype(human.glasses, /obj/item/clothing/glasses/hud/security) || istype(human.glasses, /obj/item/clothing/glasses/sunglasses/sechud) && !human.blinded)
|
||||
human << "<span class='info'>\icon[human.glasses] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
|
||||
for(var/mob/living/silicon/robot in world)
|
||||
if((robot.z == src.z) && !robot.blinded)
|
||||
for(var/obj/I in robot.contents)
|
||||
if(istype(I, /obj/item/borg/sight/hud/sec))
|
||||
robot << "<span class='info'>\icon[I] [src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
|
||||
if((robot.z == src.z) && !robot.blinded && robot.sensor_mode == 1)
|
||||
robot << "<span class='info'>[src.name] is [arrest_type ? "detaining" : "arresting"] level [threatlevel] threat <b>[target]</b> in <b>[location]</b></span>"
|
||||
@@ -398,7 +398,7 @@
|
||||
|
||||
//user << browse(t, "window=turretid;size=500x250")
|
||||
//onclose(user, "turretid")
|
||||
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])")
|
||||
var/datum/browser/popup = new(user, "turretid", "Turret Control Panel ([area.name])", 500, 250)
|
||||
popup.set_content(t)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
icon_state = "mecha_taser"
|
||||
energy_drain = 20
|
||||
equip_cooldown = 8
|
||||
projectile = /obj/item/projectile/energy/electrode/revolver
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
size = 1
|
||||
|
||||
|
||||
@@ -1,227 +1,148 @@
|
||||
/obj/item/device/flash
|
||||
name = "flash"
|
||||
desc = "Used for blinding and being an asshole."
|
||||
desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production."
|
||||
icon_state = "flash"
|
||||
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
|
||||
throwforce = 5
|
||||
w_class = 1.0
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
origin_tech = "magnets=2;combat=1"
|
||||
|
||||
var/times_used = 0 //Number of times it's been used.
|
||||
var/broken = 0 //Is the flash burnt out?
|
||||
var/last_used = 0 //last world.time it was used.
|
||||
|
||||
/obj/item/device/flash/proc/clown_check(var/mob/user)
|
||||
|
||||
/obj/item/device/flash/proc/clown_check(mob/user)
|
||||
if(user && (M_CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red \The [src] slips out of your hand."
|
||||
user.drop_item()
|
||||
flash_carbon(user, user, 15, 0)
|
||||
user.visible_message("<span class='disarm'>[user] blinds [user] with the flash!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/device/flash/proc/flash_recharge()
|
||||
//capacitor recharges over time
|
||||
for(var/i=0, i<3, i++)
|
||||
if(last_used+600 > world.time)
|
||||
break
|
||||
last_used += 600
|
||||
times_used -= 2
|
||||
|
||||
/obj/item/device/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something.
|
||||
broken = 1
|
||||
icon_state = "[initial(icon_state)]burnt"
|
||||
visible_message("<span class='notice'>The [src.name] burns out!</span>")
|
||||
|
||||
|
||||
/obj/item/device/flash/proc/flash_recharge(var/mob/user)
|
||||
if(prob(times_used * 2)) //if you use it 5 times in a minute it has a 10% chance to break!
|
||||
burn_out()
|
||||
return 0
|
||||
|
||||
var/deciseconds_passed = world.time - last_used
|
||||
for(var/seconds = deciseconds_passed/10, seconds>=10, seconds-=10) //get 1 charge every 10 seconds
|
||||
times_used--
|
||||
|
||||
last_used = world.time
|
||||
times_used = max(0,round(times_used)) //sanity
|
||||
times_used = max(0, times_used) //sanity
|
||||
|
||||
|
||||
/obj/item/device/flash/attack(mob/living/M as mob, mob/user as mob)
|
||||
if(!user || !M) return //sanity
|
||||
/obj/item/device/flash/proc/try_use_flash(var/mob/user)
|
||||
flash_recharge(user)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
if(!clown_check(user)) return
|
||||
if(broken)
|
||||
user << "<span class='warning'>\The [src] is broken.</span>"
|
||||
return
|
||||
return 0
|
||||
|
||||
flash_recharge()
|
||||
|
||||
//spamming the flash before it's fully charged (60seconds) increases the chance of it breaking
|
||||
//It will never break on the first use.
|
||||
switch(times_used)
|
||||
if(0 to 5)
|
||||
last_used = world.time
|
||||
if(prob(times_used)) //if you use it 5 times in a minute it has a 10% chance to break!
|
||||
broken = 1
|
||||
user << "<span class='warning'>The bulb has burnt out!</span>"
|
||||
icon_state = "flashburnt"
|
||||
return
|
||||
times_used++
|
||||
else //can only use it 5 times a minute
|
||||
user << "<span class='warning'>*click* *click*</span>"
|
||||
return
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
var/flashfail = 0
|
||||
flick("[initial(icon_state)]2", src)
|
||||
times_used++
|
||||
|
||||
if(user && !clown_check(user))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/device/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, convert = 1)
|
||||
add_logs(M, user, "flashed", object="the flash")
|
||||
var/safety = M:eyecheck()
|
||||
if(safety <= 0)
|
||||
M.confused += power
|
||||
flick("e_flash", M.flash)
|
||||
if(user && convert)
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Stun(1)
|
||||
|
||||
/obj/item/device/flash/attack(mob/living/M, mob/user)
|
||||
if(!try_use_flash(user))
|
||||
return 0
|
||||
|
||||
if(iscarbon(M))
|
||||
var/safety = M:eyecheck()
|
||||
if(safety <= 0)
|
||||
M.Weaken(5)
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
if(ishuman(M) && ishuman(user) && M.stat!=DEAD)
|
||||
if(user.mind && user.mind in ticker.mode.head_revolutionaries)
|
||||
var/revsafe = 0
|
||||
for(var/obj/item/weapon/implant/loyalty/L in M)
|
||||
if(L && L.implanted)
|
||||
revsafe = 1
|
||||
break
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
if(M.mind.has_been_rev)
|
||||
revsafe = 2
|
||||
if(!revsafe)
|
||||
M.mind.has_been_rev = 1
|
||||
ticker.mode.add_revolutionary(M.mind)
|
||||
else if(revsafe == 1)
|
||||
user << "<span class='warning'>Something seems to be blocking the flash!</span>"
|
||||
else
|
||||
user << "<span class='warning'>This mind seems resistant to the flash!</span>"
|
||||
user << "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>"
|
||||
else
|
||||
flashfail = 1
|
||||
flash_carbon(M, user, 5, 1)
|
||||
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
return 1
|
||||
|
||||
else if(issilicon(M))
|
||||
M.Weaken(rand(5,10))
|
||||
else
|
||||
flashfail = 1
|
||||
add_logs(M, user, "flashed", object="[src.name]")
|
||||
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the flash!</span>")
|
||||
return 1
|
||||
|
||||
if(isrobot(user))
|
||||
spawn(0)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
|
||||
if(!flashfail)
|
||||
flick("flash2", src)
|
||||
if(!issilicon(M))
|
||||
|
||||
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
else
|
||||
|
||||
user.visible_message("<span class='notice'>[user] overloads [M]'s sensors with the flash!</span>")
|
||||
else
|
||||
|
||||
user.visible_message("<span class='notice'>[user] fails to blind [M] with the flash!</span>")
|
||||
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] fails to blind [M] with the flash!</span>")
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
if(!user || !clown_check(user)) return
|
||||
if(broken)
|
||||
user.show_message("<span class='warning'>The [src.name] is broken</span>", 2)
|
||||
return
|
||||
|
||||
flash_recharge()
|
||||
|
||||
//spamming the flash before it's fully charged (60seconds) increases the chance of it breaking
|
||||
//It will never break on the first use.
|
||||
switch(times_used)
|
||||
if(0 to 5)
|
||||
if(prob(2*times_used)) //if you use it 5 times in a minute it has a 10% chance to break!
|
||||
broken = 1
|
||||
user << "<span class='warning'>The bulb has burnt out!</span>"
|
||||
icon_state = "flashburnt"
|
||||
return
|
||||
times_used++
|
||||
else //can only use it 5 times a minute
|
||||
user.show_message("<span class='warning'>*click* *click*</span>", 2)
|
||||
return
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
flick("flash2", src)
|
||||
if(user && isrobot(user))
|
||||
spawn(0)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
|
||||
/obj/item/device/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
|
||||
if(!try_use_flash(user))
|
||||
return 0
|
||||
for(var/mob/living/carbon/M in oviewers(3, null))
|
||||
if(prob(50))
|
||||
if (locate(/obj/item/weapon/cloaking_device, M))
|
||||
for(var/obj/item/weapon/cloaking_device/S in M)
|
||||
S.active = 0
|
||||
S.icon_state = "shield0"
|
||||
if(M.alpha < 255)
|
||||
var/oldalpha = M.alpha
|
||||
if(prob(80))
|
||||
M.alpha = 255
|
||||
M.visible_message("<span class='warning'>[M] suddenly becomes fully visible!</span>",\
|
||||
"<span class='warning'>You see a bright flash of light and are suddenly fully visible again.</span>")
|
||||
spawn(50)
|
||||
M.alpha = oldalpha
|
||||
var/safety = M:eyecheck()
|
||||
if(!safety)
|
||||
if(!M.blinded)
|
||||
flick("flash", M.flash)
|
||||
flash_carbon(M, user, 3, 0)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/device/flash/emp_act(severity)
|
||||
if(broken) return
|
||||
flash_recharge()
|
||||
switch(times_used)
|
||||
if(0 to 5)
|
||||
if(prob(2*times_used))
|
||||
broken = 1
|
||||
icon_state = "flashburnt"
|
||||
return
|
||||
times_used++
|
||||
if(istype(loc, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = loc
|
||||
var/safety = M.eyecheck()
|
||||
if(safety <= 0)
|
||||
M.Weaken(5)
|
||||
flick("e_flash", M.flash)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message("<span class='disarm'>[M] is blinded by the flash!</span>")
|
||||
if(!try_use_flash())
|
||||
return 0
|
||||
for(var/mob/living/carbon/M in viewers(3, null))
|
||||
flash_carbon(M, null, 10, 0)
|
||||
burn_out()
|
||||
..()
|
||||
|
||||
/obj/item/device/flash/synthetic
|
||||
name = "synthetic flash"
|
||||
desc = "When a problem arises, SCIENCE is the solution."
|
||||
icon_state = "sflash"
|
||||
origin_tech = "magnets=2;combat=1"
|
||||
var/construction_cost = list("metal"=750,"glass"=750)
|
||||
var/construction_time=100
|
||||
|
||||
/obj/item/device/flash/synthetic/attack(mob/living/M as mob, mob/user as mob)
|
||||
..()
|
||||
if(!broken)
|
||||
broken = 1
|
||||
user << "\red The bulb has burnt out!"
|
||||
icon_state = "flashburnt"
|
||||
/obj/item/device/flash/proc/terrible_conversion_proc(var/mob/M, var/mob/user)
|
||||
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
|
||||
if(user.mind && ((user.mind in ticker.mode.head_revolutionaries)))
|
||||
if(M.client)
|
||||
if(M.stat == CONSCIOUS)
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
var/resisted
|
||||
if(!isloyal(M))
|
||||
if(user.mind in ticker.mode.head_revolutionaries)
|
||||
if(!ticker.mode.add_revolutionary(M.mind))
|
||||
resisted = 1
|
||||
else
|
||||
resisted = 1
|
||||
|
||||
/obj/item/device/flash/synthetic/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
|
||||
if(resisted)
|
||||
user << "<span class='warning'>This mind seems resistant to the flash!</span>"
|
||||
else
|
||||
user << "<span class='warning'>They must be conscious before you can convert them!</span>"
|
||||
else
|
||||
user << "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>"
|
||||
|
||||
|
||||
/obj/item/device/flash/cyborg
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/device/flash/cyborg/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
if(!broken)
|
||||
broken = 1
|
||||
user << "\red The bulb has burnt out!"
|
||||
icon_state = "flashburnt"
|
||||
cyborg_flash_animation(user)
|
||||
|
||||
/obj/item/device/flash/cyborg/attack_self(mob/user)
|
||||
..()
|
||||
cyborg_flash_animation(user)
|
||||
|
||||
/obj/item/device/flash/cyborg/proc/cyborg_flash_animation(var/mob/living/user)
|
||||
var/atom/movable/overlay/animation = new(user.loc)
|
||||
animation.layer = user.layer + 1
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = user
|
||||
flick("blspell", animation)
|
||||
sleep(5)
|
||||
del(animation)
|
||||
|
||||
/obj/item/device/flash/synthetic //just a regular flash now
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
//SKREEEEEEEEEEEE tool
|
||||
|
||||
/obj/item/device/flash/alien
|
||||
/obj/item/device/flash/cyborg/alien
|
||||
name = "eye flash"
|
||||
desc = "Useful for taking pictures, making friends and flash-frying chips."
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
|
||||
@@ -3,29 +3,24 @@
|
||||
desc = "A stun baton for incapacitating people with."
|
||||
icon_state = "stunbaton"
|
||||
item_state = "baton"
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
flags = FPRINT | TABLEPASS
|
||||
force = 10
|
||||
throwforce = 7
|
||||
w_class = 3
|
||||
origin_tech = "combat=2"
|
||||
attack_verb = list("beaten")
|
||||
var/stunforce = 0
|
||||
var/agonyforce = 60
|
||||
var/status = 0 //whether the thing is on or not
|
||||
var/stunforce = 7
|
||||
var/status = 0
|
||||
var/obj/item/weapon/cell/high/bcell = null
|
||||
var/mob/foundmob = "" //Used in throwing proc.
|
||||
var/hitcost = 1500 //oh god why do power cells carry so much charge? We probably need to make a distinction between "industrial" sized power cells for APCs and power cells for everything else.
|
||||
var/allowharm = 1 // Allow or disallow harming with the stunbaton
|
||||
var/hitcost = 1500
|
||||
|
||||
/obj/item/weapon/melee/baton/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.</span>")
|
||||
return (FIRELOSS)
|
||||
|
||||
|
||||
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
|
||||
/obj/item/weapon/melee/baton/New()
|
||||
..()
|
||||
bcell = new/obj/item/weapon/cell/high(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -33,25 +28,22 @@
|
||||
bcell = locate(/obj/item/weapon/cell) in contents
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
|
||||
..()
|
||||
bcell = new(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
|
||||
if(bcell)
|
||||
if(bcell.rigged)
|
||||
bcell.explode()//exploding baton of justice
|
||||
if(bcell.charge < (hitcost+chrgdeductamt)) // If after the deduction the baton doesn't have enough charge for a stun hit it turns off.
|
||||
status = 0
|
||||
update_icon()
|
||||
return
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
if(bcell.use(chrgdeductamt))
|
||||
return 1
|
||||
else
|
||||
bcell.charge -= max(chrgdeductamt,0)
|
||||
if(bcell.charge < hitcost)
|
||||
status = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/melee/baton/examine()
|
||||
set src in view(1)
|
||||
..()
|
||||
if(bcell)
|
||||
usr <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
|
||||
if(!bcell)
|
||||
usr <<"<span class='warning'>The baton does not have a power source installed.</span>"
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/melee/baton/update_icon()
|
||||
if(status)
|
||||
@@ -61,16 +53,27 @@
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/weapon/melee/baton/examine(mob/user)
|
||||
..()
|
||||
if(bcell)
|
||||
user <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
|
||||
if(!bcell)
|
||||
user <<"<span class='warning'>The baton does not have a power source installed.</span>"
|
||||
|
||||
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/cell))
|
||||
if(!bcell)
|
||||
var/obj/item/weapon/cell/C = W
|
||||
if(bcell)
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
else
|
||||
if(C.maxcharge < hitcost)
|
||||
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
bcell = W
|
||||
user << "<span class='notice'>You install a cell in [src].</span>"
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(bcell)
|
||||
@@ -85,143 +88,88 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/attack_self(mob/user)
|
||||
if(status && (M_CLUMSY in user.mutations) && prob(50))
|
||||
user << "\red You grab the [src] on the wrong side."
|
||||
user.Weaken(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
if(bcell && bcell.charge)
|
||||
if(bcell.charge < hitcost)
|
||||
status = 0
|
||||
user << "<span class='warning'>[src] is out of charge.</span>"
|
||||
else
|
||||
status = !status
|
||||
user << "<span class='notice'>[src] is now [status ? "on" : "off"].</span>"
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
update_icon()
|
||||
if(bcell && bcell.charge > hitcost)
|
||||
status = !status
|
||||
user << "<span class='notice'>[src] is now [status ? "on" : "off"].</span>"
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
else
|
||||
status = 0
|
||||
if(!bcell)
|
||||
user << "<span class='warning'>[src] does not have a power source!</span>"
|
||||
else
|
||||
user << "<span class='warning'>[src] is out of charge.</span>"
|
||||
update_icon()
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/melee/baton/attack(mob/M, mob/user)
|
||||
/obj/item/weapon/melee/baton/attack(mob/M, mob/living/user)
|
||||
if(status && (M_CLUMSY in user.mutations) && prob(50))
|
||||
user << "span class='danger'>You accidentally hit yourself with the [src]!</span>"
|
||||
user.Weaken(30)
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
user.Weaken(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
return
|
||||
|
||||
if(isrobot(M))
|
||||
..()
|
||||
return
|
||||
if(!isliving(M))
|
||||
return
|
||||
|
||||
var/agony = agonyforce
|
||||
var/stun = stunforce
|
||||
var/mob/living/L = M
|
||||
|
||||
var/target_zone = check_zone(user.zone_sel.selecting)
|
||||
if(user.a_intent == "harm" && allowharm == 1)
|
||||
if (!..()) //item/attack() does it's own messaging and logs
|
||||
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
|
||||
agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
|
||||
stun *= 0.5
|
||||
//we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to.
|
||||
else
|
||||
//copied from human_defense.dm - human defence code should really be refactored some time.
|
||||
if (ishuman(L))
|
||||
user.lastattacked = L //are these used at all, if we have logs?
|
||||
L.lastattacker = user
|
||||
|
||||
if (user != L) // Attacking yourself can't miss
|
||||
target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L)
|
||||
|
||||
if(!target_zone)
|
||||
L.visible_message("\red <B>[user] misses [L] with \the [src]!")
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/datum/organ/external/affecting = H.get_organ(target_zone)
|
||||
if (affecting)
|
||||
if(!status)
|
||||
L.visible_message("<span class='warning'>[L] has been prodded in the [affecting.display_name] with [src] by [user]. Luckily it was off.</span>")
|
||||
return 1
|
||||
else
|
||||
H.visible_message("<span class='danger'>[L] has been prodded in the [affecting.display_name] with [src] by [user]!</span>")
|
||||
if(user.a_intent != "harm")
|
||||
if(status)
|
||||
baton_stun(L, user)
|
||||
else
|
||||
if(!status)
|
||||
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
|
||||
return 1
|
||||
else
|
||||
L.visible_message("<span class='danger'>[L] has been prodded with [src] by [user]!</span>")
|
||||
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>", \
|
||||
"<span class='warning'>You've been prodded with [src] by [user]. Luckily it was off</span>")
|
||||
return
|
||||
else
|
||||
..()
|
||||
if(status)
|
||||
baton_stun(L, user)
|
||||
|
||||
//stun effects
|
||||
L.stun_effect_act(stun, agony, target_zone, src)
|
||||
|
||||
/obj/item/weapon/melee/baton/proc/baton_stun(mob/living/L, mob/user)
|
||||
user.lastattacked = L
|
||||
L.lastattacker = user
|
||||
|
||||
L.Stun(stunforce)
|
||||
L.Weaken(stunforce)
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
|
||||
L.visible_message("<span class='danger'>[L] has been stunned with [src] by [user]!</span>", \
|
||||
"<span class='userdanger'>You've been stunned with [src] by [user]!</span>")
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src].")
|
||||
|
||||
deductcharge(hitcost)
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
R.cell.use(hitcost)
|
||||
else
|
||||
deductcharge(hitcost)
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
H.forcesay(hit_appends)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/melee/baton/throw_impact(atom/hit_atom)
|
||||
. = ..()
|
||||
if (prob(50))
|
||||
if(istype(hit_atom, /mob/living))
|
||||
var/mob/living/carbon/human/H = hit_atom
|
||||
if(status)
|
||||
//stun effects
|
||||
if (stunforce)
|
||||
H.Stun(stunforce)
|
||||
H.Weaken(stunforce)
|
||||
H.apply_effect(STUTTER, stunforce)
|
||||
|
||||
if (agonyforce)
|
||||
//Siemens coefficient?
|
||||
//TODO: Merge this with taser effects
|
||||
H.apply_effect(agonyforce,AGONY,0)
|
||||
H.apply_effect(STUTTER, agonyforce/10)
|
||||
H.apply_effect(EYE_BLUR, agonyforce/10)
|
||||
H.flash_pain()
|
||||
|
||||
deductcharge(hitcost)
|
||||
|
||||
if(bcell.charge < hitcost)
|
||||
status = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
for(var/mob/M in player_list) if(M.key == src.fingerprintslast)
|
||||
foundmob = M
|
||||
break
|
||||
|
||||
H.visible_message("<span class='danger'>[src], thrown by [foundmob.name], strikes [H] and stuns them!</span>")
|
||||
|
||||
H.attack_log += "\[[time_stamp()]\]<font color='orange'> Stunned by thrown [src.name] last touched by ([src.fingerprintslast])</font>"
|
||||
log_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [H.name] ([H.ckey])" )
|
||||
|
||||
if(!iscarbon(foundmob))
|
||||
H.LAssailant = null
|
||||
else
|
||||
H.LAssailant = foundmob
|
||||
add_logs(L, user, "stunned", object="stunbaton")
|
||||
|
||||
/obj/item/weapon/melee/baton/emp_act(severity)
|
||||
if(bcell)
|
||||
bcell.emp_act(severity) //let's not duplicate code everywhere if we don't have to please.
|
||||
deductcharge(1000 / severity)
|
||||
if(bcell.reliability != 100 && prob(50/severity))
|
||||
bcell.reliability -= 10 / severity
|
||||
..()
|
||||
|
||||
//secborg stun baton module
|
||||
/obj/item/weapon/melee/baton/robot
|
||||
hitcost = 500
|
||||
|
||||
/obj/item/weapon/melee/baton/robot/New()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/robot/attack_self(mob/user)
|
||||
//try to find our power cell
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
@@ -246,16 +194,6 @@
|
||||
item_state = "prod"
|
||||
force = 3
|
||||
throwforce = 5
|
||||
stunforce = 0
|
||||
agonyforce = 42 //less than a stunbaton and uses way more charge.
|
||||
stunforce = 5
|
||||
hitcost = 3750
|
||||
attack_verb = list("poked")
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/weapon/melee/baton/cattleprod/update_icon()
|
||||
if(status)
|
||||
icon_state = "stunprod_active"
|
||||
else if(!bcell)
|
||||
icon_state = "stunprod_nocell"
|
||||
else
|
||||
icon_state = "stunprod"
|
||||
slot_flags = null
|
||||
@@ -463,7 +463,6 @@
|
||||
item_state = "crowbar_red"
|
||||
|
||||
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
|
||||
|
||||
if(hasorgans(M))
|
||||
|
||||
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
|
||||
@@ -480,14 +479,27 @@
|
||||
return
|
||||
|
||||
if(S.brute_dam)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src].")
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.updatehealth()
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/WT = src
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src].")
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.updatehealth()
|
||||
if(istype(M,/mob/living/carbon/human/machine) && M.stat == 0) // If an IPC is brought back to life by welding it, which is possible, update the mob list
|
||||
if(M in dead_mob_list)
|
||||
dead_mob_list -= M
|
||||
respawnable_list -= M
|
||||
living_mob_list += M
|
||||
mob_list += M
|
||||
return
|
||||
else
|
||||
user << "\red You need more welding fuel to complete this task."
|
||||
return
|
||||
else
|
||||
user << "Nothing to fix!"
|
||||
return
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -93,6 +93,10 @@ var/const/FALLOFF_SOUNDS = 0.5
|
||||
S.environment = 2
|
||||
src << S
|
||||
|
||||
/client/proc/playtitlemusic()
|
||||
if(!ticker || !ticker.login_music) return
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS
|
||||
|
||||
/proc/get_rand_frequency()
|
||||
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/obj/item/device/spacepod_equipment/weaponry/proc/fire_weapons()
|
||||
|
||||
if(my_atom.next_firetime > world.time)
|
||||
usr << "<span class='warning'>Your weapons are recharging.</span>"
|
||||
return
|
||||
@@ -12,37 +11,39 @@
|
||||
my_atom.battery.use(shot_cost)
|
||||
var/olddir
|
||||
for(var/i = 0; i < shots_per; i++)
|
||||
if(olddir != dir)
|
||||
switch(dir)
|
||||
if(olddir != my_atom.dir)
|
||||
switch(my_atom.dir)
|
||||
if(NORTH)
|
||||
firstloc = get_step(src, NORTH)
|
||||
firstloc = get_step(my_atom, NORTH)
|
||||
firstloc = get_step(firstloc, NORTH)
|
||||
secondloc = get_step(firstloc,EAST)
|
||||
if(SOUTH)
|
||||
firstloc = get_turf(src)
|
||||
firstloc = get_step(my_atom, SOUTH)
|
||||
secondloc = get_step(firstloc,EAST)
|
||||
if(EAST)
|
||||
firstloc = get_turf(src)
|
||||
firstloc = get_step(my_atom, EAST)
|
||||
firstloc = get_step(firstloc, EAST)
|
||||
secondloc = get_step(firstloc,NORTH)
|
||||
if(WEST)
|
||||
firstloc = get_turf(src)
|
||||
firstloc = get_step(my_atom, WEST)
|
||||
secondloc = get_step(firstloc,NORTH)
|
||||
olddir = dir
|
||||
var/obj/item/projectile/projone = new projectile_type(firstloc)
|
||||
var/obj/item/projectile/projtwo = new projectile_type(secondloc)
|
||||
projone.starting = get_turf(src)
|
||||
var/proj_type = text2path(projectile_type)
|
||||
var/obj/item/projectile/projone = new proj_type(firstloc)
|
||||
var/obj/item/projectile/projtwo = new proj_type(secondloc)
|
||||
projone.starting = get_turf(my_atom)
|
||||
projone.shot_from = src
|
||||
projone.firer = usr
|
||||
projone.def_zone = "chest"
|
||||
projtwo.starting = get_turf(src)
|
||||
projtwo.starting = get_turf(my_atom)
|
||||
projtwo.shot_from = src
|
||||
projtwo.firer = usr
|
||||
projtwo.def_zone = "chest"
|
||||
spawn()
|
||||
playsound(src, fire_sound, 50, 1)
|
||||
projone.dumbfire(dir)
|
||||
projtwo.dumbfire(dir)
|
||||
sleep(1)
|
||||
projone.dumbfire(my_atom.dir)
|
||||
projtwo.dumbfire(my_atom.dir)
|
||||
sleep(2)
|
||||
my_atom.next_firetime = world.time + fire_delay
|
||||
|
||||
/datum/spacepod/equipment
|
||||
@@ -70,44 +71,32 @@
|
||||
var/shot_cost = 0
|
||||
var/shots_per = 1
|
||||
var/fire_sound
|
||||
var/fire_delay = 10
|
||||
var/fire_delay = 20
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser
|
||||
name = "\improper taser system"
|
||||
desc = "A weak taser system for space pods, fires electrodes that shock upon impact."
|
||||
icon_state = "pod_taser"
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
shot_cost = 10
|
||||
shot_cost = 250
|
||||
fire_sound = "sound/weapons/Taser.ogg"
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser/proc/fire_weapon_system()
|
||||
set category = "Spacepod"
|
||||
set name = "Fire Taser System"
|
||||
set desc = "Fire the tasers."
|
||||
set src = usr.loc
|
||||
|
||||
fire_weapons()
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/taser/burst
|
||||
name = "\improper taser system"
|
||||
/obj/item/device/spacepod_equipment/weaponry/burst_taser
|
||||
name = "\improper burst taser system"
|
||||
desc = "A weak taser system for space pods, this one fires 3 at a time."
|
||||
icon_state = "pod_b_taser"
|
||||
shot_cost = 20
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
shot_cost = 350
|
||||
shots_per = 3
|
||||
fire_sound = "sound/weapons/Taser.ogg"
|
||||
fire_delay = 40
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/laser
|
||||
name = "\improper laser system"
|
||||
desc = "A weak laser system for space pods, fires concentrated bursts of energy"
|
||||
icon_state = "pod_w_laser"
|
||||
projectile_type = "/obj/item/projectile/beam"
|
||||
shot_cost = 15
|
||||
shot_cost = 300
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
fire_delay = 25
|
||||
fire_delay = 30
|
||||
|
||||
/obj/item/device/spacepod_equipment/weaponry/laser/proc/fire_weapon_system()
|
||||
set category = "Spacepod"
|
||||
set name = "Fire Laser System"
|
||||
set desc = "Fire the lasers."
|
||||
set src = usr.loc
|
||||
|
||||
fire_weapons()
|
||||
@@ -24,7 +24,9 @@
|
||||
var/hatch_open = 0
|
||||
var/next_firetime = 0
|
||||
var/list/pod_overlays
|
||||
var/health = 400
|
||||
var/health = 100
|
||||
var/lights = 0
|
||||
var/lights_power = 6
|
||||
|
||||
/obj/spacepod/New()
|
||||
. = ..()
|
||||
@@ -140,9 +142,6 @@
|
||||
W.loc = equipment_system
|
||||
equipment_system.weapon_system = W
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
var/path = text2path("[W.type]/proc/fire_weapon_system")
|
||||
if(path)
|
||||
verbs += path//obj/spacepod/proc/fire_weapons
|
||||
return
|
||||
|
||||
|
||||
@@ -205,18 +204,16 @@
|
||||
|
||||
/obj/spacepod/sec
|
||||
name = "\improper security spacepod"
|
||||
desc = "An armed security spacepod."
|
||||
desc = "An armed security spacepod with reinforced armor plating."
|
||||
icon_state = "pod_mil"
|
||||
health = 150
|
||||
|
||||
/obj/spacepod/sec/New()
|
||||
..()
|
||||
var/obj/item/device/spacepod_equipment/weaponry/taser/burst/T = new /obj/item/device/spacepod_equipment/weaponry/taser/burst
|
||||
var/obj/item/device/spacepod_equipment/weaponry/taser/T = new /obj/item/device/spacepod_equipment/weaponry/taser
|
||||
T.loc = equipment_system
|
||||
equipment_system.weapon_system = T
|
||||
equipment_system.weapon_system.my_atom = T
|
||||
var/path = text2path("[T.type]/proc/fire_weapon_system")
|
||||
if(path)
|
||||
verbs += path//obj/spacepod/proc/fire_weapons
|
||||
equipment_system.weapon_system.my_atom = src
|
||||
return
|
||||
|
||||
/obj/spacepod/random/New()
|
||||
@@ -368,12 +365,12 @@
|
||||
src.occupant = null
|
||||
usr << "<span class='notice'>You climb out of the pod</span>"
|
||||
return
|
||||
|
||||
|
||||
/obj/spacepod/verb/toggleDoors()
|
||||
set name = "Toggle Nearby Pod Doors"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
|
||||
|
||||
for(var/obj/machinery/door/poddoor/P in oview(3,src))
|
||||
if(istype(P, /obj/machinery/door/poddoor/three_tile_hor) || istype(P, /obj/machinery/door/poddoor/three_tile_ver) || istype(P, /obj/machinery/door/poddoor/four_tile_hor) || istype(P, /obj/machinery/door/poddoor/four_tile_ver))
|
||||
var/mob/living/carbon/human/L = usr
|
||||
@@ -384,9 +381,30 @@
|
||||
else
|
||||
P.close()
|
||||
return 1
|
||||
usr << "<span class='warning'>Access denied.</span>"
|
||||
usr << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
usr << "<span class='warning'>You are not close to any pod doors.</span>"
|
||||
usr << "<span class='warning'>You are not close to any pod doors.</span>"
|
||||
return
|
||||
|
||||
/obj/spacepod/verb/fireWeapon()
|
||||
set name = "Fire Pod Weapons"
|
||||
set desc = "Fire the weapons."
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
equipment_system.weapon_system.fire_weapons()
|
||||
|
||||
obj/spacepod/verb/toggleLights()
|
||||
set name = "Toggle Lights"
|
||||
set category = "Spacepod"
|
||||
set src = usr.loc
|
||||
if (usr != occupant)
|
||||
return
|
||||
lights = !lights
|
||||
if(lights)
|
||||
SetLuminosity(luminosity + lights_power)
|
||||
else
|
||||
SetLuminosity(luminosity - lights_power)
|
||||
occupant << "Toggled lights [lights?"on":"off"]."
|
||||
return
|
||||
|
||||
/obj/spacepod/proc/enter_after(delay as num, var/mob/user as mob, var/numticks = 5)
|
||||
|
||||
@@ -12,6 +12,8 @@ var/global/list/machines = list()
|
||||
var/global/list/processing_objects = list()
|
||||
var/global/list/active_diseases = list()
|
||||
var/global/list/events = list()
|
||||
var/global/list/med_hud_users = list()
|
||||
var/global/list/sec_hud_users = list()
|
||||
//items that ask to be called every cycle
|
||||
|
||||
var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
|
||||
|
||||
@@ -1618,9 +1618,6 @@
|
||||
var/obj/pageobj = B.contents[page]
|
||||
data += "<A href='?src=\ref[src];AdminFaxViewPage=[page];paper_bundle=\ref[B]'>Page [page] - [pageobj.name]</A><BR>"
|
||||
|
||||
world << data
|
||||
world << "Sent by: [usr]"
|
||||
|
||||
usr << browse(data, "window=[B.name]")
|
||||
else
|
||||
usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]"
|
||||
|
||||
@@ -310,6 +310,7 @@ datum/preferences
|
||||
dat += "-Color: <a href='?_src_=prefs;preference=UIcolor'><b>[UI_style_color]</b></a> <table style='display:inline;' bgcolor='[UI_style_color]'><tr><td>__</td></tr></table><br>"
|
||||
dat += "-Alpha(transparence): <a href='?_src_=prefs;preference=UIalpha'><b>[UI_style_alpha]</b></a><br>"
|
||||
dat += "<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(sound & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[(sound & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Randomized Character Slot:</b> <a href='?_src_=prefs;preference=randomslot'><b>[randomslot ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||
dat += "<b>Ghost sight:</b> <a href='?_src_=prefs;preference=ghost_sight'><b>[(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
|
||||
@@ -1291,6 +1292,13 @@ datum/preferences
|
||||
if("hear_midis")
|
||||
sound ^= SOUND_MIDI
|
||||
|
||||
if("lobby_music")
|
||||
sound ^= SOUND_LOBBY
|
||||
if(sound & SOUND_LOBBY)
|
||||
user << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1)
|
||||
else
|
||||
user << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
|
||||
|
||||
if("ghost_ears")
|
||||
toggles ^= CHAT_GHOSTEARS
|
||||
|
||||
|
||||
@@ -59,6 +59,21 @@
|
||||
src << "You will [(prefs.toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat."
|
||||
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggletitlemusic()
|
||||
set name = "Hear/Silence LobbyMusic"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing the GameLobby music"
|
||||
prefs.sound ^= SOUND_LOBBY
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
src << "You will now hear music in the game lobby."
|
||||
if(istype(mob, /mob/new_player))
|
||||
playtitlemusic()
|
||||
else
|
||||
src << "You will no longer hear music in the game lobby."
|
||||
if(istype(mob, /mob/new_player))
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jamsz
|
||||
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglemidis()
|
||||
set name = "Hear/Silence Midis"
|
||||
|
||||
@@ -28,24 +28,10 @@
|
||||
darkness_view = 8
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/process_hud(var/mob/M)
|
||||
if(!M) return
|
||||
if(!M.client) return
|
||||
var/client/C = M.client
|
||||
for(var/mob/living/carbon/human/patient in view(get_turf(M)))
|
||||
if(M.see_invisible < patient.invisibility)
|
||||
continue
|
||||
C.images += patient.hud_list[HEALTH_HUD]
|
||||
C.images += patient.hud_list[STATUS_HUD]
|
||||
process_med_hud(M,1)
|
||||
|
||||
/obj/item/clothing/glasses/hud/health_advanced/process_hud(var/mob/M)
|
||||
if(!M) return
|
||||
if(!M.client) return
|
||||
var/client/C = M.client
|
||||
for(var/mob/living/carbon/human/patient in view(get_turf(M)))
|
||||
if(M.see_invisible < patient.invisibility)
|
||||
continue
|
||||
C.images += patient.hud_list[HEALTH_HUD]
|
||||
C.images += patient.hud_list[STATUS_HUD]
|
||||
process_sec_hud(M,1)
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/hud/security
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if (M.internals)
|
||||
M.internals.icon_state = "internal1"
|
||||
|
||||
M.generate_name()
|
||||
//M.generate_name()
|
||||
|
||||
if( M.species.name=="Tajaran" || M.species.name=="Unathi" )
|
||||
if(M.mind.assigned_role == "Cyborg" || M.mind.assigned_role == "Clown")
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/mob/living/carbon/brain/say(var/message)
|
||||
if (silent)
|
||||
return
|
||||
|
||||
if (stat == 2) // Dead.
|
||||
return say_dead(message)
|
||||
|
||||
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
|
||||
return //No MMI, can't speak, bucko./N
|
||||
|
||||
@@ -219,8 +219,6 @@
|
||||
"\blue [M] gives [src] a [pick("hug","warm embrace")].", \
|
||||
"\blue You hug [src].", \
|
||||
)
|
||||
if(prob(10))
|
||||
src.emote("fart")
|
||||
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
if(!(species.flags & IS_SYNTHETIC))
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
animation = new(loc)
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'icons/mob/mob.dmi'
|
||||
animation.master = src
|
||||
|
||||
playsound(src.loc, 'sound/effects/gib.ogg', 100, 1, 10)
|
||||
playsound(src.loc, 'sound/effects/gib.ogg', 100, 1, 10)
|
||||
|
||||
for(var/datum/organ/external/E in src.organs)
|
||||
if(istype(E, /datum/organ/external/chest))
|
||||
@@ -20,9 +20,15 @@
|
||||
if(prob(100 - E.get_damage()))
|
||||
// Override the current limb status and don't cause an explosion
|
||||
E.droplimb(1,1)
|
||||
|
||||
flick("gibbed-h", animation)
|
||||
hgibs(loc, viruses, dna)
|
||||
|
||||
if(!(species.flags & IS_SYNTHETIC))
|
||||
flick("gibbed-h", animation)
|
||||
hgibs(loc, viruses, dna)
|
||||
else
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
|
||||
@@ -635,8 +635,11 @@
|
||||
// Needed for M_TOXIC_FART
|
||||
if("fart")
|
||||
if(world.time-lastFart >= 600)
|
||||
playsound(src.loc, 'sound/effects/fart.ogg', 50, 1, -3) //Admins voted no to fun
|
||||
message = "<b>[src]</b> [pick("passes wind","farts")]."
|
||||
// playsound(src.loc, 'sound/effects/fart.ogg', 50, 1, -3) //Admins still vote no to fun
|
||||
if(M_TOXIC_FARTS in mutations)
|
||||
message = "<b>[src]</b> unleashes a [pick("horrible","terrible","foul","disgusting","awful")] fart."
|
||||
else
|
||||
message = "<b>[src]</b> [pick("passes wind","farts")]."
|
||||
m_type = 2
|
||||
|
||||
var/turf/location = get_turf(src)
|
||||
@@ -644,38 +647,31 @@
|
||||
if(M_SUPER_FART in mutations)
|
||||
aoe_range+=3 //Was 5
|
||||
|
||||
// If we're wearing a suit, don't blast or gas those around us.
|
||||
/* // If we're wearing a suit, don't blast or gas those around us.
|
||||
var/wearing_suit=0
|
||||
var/wearing_mask=0
|
||||
if(wear_suit && wear_suit.body_parts_covered & LOWER_TORSO)
|
||||
wearing_suit=1
|
||||
if (internal != null && wear_mask && (wear_mask.flags & MASKINTERNALS))
|
||||
wearing_mask=1
|
||||
wearing_mask=1 */
|
||||
|
||||
// Process toxic farts first.
|
||||
if(M_TOXIC_FARTS in mutations)
|
||||
if(wearing_suit)
|
||||
if(!wearing_mask)
|
||||
src << "\red You gas yourself!"
|
||||
reagents.add_reagent("space_drugs", rand(10,20))
|
||||
else
|
||||
// Was /turf/, now /mob/
|
||||
|
||||
for(var/mob/M in range(location,aoe_range))
|
||||
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS))
|
||||
continue
|
||||
if(!airborne_can_reach(location,M,aoe_range))
|
||||
continue
|
||||
// Now, we don't have this:
|
||||
//new /obj/effects/fart_cloud(T,L)
|
||||
// But:
|
||||
// <[REDACTED]> so, what it does is...imagine a 3x3 grid with the person in the center. When someone uses the emote *fart (it's not a spell style ability and has no cooldown), then anyone in the 8 tiles AROUND the person who uses it
|
||||
// <[REDACTED]> gets between 1 and 10 units of jenkem added to them...we obviously don't have Jenkem, but Space Drugs do literally the same exact thing as Jenkem
|
||||
// <[REDACTED]> the user, of course, isn't impacted because it's not an actual smoke cloud
|
||||
// So, let's give 'em space drugs.
|
||||
if (M == src)
|
||||
continue
|
||||
M.reagents.add_reagent("space_drugs",rand(1,10))
|
||||
for(var/mob/M in range(location,aoe_range))
|
||||
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS))
|
||||
continue
|
||||
if(!airborne_can_reach(location,M,aoe_range))
|
||||
continue
|
||||
// Now, we don't have this:
|
||||
//new /obj/effects/fart_cloud(T,L)
|
||||
// But:
|
||||
// <[REDACTED]> so, what it does is...imagine a 3x3 grid with the person in the center. When someone uses the emote *fart (it's not a spell style ability and has no cooldown), then anyone in the 8 tiles AROUND the person who uses it
|
||||
// <[REDACTED]> gets between 1 and 10 units of jenkem added to them...we obviously don't have Jenkem, but Space Drugs do literally the same exact thing as Jenkem
|
||||
// <[REDACTED]> the user, of course, isn't impacted because it's not an actual smoke cloud
|
||||
// So, let's give 'em space drugs.
|
||||
if (M == src)
|
||||
continue
|
||||
M.reagents.add_reagent("space_drugs",rand(1,10))
|
||||
/*
|
||||
var/datum/effect/effect/system/smoke_spread/chem/fart/S = new /datum/effect/effect/system/smoke_spread/chem/fart
|
||||
S.attach(location)
|
||||
@@ -686,23 +682,21 @@
|
||||
S.start()
|
||||
*/
|
||||
if(M_SUPER_FART in mutations)
|
||||
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
visible_message("\red <b>[name]</b> hunches down and grits their teeth!")
|
||||
if(do_after(usr,30))
|
||||
visible_message("\red <b>[name]</b> unleashes a [pick("tremendous","gigantic","colossal")] fart!","You hear a [pick("tremendous","gigantic","colossal")] fart.")
|
||||
//playsound(L.loc, 'superfart.ogg', 50, 0)
|
||||
if(!wearing_suit)
|
||||
for(var/mob/living/V in range(location,aoe_range))
|
||||
shake_camera(V,10,5)
|
||||
if (V == src)
|
||||
continue
|
||||
if(!airborne_can_reach(get_turf(src), get_turf(V)))
|
||||
continue
|
||||
V << "\red You are sent flying!"
|
||||
V.Weaken(5) // why the hell was this set to 12 christ
|
||||
step_away(V,location,15)
|
||||
step_away(V,location,15)
|
||||
step_away(V,location,15)
|
||||
for(var/mob/living/V in range(location,aoe_range))
|
||||
shake_camera(V,10,5)
|
||||
if (V == src)
|
||||
continue
|
||||
if(!airborne_can_reach(get_turf(src), get_turf(V)))
|
||||
continue
|
||||
V << "\red You are sent flying!"
|
||||
V.Weaken(5) // why the hell was this set to 12 christ
|
||||
step_away(V,location,15)
|
||||
step_away(V,location,15)
|
||||
step_away(V,location,15)
|
||||
else
|
||||
usr << "\red You were interrupted and couldn't fart! Rude!"
|
||||
lastFart=world.time
|
||||
|
||||
@@ -474,30 +474,15 @@
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health_advanced)
|
||||
else
|
||||
return 0
|
||||
else if(istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
else if(istype(M, /mob/living/silicon))
|
||||
var/mob/living/silicon/R = M
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
for(var/obj/I in R.contents)
|
||||
if(istype(I, /obj/item/borg/sight/hud/sec))
|
||||
return 1
|
||||
if(R.sensor_mode == 1)
|
||||
return 1
|
||||
if("medical")
|
||||
for(var/obj/I in R.contents)
|
||||
if(istype(I, /obj/item/borg/sight/hud/med))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
else if(istype(M, /mob/living/silicon/ai))
|
||||
var/mob/living/silicon/ai/A = M
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
for(var/obj/I in A.contents)
|
||||
if(istype(I, /obj/item/borg/sight/hud/sec))
|
||||
return 1
|
||||
if("medical")
|
||||
for(var/obj/I in A.contents)
|
||||
if(istype(I, /obj/item/borg/sight/hud/med))
|
||||
return 1
|
||||
if(R.sensor_mode == 2)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
else
|
||||
|
||||
@@ -1555,7 +1555,7 @@
|
||||
|
||||
//Check for ID
|
||||
var/obj/item/weapon/card/id/idcard = get_idcard()
|
||||
if(judgebot.idcheck && !idcard && name=="Unknown")
|
||||
if(judgebot.idcheck && !idcard)
|
||||
threatcount += 4
|
||||
|
||||
//Check for weapons
|
||||
|
||||
@@ -1672,6 +1672,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
proc/handle_decay()
|
||||
var/decaytime = world.time - timeofdeath
|
||||
|
||||
if(species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
|
||||
if(decaytime <= 6000) //10 minutes for decaylevel1 -- stinky
|
||||
return
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/mob/living/carbon/slime/proc/regular_hud_updates()
|
||||
/mob/living/carbon/slime/regular_hud_updates()
|
||||
return
|
||||
@@ -64,12 +64,13 @@
|
||||
src <<"\red You have been hit by [P]!"
|
||||
del P
|
||||
return
|
||||
*/
|
||||
|
||||
if(istype(P, /obj/item/projectile/energy/electrode) || istype(P, /obj/item/projectile/bullet/stunshot))
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
src <<"\red You have been hit by [P]!"
|
||||
del P
|
||||
return
|
||||
*/
|
||||
|
||||
//Armor
|
||||
var/absorb = run_armor_check(def_zone, P.flag)
|
||||
@@ -81,7 +82,7 @@
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge)
|
||||
|
||||
|
||||
P.on_hit(src, absorb, def_zone)
|
||||
if(istype(P, /obj/item/projectile/beam/lightning))
|
||||
if(P.damage >= 200)
|
||||
|
||||
@@ -10,11 +10,11 @@ var/list/department_radio_keys = list(
|
||||
":s" = "Security", "#s" = "Security", ".s" = "Security",
|
||||
":w" = "whisper", "#w" = "whisper", ".w" = "whisper",
|
||||
":b" = "binary", "#b" = "binary", ".b" = "binary",
|
||||
":d" = "drone", "#d" = "drone", ".d" = "drone",
|
||||
":d" = "drone", "#d" = "drone", ".d" = "drone",
|
||||
":a" = "alientalk", "#a" = "alientalk", ".a" = "alientalk",
|
||||
":t" = "Syndicate", "#t" = "Syndicate", ".t" = "Syndicate",
|
||||
":u" = "Supply", "#u" = "Supply", ".u" = "Supply",
|
||||
":z" = "Service", "#z" = "Service", ".z" = "Service",
|
||||
":z" = "Service", "#z" = "Service", ".z" = "Service",
|
||||
":g" = "changeling", "#g" = "changeling", ".g" = "changeling",
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@ var/list/department_radio_keys = list(
|
||||
":E" = "Engineering", "#E" = "Engineering", ".E" = "Engineering",
|
||||
":S" = "Security", "#S" = "Security", ".S" = "Security",
|
||||
":W" = "whisper", "#W" = "whisper", ".W" = "whisper",
|
||||
":D" = "drone", "#D" = "drone", ".D" = "drone",
|
||||
":D" = "drone", "#D" = "drone", ".D" = "drone",
|
||||
":B" = "binary", "#B" = "binary", ".B" = "binary",
|
||||
":A" = "alientalk", "#A" = "alientalk", ".A" = "alientalk",
|
||||
":T" = "Syndicate", "#T" = "Syndicate", ".T" = "Syndicate",
|
||||
":U" = "Supply", "#U" = "Supply", ".U" = "Supply",
|
||||
":Z" = "Service", "#Z" = "Service", ".Z" = "Service",
|
||||
":G" = "changeling", "#G" = "changeling", ".G" = "changeling"
|
||||
|
||||
|
||||
/* //kinda localization -- rastaf0
|
||||
//same keys as above, but on russian keyboard layout. This file uses cp1251 as encoding.
|
||||
":ê" = "right hand", "#ê" = "right hand", ".ê" = "right hand",
|
||||
@@ -185,8 +185,8 @@ var/list/department_radio_keys = list(
|
||||
if (!(istype(src,/mob/living/carbon/human) && !isAI(src) && !isrobot(src) || istype(src,/mob/living/carbon/monkey) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department") || isAI(src) && (message_mode=="department") || (message_mode in radiochannels)))
|
||||
message_mode = null //only humans can use headsets
|
||||
|
||||
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
|
||||
message_mode = null //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
|
||||
if(traumatic_shock > 61 && prob(50))
|
||||
message_mode = null //people in shock will have a high chance of not being able to speak on radio; needed since people don't instantly pass out at 100 damage.
|
||||
|
||||
message = capitalize(message)
|
||||
|
||||
|
||||
@@ -830,23 +830,10 @@ var/list/ai_list = list()
|
||||
lightNearbyCamera()
|
||||
|
||||
/mob/living/silicon/ai/proc/control_hud()
|
||||
set name = "Toggle Sensors"
|
||||
set desc = "Toggles your sensors to display security records, medical records or nothing."
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "AI Commands"
|
||||
|
||||
if(stat != 0)
|
||||
return
|
||||
|
||||
var/hud = input("Please select a sensor module!", "Toggle Sensors", "None", null) in list("None","Security","Medical")
|
||||
for(var/obj/item/borg/sight/hud/H in contents)
|
||||
del(H)
|
||||
switch(hud)
|
||||
if("Security")
|
||||
sechud = new/obj/item/borg/sight/hud/sec(src)
|
||||
if("Medical")
|
||||
healthhud = new/obj/item/borg/sight/hud/med(src)
|
||||
else
|
||||
return
|
||||
toggle_sensor_mode()
|
||||
|
||||
// Handled camera lighting, when toggled.
|
||||
// It will get the nearest camera from the eyeobj, lighting it.
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
/mob/living/silicon/ai/Life()
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2)
|
||||
return
|
||||
else //I'm not removing that shitton of tabs, unneeded as they are. -- Urist
|
||||
@@ -176,6 +173,13 @@
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
|
||||
regular_hud_updates()
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1,src.eyeobj)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1,src.eyeobj)
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
health = 100
|
||||
@@ -184,12 +188,4 @@
|
||||
if(fire_res_on_core)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
|
||||
else
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
|
||||
/mob/living/silicon/ai/proc/handle_regular_hud_updates()
|
||||
for(var/image/hud in client.images) //COPIED FROM the human handle_regular_hud_updates() proc
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
client.images.Remove(hud)
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
|
||||
@@ -1,110 +0,0 @@
|
||||
/mob/living/silicon/pai/proc/regular_hud_updates()
|
||||
if(client)
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud")
|
||||
client.images -= hud
|
||||
|
||||
/mob/living/silicon/pai/proc/securityHUD()
|
||||
if(client)
|
||||
var/image/holder
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for(var/mob/living/carbon/human/perp in view(T))
|
||||
if(src.see_invisible < perp.invisibility)
|
||||
continue
|
||||
var/perpname = "wot"
|
||||
holder = perp.hud_list[ID_HUD]
|
||||
if(perp.wear_id)
|
||||
var/obj/item/weapon/card/id/I = perp.wear_id.GetID()
|
||||
if(I)
|
||||
perpname = I.registered_name
|
||||
holder.icon_state = "hud[ckey(perp:wear_id:GetJobName())]"
|
||||
client.images += holder
|
||||
else
|
||||
perpname = perp.name
|
||||
holder.icon_state = "hudunknown"
|
||||
client.images += holder
|
||||
else
|
||||
holder.icon_state = "hudunknown"
|
||||
client.images += holder
|
||||
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
holder = perp.hud_list[WANTED_HUD]
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
|
||||
holder.icon_state = "hudwanted"
|
||||
client.images += holder
|
||||
break
|
||||
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
|
||||
holder.icon_state = "hudprisoner"
|
||||
client.images += holder
|
||||
break
|
||||
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled"))
|
||||
holder.icon_state = "hudparolled"
|
||||
client.images += holder
|
||||
break
|
||||
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
|
||||
holder.icon_state = "hudreleased"
|
||||
client.images += holder
|
||||
break
|
||||
|
||||
/mob/living/silicon/pai/proc/medicalHUD()
|
||||
if(client)
|
||||
var/image/holder
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for(var/mob/living/carbon/human/patient in view(T))
|
||||
if(src.see_invisible < patient.invisibility)
|
||||
continue
|
||||
var/foundVirus = 0
|
||||
|
||||
for (var/ID in patient.virus2)
|
||||
if (ID in virusDB)
|
||||
foundVirus = 1
|
||||
break
|
||||
|
||||
holder = patient.hud_list[HEALTH_HUD]
|
||||
if(patient.stat == 2)
|
||||
holder.icon_state = "hudhealth-100"
|
||||
client.images += holder
|
||||
else
|
||||
holder.icon_state = "hud[RoundHealth(patient.health)]"
|
||||
client.images += holder
|
||||
|
||||
holder = patient.hud_list[STATUS_HUD]
|
||||
if(patient.stat == 2)
|
||||
holder.icon_state = "huddead"
|
||||
else if(patient.status_flags & XENO_HOST)
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(foundVirus)
|
||||
holder.icon_state = "hudill"
|
||||
else if(patient.has_brain_worms())
|
||||
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
|
||||
if(B.controlling)
|
||||
holder.icon_state = "hudbrainworm"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
client.images += holder
|
||||
|
||||
/mob/living/silicon/pai/proc/RoundHealth(health)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
return "health100"
|
||||
if(70 to 100)
|
||||
return "health80"
|
||||
if(50 to 70)
|
||||
return "health60"
|
||||
if(30 to 50)
|
||||
return "health40"
|
||||
if(20 to 30)
|
||||
return "health25"
|
||||
if(5 to 15)
|
||||
return "health10"
|
||||
if(1 to 5)
|
||||
return "health1"
|
||||
if(-99 to 0)
|
||||
return "health0"
|
||||
else
|
||||
return "health-100"
|
||||
return "0"
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
regular_hud_updates()
|
||||
if(src.secHUD == 1)
|
||||
src.securityHUD()
|
||||
process_sec_hud(src, 1)
|
||||
if(src.medHUD == 1)
|
||||
src.medicalHUD()
|
||||
process_med_hud(src, 1)
|
||||
if(silence_time)
|
||||
if(world.timeofday >= silence_time)
|
||||
silence_time = null
|
||||
|
||||
@@ -177,12 +177,17 @@
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
for(var/image/hud in client.images) //COPIED FROM the human handle_regular_hud_updates() proc
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
client.images.Remove(hud)
|
||||
regular_hud_updates()
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
if(hud && hud.hud)
|
||||
hud.hud.process_hud(src)
|
||||
else
|
||||
switch(src.sensor_mode)
|
||||
if (SEC_HUD)
|
||||
process_sec_hud(src,1)
|
||||
if (MED_HUD)
|
||||
process_med_hud(src,1)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
|
||||
@@ -460,23 +460,10 @@
|
||||
src << "\red You enable [C.name]."
|
||||
|
||||
/mob/living/silicon/robot/verb/control_hud()
|
||||
set name = "Toggle Sensors"
|
||||
set desc = "Toggles your sensors to display security records, medical records or nothing."
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
set category = "Robot Commands"
|
||||
|
||||
if(stat != 0)
|
||||
return
|
||||
|
||||
var/hud = input("Please select a sensor module!", "Toggle Sensors", "None", null) in list("None","Security","Medical")
|
||||
for(var/obj/item/borg/sight/hud/H in contents)
|
||||
del(H)
|
||||
switch(hud)
|
||||
if("Security")
|
||||
sechud = new/obj/item/borg/sight/hud/sec(src)
|
||||
if("Medical")
|
||||
healthhud = new/obj/item/borg/sight/hud/med(src)
|
||||
else
|
||||
return
|
||||
toggle_sensor_mode()
|
||||
|
||||
/mob/living/silicon/robot/blob_act()
|
||||
if (stat != 2)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.emag = new /obj/item/toy/sword(src)
|
||||
src.emag.name = "Placeholder Emag Item"
|
||||
// src.jetpack = new /obj/item/toy/sword(src)
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/loaded(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/borghypo/surgeon(src)
|
||||
src.modules += new /obj/item/weapon/scalpel(src)
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/device/healthanalyzer(src)
|
||||
src.modules += new /obj/item/device/reagent_scanner/adv(src)
|
||||
src.modules += new /obj/item/roller_holder(src)
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/rcd/borg(src)
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/weapon/weldingtool/largetank(src)
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight/seclite(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/melee/baton/robot(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/trash(src)
|
||||
src.modules += new /obj/item/weapon/mop(src)
|
||||
@@ -264,7 +264,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/pen/robopen(src)
|
||||
src.modules += new /obj/item/weapon/form_printer(src)
|
||||
src.modules += new /obj/item/device/taperecorder(src)
|
||||
@@ -312,7 +312,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/meson(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/screwdriver(src)
|
||||
@@ -326,7 +326,7 @@
|
||||
name = "NT advanced combat module"
|
||||
|
||||
/obj/item/weapon/robot_module/deathsquad/New()
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/borg/sight/thermal(src)
|
||||
src.modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
|
||||
@@ -340,7 +340,7 @@
|
||||
name = "syndicate robot module"
|
||||
|
||||
/obj/item/weapon/robot_module/syndicate/New()
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/crossbow/cyborg(src)
|
||||
@@ -356,7 +356,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/device/flashlight(src)
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg(src)
|
||||
src.modules += new /obj/item/borg/sight/thermal(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
New()
|
||||
src.modules += new /obj/item/weapon/melee/energy/alien/claws(src)
|
||||
src.modules += new /obj/item/device/flash/alien(src)
|
||||
src.modules += new /obj/item/device/flash/cyborg/alien(src)
|
||||
src.modules += new /obj/item/borg/sight/thermal/alien(src)
|
||||
var/obj/item/weapon/reagent_containers/spray/alien/stun/S = new /obj/item/weapon/reagent_containers/spray/alien/stun(src)
|
||||
S.reagents.add_reagent("stoxin",250) //nerfed to sleeptoxin to make it less instant drop.
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
var/speak_exclamation = "declares"
|
||||
var/speak_query = "queries"
|
||||
var/pose //Yes, now AIs can pose too.
|
||||
var/sensor_mode = 0 //Determines the current HUD.
|
||||
#define SEC_HUD 1 //Security HUD mode
|
||||
#define MED_HUD 2 //Medical HUD mode
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
return
|
||||
@@ -254,3 +257,16 @@
|
||||
set category = "IC"
|
||||
|
||||
flavor_text = copytext(sanitize(input(usr, "Please enter your new flavour text.", "Flavour text", null) as text), 1)
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
|
||||
switch(sensor_type)
|
||||
if ("Security")
|
||||
sensor_mode = SEC_HUD
|
||||
src << "<span class='notice'>Security records overlay enabled.</span>"
|
||||
if ("Medical")
|
||||
sensor_mode = MED_HUD
|
||||
src << "<span class='notice'>Life signs monitor overlay enabled.</span>"
|
||||
if ("Disable")
|
||||
sensor_mode = 0
|
||||
src << "Sensor augmentations disabled."
|
||||
|
||||
@@ -33,3 +33,4 @@
|
||||
spawn(40)
|
||||
if(client)
|
||||
handle_privacy_poll()
|
||||
client.playtitlemusic()
|
||||
|
||||
@@ -633,6 +633,12 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.updatehealth()
|
||||
if(istype(M,/mob/living/carbon/human/machine) && M.stat == 0) // If an IPC is brought back to life by welding it, which is possible, update the mob list
|
||||
if(M in dead_mob_list)
|
||||
dead_mob_list -= M
|
||||
respawnable_list -= M
|
||||
living_mob_list += M
|
||||
mob_list += M
|
||||
return
|
||||
else
|
||||
user << "Nothing to fix!"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
charge_cost = 100
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
user << "\red [src.name] is now set to stun."
|
||||
projectile_type = "/obj/item/projectile/energy/electrode/revolver"
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
if(0)
|
||||
mode = 1
|
||||
charge_cost = 100
|
||||
|
||||
@@ -232,3 +232,13 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
power_supply.give(5000)
|
||||
playsound(src.loc, 'sound/weapons/shotgunpump.ogg', 60, 1)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler
|
||||
name = "disabler"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
|
||||
icon_state = "disabler"
|
||||
item_state = null
|
||||
projectile_type = "/obj/item/projectile/energy/disabler"
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
charge_cost = 500
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
cell_type = "/obj/item/weapon/cell/crap"
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg
|
||||
name = "taser gun"
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/process() //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/cyborg/process_chambered()
|
||||
if(in_chamber)
|
||||
return 1
|
||||
@@ -46,9 +46,9 @@
|
||||
name = "stun revolver"
|
||||
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
|
||||
icon_state = "stunrevolver"
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
fire_sound = "sound/weapons/gunshot.ogg"
|
||||
origin_tech = "combat=3;materials=3;powerstorage=2"
|
||||
projectile_type = "/obj/item/projectile/energy/electrode/revolver"
|
||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
|
||||
|
||||
@@ -77,10 +77,10 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/process()
|
||||
charge_tick++
|
||||
if(charge_tick < 4)
|
||||
if(charge_tick < 4)
|
||||
return 0
|
||||
charge_tick = 0
|
||||
if(!power_supply)
|
||||
if(!power_supply)
|
||||
return 0
|
||||
power_supply.give(1000)
|
||||
return 1
|
||||
@@ -92,8 +92,8 @@
|
||||
desc = "An energy-based crossbow that draws power from the cyborg's internal energy cell directly."
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/cyborg/process()
|
||||
return 1
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/energy/crossbow/cyborg/process_chambered()
|
||||
if(in_chamber)
|
||||
return 1
|
||||
|
||||
@@ -10,13 +10,9 @@
|
||||
name = "electrode"
|
||||
icon_state = "spark"
|
||||
nodamage = 1
|
||||
/*
|
||||
stun = 10
|
||||
weaken = 10
|
||||
stutter = 10
|
||||
*/
|
||||
agony = 40
|
||||
damage_type = HALLOSS
|
||||
stun = 5
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
hitsound = 'sound/weapons/tase.ogg'
|
||||
//Damage will be handled on the MOB side, to prevent window shattering.
|
||||
|
||||
@@ -74,3 +70,15 @@
|
||||
damage = 20
|
||||
damage_type = TOX
|
||||
irradiate = 20
|
||||
|
||||
/obj/item/projectile/energy/disabler
|
||||
name = "disabler beam"
|
||||
icon_state = "omnilaser"
|
||||
damage = 34
|
||||
damage_type = HALLOSS
|
||||
var/range = 8
|
||||
|
||||
/obj/item/projectile/energy/disabler/Range()
|
||||
range--
|
||||
if(range <= 0)
|
||||
del(src)
|
||||
@@ -251,6 +251,7 @@
|
||||
icon_state = "virusfoodtank"
|
||||
amount_per_transfer_from_this = 10
|
||||
anchored = 1
|
||||
density = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -1579,6 +1579,16 @@ datum/design/adv_reagent_scanner
|
||||
reliability_base = 74
|
||||
build_path = "/obj/item/device/reagent_scanner/adv"
|
||||
|
||||
datum/design/cyborg_analyzer
|
||||
name = "Cyborg Analyzer"
|
||||
desc = "A hand-held scanner able to diagnose robotic injuries."
|
||||
id = "cyborg_analyzer"
|
||||
req_tech = list("programming" = 2, "biotech" = 2, "magnets" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 30, "$glass" = 20)
|
||||
reliability_base = 74
|
||||
build_path = "/obj/item/device/robotanalyzer"
|
||||
|
||||
datum/design/mmi
|
||||
name = "Man-Machine Interface"
|
||||
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
|
||||
@@ -1602,7 +1612,7 @@ datum/design/mmi_radio
|
||||
category = "Misc"
|
||||
|
||||
datum/design/synthetic_flash
|
||||
name = "Synthetic Flash"
|
||||
name = "Flash"
|
||||
desc = "When a problem arises, SCIENCE is the solution."
|
||||
id = "sflash"
|
||||
req_tech = list("magnets" = 3, "combat" = 2)
|
||||
|
||||
@@ -44,6 +44,25 @@
|
||||
/obj/structure/boulder/New()
|
||||
icon_state = "boulder[rand(1,4)]"
|
||||
excavation_level = rand(5,50)
|
||||
|
||||
/obj/structure/boulder/Bumped(AM)
|
||||
. = ..()
|
||||
if(istype(AM,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
|
||||
attackby(H.l_hand,H)
|
||||
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
|
||||
attackby(H.r_hand,H)
|
||||
|
||||
else if(istype(AM,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = AM
|
||||
if(istype(R.module_active,/obj/item/weapon/pickaxe))
|
||||
attackby(R.module_active,R)
|
||||
|
||||
else if(istype(AM,/obj/mecha))
|
||||
var/obj/mecha/M = AM
|
||||
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
|
||||
M.selected.action(src)
|
||||
|
||||
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/device/core_sampler))
|
||||
|
||||
@@ -128,6 +128,8 @@
|
||||
if (target.op_stage.face == 3)
|
||||
var/datum/organ/external/head/h = affected
|
||||
h.disfigured = 0
|
||||
h.update_icon()
|
||||
target.regenerate_icons()
|
||||
target.op_stage.face = 0
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
@@ -26,20 +26,28 @@
|
||||
|
||||
min_duration = 80
|
||||
max_duration = 100
|
||||
|
||||
|
||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
return ..() && !(affected.status & ORGAN_CUT_AWAY)
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("[user] starts peeling back tattered flesh where [target]'s head used to be with \the [tool].", \
|
||||
"You start peeling back tattered flesh where [target]'s head used to be with \the [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("[user] starts peeling back tattered flesh where [target]'s head used to be with \the [tool].", \
|
||||
"You start peeling back tattered flesh where [target]'s head used to be with \the [tool].")
|
||||
else
|
||||
user.visible_message("[user] starts peeling back metal where [target]'s head used to be with \the [tool].", \
|
||||
"You start peeling back metal where [target]'s head used to be with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] peels back tattered flesh where [target]'s head used to be with \the [tool].", \
|
||||
"\blue You peel back tattered flesh where [target]'s head used to be with \the [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("\blue [user] peels back tattered flesh where [target]'s head used to be with \the [tool].", \
|
||||
"\blue You peel back tattered flesh where [target]'s head used to be with \the [tool].")
|
||||
else
|
||||
user.visible_message("\blue [user] peels back metal where [target]'s head used to be with \the [tool].", \
|
||||
"\blue You peel back metal where [target]'s head used to be with \the [tool].")
|
||||
affected.status |= ORGAN_CUT_AWAY
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -47,7 +55,7 @@
|
||||
if (affected.parent)
|
||||
affected = affected.parent
|
||||
user.visible_message("\red [user]'s hand slips, ripping [target]'s [affected.display_name] open!", \
|
||||
"\red Your hand slips, ripping [target]'s [affected.display_name] open!")
|
||||
"\red Your hand slips, ripping [target]'s [affected.display_name] open!")
|
||||
affected.createwound(CUT, 10)
|
||||
|
||||
|
||||
@@ -72,16 +80,25 @@
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
user.visible_message("\blue [user] has finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].", \
|
||||
"\blue You have finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("\blue [user] has finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].", \
|
||||
"\blue You have finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].")
|
||||
else
|
||||
user.visible_message("\blue [user] has finished repositioning metal to something recognizable where [target]'s head used to be with \the [tool].", \
|
||||
"\blue You have finished repositioning metal to something anatomically recognizable where [target]'s head used to be with \the [tool].")
|
||||
|
||||
target.op_stage.head_reattach = 1
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected.parent)
|
||||
affected = affected.parent
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("\red [user]'s hand slips, further rending flesh on [target]'s neck!", \
|
||||
"\red Your hand slips, further rending flesh on [target]'s neck!")
|
||||
else
|
||||
user.visible_message("\red [user]'s hand slips, further rending metal on [target]'s neck!", \
|
||||
"\red Your hand slips, further rending metal on [target]'s neck!")
|
||||
target.apply_damage(10, BRUTE, affected)
|
||||
|
||||
/datum/surgery_step/head/suture
|
||||
@@ -99,8 +116,12 @@
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
// var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is stapling and suturing flesh into place in [target]'s esophagal and vocal region with \the [tool].", \
|
||||
"You start to staple and suture flesh into place in [target]'s esophagal and vocal region with \the [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("[user] is stapling and suturing flesh into place in [target]'s esophagal and vocal region with \the [tool].", \
|
||||
"You start to staple and suture flesh into place in [target]'s esophagal and vocal region with \the [tool].")
|
||||
else
|
||||
user.visible_message("[user] is stapling and suturing metal into place in [target]'s esophagal and vocal region with \the [tool].", \
|
||||
"You start to staple and suture metal into place in [target]'s esophagal and vocal region with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -175,15 +196,19 @@
|
||||
user.visible_message("\blue [user] has attached [target]'s head to the body.", \
|
||||
"\blue You have attached [target]'s head to the body.")
|
||||
affected.status = 0
|
||||
if(istype(target,/mob/living/carbon/human/machine))
|
||||
affected.status = 128
|
||||
affected.amputated = 0
|
||||
affected.destspawn = 0
|
||||
var/obj/item/weapon/organ/head/B = tool
|
||||
if (B.brainmob.mind)
|
||||
B.brainmob.mind.transfer_to(target)
|
||||
affected.setAmputatedTree()
|
||||
target.handle_organs()
|
||||
target.update_body()
|
||||
target.updatehealth()
|
||||
target.UpdateDamageIcon()
|
||||
|
||||
target.regenerate_icons()
|
||||
target.updatehealth()
|
||||
del(B)
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
@@ -37,14 +37,22 @@
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("[user] starts cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||
"You start cutting away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||
else
|
||||
user.visible_message("[user] starts cutting away metal where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||
"You start cutting away metal where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("\blue [user] cuts away flesh where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||
"\blue You cut away flesh where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||
else
|
||||
user.visible_message("\blue [user] cuts away metal where [target]'s [affected.display_name] used to be with \the [tool].", \
|
||||
"\blue You cut away metal where [target]'s [affected.display_name] used to be with \the [tool].")
|
||||
affected.status |= ORGAN_CUT_AWAY
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
@@ -52,7 +60,7 @@
|
||||
if (affected.parent)
|
||||
affected = affected.parent
|
||||
user.visible_message("\red [user]'s hand slips, cutting [target]'s [affected.display_name] open!", \
|
||||
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
|
||||
"\red Your hand slips, cutting [target]'s [affected.display_name] open!")
|
||||
affected.createwound(CUT, 10)
|
||||
|
||||
|
||||
@@ -71,22 +79,34 @@
|
||||
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] is beginning reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
|
||||
"You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("[user] is beginning to reposition flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].", \
|
||||
"You start repositioning flesh and nerve endings where where [target]'s [affected.display_name] used to be with [tool].")
|
||||
else
|
||||
user.visible_message("[user] is beginning to reposition metal and wire endings where where [target]'s [affected.display_name] used to be with [tool].", \
|
||||
"You start repositioning metal and wire endings where where [target]'s [affected.display_name] used to be with [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
|
||||
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("\blue [user] has finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].", \
|
||||
"\blue You have finished repositioning flesh and nerve endings where [target]'s [affected.display_name] used to be with [tool].")
|
||||
else
|
||||
user.visible_message("\blue [user] has finished repositioning metal and wire endings where [target]'s [affected.display_name] used to be with [tool].", \
|
||||
"\blue You have finished repositioning metal and wire endings where [target]'s [affected.display_name] used to be with [tool].")
|
||||
affected.open = 3
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
if (affected.parent)
|
||||
affected = affected.parent
|
||||
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
|
||||
"\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!")
|
||||
if(!(target.species.flags & IS_SYNTHETIC))
|
||||
user.visible_message("\red [user]'s hand slips, tearing flesh on [target]'s [affected.display_name]!", \
|
||||
"\red Your hand slips, tearing flesh on [target]'s [affected.display_name]!")
|
||||
else
|
||||
user.visible_message("\red [user]'s hand slips, tearing metal on [target]'s [affected.display_name]!", \
|
||||
"\red Your hand slips, tearing metal on [target]'s [affected.display_name]!")
|
||||
target.apply_damage(10, BRUTE, affected, sharp=1)
|
||||
|
||||
|
||||
@@ -108,7 +128,7 @@
|
||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
var/datum/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message("[user] starts adjusting area around [target]'s [affected.display_name] with \the [tool].", \
|
||||
"You start adjusting area around [target]'s [affected.display_name] with \the [tool]..")
|
||||
"You start adjusting area around [target]'s [affected.display_name] with \the [tool].")
|
||||
..()
|
||||
|
||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
+1
-1
@@ -698,7 +698,7 @@ var/list/TAGGERLOCATIONS = list("Disposals",
|
||||
#define SOUND_ADMINHELP 1
|
||||
#define SOUND_MIDI 2
|
||||
#define SOUND_AMBIENCE 4
|
||||
#define SOUND_LOBBY 8 //Removed, can be replaced with any other sound bitflag as needed.
|
||||
#define SOUND_LOBBY 8
|
||||
#define SOUND_STREAMING 16
|
||||
|
||||
#define SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_STREAMING)
|
||||
|
||||
Reference in New Issue
Block a user