Cleanup redundant machine stuff (#18494)

This commit is contained in:
AffectedArc07
2022-07-27 21:25:39 +01:00
committed by GitHub
parent 53c4aad491
commit 2f5cec832d
26 changed files with 80 additions and 627 deletions
+9 -9
View File
@@ -104,21 +104,19 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
return desc
/datum/uplink_item/proc/buy(obj/item/uplink/hidden/U, mob/user)
if(!istype(U))
return 0
return FALSE
if(user.stat || user.restrained())
return 0
return FALSE
if(!(istype(user, /mob/living/carbon/human)))
return 0
return FALSE
// If the uplink's holder is in the user's contents
if((U.loc in user.contents || (in_range(U.loc, user) && istype(U.loc.loc, /turf))))
user.set_machine(U)
if(cost > U.uses)
return 0
return FALSE
var/obj/I = spawn_item(get_turf(user), U)
@@ -129,21 +127,23 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
log_game("[key_name(user)] purchased [name]. [name] was discounted to [cost].")
if(!user.mind.special_role)
message_admins("[key_name_admin(user)] purchased [name] (discounted to [cost]), as a non antagonist.")
else
log_game("[key_name(user)] purchased [name].")
if(!user.mind.special_role)
message_admins("[key_name_admin(user)] purchased [name], as a non antagonist.")
A.put_in_any_hand_if_possible(I)
if(istype(I,/obj/item/storage/box/) && I.contents.len>0)
for(var/atom/o in I)
U.purchase_log += "<BIG>[bicon(o)]</BIG>"
else
U.purchase_log += "<BIG>[bicon(I)]</BIG>"
//U.interact(user)
return 1
return 0
return TRUE
return FALSE
/*
//