Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
@@ -2,7 +2,7 @@
// AI (i.e. game AI, not the AI player) controlled bots
/mob/living/simple_animal/bot
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
layer = MOB_LAYER
gender = NEUTER
luminosity = 3
@@ -103,18 +103,18 @@
if(stat)
return 0
on = 1
SetLuminosity(initial(luminosity))
set_light(initial(light_range))
update_icon()
diag_hud_set_botstat()
return 1
/mob/living/simple_animal/bot/proc/turn_off()
on = 0
SetLuminosity(0)
set_light(0)
bot_reset() //Resets an AI's call, should it exist.
update_icon()
/mob/living/simple_animal/bot/New()
/mob/living/simple_animal/bot/Initialize()
..()
access_card = new /obj/item/weapon/card/id(src)
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
@@ -169,7 +169,7 @@
if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again.
locked = 0
emagged = 1
user << "<span class='notice'>You bypass [src]'s controls.</span>"
to_chat(user, "<span class='notice'>You bypass [src]'s controls.</span>")
return
if(!locked && open) //Bot panel is unlocked by ID or emag, and the panel is screwed open. Ready for emagging.
emagged = 2
@@ -177,21 +177,21 @@
locked = 1 //Access denied forever!
bot_reset()
turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP.
src << "<span class='userdanger'>(#$*#$^^( OVERRIDE DETECTED</span>"
to_chat(src, "<span class='userdanger'>(#$*#$^^( OVERRIDE DETECTED</span>")
add_logs(user, src, "emagged")
return
else //Bot is unlocked, but the maint panel has not been opened with a screwdriver yet.
user << "<span class='warning'>You need to open maintenance panel first!</span>"
to_chat(user, "<span class='warning'>You need to open maintenance panel first!</span>")
/mob/living/simple_animal/bot/examine(mob/user)
..()
if(health < maxHealth)
if(health > maxHealth/3)
user << "[src]'s parts look loose."
to_chat(user, "[src]'s parts look loose.")
else
user << "[src]'s parts look very loose!"
to_chat(user, "[src]'s parts look very loose!")
else
user << "[src] is in pristine condition."
to_chat(user, "[src] is in pristine condition.")
/mob/living/simple_animal/bot/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
if(amount>0 && prob(10))
@@ -235,7 +235,7 @@
if(!topic_denied(user))
interact(user)
else
user << "<span class='warning'>[src]'s interface is not responding!</span>"
to_chat(user, "<span class='warning'>[src]'s interface is not responding!</span>")
/mob/living/simple_animal/bot/interact(mob/user)
show_controls(user)
@@ -244,27 +244,27 @@
if(istype(W, /obj/item/weapon/screwdriver))
if(!locked)
open = !open
user << "<span class='notice'>The maintenance panel is now [open ? "opened" : "closed"].</span>"
to_chat(user, "<span class='notice'>The maintenance panel is now [open ? "opened" : "closed"].</span>")
else
user << "<span class='warning'>The maintenance panel is locked.</span>"
to_chat(user, "<span class='warning'>The maintenance panel is locked.</span>")
else if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
user << "Controls are now [locked ? "locked." : "unlocked."]"
to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]")
else
if(emagged)
user << "<span class='danger'>ERROR</span>"
to_chat(user, "<span class='danger'>ERROR</span>")
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
to_chat(user, "<span class='warning'>Please close the access panel before locking it.</span>")
else
user << "<span class='warning'>Access denied.</span>"
to_chat(user, "<span class='warning'>Access denied.</span>")
else if(istype(W, /obj/item/device/paicard))
insertpai(user, W)
else if(istype(W, /obj/item/weapon/hemostat) && paicard)
if(open)
user << "<span class='warning'>Close the access panel before manipulating the personality slot!</span>"
to_chat(user, "<span class='warning'>Close the access panel before manipulating the personality slot!</span>")
else
user << "<span class='notice'>You attempt to pull [paicard] free...</span>"
to_chat(user, "<span class='notice'>You attempt to pull [paicard] free...</span>")
if(do_after(user, 30, target = src))
if (paicard)
user.visible_message("<span class='notice'>[user] uses [W] to pull [paicard] out of [bot_name]!</span>","<span class='notice'>You pull [paicard] out of [bot_name] with [W].</span>")
@@ -273,17 +273,17 @@
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
if(health >= maxHealth)
user << "<span class='warning'>[src] does not need a repair!</span>"
to_chat(user, "<span class='warning'>[src] does not need a repair!</span>")
return
if(!open)
user << "<span class='warning'>Unable to repair with the maintenance panel closed!</span>"
to_chat(user, "<span class='warning'>Unable to repair with the maintenance panel closed!</span>")
return
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
adjustHealth(-10)
user.visible_message("[user] repairs [src]!","<span class='notice'>You repair [src].</span>")
else
user << "<span class='warning'>The welder must be on for this task!</span>"
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
else
if(W.force) //if force is non-zero
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
@@ -473,7 +473,7 @@ Pass a positive integer as an argument to override a bot's default speed.
var/area/end_area = get_area(waypoint)
if(client) //Player bots instead get a location command from the AI
src << "<span class='noticebig'>Priority waypoint set by \icon[caller] <b>[caller]</b>. Proceed to <b>[end_area.name]<\b>."
to_chat(src, "<span class='noticebig'>Priority waypoint set by \icon[caller] <b>[caller]</b>. Proceed to <b>[end_area.name]<\b>.")
//For giving the bot temporary all-access.
var/obj/item/weapon/card/id/all_access = new /obj/item/weapon/card/id
@@ -489,13 +489,13 @@ Pass a positive integer as an argument to override a bot's default speed.
turn_on() //Saves the AI the hassle of having to activate a bot manually.
access_card = all_access //Give the bot all-access while under the AI's command.
if(message)
calling_ai << "<span class='notice'>\icon[src] [name] called to [end_area.name]. [path.len-1] meters to destination.</span>"
to_chat(calling_ai, "<span class='notice'>\icon[src] [name] called to [end_area.name]. [path.len-1] meters to destination.</span>")
pathset = 1
mode = BOT_RESPONDING
tries = 0
else
if(message)
calling_ai << "<span class='danger'>Failed to calculate a valid route. Ensure destination is clear of obstructions and within range.</span>"
to_chat(calling_ai, "<span class='danger'>Failed to calculate a valid route. Ensure destination is clear of obstructions and within range.</span>")
calling_ai = null
path = list()
@@ -504,13 +504,13 @@ Pass a positive integer as an argument to override a bot's default speed.
var/success = bot_move(ai_waypoint, 3)
if(!success)
if(calling_ai)
calling_ai << "\icon[src] [get_turf(src) == ai_waypoint ? "<span class='notice'>[src] successfully arrived to waypoint.</span>" : "<span class='danger'>[src] failed to reach waypoint.</span>"]"
to_chat(calling_ai, "\icon[src] [get_turf(src) == ai_waypoint ? "<span class='notice'>[src] successfully arrived to waypoint.</span>" : "<span class='danger'>[src] failed to reach waypoint.</span>"]")
calling_ai = null
bot_reset()
/mob/living/simple_animal/bot/proc/bot_reset()
if(calling_ai) //Simple notification to the AI if it called a bot. It will not know the cause or identity of the bot.
calling_ai << "<span class='danger'>Call command to a bot has been reset.</span>"
to_chat(calling_ai, "<span class='danger'>Call command to a bot has been reset.</span>")
calling_ai = null
path = list()
summon_target = null
@@ -663,24 +663,24 @@ Pass a positive integer as an argument to override a bot's default speed.
/mob/living/simple_animal/bot/proc/bot_control_message(command,user,user_turf,user_access)
switch(command)
if("patroloff")
src << "<span class='warning big'>STOP PATROL</span>"
to_chat(src, "<span class='warning big'>STOP PATROL</span>")
if("patrolon")
src << "<span class='warning big'>START PATROL</span>"
to_chat(src, "<span class='warning big'>START PATROL</span>")
if("summon")
var/area/a = get_area(user_turf)
src << "<span class='warning big'>PRIORITY ALERT:[user] in [a.name]!</span>"
to_chat(src, "<span class='warning big'>PRIORITY ALERT:[user] in [a.name]!</span>")
if("stop")
src << "<span class='warning big'>STOP!</span>"
to_chat(src, "<span class='warning big'>STOP!</span>")
if("go")
src << "<span class='warning big'>GO!</span>"
to_chat(src, "<span class='warning big'>GO!</span>")
if("home")
src << "<span class='warning big'>RETURN HOME!</span>"
to_chat(src, "<span class='warning big'>RETURN HOME!</span>")
if("ejectpai")
return
else
src << "<span class='warning'>Unidentified control sequence recieved:[command]</span>"
to_chat(src, "<span class='warning'>Unidentified control sequence recieved:[command]</span>")
/mob/living/simple_animal/bot/proc/bot_summon() // summoned to PDA
summon_step()
@@ -756,7 +756,7 @@ Pass a positive integer as an argument to override a bot's default speed.
return 1
if(topic_denied(usr))
usr << "<span class='warning'>[src]'s interface is not responding!</span>"
to_chat(usr, "<span class='warning'>[src]'s interface is not responding!</span>")
return 1
add_fingerprint(usr)
@@ -777,18 +777,18 @@ Pass a positive integer as an argument to override a bot's default speed.
emagged = 2
hacked = 1
locked = 1
usr << "<span class='warning'>[text_hack]</span>"
to_chat(usr, "<span class='warning'>[text_hack]</span>")
bot_reset()
else if(!hacked)
usr << "<span class='boldannounce'>[text_dehack_fail]</span>"
to_chat(usr, "<span class='boldannounce'>[text_dehack_fail]</span>")
else
emagged = 0
hacked = 0
usr << "<span class='notice'>[text_dehack]</span>"
to_chat(usr, "<span class='notice'>[text_dehack]</span>")
bot_reset()
if("ejectpai")
if(paicard && (!locked || issilicon(usr) || IsAdminGhost(usr)))
usr << "<span class='notice'>You eject [paicard] from [bot_name]</span>"
to_chat(usr, "<span class='notice'>You eject [paicard] from [bot_name]</span>")
ejectpai(usr)
update_controls()
@@ -800,7 +800,7 @@ Pass a positive integer as an argument to override a bot's default speed.
use_power = 0
var/mob/living/simple_animal/bot/owner = null
/obj/machinery/bot_core/New(loc)
/obj/machinery/bot_core/Initialize()
..()
owner = loc
if(!istype(owner))
@@ -846,7 +846,7 @@ Pass a positive integer as an argument to override a bot's default speed.
/mob/living/simple_animal/bot/proc/insertpai(mob/user, obj/item/device/paicard/card)
if(paicard)
user << "<span class='warning'>A [paicard] is already inserted!</span>"
to_chat(user, "<span class='warning'>A [paicard] is already inserted!</span>")
else if(allow_pai && !key)
if(!locked && !open)
if(card.pai && card.pai.mind)
@@ -856,18 +856,18 @@ Pass a positive integer as an argument to override a bot's default speed.
paicard = card
user.visible_message("[user] inserts [card] into [src]!","<span class='notice'>You insert [card] into [src].</span>")
paicard.pai.mind.transfer_to(src)
src << "<span class='notice'>You sense your form change as you are uploaded into [src].</span>"
to_chat(src, "<span class='notice'>You sense your form change as you are uploaded into [src].</span>")
bot_name = name
name = paicard.pai.name
faction = user.faction.Copy()
add_logs(user, paicard.pai, "uploaded to [bot_name],")
return 1
else
user << "<span class='warning'>[card] is inactive.</span>"
to_chat(user, "<span class='warning'>[card] is inactive.</span>")
else
user << "<span class='warning'>The personality slot is locked.</span>"
to_chat(user, "<span class='warning'>The personality slot is locked.</span>")
else
user << "<span class='warning'>[src] is not compatible with [card]</span>"
to_chat(user, "<span class='warning'>[src] is not compatible with [card]</span>")
/mob/living/simple_animal/bot/proc/ejectpai(mob/user = null, announce = 1)
if(paicard)
@@ -884,7 +884,7 @@ Pass a positive integer as an argument to override a bot's default speed.
else
add_logs(src, paicard.pai, "ejected")
if(announce)
paicard.pai << "<span class='notice'>You feel your control fade as [paicard] ejects from [bot_name].</span>"
to_chat(paicard.pai, "<span class='notice'>You feel your control fade as [paicard] ejects from [bot_name].</span>")
paicard = null
name = bot_name
faction = initial(faction)
@@ -2,7 +2,7 @@
/mob/living/simple_animal/bot/cleanbot
name = "\improper Cleanbot"
desc = "A little cleaning robot, he looks so excited!"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "cleanbot0"
density = 0
anchored = 0
@@ -31,7 +31,7 @@
var/next_dest
var/next_dest_loc
/mob/living/simple_animal/bot/cleanbot/New()
/mob/living/simple_animal/bot/cleanbot/Initialize()
..()
get_targets()
icon_state = "cleanbot[on]"
@@ -65,14 +65,14 @@
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>"
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>")
else
if(emagged)
user << "<span class='warning'>ERROR</span>"
to_chat(user, "<span class='warning'>ERROR</span>")
if(open)
user << "<span class='warning'>Please close the access panel before locking it.</span>"
to_chat(user, "<span class='warning'>Please close the access panel before locking it.</span>")
else
user << "<span class='notice'>\The [src] doesn't seem to respect your authority.</span>"
to_chat(user, "<span class='notice'>\The [src] doesn't seem to respect your authority.</span>")
else
return ..()
@@ -80,7 +80,7 @@
..()
if(emagged == 2)
if(user)
user << "<span class='danger'>[src] buzzes and beeps.</span>"
to_chat(user, "<span class='danger'>[src] buzzes and beeps.</span>")
/mob/living/simple_animal/bot/cleanbot/process_scan(atom/A)
if(iscarbon(A))
@@ -4,7 +4,7 @@
/obj/item/weapon/bucket_sensor
desc = "It's a bucket. With a sensor attached."
name = "proxy bucket"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "bucket_proxy"
force = 3
throwforce = 5
@@ -22,7 +22,7 @@
var/turf/T = get_turf(loc)
var/mob/living/simple_animal/bot/cleanbot/A = new /mob/living/simple_animal/bot/cleanbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>"
to_chat(user, "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/pen))
@@ -38,7 +38,7 @@
/obj/item/weapon/ed209_assembly
name = "\improper ED-209 assembly"
desc = "Some sort of bizarre assembly."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "ed209_frame"
item_state = "ed209_frame"
var/build_step = 0
@@ -64,7 +64,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the robot leg to [src].</span>"
to_chat(user, "<span class='notice'>You add the robot leg to [src].</span>")
name = "legs/frame assembly"
if(build_step == 1)
item_state = "ed209_leg"
@@ -85,7 +85,7 @@
lasercolor = newcolor
qdel(W)
build_step++
user << "<span class='notice'>You add the armor to [src].</span>"
to_chat(user, "<span class='notice'>You add the armor to [src].</span>")
name = "vest/legs/frame assembly"
item_state = "[lasercolor]ed209_shell"
icon_state = "[lasercolor]ed209_shell"
@@ -96,7 +96,7 @@
if(WT.remove_fuel(0,user))
build_step++
name = "shielded frame assembly"
user << "<span class='notice'>You weld the vest to [src].</span>"
to_chat(user, "<span class='notice'>You weld the vest to [src].</span>")
if(4)
switch(lasercolor)
if("b")
@@ -115,7 +115,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the helmet to [src].</span>"
to_chat(user, "<span class='notice'>You add the helmet to [src].</span>")
name = "covered and shielded frame assembly"
item_state = "[lasercolor]ed209_hat"
icon_state = "[lasercolor]ed209_hat"
@@ -126,7 +126,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the prox sensor to [src].</span>"
to_chat(user, "<span class='notice'>You add the prox sensor to [src].</span>")
name = "covered, shielded and sensored frame assembly"
item_state = "[lasercolor]ed209_prox"
icon_state = "[lasercolor]ed209_prox"
@@ -135,14 +135,14 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = W
if(coil.get_amount() < 1)
user << "<span class='warning'>You need one length of cable to wire the ED-209!</span>"
to_chat(user, "<span class='warning'>You need one length of cable to wire the ED-209!</span>")
return
user << "<span class='notice'>You start to wire [src]...</span>"
to_chat(user, "<span class='notice'>You start to wire [src]...</span>")
if(do_after(user, 40, target = src))
if(coil.get_amount() >= 1 && build_step == 6)
coil.use(1)
build_step = 7
user << "<span class='notice'>You wire the ED-209 assembly.</span>"
to_chat(user, "<span class='notice'>You wire the ED-209 assembly.</span>")
name = "wired ED-209 assembly"
if(7)
@@ -166,7 +166,7 @@
return
name = newname
build_step++
user << "<span class='notice'>You add [W] to [src].</span>"
to_chat(user, "<span class='notice'>You add [W] to [src].</span>")
item_state = "[lasercolor]ed209_taser"
icon_state = "[lasercolor]ed209_taser"
qdel(W)
@@ -174,18 +174,18 @@
if(8)
if(istype(W, /obj/item/weapon/screwdriver))
playsound(loc, W.usesound, 100, 1)
user << "<span class='notice'>You start attaching the gun to the frame...</span>"
to_chat(user, "<span class='notice'>You start attaching the gun to the frame...</span>")
if(do_after(user, 40*W.toolspeed, 0, src, 1))
build_step++
name = "armed [name]"
user << "<span class='notice'>Taser gun attached.</span>"
to_chat(user, "<span class='notice'>Taser gun attached.</span>")
if(9)
if(istype(W, /obj/item/weapon/stock_parts/cell))
if(!user.temporarilyRemoveItemFromInventory(W))
return
build_step++
user << "<span class='notice'>You complete the ED-209.</span>"
to_chat(user, "<span class='notice'>You complete the ED-209.</span>")
var/turf/T = get_turf(src)
new /mob/living/simple_animal/bot/ed209(T,created_name,lasercolor)
qdel(W)
@@ -195,7 +195,7 @@
/obj/item/weapon/toolbox_tiles
desc = "It's a toolbox with tiles sticking out the top"
name = "tiles and toolbox"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "toolbox_tiles"
force = 3
throwforce = 10
@@ -207,7 +207,7 @@
/obj/item/weapon/toolbox_tiles_sensor
desc = "It's a toolbox with tiles sticking out the top and a sensor attached"
name = "tiles, toolbox and sensor arrangement"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "toolbox_tiles_sensor"
force = 3
throwforce = 10
@@ -221,17 +221,17 @@
..()
return
if(contents.len >= 1)
user << "<span class='warning'>They won't fit in, as there is already stuff inside!</span>"
to_chat(user, "<span class='warning'>They won't fit in, as there is already stuff inside!</span>")
return
if(T.use(10))
if(user.s_active)
user.s_active.close(user)
var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles
user.put_in_hands(B)
user << "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>"
to_chat(user, "<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>")
qdel(src)
else
user << "<span class='warning'>You need 10 floor tiles to start building a floorbot!</span>"
to_chat(user, "<span class='warning'>You need 10 floor tiles to start building a floorbot!</span>")
return
/obj/item/weapon/toolbox_tiles/attackby(obj/item/W, mob/user, params)
@@ -241,7 +241,7 @@
var/obj/item/weapon/toolbox_tiles_sensor/B = new /obj/item/weapon/toolbox_tiles_sensor()
B.created_name = created_name
user.put_in_hands(B)
user << "<span class='notice'>You add the sensor to the toolbox and tiles.</span>"
to_chat(user, "<span class='notice'>You add the sensor to the toolbox and tiles.</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/pen))
@@ -260,7 +260,7 @@
var/turf/T = get_turf(user.loc)
var/mob/living/simple_animal/bot/floorbot/A = new /mob/living/simple_animal/bot/floorbot(T)
A.name = created_name
user << "<span class='notice'>You add the robot arm to the odd looking toolbox assembly. Boop beep!</span>"
to_chat(user, "<span class='notice'>You add the robot arm to the odd looking toolbox assembly. Boop beep!</span>")
qdel(src)
else if(istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
@@ -275,7 +275,7 @@
/obj/item/weapon/firstaid_arm_assembly
name = "incomplete medibot assembly."
desc = "A first aid kit with a robot arm permanently grafted to it."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "firstaid_arm"
var/build_step = 0
var/created_name = "Medibot" //To preserve the name if it's a unique medbot I guess
@@ -286,7 +286,7 @@
..()
spawn(5)
if(skin)
add_overlay(image('icons/obj/aibots.dmi', "kit_skin_[skin]"))
add_overlay(image('icons/mob/aibots.dmi', "kit_skin_[skin]"))
/obj/item/weapon/storage/firstaid/attackby(obj/item/bodypart/S, mob/user, params)
@@ -295,7 +295,7 @@
//Making a medibot!
if(contents.len >= 1)
user << "<span class='warning'>You need to empty [src] out first!</span>"
to_chat(user, "<span class='warning'>You need to empty [src] out first!</span>")
return
var/obj/item/weapon/firstaid_arm_assembly/A = new /obj/item/weapon/firstaid_arm_assembly
@@ -310,7 +310,7 @@
qdel(S)
user.put_in_hands(A)
user << "<span class='notice'>You add the robot arm to the first aid kit.</span>"
to_chat(user, "<span class='notice'>You add the robot arm to the first aid kit.</span>")
qdel(src)
@@ -331,9 +331,9 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You add the health sensor to [src].</span>"
to_chat(user, "<span class='notice'>You add the health sensor to [src].</span>")
name = "First aid/robot arm/health analyzer assembly"
add_overlay(image('icons/obj/aibots.dmi', "na_scanner"))
add_overlay(image('icons/mob/aibots.dmi', "na_scanner"))
if(1)
if(isprox(W))
@@ -341,7 +341,7 @@
return
qdel(W)
build_step++
user << "<span class='notice'>You complete the Medibot. Beep boop!</span>"
to_chat(user, "<span class='notice'>You complete the Medibot. Beep boop!</span>")
var/turf/T = get_turf(src)
var/mob/living/simple_animal/bot/medbot/S = new /mob/living/simple_animal/bot/medbot(T)
S.skin = skin
@@ -352,7 +352,7 @@
/obj/item/weapon/secbot_assembly
name = "incomplete securitron assembly"
desc = "Some sort of bizarre assembly made from a proximity sensor, helmet, and signaler."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "helmet_signaler"
item_state = "helmet"
var/build_step = 0
@@ -368,14 +368,14 @@
return
if(F) //Has a flashlight. Player must remove it, else it will be lost forever.
user << "<span class='warning'>The mounted flashlight is in the way, remove it first!</span>"
to_chat(user, "<span class='warning'>The mounted flashlight is in the way, remove it first!</span>")
return
if(S.secured)
qdel(S)
var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
user.put_in_hands(A)
user << "<span class='notice'>You add the signaler to the helmet.</span>"
to_chat(user, "<span class='notice'>You add the signaler to the helmet.</span>")
qdel(src)
else
return
@@ -388,19 +388,19 @@
if(WT.remove_fuel(0, user))
build_step++
add_overlay("hs_hole")
user << "<span class='notice'>You weld a hole in [src]!</span>"
to_chat(user, "<span class='notice'>You weld a hole in [src]!</span>")
else if(build_step == 1)
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
build_step--
cut_overlay("hs_hole")
user << "<span class='notice'>You weld the hole in [src] shut!</span>"
to_chat(user, "<span class='notice'>You weld the hole in [src] shut!</span>")
else if(isprox(I) && (build_step == 1))
if(!user.temporarilyRemoveItemFromInventory(I))
return
build_step++
user << "<span class='notice'>You add the prox sensor to [src]!</span>"
to_chat(user, "<span class='notice'>You add the prox sensor to [src]!</span>")
add_overlay("hs_eye")
name = "helmet/signaler/prox sensor assembly"
qdel(I)
@@ -409,7 +409,7 @@
if(!user.temporarilyRemoveItemFromInventory(I))
return
build_step++
user << "<span class='notice'>You add the robot arm to [src]!</span>"
to_chat(user, "<span class='notice'>You add the robot arm to [src]!</span>")
name = "helmet/signaler/prox sensor/robot arm assembly"
add_overlay("hs_arm")
qdel(I)
@@ -418,7 +418,7 @@
if(!user.temporarilyRemoveItemFromInventory(I))
return
build_step++
user << "<span class='notice'>You complete the Securitron! Beep boop.</span>"
to_chat(user, "<span class='notice'>You complete the Securitron! Beep boop.</span>")
var/mob/living/simple_animal/bot/secbot/S = new /mob/living/simple_animal/bot/secbot
S.loc = get_turf(src)
S.name = created_name
@@ -438,17 +438,17 @@
if(!build_step)
new /obj/item/device/assembly/signaler(get_turf(src))
new /obj/item/clothing/head/helmet/sec(get_turf(src))
user << "<span class='notice'>You disconnect the signaler from the helmet.</span>"
to_chat(user, "<span class='notice'>You disconnect the signaler from the helmet.</span>")
qdel(src)
else if(build_step == 2)
cut_overlay("hs_eye")
new /obj/item/device/assembly/prox_sensor(get_turf(src))
user << "<span class='notice'>You detach the proximity sensor from [src].</span>"
to_chat(user, "<span class='notice'>You detach the proximity sensor from [src].</span>")
build_step--
else if(build_step == 3)
cut_overlay("hs_arm")
new /obj/item/bodypart/l_arm/robot(get_turf(src))
user << "<span class='notice'>You remove the robot arm from [src].</span>"
to_chat(user, "<span class='notice'>You remove the robot arm from [src].</span>")
build_step--
@@ -1,7 +1,7 @@
/mob/living/simple_animal/bot/ed209
name = "\improper ED-209 Security Robot"
desc = "A security robot. He looks less than thrilled."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "ed2090"
density = 1
anchored = 0
@@ -42,7 +42,7 @@
var/shoot_sound = 'sound/weapons/Taser.ogg'
/mob/living/simple_animal/bot/ed209/New(loc,created_name,created_lasercolor)
/mob/living/simple_animal/bot/ed209/Initialize(mapload,created_name,created_lasercolor)
..()
if(created_name)
name = created_name
@@ -178,7 +178,7 @@ Auto Patrol[]"},
..()
if(emagged == 2)
if(user)
user << "<span class='warning'>You short out [src]'s target assessment circuits.</span>"
to_chat(user, "<span class='warning'>You short out [src]'s target assessment circuits.</span>")
oldtarget_name = user.name
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
declare_arrests = 0
@@ -358,7 +358,7 @@ Auto Patrol[]"},
var/obj/item/weapon/ed209_assembly/Sa = new /obj/item/weapon/ed209_assembly(Tsec)
Sa.build_step = 1
Sa.add_overlay(image('icons/obj/aibots.dmi', "hs_hole"))
Sa.add_overlay(image('icons/mob/aibots.dmi', "hs_hole"))
Sa.created_name = name
new /obj/item/device/assembly/prox_sensor(Tsec)
@@ -2,7 +2,7 @@
/mob/living/simple_animal/bot/floorbot
name = "\improper Floorbot"
desc = "A little floor repairing robot, he looks so excited!"
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "floorbot0"
density = 0
anchored = 0
@@ -38,7 +38,7 @@
#define REPLACE_TILE 6
#define TILE_EMAG 7
/mob/living/simple_animal/bot/floorbot/New()
/mob/living/simple_animal/bot/floorbot/Initialize()
..()
update_icon()
var/datum/job/engineer/J = new/datum/job/engineer
@@ -101,12 +101,12 @@
/mob/living/simple_animal/bot/floorbot/attackby(obj/item/W , mob/user, params)
if(istype(W, /obj/item/stack/tile/plasteel))
user << "<span class='notice'>The floorbot can produce normal tiles itself.</span>"
to_chat(user, "<span class='notice'>The floorbot can produce normal tiles itself.</span>")
return
if(specialtiles && istype(W, /obj/item/stack/tile))
var/obj/item/stack/tile/usedtile = W
if(usedtile.type != tiletype)
user << "<span class='warning'>Different custom tiles are already inside the floorbot.</span>"
to_chat(user, "<span class='warning'>Different custom tiles are already inside the floorbot.</span>")
return
if(istype(W, /obj/item/stack/tile))
if(specialtiles >= maxtiles)
@@ -117,9 +117,9 @@
tiles.use(loaded)
specialtiles += loaded
if(loaded > 0)
user << "<span class='notice'>You load [loaded] tiles into the floorbot. It now contains [specialtiles] tiles.</span>"
to_chat(user, "<span class='notice'>You load [loaded] tiles into the floorbot. It now contains [specialtiles] tiles.</span>")
else
user << "<span class='warning'>You need at least one floor tile to put into [src]!</span>"
to_chat(user, "<span class='warning'>You need at least one floor tile to put into [src]!</span>")
else
..()
@@ -127,7 +127,7 @@
..()
if(emagged == 2)
if(user)
user << "<span class='danger'>[src] buzzes and beeps.</span>"
to_chat(user, "<span class='danger'>[src] buzzes and beeps.</span>")
/mob/living/simple_animal/bot/floorbot/Topic(href, href_list)
if(..())
@@ -6,7 +6,7 @@
/mob/living/simple_animal/bot/medbot
name = "\improper Medibot"
desc = "A little medical robot. He looks somewhat underwhelmed."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "medibot0"
density = 0
anchored = 0
@@ -85,13 +85,13 @@
else
icon_state = "medibot1"
/mob/living/simple_animal/bot/medbot/New()
/mob/living/simple_animal/bot/medbot/Initialize()
..()
update_icon()
spawn(4)
if(skin)
add_overlay(image('icons/obj/aibots.dmi', "medskin_[skin]"))
add_overlay(image('icons/mob/aibots.dmi', "medskin_[skin]"))
var/datum/job/doctor/J = new/datum/job/doctor
access_card.access += J.get_access()
@@ -209,17 +209,17 @@
if(istype(W, /obj/item/weapon/reagent_containers/glass))
. = 1 //no afterattack
if(locked)
user << "<span class='warning'>You cannot insert a beaker because the panel is locked!</span>"
to_chat(user, "<span class='warning'>You cannot insert a beaker because the panel is locked!</span>")
return
if(!isnull(reagent_glass))
user << "<span class='warning'>There is already a beaker loaded!</span>"
to_chat(user, "<span class='warning'>There is already a beaker loaded!</span>")
return
if(!user.drop_item())
return
W.loc = src
reagent_glass = W
user << "<span class='notice'>You insert [W].</span>"
to_chat(user, "<span class='notice'>You insert [W].</span>")
show_controls(user)
else
@@ -233,7 +233,7 @@
if(emagged == 2)
declare_crit = 0
if(user)
user << "<span class='notice'>You short out [src]'s reagent synthesis circuits.</span>"
to_chat(user, "<span class='notice'>You short out [src]'s reagent synthesis circuits.</span>")
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
flick("medibot_spark", src)
if(user)
@@ -48,7 +48,7 @@ var/global/mulebot_count = 0
var/obj/item/weapon/stock_parts/cell/cell
var/bloodiness = 0
/mob/living/simple_animal/bot/mulebot/New()
/mob/living/simple_animal/bot/mulebot/Initialize()
..()
wires = new /datum/wires/mulebot(src)
var/datum/job/cargo_tech/J = new/datum/job/cargo_tech
@@ -107,7 +107,7 @@ var/global/mulebot_count = 0
user.visible_message("<span class='danger'>[user] knocks [load] off [src] with \the [I]!</span>",
"<span class='danger'>You knock [load] off [src] with \the [I]!</span>")
else
user << "<span class='warning'>You hit [src] with \the [I] but to no effect!</span>"
to_chat(user, "<span class='warning'>You hit [src] with \the [I] but to no effect!</span>")
..()
else
..()
@@ -119,7 +119,7 @@ var/global/mulebot_count = 0
emagged = 1
if(!open)
locked = !locked
user << "<span class='notice'>You [locked ? "lock" : "unlock"] the [src]'s controls!</span>"
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the [src]'s controls!</span>")
flick("mulebot-emagged", src)
playsound(loc, 'sound/effects/sparks1.ogg', 100, 0)
@@ -209,7 +209,7 @@ var/global/mulebot_count = 0
turn_off()
else if(cell && !open)
if(!turn_on())
usr << "<span class='warning'>You can't switch on [src]!</span>"
to_chat(usr, "<span class='warning'>You can't switch on [src]!</span>")
return
. = TRUE
else
@@ -434,7 +434,7 @@ var/global/mulebot_count = 0
return
if(on)
var/speed = (wires.is_cut(WIRE_MOTOR1) ? 0 : 1) + (wires.is_cut(WIRE_MOTOR2) ? 0 : 2)
//world << "speed: [speed]"
//to_chat(world, "speed: [speed]")
var/num_steps = 0
switch(speed)
if(0)
@@ -476,7 +476,7 @@ var/global/mulebot_count = 0
path -= next
return
if(isturf(next))
//world << "at ([x],[y]) moving to ([next.x],[next.y])"
//to_chat(world, "at ([x],[y]) moving to ([next.x],[next.y])")
if(bloodiness)
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
@@ -499,7 +499,7 @@ var/global/mulebot_count = 0
var/moved = step_towards(src, next) // attempt to move
if(cell) cell.use(1)
if(moved && oldloc!=loc) // successful move
//world << "Successful move."
//to_chat(world, "Successful move.")
blockcount = 0
path -= loc
@@ -510,7 +510,7 @@ var/global/mulebot_count = 0
else // failed to move
//world << "Unable to move."
//to_chat(world, "Unable to move.")
blockcount++
mode = BOT_BLOCKED
if(blockcount == 3)
@@ -530,16 +530,16 @@ var/global/mulebot_count = 0
return
else
buzz(ANNOYED)
//world << "Bad turf."
//to_chat(world, "Bad turf.")
mode = BOT_NAV
return
else
//world << "No path."
//to_chat(world, "No path.")
mode = BOT_NAV
return
if(BOT_NAV) // calculate new path
//world << "Calc new path."
//to_chat(world, "Calc new path.")
mode = BOT_WAIT_FOR_NAV
spawn(0)
calc_path()
@@ -598,7 +598,7 @@ var/global/mulebot_count = 0
if(pathset) //The AI called us here, so notify it of our arrival.
loaddir = dir //The MULE will attempt to load a crate in whatever direction the MULE is "facing".
if(calling_ai)
calling_ai << "<span class='notice'>\icon[src] [src] wirelessly plays a chiming sound!</span>"
to_chat(calling_ai, "<span class='notice'>\icon[src] [src] wirelessly plays a chiming sound!</span>")
playsound(calling_ai, 'sound/machines/chime.ogg',40, 0)
calling_ai = null
radio_channel = "AI Private" //Report on AI Private instead if the AI is controlling us.
@@ -1,7 +1,7 @@
/mob/living/simple_animal/bot/secbot
name = "\improper Securitron"
desc = "A little security robot. He looks less than thrilled."
icon = 'icons/obj/aibots.dmi'
icon = 'icons/mob/aibots.dmi'
icon_state = "secbot0"
density = 0
anchored = 0
@@ -27,16 +27,16 @@
var/target_lastloc //Loc of target when arrested.
var/last_found //There's a delay
var/declare_arrests = 1 //When making an arrest, should it notify everyone on the security channel?
var/idcheck = 0 //If true, arrest people with no IDs
var/weaponscheck = 0 //If true, arrest people for weapons if they lack access
var/idcheck = 1 //If true, arrest people with no IDs
var/weaponscheck = 1 //If true, arrest people for weapons if they lack access
var/check_records = 1 //Does it check security records?
var/arrest_type = 0 //If true, don't handcuff
/mob/living/simple_animal/bot/secbot/beepsky
name = "Officer Beep O'sky"
desc = "It's Officer Beep O'sky! Powered by a potato and a shot of whiskey."
idcheck = 0
weaponscheck = 0
idcheck = 1
weaponscheck = 1
auto_patrol = 1
/mob/living/simple_animal/bot/secbot/beepsky/explode()
@@ -52,7 +52,7 @@
desc = "It's Officer Pingsky! Delegated to satellite guard duty for harbouring anti-human sentiment."
radio_channel = "AI Private"
/mob/living/simple_animal/bot/secbot/New()
/mob/living/simple_animal/bot/secbot/Initialize()
..()
icon_state = "secbot[on]"
spawn(3)
@@ -161,7 +161,7 @@ Auto Patrol: []"},
..()
if(emagged == 2)
if(user)
user << "<span class='danger'>You short out [src]'s target assessment circuits.</span>"
to_chat(user, "<span class='danger'>You short out [src]'s target assessment circuits.</span>")
oldtarget_name = user.name
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
declare_arrests = 0