Skip to content

Commit

Permalink
Перенос проверки (TauCetiStation#12756)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slavik2001 authored Jan 22, 2024
1 parent 6b9ec88 commit 8d73696
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
14 changes: 0 additions & 14 deletions code/game/machinery/bots/secbot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -629,20 +629,6 @@

//Secbot Construction

/obj/item/clothing/head/helmet/attackby(obj/item/I, mob/user, params)
if(!issignaler(I)) //Eh, but we don't want people making secbots out of space helmets.
return ..()

var/obj/item/device/assembly/signaler/S = I
if(!S.secured)
return ..()

var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
user.put_in_hands(A)
to_chat(user, "<span class='notice'>You add \the [S] to the helmet.</span>")
qdel(S)
qdel(src)

/obj/item/weapon/secbot_assembly/attackby(obj/item/I, mob/user, params)
if(iswelding(I) && !build_step)
var/obj/item/weapon/weldingtool/WT = I
Expand Down
16 changes: 15 additions & 1 deletion code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
holochip.deactivate_holomap()
..()

/obj/item/clothing/head/helmet/attackby(obj/item/I, mob/user)
/obj/item/clothing/head/helmet/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/holochip))
if(flags & ABSTRACT)
return //You can't insert holochip in abstract item.
Expand Down Expand Up @@ -65,6 +65,20 @@
playsound(src, 'sound/items/Screwdriver.ogg', VOL_EFFECTS_MASTER)
to_chat(user, "<span class='notice'>You remove the [holochip] from the [src]</span>")

if(!issignaler(I)) //Eh, but we don't want people making secbots out of space helmets.
return ..()

var/obj/item/device/assembly/signaler/S = I
if(!S.secured)
to_chat(user, "<span class='notice'>The signaler not secured.</span>")
return ..()

var/obj/item/weapon/secbot_assembly/A = new /obj/item/weapon/secbot_assembly
user.put_in_hands(A)
to_chat(user, "<span class='notice'>You add \the [I] to the helmet.</span>")
qdel(I)
qdel(src)

/obj/item/clothing/head/helmet/psyamp
name = "psychic amplifier"
desc = "A crown-of-thorns psychic amplifier. Kind of looks like a tiara having sex with an industrial robot."
Expand Down

0 comments on commit 8d73696

Please sign in to comment.