mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 21:19:44 +01:00
Merge branch 'master' of github.com:Baystation12/Baystation12
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
/mob/proc/death(gibbed)
|
||||
timeofdeath = world.time
|
||||
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]")
|
||||
log_file << "Death | \The [get_area(src)] | [bruteloss], [oxyloss], [toxloss], [fireloss][attack_log && attack_log.len? " | attack_log[attack_log.len]" : ""]"
|
||||
log_file << "Death | \The [get_area(src)] | [bruteloss], [oxyloss], [toxloss], [fireloss][attack_log && attack_log.len? " | [attack_log[attack_log.len]]" : ""]"
|
||||
if(client)
|
||||
client.onDeath()
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@
|
||||
G.process()
|
||||
|
||||
if(isturf(loc) && rand(1,1000) == 1) //0.1% chance of playing a scary sound to someone who's in complete darkness
|
||||
var/turf/currentTurf = loc
|
||||
if(!currentTurf.sd_lumcount)
|
||||
var/turf/currentTurf = get_turf(src)
|
||||
if(!max(currentTurf.ul_GetRed(), currentTurf.ul_GetGreen(), currentTurf.ul_GetBlue()))
|
||||
playsound_local(src,pick(scarySounds),50, 1, -1)
|
||||
|
||||
src.moved_recently = max(0, moved_recently-1)
|
||||
@@ -825,7 +825,8 @@
|
||||
if(mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
|
||||
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
|
||||
if(istype(loc,/turf)) //else, there's considered to be no light
|
||||
light_amount = min(10,loc:sd_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
|
||||
var/turf/currentTurf = get_turf(src)
|
||||
light_amount = min(10,max(currentTurf.ul_GetRed(), currentTurf.ul_GetGreen(), currentTurf.ul_GetBlue())) - 5 //hardcapped so it's not abused by having a ton of flashlights
|
||||
if(nutrition < 500) //so they can't store nutrition to survive without light forever
|
||||
nutrition += light_amount
|
||||
if(light_amount > 0) //if there's enough light, heal
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if(PARALYZE)
|
||||
Paralyse(effect/(blocked+1))
|
||||
if(IRRADIATE)
|
||||
radiation += max((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
|
||||
radiation += max((((effect - (effect*(getarmor(null, "rad")/100))))/(blocked+1)),0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
if(canstun) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
|
||||
@@ -109,8 +109,8 @@
|
||||
":q" = "Cargo",
|
||||
":g" = "changeling",
|
||||
|
||||
":R" = "right hand",
|
||||
":L" = "left hand",
|
||||
":R" = "right ear",
|
||||
":L" = "left ear",
|
||||
":I" = "intercom",
|
||||
":H" = "department",
|
||||
":C" = "Command",
|
||||
@@ -150,9 +150,9 @@
|
||||
//world << "channel_prefix=[channel_prefix]; message_mode=[message_mode]"
|
||||
if (message_mode)
|
||||
message = trim(copytext(message, 3))
|
||||
if (!(ishuman(src) || istype(src, /mob/living/simple_animal)) && (message_mode=="department" || (message_mode in radiochannels)))
|
||||
if (!(ishuman(src) || istype(src, /mob/living/simple_animal/parrot)) && (message_mode=="department" || (message_mode in radiochannels) || message_mode == "right ear" || message_mode == "left ear"))
|
||||
message_mode = null //only humans can use headsets
|
||||
// Check removed so parrots can use headsets!
|
||||
// Parrots can also use headsets!
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/silicon/robot/Login()
|
||||
/mob/living/silicon/robot/Login(var/syndie = 0)
|
||||
..()
|
||||
|
||||
rebuild_appearance()
|
||||
@@ -19,4 +19,43 @@
|
||||
A.connected_robots += src
|
||||
break
|
||||
*/
|
||||
if(!started)
|
||||
if(!syndie)
|
||||
if (client)
|
||||
connected_ai = activeais()
|
||||
if (connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
// laws = connected_ai.laws //The borg inherits its AI's laws
|
||||
laws = new /datum/ai_laws
|
||||
lawsync()
|
||||
src << "<b>Unit slaved to [connected_ai.name], downloading laws.</b>"
|
||||
lawupdate = 1
|
||||
else
|
||||
laws = new /datum/ai_laws/nanotrasen
|
||||
lawupdate = 0
|
||||
src << "<b>Unable to locate an AI, reverting to standard NanoTrasen laws.</b>"
|
||||
else
|
||||
laws = new /datum/ai_laws/antimov
|
||||
lawupdate = 0
|
||||
scrambledcodes = 1
|
||||
src << "Follow your laws."
|
||||
cell.maxcharge = 25000
|
||||
cell.charge = 25000
|
||||
module = new /obj/item/weapon/robot_module/syndicate(src)
|
||||
hands.icon_state = "standard"
|
||||
icon_state = "secborg"
|
||||
modtype = "Synd"
|
||||
|
||||
radio = new /obj/item/device/radio(src)
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.c_tag = real_name
|
||||
camera.network = "SS13"
|
||||
if(!cell)
|
||||
var/obj/item/weapon/cell/C = new(src)
|
||||
C.charge = 1500
|
||||
cell = C
|
||||
if(src.mind)
|
||||
ticker.mode.remove_revolutionary(src.mind)
|
||||
started = 1
|
||||
|
||||
return
|
||||
@@ -1,3 +1,5 @@
|
||||
/mob/living/silicon/robot
|
||||
var/started = null//A fix to ensure people don't try to bypass law assignment. Initial assignment sets it to one but it check on login whether they have been initiated -Sieve
|
||||
|
||||
/mob/living/silicon/robot/New(loc,var/syndie = 0)
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
@@ -51,6 +53,7 @@
|
||||
cell = C
|
||||
if(src.mind)
|
||||
ticker.mode.remove_revolutionary(src.mind)
|
||||
started = 1
|
||||
..()
|
||||
|
||||
//If there's an MMI in the robot, have it ejected when the mob goes away. --NEO
|
||||
@@ -551,6 +554,9 @@
|
||||
sleep(20)
|
||||
src << "\red ERRORERRORERROR"
|
||||
src << "\red \b ALERT: [user.real_name] is your new master. Obey your new laws and their commands."
|
||||
if(istype(src.module, /obj/item/weapon/robot_module/miner))
|
||||
src.module.modules -= /obj/item/weapon/pickaxe/borgdrill
|
||||
src.module.modules += /obj/item/weapon/pickaxe/diamonddrill//Buff when emagged, break down walls, kill men, whatever -Sieve
|
||||
updateicon()
|
||||
else
|
||||
user << "You fail to [ locked ? "unlock" : "lock"] [src]'s interface."
|
||||
|
||||
@@ -673,9 +673,7 @@
|
||||
return health
|
||||
|
||||
/mob/proc/UpdateLuminosity()
|
||||
if(total_luminosity == last_luminosity) return 0//nothing to do here
|
||||
last_luminosity = total_luminosity
|
||||
sd_SetLuminosity(min(total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else
|
||||
ul_SetLuminosity(LuminosityRed, LuminosityGreen, LuminosityBlue)//Current hardcode max at 7, should likely be a const somewhere else
|
||||
return 1
|
||||
|
||||
/mob/MouseDrop(mob/M as mob)
|
||||
@@ -715,6 +713,9 @@
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = usr
|
||||
if(istype(src, /obj/machinery/artifact))
|
||||
var/obj/machinery/artifact/A = src
|
||||
A.attack_hand(usr)
|
||||
return
|
||||
|
||||
/atom/verb/examine()
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
var/obj/screen/gun/run/gun_run_icon = null
|
||||
var/obj/screen/gun/mode/gun_setting_icon = null
|
||||
|
||||
var/total_luminosity = 0 //This controls luminosity for mobs, when you pick up lights and such this is edited. If you want the mob to use lights it must update its lum in its life proc or such. Note clamp this value around 7 or such to prevent massive light lag.
|
||||
var/last_luminosity = 0
|
||||
// var/total_luminosity = 0 //This controls luminosity for mobs, when you pick up lights and such this is edited. If you want the mob to use lights it must update its lum in its life proc or such. Note clamp this value around 7 or such to prevent massive light lag.
|
||||
// var/last_luminosity = 0
|
||||
|
||||
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
|
||||
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
|
||||
|
||||
@@ -40,10 +40,7 @@
|
||||
/client/Southwest()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.get_active_hand())
|
||||
usr << "\red You have nothing in your hand to throw."
|
||||
return
|
||||
toggle_throw_mode()
|
||||
C.toggle_throw_mode()
|
||||
else
|
||||
usr << "\red This mob type cannot throw items."
|
||||
return
|
||||
@@ -119,9 +116,77 @@
|
||||
set hidden = 1
|
||||
if(istype(mob, /mob/living/carbon))
|
||||
mob:swap_hand()
|
||||
if(istype(mob,/mob/living/silicon/robot))//Oh nested logic loops, is there anything you can't do? -Sieve
|
||||
var/mob/living/silicon/robot/R = mob
|
||||
if(!R.module_active)
|
||||
if(!R.module_state_1)
|
||||
if(!R.module_state_2)
|
||||
if(!R.module_state_3)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3 +a"
|
||||
R:module_active = R:module_state_3
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2 +a"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_2
|
||||
else
|
||||
R:inv1.icon_state = "inv1 +a"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_1
|
||||
else
|
||||
if(R.module_active == R.module_state_1)
|
||||
if(!R.module_state_2)
|
||||
if(!R.module_state_3)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3 +a"
|
||||
R:module_active = R:module_state_3
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2 +a"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_2
|
||||
else if(R.module_active == R.module_state_2)
|
||||
if(!R.module_state_3)
|
||||
if(!R.module_state_1)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1 +a"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_1
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3 +a"
|
||||
R:module_active = R:module_state_3
|
||||
else if(R.module_active == R.module_state_3)
|
||||
if(!R.module_state_1)
|
||||
if(!R.module_state_2)
|
||||
return
|
||||
else
|
||||
R:inv1.icon_state = "inv1"
|
||||
R:inv2.icon_state = "inv2 +a"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_2
|
||||
else
|
||||
R:inv1.icon_state = "inv1 +a"
|
||||
R:inv2.icon_state = "inv2"
|
||||
R:inv3.icon_state = "inv3"
|
||||
R:module_active = R:module_state_1
|
||||
else
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
|
||||
/client/verb/attack_self()
|
||||
set hidden = 1
|
||||
var/obj/item/weapon/W = mob.equipped()
|
||||
@@ -132,10 +197,12 @@
|
||||
|
||||
/client/verb/toggle_throw_mode()
|
||||
set hidden = 1
|
||||
if(!istype(mob, /mob/living/carbon)) return
|
||||
if((mob.stat || mob.restrained()) || !(isturf(mob.loc))) return
|
||||
mob:toggle_throw_mode()
|
||||
return
|
||||
if(!istype(mob, /mob/living/carbon))
|
||||
return
|
||||
if (!mob.stat && isturf(mob.loc) && !mob.restrained())
|
||||
mob:toggle_throw_mode()
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/client/verb/drop_item()
|
||||
@@ -220,7 +287,8 @@
|
||||
if(mob.stat==2) return
|
||||
|
||||
if(isAI(mob)) return AIMove(n,direct,mob)
|
||||
if(mob.monkeyizing) return //This is sota the goto stop mobs from moving var
|
||||
|
||||
if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var
|
||||
|
||||
if(mob.incorporeal_move)//Move though walls
|
||||
Process_Incorpmove(direct)
|
||||
|
||||
@@ -448,8 +448,7 @@ datum/preferences
|
||||
// Modify this if you added more jobs and it looks like a mess. Add the jobs in the splitJobs that you want to trigger and intitate a new table.
|
||||
|
||||
if(splitJobs == null)
|
||||
if (ticker.current_state >= GAME_STATE_PLAYING
|
||||
)
|
||||
if (ticker && ticker.current_state >= GAME_STATE_PLAYING)
|
||||
splitJobs = list()
|
||||
else
|
||||
splitJobs = list("Chief Engineer")
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
emote_hear = list("barks", "woofs", "yaps","pants")
|
||||
emote_see = list("shakes its head", "shivers")
|
||||
desc = "It's a corgi."
|
||||
src.sd_SetLuminosity(0)
|
||||
src.ul_SetLuminosity(0)
|
||||
inventory_head.loc = src.loc
|
||||
inventory_head = null
|
||||
else
|
||||
@@ -239,7 +239,7 @@
|
||||
name = "Rudolph the Red-Nosed Corgi"
|
||||
emote_hear = list("barks christmas songs", "yaps")
|
||||
desc = "He has a very shiny nose."
|
||||
src.sd_SetLuminosity(6)
|
||||
src.ul_SetLuminosity(6)
|
||||
if(/obj/item/clothing/head/cargosoft)
|
||||
name = "Corgi Tech [real_name]"
|
||||
speak = list("Needs a stamp!", "Request DENIED!", "Fill these out in triplicate!")
|
||||
|
||||
Reference in New Issue
Block a user