Skip to content

Commit

Permalink
Я научился работать с массивами.
Browse files Browse the repository at this point in the history
  • Loading branch information
SmiLeYre committed Oct 31, 2024
1 parent 0547e65 commit 0f2eb9c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
31 changes: 31 additions & 0 deletions code/modules/admin/smites/aikofication.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/// Fires an absurd amount of bullets at the target
/datum/smite/aikofication
name = "Aikofication"

/datum/smite/aikofication/effect(client/user, mob/living/target)
. = ..()
if(!ishuman(target))
alert(usr, "ERROR: This doesn't look like a human now, does it?")
return
var/mob/living/carbon/human/human_target = target
switch(input(usr, "What to do now<br>The GLOBAL currently contains [GLOB.dna_for_copying ? GLOB.dna_for_copying.real_name : "Nothing"]", "Setting appearance") as null|anything in list("Save", "Load"))
if("Save")
if(!GLOB.dna_for_copying || !istype(GLOB.dna_for_copying, /datum/dna))
GLOB.dna_for_copying = new
human_target.dna.copy_dna(GLOB.dna_for_copying)
message_admins("[key_name(human_target)]'s dna has been saved into the punishment buffer.")
if("Load")
if(!GLOB.dna_for_copying || !istype(GLOB.dna_for_copying, /datum/dna))
alert(usr, "ERROR: There's nothing to copy!")
return
var/old_name = human_target.real_name
GLOB.dna_for_copying.transfer_identity(human_target, TRUE)
human_target.real_name = human_target.dna.real_name
var/obj/item/card/id/W = human_target.wear_id
if(W)
W.registered_name = human_target.real_name
W.update_label(W.registered_name, W.assignment)
human_target.updateappearance(mutcolor_update=1)
human_target.domutcheck()
human_target.visible_message("[old_name] transforms into [human_target.real_name]")
message_admins("[key_name(human_target)]'s dna has been loaded from the punishment buffer.")
6 changes: 6 additions & 0 deletions code/modules/admin/verbs/secrets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,14 @@
if(!GLOB.dna_for_copying || !istype(GLOB.dna_for_copying, /datum/dna))
alert(usr, "ERROR: There's nothing to copy!")
return
if(!is_station_level(H.z))
continue
GLOB.dna_for_copying.transfer_identity(H, TRUE)
H.real_name = H.dna.real_name
var/obj/item/card/id/W = H.wear_id
if(W)
W.registered_name = H.real_name
W.update_label(W.registered_name, W.assignment)
H.updateappearance(mutcolor_update=1)
H.domutcheck()
amount_modified++
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/human/dummy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ GLOBAL_LIST_EMPTY(dummy_mob_list)

if(ishuman(target))
var/mob/living/carbon/human/human_target = target
SSquirks.AssignQuirks(human_target, human_target.client, TRUE, TRUE, null, FALSE, human_target)
if(human_target?.client)
SSquirks.AssignQuirks(human_target, human_target.client, TRUE, TRUE, null, FALSE, human_target)
human_target.copy_clothing_prefs(copycat)

copycat.updateappearance(icon_update=TRUE, mutcolor_update=TRUE, mutations_overlay_update=TRUE)
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,7 @@
#include "code\modules\admin\whitelist.dm"
#include "code\modules\admin\callproc\callproc.dm"
#include "code\modules\admin\DB_ban\functions.dm"
#include "code\modules\admin\smites\aikofication.dm"
#include "code\modules\admin\smites\berforate.dm"
#include "code\modules\admin\smites\bloodless.dm"
#include "code\modules\admin\smites\boneless.dm"
Expand Down

0 comments on commit 0f2eb9c

Please sign in to comment.