mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
line fixes
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1445
-1445
File diff suppressed because it is too large
Load Diff
@@ -1,283 +1,283 @@
|
||||
/obj/item/flash
|
||||
name = "flash"
|
||||
desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "flash"
|
||||
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 300)
|
||||
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.
|
||||
var/battery_panel = 0 //whether the flash can be modified with a cell or not
|
||||
var/overcharged = 0 //if overcharged the flash will set people on fire then immediately burn out (does so even if it doesn't blind them).
|
||||
var/can_overcharge = TRUE //set this to FALSE if you don't want your flash to be overcharge capable
|
||||
var/use_sound = 'sound/weapons/flash.ogg'
|
||||
|
||||
/obj/item/flash/proc/clown_check(mob/user)
|
||||
if(user && (CLUMSY in user.mutations) && prob(50))
|
||||
flash_carbon(user, user, 15, 0)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/flash/attackby(obj/item/W, mob/user, params)
|
||||
if(can_overcharge)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(battery_panel)
|
||||
to_chat(user, "<span class='notice'>You close the battery compartment on the [src].</span>")
|
||||
battery_panel = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You open the battery compartment on the [src].</span>")
|
||||
battery_panel = 1
|
||||
if(battery_panel && !overcharged)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
to_chat(user, "<span class='notice'>You jam the cell into battery compartment on the [src].</span>")
|
||||
qdel(W)
|
||||
overcharged = 1
|
||||
overlays += "overcharge"
|
||||
|
||||
/obj/item/flash/random/New()
|
||||
..()
|
||||
if(prob(25))
|
||||
broken = 1
|
||||
icon_state = "[initial(icon_state)]burnt"
|
||||
|
||||
/obj/item/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/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, times_used) //sanity
|
||||
|
||||
|
||||
/obj/item/flash/proc/try_use_flash(var/mob/user = null)
|
||||
flash_recharge(user)
|
||||
|
||||
if(broken)
|
||||
return 0
|
||||
|
||||
playsound(src.loc, use_sound, 100, 1)
|
||||
flick("[initial(icon_state)]2", src)
|
||||
times_used++
|
||||
|
||||
if(user && !clown_check(user))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
|
||||
if(user)
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
if(targeted)
|
||||
if(M.weakeyes)
|
||||
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
|
||||
if(M.flash_eyes(1, 1))
|
||||
M.AdjustConfused(power)
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Stun(1)
|
||||
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
|
||||
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
|
||||
if(M.weakeyes)
|
||||
M.Stun(2)
|
||||
M.visible_message("<span class='disarm'>[M] gasps and shields [M.p_their()] eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
|
||||
else
|
||||
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
|
||||
to_chat(user, "<span class='warning'>You fail to blind [M] with the flash!</span>")
|
||||
to_chat(M, "<span class='danger'>[user] fails to blind you with the flash!</span>")
|
||||
return
|
||||
|
||||
if(M.flash_eyes())
|
||||
M.AdjustConfused(power)
|
||||
|
||||
/obj/item/flash/attack(mob/living/M, mob/user)
|
||||
if(!try_use_flash(user))
|
||||
return 0
|
||||
|
||||
if(iscarbon(M))
|
||||
flash_carbon(M, user, 5, 1)
|
||||
if(overcharged)
|
||||
M.adjust_fire_stacks(6)
|
||||
M.IgniteMob()
|
||||
burn_out()
|
||||
return 1
|
||||
|
||||
else if(issilicon(M))
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.module) // Perhaps they didn't choose a module yet
|
||||
for(var/obj/item/borg/combat/shield/S in R.module.modules)
|
||||
if(R.activated(S))
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by [M.p_their()] shield!</span>")
|
||||
return 1
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
M.Weaken(rand(5,10))
|
||||
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
|
||||
return 1
|
||||
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
|
||||
|
||||
|
||||
/obj/item/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
|
||||
if(!try_use_flash(user))
|
||||
return 0
|
||||
user.visible_message("<span class='disarm'>[user]'s [src.name] emits a blinding light!</span>", "<span class='danger'>Your [src.name] emits a blinding light!</span>")
|
||||
for(var/mob/living/carbon/M in oviewers(3, null))
|
||||
flash_carbon(M, user, 3, 0)
|
||||
|
||||
|
||||
/obj/item/flash/emp_act(severity)
|
||||
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/flash/proc/terrible_conversion_proc(mob/M, mob/user)
|
||||
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
|
||||
if(user.mind && (user.mind in SSticker.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(!ismindshielded(M))
|
||||
if(user.mind in SSticker.mode.head_revolutionaries)
|
||||
if(SSticker.mode.add_revolutionary(M.mind))
|
||||
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
|
||||
else
|
||||
resisted = 1
|
||||
else
|
||||
resisted = 1
|
||||
|
||||
if(resisted)
|
||||
to_chat(user, "<span class='warning'>This mind seems resistant to the [name]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>They must be conscious before you can convert [M.p_them()]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>")
|
||||
|
||||
|
||||
/obj/item/flash/cyborg
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/flash/cyborg/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
new /obj/effect/temp_visual/borgflash(get_turf(src))
|
||||
|
||||
/obj/item/flash/cyborg/attack_self(mob/user)
|
||||
..()
|
||||
new /obj/effect/temp_visual/borgflash(get_turf(src))
|
||||
|
||||
/obj/item/flash/cameraflash
|
||||
name = "camera"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
desc = "A polaroid camera. 10 photos left."
|
||||
icon_state = "camera"
|
||||
item_state = "electropack" //spelling, a coders worst enemy. This part gave me trouble for a while.
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
can_overcharge = FALSE
|
||||
var/flash_max_charges = 5
|
||||
var/flash_cur_charges = 5
|
||||
var/charge_tick = 0
|
||||
use_sound = 'sound/items/polaroid1.ogg'
|
||||
|
||||
/obj/item/flash/cameraflash/burn_out() //stops from burning out
|
||||
return
|
||||
|
||||
/obj/item/flash/cameraflash/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flash/cameraflash/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/flash/cameraflash/process() //this and the two parts above are part of the charge system.
|
||||
charge_tick++
|
||||
if(charge_tick < 10)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
flash_cur_charges = min(flash_cur_charges+1, flash_max_charges)
|
||||
return TRUE
|
||||
|
||||
/obj/item/flash/cameraflash/attack(mob/living/M, mob/user)
|
||||
if(flash_cur_charges > 0)
|
||||
flash_cur_charges -= 1
|
||||
to_chat(user, "[src] now has [flash_cur_charges] charge\s.")
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
/obj/item/flash/cameraflash/attack_self(mob/living/carbon/user, flag = 0)
|
||||
if(flash_cur_charges > 0)
|
||||
flash_cur_charges -= 1
|
||||
to_chat(user, "[src] now has [flash_cur_charges] charge\s.")
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
/obj/item/flash/memorizer
|
||||
name = "memorizer"
|
||||
desc = "If you see this, you're not likely to remember it any time soon."
|
||||
icon_state = "memorizer"
|
||||
item_state = "nullrod"
|
||||
|
||||
/obj/item/flash/armimplant
|
||||
name = "photon projector"
|
||||
desc = "A high-powered photon projector implant normally used for lighting purposes, but also doubles as a flashbulb weapon. Self-repair protocols fix the flashbulb if it ever burns out."
|
||||
var/flashcd = 20
|
||||
var/overheat = 0
|
||||
var/obj/item/organ/internal/cyberimp/arm/flash/I = null
|
||||
|
||||
/obj/item/flash/armimplant/Destroy()
|
||||
I = null
|
||||
return ..()
|
||||
|
||||
/obj/item/flash/armimplant/burn_out()
|
||||
if(I && I.owner)
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector implant overheats and deactivates!</span>")
|
||||
I.Retract()
|
||||
overheat = FALSE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), flashcd * 2)
|
||||
|
||||
/obj/item/flash/armimplant/try_use_flash(mob/user = null)
|
||||
if(overheat)
|
||||
if(I && I.owner)
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>")
|
||||
return FALSE
|
||||
overheat = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), flashcd)
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
update_icon(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/flash/armimplant/proc/cooldown()
|
||||
overheat = FALSE
|
||||
|
||||
|
||||
/obj/item/flash/synthetic //just a regular flash now
|
||||
/obj/item/flash
|
||||
name = "flash"
|
||||
desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "flash"
|
||||
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 300)
|
||||
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.
|
||||
var/battery_panel = 0 //whether the flash can be modified with a cell or not
|
||||
var/overcharged = 0 //if overcharged the flash will set people on fire then immediately burn out (does so even if it doesn't blind them).
|
||||
var/can_overcharge = TRUE //set this to FALSE if you don't want your flash to be overcharge capable
|
||||
var/use_sound = 'sound/weapons/flash.ogg'
|
||||
|
||||
/obj/item/flash/proc/clown_check(mob/user)
|
||||
if(user && (CLUMSY in user.mutations) && prob(50))
|
||||
flash_carbon(user, user, 15, 0)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/flash/attackby(obj/item/W, mob/user, params)
|
||||
if(can_overcharge)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(battery_panel)
|
||||
to_chat(user, "<span class='notice'>You close the battery compartment on the [src].</span>")
|
||||
battery_panel = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You open the battery compartment on the [src].</span>")
|
||||
battery_panel = 1
|
||||
if(battery_panel && !overcharged)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
to_chat(user, "<span class='notice'>You jam the cell into battery compartment on the [src].</span>")
|
||||
qdel(W)
|
||||
overcharged = 1
|
||||
overlays += "overcharge"
|
||||
|
||||
/obj/item/flash/random/New()
|
||||
..()
|
||||
if(prob(25))
|
||||
broken = 1
|
||||
icon_state = "[initial(icon_state)]burnt"
|
||||
|
||||
/obj/item/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/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, times_used) //sanity
|
||||
|
||||
|
||||
/obj/item/flash/proc/try_use_flash(var/mob/user = null)
|
||||
flash_recharge(user)
|
||||
|
||||
if(broken)
|
||||
return 0
|
||||
|
||||
playsound(src.loc, use_sound, 100, 1)
|
||||
flick("[initial(icon_state)]2", src)
|
||||
times_used++
|
||||
|
||||
if(user && !clown_check(user))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
|
||||
if(user)
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
if(targeted)
|
||||
if(M.weakeyes)
|
||||
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
|
||||
if(M.flash_eyes(1, 1))
|
||||
M.AdjustConfused(power)
|
||||
terrible_conversion_proc(M, user)
|
||||
M.Stun(1)
|
||||
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
|
||||
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
|
||||
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
|
||||
if(M.weakeyes)
|
||||
M.Stun(2)
|
||||
M.visible_message("<span class='disarm'>[M] gasps and shields [M.p_their()] eyes!</span>", "<span class='userdanger'>You gasp and shields your eyes!</span>")
|
||||
else
|
||||
visible_message("<span class='disarm'>[user] fails to blind [M] with the flash!</span>")
|
||||
to_chat(user, "<span class='warning'>You fail to blind [M] with the flash!</span>")
|
||||
to_chat(M, "<span class='danger'>[user] fails to blind you with the flash!</span>")
|
||||
return
|
||||
|
||||
if(M.flash_eyes())
|
||||
M.AdjustConfused(power)
|
||||
|
||||
/obj/item/flash/attack(mob/living/M, mob/user)
|
||||
if(!try_use_flash(user))
|
||||
return 0
|
||||
|
||||
if(iscarbon(M))
|
||||
flash_carbon(M, user, 5, 1)
|
||||
if(overcharged)
|
||||
M.adjust_fire_stacks(6)
|
||||
M.IgniteMob()
|
||||
burn_out()
|
||||
return 1
|
||||
|
||||
else if(issilicon(M))
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.module) // Perhaps they didn't choose a module yet
|
||||
for(var/obj/item/borg/combat/shield/S in R.module.modules)
|
||||
if(R.activated(S))
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by [M.p_their()] shield!</span>")
|
||||
return 1
|
||||
add_attack_logs(user, M, "Flashed with [src]")
|
||||
if(M.flash_eyes(affect_silicon = 1))
|
||||
M.Weaken(rand(5,10))
|
||||
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
|
||||
return 1
|
||||
|
||||
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
|
||||
|
||||
|
||||
/obj/item/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
|
||||
if(!try_use_flash(user))
|
||||
return 0
|
||||
user.visible_message("<span class='disarm'>[user]'s [src.name] emits a blinding light!</span>", "<span class='danger'>Your [src.name] emits a blinding light!</span>")
|
||||
for(var/mob/living/carbon/M in oviewers(3, null))
|
||||
flash_carbon(M, user, 3, 0)
|
||||
|
||||
|
||||
/obj/item/flash/emp_act(severity)
|
||||
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/flash/proc/terrible_conversion_proc(mob/M, mob/user)
|
||||
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
|
||||
if(user.mind && (user.mind in SSticker.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(!ismindshielded(M))
|
||||
if(user.mind in SSticker.mode.head_revolutionaries)
|
||||
if(SSticker.mode.add_revolutionary(M.mind))
|
||||
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
|
||||
else
|
||||
resisted = 1
|
||||
else
|
||||
resisted = 1
|
||||
|
||||
if(resisted)
|
||||
to_chat(user, "<span class='warning'>This mind seems resistant to the [name]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>They must be conscious before you can convert [M.p_them()]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>")
|
||||
|
||||
|
||||
/obj/item/flash/cyborg
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/flash/cyborg/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
new /obj/effect/temp_visual/borgflash(get_turf(src))
|
||||
|
||||
/obj/item/flash/cyborg/attack_self(mob/user)
|
||||
..()
|
||||
new /obj/effect/temp_visual/borgflash(get_turf(src))
|
||||
|
||||
/obj/item/flash/cameraflash
|
||||
name = "camera"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
desc = "A polaroid camera. 10 photos left."
|
||||
icon_state = "camera"
|
||||
item_state = "electropack" //spelling, a coders worst enemy. This part gave me trouble for a while.
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
can_overcharge = FALSE
|
||||
var/flash_max_charges = 5
|
||||
var/flash_cur_charges = 5
|
||||
var/charge_tick = 0
|
||||
use_sound = 'sound/items/polaroid1.ogg'
|
||||
|
||||
/obj/item/flash/cameraflash/burn_out() //stops from burning out
|
||||
return
|
||||
|
||||
/obj/item/flash/cameraflash/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/flash/cameraflash/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/flash/cameraflash/process() //this and the two parts above are part of the charge system.
|
||||
charge_tick++
|
||||
if(charge_tick < 10)
|
||||
return FALSE
|
||||
charge_tick = 0
|
||||
flash_cur_charges = min(flash_cur_charges+1, flash_max_charges)
|
||||
return TRUE
|
||||
|
||||
/obj/item/flash/cameraflash/attack(mob/living/M, mob/user)
|
||||
if(flash_cur_charges > 0)
|
||||
flash_cur_charges -= 1
|
||||
to_chat(user, "[src] now has [flash_cur_charges] charge\s.")
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
/obj/item/flash/cameraflash/attack_self(mob/living/carbon/user, flag = 0)
|
||||
if(flash_cur_charges > 0)
|
||||
flash_cur_charges -= 1
|
||||
to_chat(user, "[src] now has [flash_cur_charges] charge\s.")
|
||||
..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs time to recharge!</span>")
|
||||
return
|
||||
|
||||
/obj/item/flash/memorizer
|
||||
name = "memorizer"
|
||||
desc = "If you see this, you're not likely to remember it any time soon."
|
||||
icon_state = "memorizer"
|
||||
item_state = "nullrod"
|
||||
|
||||
/obj/item/flash/armimplant
|
||||
name = "photon projector"
|
||||
desc = "A high-powered photon projector implant normally used for lighting purposes, but also doubles as a flashbulb weapon. Self-repair protocols fix the flashbulb if it ever burns out."
|
||||
var/flashcd = 20
|
||||
var/overheat = 0
|
||||
var/obj/item/organ/internal/cyberimp/arm/flash/I = null
|
||||
|
||||
/obj/item/flash/armimplant/Destroy()
|
||||
I = null
|
||||
return ..()
|
||||
|
||||
/obj/item/flash/armimplant/burn_out()
|
||||
if(I && I.owner)
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector implant overheats and deactivates!</span>")
|
||||
I.Retract()
|
||||
overheat = FALSE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), flashcd * 2)
|
||||
|
||||
/obj/item/flash/armimplant/try_use_flash(mob/user = null)
|
||||
if(overheat)
|
||||
if(I && I.owner)
|
||||
to_chat(I.owner, "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>")
|
||||
return FALSE
|
||||
overheat = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), flashcd)
|
||||
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
|
||||
update_icon(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/flash/armimplant/proc/cooldown()
|
||||
overheat = FALSE
|
||||
|
||||
|
||||
/obj/item/flash/synthetic //just a regular flash now
|
||||
|
||||
@@ -1,95 +1,95 @@
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
name = "alien queen"
|
||||
caste = "q"
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
icon_state = "alienq_s"
|
||||
status_flags = CANPARALYSE
|
||||
heal_rate = 5
|
||||
large = 1
|
||||
ventcrawler = 0
|
||||
pressure_resistance = 200 //Because big, stompy xenos should not be blown around like paper.
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/New()
|
||||
create_reagents(100)
|
||||
|
||||
//there should only be one queen
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.living_mob_list)
|
||||
if(Q == src) continue
|
||||
if(Q.stat == DEAD) continue
|
||||
if(Q.client)
|
||||
name = "alien princess ([rand(1, 999)])" //if this is too cutesy feel free to change it/remove it.
|
||||
break
|
||||
|
||||
real_name = src.name
|
||||
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
|
||||
alien_organs += new /obj/item/organ/internal/xenos/acidgland
|
||||
alien_organs += new /obj/item/organ/internal/xenos/eggsac
|
||||
alien_organs += new /obj/item/organ/internal/xenos/resinspinner
|
||||
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/movement_delay()
|
||||
. = ..()
|
||||
. += 3
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/handle_hud_icons_health()
|
||||
..() //-Yvarov
|
||||
|
||||
if(healths)
|
||||
if(stat != DEAD)
|
||||
switch(health)
|
||||
if(250 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(175 to 250)
|
||||
healths.icon_state = "health1"
|
||||
if(100 to 175)
|
||||
healths.icon_state = "health2"
|
||||
if(50 to 100)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 50)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/can_inject(mob/user, error_msg, target_zone, penetrate_thick)
|
||||
return FALSE
|
||||
|
||||
//Queen verbs
|
||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
||||
|
||||
set name = "Lay Egg (75)"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
if(locate(/obj/structure/alien/egg) in get_turf(src))
|
||||
to_chat(src, "<span class='noticealien'>There's already an egg here.</span>")
|
||||
return
|
||||
|
||||
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustPlasma(-75)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] has laid an egg!</span>"), 1)
|
||||
new /obj/structure/alien/egg(loc)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large
|
||||
icon = 'icons/mob/alienlarge.dmi'
|
||||
icon_state = "queen_s"
|
||||
pixel_x = -16
|
||||
large = 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large/update_icons()
|
||||
overlays.Cut()
|
||||
|
||||
if(stat == DEAD)
|
||||
icon_state = "queen_dead"
|
||||
else if(stat == UNCONSCIOUS || lying || resting)
|
||||
icon_state = "queen_sleep"
|
||||
else
|
||||
icon_state = "queen_s"
|
||||
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
/mob/living/carbon/alien/humanoid/queen
|
||||
name = "alien queen"
|
||||
caste = "q"
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
icon_state = "alienq_s"
|
||||
status_flags = CANPARALYSE
|
||||
heal_rate = 5
|
||||
large = 1
|
||||
ventcrawler = 0
|
||||
pressure_resistance = 200 //Because big, stompy xenos should not be blown around like paper.
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/New()
|
||||
create_reagents(100)
|
||||
|
||||
//there should only be one queen
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.living_mob_list)
|
||||
if(Q == src) continue
|
||||
if(Q.stat == DEAD) continue
|
||||
if(Q.client)
|
||||
name = "alien princess ([rand(1, 999)])" //if this is too cutesy feel free to change it/remove it.
|
||||
break
|
||||
|
||||
real_name = src.name
|
||||
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
|
||||
alien_organs += new /obj/item/organ/internal/xenos/acidgland
|
||||
alien_organs += new /obj/item/organ/internal/xenos/eggsac
|
||||
alien_organs += new /obj/item/organ/internal/xenos/resinspinner
|
||||
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/movement_delay()
|
||||
. = ..()
|
||||
. += 3
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/handle_hud_icons_health()
|
||||
..() //-Yvarov
|
||||
|
||||
if(healths)
|
||||
if(stat != DEAD)
|
||||
switch(health)
|
||||
if(250 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(175 to 250)
|
||||
healths.icon_state = "health1"
|
||||
if(100 to 175)
|
||||
healths.icon_state = "health2"
|
||||
if(50 to 100)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 50)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/can_inject(mob/user, error_msg, target_zone, penetrate_thick)
|
||||
return FALSE
|
||||
|
||||
//Queen verbs
|
||||
/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
|
||||
|
||||
set name = "Lay Egg (75)"
|
||||
set desc = "Lay an egg to produce huggers to impregnate prey with."
|
||||
set category = "Alien"
|
||||
if(locate(/obj/structure/alien/egg) in get_turf(src))
|
||||
to_chat(src, "<span class='noticealien'>There's already an egg here.</span>")
|
||||
return
|
||||
|
||||
if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
|
||||
adjustPlasma(-75)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] has laid an egg!</span>"), 1)
|
||||
new /obj/structure/alien/egg(loc)
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large
|
||||
icon = 'icons/mob/alienlarge.dmi'
|
||||
icon_state = "queen_s"
|
||||
pixel_x = -16
|
||||
large = 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large/update_icons()
|
||||
overlays.Cut()
|
||||
|
||||
if(stat == DEAD)
|
||||
icon_state = "queen_dead"
|
||||
else if(stat == UNCONSCIOUS || lying || resting)
|
||||
icon_state = "queen_sleep"
|
||||
else
|
||||
icon_state = "queen_s"
|
||||
|
||||
for(var/image/I in overlays_standing)
|
||||
overlays += I
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,105 +1,105 @@
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
robot_talk_understand = 1
|
||||
voice_name = "synthesized voice"
|
||||
has_unlimited_silicon_privilege = 1
|
||||
var/syndicate = 0
|
||||
var/const/MAIN_CHANNEL = "Main Frequency"
|
||||
var/lawchannel = MAIN_CHANNEL // Default channel on which to state laws
|
||||
var/list/stating_laws = list()// Channels laws are currently being stated on
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
//var/list/hud_list[10]
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to
|
||||
var/designation = ""
|
||||
var/obj/item/camera/siliconcam/aiCamera = null //photography
|
||||
//Used in say.dm, allows for pAIs to have different say flavor text, as well as silicons, although the latter is not implemented.
|
||||
var/speak_statement = "states"
|
||||
var/speak_exclamation = "declares"
|
||||
var/speak_query = "queries"
|
||||
var/pose //Yes, now AIs can pose too.
|
||||
var/death_sound = 'sound/voice/borg_deathsound.ogg'
|
||||
|
||||
//var/sensor_mode = 0 //Determines the current HUD.
|
||||
|
||||
var/next_alarm_notice
|
||||
var/list/datum/alarm/queued_alarms = new()
|
||||
|
||||
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD)
|
||||
|
||||
|
||||
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
|
||||
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
|
||||
var/d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED //There is only one kind of diag hud
|
||||
|
||||
var/obj/item/radio/common_radio
|
||||
|
||||
/mob/living/silicon/New()
|
||||
GLOB.silicon_mob_list |= src
|
||||
..()
|
||||
var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
|
||||
diag_hud.add_to_hud(src)
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
add_language("Galactic Common")
|
||||
init_subsystems()
|
||||
|
||||
/mob/living/silicon/med_hud_set_health()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/med_hud_set_status()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
GLOB.silicon_mob_list -= src
|
||||
for(var/datum/alarm_handler/AH in alarm_handlers)
|
||||
AH.unregister(src)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/rename_character(oldname, newname)
|
||||
// we actually don't want it changing minds and stuff
|
||||
if(!newname)
|
||||
return 0
|
||||
|
||||
real_name = newname
|
||||
name = real_name
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
return
|
||||
|
||||
/mob/living/silicon/drop_item()
|
||||
return
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
|
||||
return FALSE //So borgs they don't die trying to fix wiring
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.take_organ_damage(20)
|
||||
Stun(8)
|
||||
if(2)
|
||||
src.take_organ_damage(10)
|
||||
Stun(3)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
to_chat(src, "<span class='danger'>*BZZZT*</span>")
|
||||
to_chat(src, "<span class='warning'>Warning: Electromagnetic pulse detected.</span>")
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
|
||||
return
|
||||
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg, target_zone, penetrate_thick)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>[p_their(TRUE)] outer shell is too tough.</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
robot_talk_understand = 1
|
||||
voice_name = "synthesized voice"
|
||||
has_unlimited_silicon_privilege = 1
|
||||
var/syndicate = 0
|
||||
var/const/MAIN_CHANNEL = "Main Frequency"
|
||||
var/lawchannel = MAIN_CHANNEL // Default channel on which to state laws
|
||||
var/list/stating_laws = list()// Channels laws are currently being stated on
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
//var/list/hud_list[10]
|
||||
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
|
||||
var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to
|
||||
var/designation = ""
|
||||
var/obj/item/camera/siliconcam/aiCamera = null //photography
|
||||
//Used in say.dm, allows for pAIs to have different say flavor text, as well as silicons, although the latter is not implemented.
|
||||
var/speak_statement = "states"
|
||||
var/speak_exclamation = "declares"
|
||||
var/speak_query = "queries"
|
||||
var/pose //Yes, now AIs can pose too.
|
||||
var/death_sound = 'sound/voice/borg_deathsound.ogg'
|
||||
|
||||
//var/sensor_mode = 0 //Determines the current HUD.
|
||||
|
||||
var/next_alarm_notice
|
||||
var/list/datum/alarm/queued_alarms = new()
|
||||
|
||||
hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD)
|
||||
|
||||
|
||||
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
|
||||
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
|
||||
var/d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED //There is only one kind of diag hud
|
||||
|
||||
var/obj/item/radio/common_radio
|
||||
|
||||
/mob/living/silicon/New()
|
||||
GLOB.silicon_mob_list |= src
|
||||
..()
|
||||
var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC]
|
||||
diag_hud.add_to_hud(src)
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
add_language("Galactic Common")
|
||||
init_subsystems()
|
||||
|
||||
/mob/living/silicon/med_hud_set_health()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/med_hud_set_status()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
GLOB.silicon_mob_list -= src
|
||||
for(var/datum/alarm_handler/AH in alarm_handlers)
|
||||
AH.unregister(src)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/rename_character(oldname, newname)
|
||||
// we actually don't want it changing minds and stuff
|
||||
if(!newname)
|
||||
return 0
|
||||
|
||||
real_name = newname
|
||||
name = real_name
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/proc/show_laws()
|
||||
return
|
||||
|
||||
/mob/living/silicon/drop_item()
|
||||
return
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
|
||||
return FALSE //So borgs they don't die trying to fix wiring
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
src.take_organ_damage(20)
|
||||
Stun(8)
|
||||
if(2)
|
||||
src.take_organ_damage(10)
|
||||
Stun(3)
|
||||
flash_eyes(affect_silicon = 1)
|
||||
to_chat(src, "<span class='danger'>*BZZZT*</span>")
|
||||
to_chat(src, "<span class='warning'>Warning: Electromagnetic pulse detected.</span>")
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/silicon/proc/damage_mob(var/brute = 0, var/fire = 0, var/tox = 0)
|
||||
return
|
||||
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg, target_zone, penetrate_thick)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>[p_their(TRUE)] outer shell is too tough.</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/welder_act(mob/user, obj/item/I)
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
return
|
||||
@@ -119,242 +119,242 @@
|
||||
user.visible_message("<span class='alert'>[user] patches some dents on [src] with [I].</span>")
|
||||
|
||||
|
||||
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
|
||||
if(!Proj.nodamage)
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(Proj.damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(Proj.damage)
|
||||
|
||||
Proj.on_hit(src,2)
|
||||
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/negate_armor = 0)
|
||||
return 0//The only effect that can hit them atm is flashes and they still directly edit so this works for now
|
||||
/*
|
||||
if(!effect || (blocked >= 2)) return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
Stun(effect / (blocked + 1))
|
||||
if(WEAKEN)
|
||||
Weaken(effect / (blocked + 1))
|
||||
if(PARALYZE)
|
||||
Paralyse(effect / (blocked + 1))
|
||||
if(IRRADIATE)
|
||||
radiation += min((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
if(EYE_BLUR)
|
||||
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
|
||||
if(DROWSY)
|
||||
drowsyness = max(drowsyness,(effect/(blocked+1)))
|
||||
updatehealth()
|
||||
return 1*/
|
||||
|
||||
/proc/islinked(var/mob/living/silicon/robot/bot, var/mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return 0
|
||||
if(bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
// this function shows the health of the pAI in the Status panel
|
||||
/mob/living/silicon/proc/show_system_integrity()
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [round((health/maxHealth)*100)]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
/mob/living/silicon/Stat()
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
show_stat_emergency_shuttle_eta()
|
||||
show_system_integrity()
|
||||
|
||||
//Silicon mob language procs
|
||||
|
||||
/mob/living/silicon/can_speak_language(datum/language/speaking)
|
||||
return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language
|
||||
|
||||
/mob/living/silicon/add_language(var/language, var/can_speak=1)
|
||||
if(..(language) && can_speak)
|
||||
speech_synthesizer_langs.Add(GLOB.all_languages[language])
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/remove_language(var/rem_language)
|
||||
..(rem_language)
|
||||
|
||||
for(var/datum/language/L in speech_synthesizer_langs)
|
||||
if(L.name == rem_language)
|
||||
speech_synthesizer_langs -= L
|
||||
|
||||
/mob/living/silicon/check_lang_data()
|
||||
. = ""
|
||||
|
||||
if(default_language)
|
||||
. += "Current default language: [default_language] - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br><br>"
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
if(!(L.flags & NONGLOBAL))
|
||||
var/default_str
|
||||
if(L == default_language)
|
||||
default_str = " - default - <a href='byond://?src=[UID()];default_lang=reset'>reset</a>"
|
||||
else
|
||||
default_str = " - <a href='byond://?src=[UID()];default_lang=[L]'>set default</a>"
|
||||
|
||||
var/synth = (L in speech_synthesizer_langs)
|
||||
. += "<b>[L.name] (:[L.key])</b>[synth ? default_str : null]<br>Speech Synthesizer: <i>[synth ? "YES" : "NOT SUPPORTED"]</i><br>[L.desc]<br><br>"
|
||||
|
||||
|
||||
// this function displays the stations manifest in a separate window
|
||||
/mob/living/silicon/proc/show_station_manifest()
|
||||
var/dat
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
if(data_core)
|
||||
dat += data_core.get_manifest(1) // make it monochrome
|
||||
dat += "<br>"
|
||||
src << browse(dat, "window=airoster")
|
||||
onclose(src, "airoster")
|
||||
|
||||
/mob/living/silicon/assess_threat() //Secbots won't hunt silicon units
|
||||
return -10
|
||||
|
||||
/mob/living/silicon/verb/pose()
|
||||
set name = "Set Pose"
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. It is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
/mob/living/silicon/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
set desc = "Sets an extended description of your character's features."
|
||||
set category = "IC"
|
||||
|
||||
update_flavor_text()
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/proc/remove_med_sec_hud()
|
||||
var/datum/atom_hud/secsensor = huds[sec_hud]
|
||||
var/datum/atom_hud/medsensor = huds[med_hud]
|
||||
for(var/datum/atom_hud/data/diagnostic/diagsensor in huds)
|
||||
diagsensor.remove_hud_from(src)
|
||||
secsensor.remove_hud_from(src)
|
||||
medsensor.remove_hud_from(src)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/add_sec_hud()
|
||||
var/datum/atom_hud/secsensor = huds[sec_hud]
|
||||
secsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/add_med_hud()
|
||||
var/datum/atom_hud/medsensor = huds[med_hud]
|
||||
medsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/add_diag_hud()
|
||||
for(var/datum/atom_hud/data/diagnostic/diagsensor in huds)
|
||||
diagsensor.add_hud_to(src)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Diagnostic","Disable")
|
||||
remove_med_sec_hud()
|
||||
switch(sensor_type)
|
||||
if("Security")
|
||||
add_sec_hud()
|
||||
to_chat(src, "<span class='notice'>Security records overlay enabled.</span>")
|
||||
if("Medical")
|
||||
add_med_hud()
|
||||
to_chat(src, "<span class='notice'>Life signs monitor overlay enabled.</span>")
|
||||
if("Diagnostic")
|
||||
add_diag_hud()
|
||||
to_chat(src, "<span class='notice'>Robotics diagnostic overlay enabled.</span>")
|
||||
if("Disable")
|
||||
to_chat(src, "Sensor augmentations disabled.")
|
||||
|
||||
/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised)
|
||||
if(!next_alarm_notice)
|
||||
next_alarm_notice = world.time + SecondsToTicks(10)
|
||||
|
||||
var/list/alarms = queued_alarms[alarm_handler]
|
||||
if(was_raised)
|
||||
// Raised alarms are always set
|
||||
alarms[alarm] = 1
|
||||
else
|
||||
// Alarms that were raised but then cleared before the next notice are instead removed
|
||||
if(alarm in alarms)
|
||||
alarms -= alarm
|
||||
// And alarms that have only been cleared thus far are set as such
|
||||
else
|
||||
alarms[alarm] = -1
|
||||
|
||||
/mob/living/silicon/proc/process_queued_alarms()
|
||||
if(next_alarm_notice && (world.time > next_alarm_notice))
|
||||
next_alarm_notice = 0
|
||||
|
||||
var/alarm_raised = 0
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == 1)
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='warning'>--- [AH.category] Detected ---</span>")
|
||||
raised_alarm(A)
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == -1)
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='notice'>--- [AH.category] Cleared ---</span>")
|
||||
to_chat(src, "\The [A.alarm_name()].")
|
||||
|
||||
if(alarm_raised)
|
||||
to_chat(src, "<A HREF=?src=[UID()];showalerts=1>\[Show Alerts\]</A>")
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
alarms.Cut()
|
||||
|
||||
/mob/living/silicon/proc/raised_alarm(var/datum/alarm/A)
|
||||
to_chat(src, "[A.alarm_name()]!")
|
||||
|
||||
/mob/living/silicon/ai/raised_alarm(var/datum/alarm/A)
|
||||
var/cameratext = ""
|
||||
for(var/obj/machinery/camera/C in A.cameras())
|
||||
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=[UID()];switchcamera=\ref[C]>[C.c_tag]</A>"
|
||||
to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])")
|
||||
|
||||
/mob/living/silicon/adjustToxLoss(var/amount)
|
||||
return STATUS_UPDATE_NONE
|
||||
|
||||
/mob/living/silicon/get_access()
|
||||
return IGNORE_ACCESS //silicons always have access
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/noise)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/is_mechanical()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/is_literate()
|
||||
return 1
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
/mob/living/silicon/can_hear()
|
||||
. = TRUE
|
||||
|
||||
/mob/living/silicon/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
|
||||
if(!Proj.nodamage)
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(Proj.damage)
|
||||
if(BURN)
|
||||
adjustFireLoss(Proj.damage)
|
||||
|
||||
Proj.on_hit(src,2)
|
||||
|
||||
return 2
|
||||
|
||||
/mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/negate_armor = 0)
|
||||
return 0//The only effect that can hit them atm is flashes and they still directly edit so this works for now
|
||||
/*
|
||||
if(!effect || (blocked >= 2)) return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
Stun(effect / (blocked + 1))
|
||||
if(WEAKEN)
|
||||
Weaken(effect / (blocked + 1))
|
||||
if(PARALYZE)
|
||||
Paralyse(effect / (blocked + 1))
|
||||
if(IRRADIATE)
|
||||
radiation += min((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
if(EYE_BLUR)
|
||||
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
|
||||
if(DROWSY)
|
||||
drowsyness = max(drowsyness,(effect/(blocked+1)))
|
||||
updatehealth()
|
||||
return 1*/
|
||||
|
||||
/proc/islinked(var/mob/living/silicon/robot/bot, var/mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return 0
|
||||
if(bot.connected_ai == ai)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
// this function shows the health of the pAI in the Status panel
|
||||
/mob/living/silicon/proc/show_system_integrity()
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [round((health/maxHealth)*100)]%"))
|
||||
else
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
/mob/living/silicon/Stat()
|
||||
..()
|
||||
if(statpanel("Status"))
|
||||
show_stat_emergency_shuttle_eta()
|
||||
show_system_integrity()
|
||||
|
||||
//Silicon mob language procs
|
||||
|
||||
/mob/living/silicon/can_speak_language(datum/language/speaking)
|
||||
return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language
|
||||
|
||||
/mob/living/silicon/add_language(var/language, var/can_speak=1)
|
||||
if(..(language) && can_speak)
|
||||
speech_synthesizer_langs.Add(GLOB.all_languages[language])
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/remove_language(var/rem_language)
|
||||
..(rem_language)
|
||||
|
||||
for(var/datum/language/L in speech_synthesizer_langs)
|
||||
if(L.name == rem_language)
|
||||
speech_synthesizer_langs -= L
|
||||
|
||||
/mob/living/silicon/check_lang_data()
|
||||
. = ""
|
||||
|
||||
if(default_language)
|
||||
. += "Current default language: [default_language] - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br><br>"
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
if(!(L.flags & NONGLOBAL))
|
||||
var/default_str
|
||||
if(L == default_language)
|
||||
default_str = " - default - <a href='byond://?src=[UID()];default_lang=reset'>reset</a>"
|
||||
else
|
||||
default_str = " - <a href='byond://?src=[UID()];default_lang=[L]'>set default</a>"
|
||||
|
||||
var/synth = (L in speech_synthesizer_langs)
|
||||
. += "<b>[L.name] (:[L.key])</b>[synth ? default_str : null]<br>Speech Synthesizer: <i>[synth ? "YES" : "NOT SUPPORTED"]</i><br>[L.desc]<br><br>"
|
||||
|
||||
|
||||
// this function displays the stations manifest in a separate window
|
||||
/mob/living/silicon/proc/show_station_manifest()
|
||||
var/dat
|
||||
dat += "<h4>Crew Manifest</h4>"
|
||||
if(data_core)
|
||||
dat += data_core.get_manifest(1) // make it monochrome
|
||||
dat += "<br>"
|
||||
src << browse(dat, "window=airoster")
|
||||
onclose(src, "airoster")
|
||||
|
||||
/mob/living/silicon/assess_threat() //Secbots won't hunt silicon units
|
||||
return -10
|
||||
|
||||
/mob/living/silicon/verb/pose()
|
||||
set name = "Set Pose"
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC"
|
||||
|
||||
pose = sanitize(copytext(input(usr, "This is [src]. It is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
|
||||
|
||||
/mob/living/silicon/verb/set_flavor()
|
||||
set name = "Set Flavour Text"
|
||||
set desc = "Sets an extended description of your character's features."
|
||||
set category = "IC"
|
||||
|
||||
update_flavor_text()
|
||||
|
||||
/mob/living/silicon/binarycheck()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/proc/remove_med_sec_hud()
|
||||
var/datum/atom_hud/secsensor = huds[sec_hud]
|
||||
var/datum/atom_hud/medsensor = huds[med_hud]
|
||||
for(var/datum/atom_hud/data/diagnostic/diagsensor in huds)
|
||||
diagsensor.remove_hud_from(src)
|
||||
secsensor.remove_hud_from(src)
|
||||
medsensor.remove_hud_from(src)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/add_sec_hud()
|
||||
var/datum/atom_hud/secsensor = huds[sec_hud]
|
||||
secsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/add_med_hud()
|
||||
var/datum/atom_hud/medsensor = huds[med_hud]
|
||||
medsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/add_diag_hud()
|
||||
for(var/datum/atom_hud/data/diagnostic/diagsensor in huds)
|
||||
diagsensor.add_hud_to(src)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensor_mode()
|
||||
var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Diagnostic","Disable")
|
||||
remove_med_sec_hud()
|
||||
switch(sensor_type)
|
||||
if("Security")
|
||||
add_sec_hud()
|
||||
to_chat(src, "<span class='notice'>Security records overlay enabled.</span>")
|
||||
if("Medical")
|
||||
add_med_hud()
|
||||
to_chat(src, "<span class='notice'>Life signs monitor overlay enabled.</span>")
|
||||
if("Diagnostic")
|
||||
add_diag_hud()
|
||||
to_chat(src, "<span class='notice'>Robotics diagnostic overlay enabled.</span>")
|
||||
if("Disable")
|
||||
to_chat(src, "Sensor augmentations disabled.")
|
||||
|
||||
/mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised)
|
||||
if(!next_alarm_notice)
|
||||
next_alarm_notice = world.time + SecondsToTicks(10)
|
||||
|
||||
var/list/alarms = queued_alarms[alarm_handler]
|
||||
if(was_raised)
|
||||
// Raised alarms are always set
|
||||
alarms[alarm] = 1
|
||||
else
|
||||
// Alarms that were raised but then cleared before the next notice are instead removed
|
||||
if(alarm in alarms)
|
||||
alarms -= alarm
|
||||
// And alarms that have only been cleared thus far are set as such
|
||||
else
|
||||
alarms[alarm] = -1
|
||||
|
||||
/mob/living/silicon/proc/process_queued_alarms()
|
||||
if(next_alarm_notice && (world.time > next_alarm_notice))
|
||||
next_alarm_notice = 0
|
||||
|
||||
var/alarm_raised = 0
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == 1)
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='warning'>--- [AH.category] Detected ---</span>")
|
||||
raised_alarm(A)
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
var/reported = 0
|
||||
for(var/datum/alarm/A in alarms)
|
||||
if(alarms[A] == -1)
|
||||
if(!reported)
|
||||
reported = 1
|
||||
to_chat(src, "<span class='notice'>--- [AH.category] Cleared ---</span>")
|
||||
to_chat(src, "\The [A.alarm_name()].")
|
||||
|
||||
if(alarm_raised)
|
||||
to_chat(src, "<A HREF=?src=[UID()];showalerts=1>\[Show Alerts\]</A>")
|
||||
|
||||
for(var/datum/alarm_handler/AH in queued_alarms)
|
||||
var/list/alarms = queued_alarms[AH]
|
||||
alarms.Cut()
|
||||
|
||||
/mob/living/silicon/proc/raised_alarm(var/datum/alarm/A)
|
||||
to_chat(src, "[A.alarm_name()]!")
|
||||
|
||||
/mob/living/silicon/ai/raised_alarm(var/datum/alarm/A)
|
||||
var/cameratext = ""
|
||||
for(var/obj/machinery/camera/C in A.cameras())
|
||||
cameratext += "[(cameratext == "")? "" : "|"]<A HREF=?src=[UID()];switchcamera=\ref[C]>[C.c_tag]</A>"
|
||||
to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])")
|
||||
|
||||
/mob/living/silicon/adjustToxLoss(var/amount)
|
||||
return STATUS_UPDATE_NONE
|
||||
|
||||
/mob/living/silicon/get_access()
|
||||
return IGNORE_ACCESS //silicons always have access
|
||||
|
||||
/mob/living/silicon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash/noise)
|
||||
if(affect_silicon)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/is_mechanical()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/is_literate()
|
||||
return 1
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
/mob/living/silicon/can_hear()
|
||||
. = TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user