Skip to content

Commit

Permalink
wow rkz you used to suck at coding
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsar-Salat committed Oct 20, 2023
1 parent 36161e9 commit f584622
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
10 changes: 5 additions & 5 deletions code/modules/mob/living/simple_animal/bot/ed209bot.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/mob/living/simple_animal/bot/secbot/ed209
name = "\improper ED-209 Security Robot"
desc = "A security robot. He looks less than thrilled."
icon_state = "ed2090"
icon_state = "ed209"
density = TRUE
health = 100
maxHealth = 100
Expand All @@ -16,8 +16,8 @@
var/lastfired = 0
var/shot_delay = 15
var/shoot_sound = 'sound/weapons/laser.ogg'
var/projectile = /obj/item/projectile/beam/disabler
var/fair_market_projectile = /obj/item/projectile/bullet/c38 // For shooting the worst scumbags of all: the poor
var/projectile = /obj/projectile/beam/disabler
var/fair_market_projectile = /obj/projectile/bullet/c38 // For shooting the worst scumbags of all: the poor
do_footstep = TRUE

/mob/living/simple_animal/bot/secbot/ed209/Initialize(mapload)
Expand Down Expand Up @@ -62,9 +62,9 @@
/mob/living/simple_animal/bot/secbot/ed209/proc/set_weapon() //used to update the projectile type and firing sound
shoot_sound = 'sound/weapons/laser.ogg'
if(emagged == 2)
projectile = /obj/item/projectile/beam
projectile = /obj/projectile/beam
else
projectile = /obj/item/projectile/beam/disabler
projectile = /obj/projectile/beam/disabler

/mob/living/simple_animal/bot/secbot/ed209/proc/shootAt(mob/target)
if(world.time <= lastfired + shot_delay)
Expand Down
13 changes: 7 additions & 6 deletions code/modules/mob/living/simple_animal/bot/secbot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@

/mob/living/simple_animal/bot/secbot/Initialize(mapload)
. = ..()
update_icon()
update_appearance(UPDATE_ICON)

var/datum/job/J = SSjob.GetJob(JOB_NAME_DETECTIVE)
access_card.access = J.get_access()
prev_access = access_card.access.Copy()
Expand All @@ -81,11 +82,11 @@
)
AddElement(/datum/element/connect_loc, loc_connections)

/mob/living/simple_animal/bot/secbot/update_icon()
/mob/living/simple_animal/bot/secbot/update_icon_state()
if(mode == BOT_HUNT)
icon_state = "[initial(icon_state)]-c"
return
..()
return ..()

/mob/living/simple_animal/bot/secbot/turn_off()
..()
Expand Down Expand Up @@ -196,7 +197,7 @@
oldtarget_name = user.name
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
declare_arrests = FALSE
update_icon()
update_appearance()

/mob/living/simple_animal/bot/secbot/bullet_act(obj/projectile/Proj)
if(istype(Proj , /obj/projectile/beam)||istype(Proj, /obj/projectile/bullet))
Expand Down Expand Up @@ -239,7 +240,7 @@
if(!C.handcuffed)
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)
C.update_handcuffed()
playsound(src, "law", 50, 0)
playsound(src, "law", 50, FALSE)
back_to_idle()

/mob/living/simple_animal/bot/secbot/proc/stun_attack(mob/living/carbon/C)
Expand Down Expand Up @@ -267,7 +268,7 @@
log_combat(src, C, "stunned")
playsound(src, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
icon_state = "[initial(icon_state)]-c"
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon)), 2)
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_appearance)), 0.2 SECONDS)

/mob/living/simple_animal/bot/secbot/handle_automated_action()
if(!..())
Expand Down
8 changes: 7 additions & 1 deletion code/modules/spells/spell_types/conjure.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@
summon_type = list(/mob/living/simple_animal/bot/secbot/ed209)
summon_amt = 10
range = 3
newVars = list("emagged" = 2, "remote_disabled" = 1, "projectile" = /obj/item/projectile/beam/laser, "declare_arrests" = 0,"name" = "Wizard's Justicebot")
newVars = list(
"emagged" = 2,
"remote_disabled" = 1,
"projectile" = /obj/projectile/beam/laser,
"declare_arrests" = 0,
"name" = "Wizard's Justicebot"
)

/obj/effect/proc_holder/spell/aoe_turf/conjure/linkWorlds
name = "Link Worlds"
Expand Down
Binary file modified icons/mob/aibots.dmi
Binary file not shown.

0 comments on commit f584622

Please sign in to comment.