Skip to content

Commit

Permalink
more smithing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dwasint committed Apr 10, 2024
1 parent 96c7f70 commit f0f7a2b
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
9 changes: 8 additions & 1 deletion monkestation/code/modules/slash_commands/world_topics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@
if(!id)
logger.Log(LOG_CATEGORY_DEBUG, "NO MENTOR REPLY ID", input)
return
var/datum/request/retrieved = GLOB.mentor_requests.requests_by_id[id]

var/datum/request/retrieved
for(var/datum/request/request in GLOB.mentor_requests.requests_by_id)
if(num2text(request.id) != id)
continue
retrieved = request
break

if(!retrieved)
logger.Log(LOG_CATEGORY_DEBUG, "NO MENTOR DATUM FOUND", input)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
attack_speed = CLICK_CD_LIGHT_WEAPON
stamina_cost = round(20 * (100 / smithed_quality))

force = round(((material_stats.density + material_stats.hardness) / 6.25) * (smithed_quality * 0.01))
force = round(((material_stats.density + material_stats.hardness) / 11) * (smithed_quality * 0.01))
throwforce = force * 1.5
w_class = WEIGHT_CLASS_NORMAL
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
attack_speed = CLICK_CD_BULKY_WEAPON
stamina_cost = round(40 * (100 / smithed_quality))

force = round(((material_stats.density + material_stats.hardness) / 7) * (smithed_quality * 0.01))
force = round(((material_stats.density + material_stats.hardness) / 10) * (smithed_quality * 0.01))
throwforce = force * 0.75
w_class = WEIGHT_CLASS_BULKY
4 changes: 4 additions & 0 deletions monkestation/code/modules/smithing/machines/arc_forge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

/obj/machinery/arc_forge/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
if((!slot_one_item || !slot_two_item) && (isstack(held_item) || istype(held_item, /obj/item/merged_material)))
context[SCREENTIP_CONTEXT_LMB] = "Add material to alloy."
if(slot_one_item && slot_two_item)
context[SCREENTIP_CONTEXT_ALT_LMB] = "Alloy Materials."
return CONTEXTUAL_SCREENTIP_SET
Expand All @@ -42,9 +44,11 @@
attacking_item = stack.split_stack(user, 1)

if(try_add_to_buffer(attacking_item))
visible_message(span_notice("[user] adds [attacking_item] into the arc forge."))
return TRUE
if(istype(attacking_item, /obj/item/merged_material))
if(try_add_to_buffer(attacking_item))
visible_message(span_notice("[user] adds [attacking_item] into the arc forge."))
return TRUE
. = ..()

Expand Down
15 changes: 15 additions & 0 deletions monkestation/code/modules/smithing/machines/electroplater.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@
///are we plating right now?
var/plating = FALSE

/obj/machinery/electroplater/Initialize(mapload)
. = ..()
register_context()

/obj/machinery/electroplater/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
if((isstack(held_item) || istype(held_item, /obj/item/merged_material)) && !stored_material)
context[SCREENTIP_CONTEXT_LMB] = "Add Material Plate."
if(stored_material && held_item)
context[SCREENTIP_CONTEXT_LMB] = "Try to plate item."
return CONTEXTUAL_SCREENTIP_SET

/obj/machinery/electroplater/attacked_by(obj/item/attacking_item, mob/living/user)
if(isstack(attacking_item))
if(stored_material)
Expand All @@ -38,18 +50,21 @@
if(stack.amount == 1)
attacking_item.forceMove(src)
stored_material = attacking_item
visible_message(span_notice("[user] puts the [attacking_item] into the electoplater."))
return FALSE
else
var/obj/item/stack/new_stack = stack.split_stack(user, 1)
new_stack.forceMove(src)
stored_material = new_stack
visible_message(span_notice("[user] puts the [attacking_item] into the electoplater."))
return FALSE

else if(istype(attacking_item, /obj/item/merged_material))
if(stored_material)
return TRUE
attacking_item.forceMove(src)
stored_material = attacking_item
visible_message(span_notice("[user] puts the [attacking_item] into the electoplater."))
return FALSE

if(!stored_material || plating_item || plating)
Expand Down

0 comments on commit f0f7a2b

Please sign in to comment.