Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Suckerberg <[email protected]>
Signed-off-by: BogCreature <[email protected]>
  • Loading branch information
BogCreature and MarkSuckerberg authored Dec 12, 2023
1 parent 053dfdc commit c27ba67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/items/pinpointer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
. = ..()
if(!active)
return
if(!target || target.loc == null)
if(!target?.loc)
. += "pinon[alert ? "alert" : ""]null[icon_suffix]"
return
var/turf/here = get_turf(src)
Expand Down
12 changes: 5 additions & 7 deletions code/modules/mining/ore_veins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,15 @@ GLOBAL_LIST_EMPTY(ore_veins)
ore_type_amount = rand(4,6)
else
ore_type_amount = 1
for(ore_type_amount, ore_type_amount>0, ore_type_amount--)
var/picked
picked = pickweight(ore_list)
for(var/ore_count in 1 to ore_type_amount)
var/picked = pickweight(ore_list)
vein_contents.Add(picked)
ore_list.Remove(picked)
GLOB.ore_veins += src

/obj/structure/vein/Destroy()
. = ..()
GLOB.ore_veins -= src
return ..()

/obj/structure/vein/deconstruct(disassembled)
destroy_effect()
Expand All @@ -92,9 +91,8 @@ GLOBAL_LIST_EMPTY(ore_veins)
/obj/structure/vein/proc/drop_ore(multiplier,obj/machinery/drill/current)
var/class
class = vein_class
for(class, class>0, class--)
var/picked
picked = pick(vein_contents)
for(var/vein_content_count in 1 to class)
var/picked = pick(vein_contents)
new picked(pick(get_adjacent_open_turfs(current)),round(rand(drop_rate_amount_min,drop_rate_amount_max)*multiplier))

/obj/structure/vein/proc/destroy_effect()
Expand Down

0 comments on commit c27ba67

Please sign in to comment.