Skip to content

Commit

Permalink
Refactors examine on hippie code since it wasn't properly done (tgsta…
Browse files Browse the repository at this point in the history
…tion#12595)

* That's all folks

* Nice
  • Loading branch information
yoyobatty committed Feb 8, 2020
1 parent 97c5d1f commit 2c50611
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 76 deletions.
10 changes: 5 additions & 5 deletions hippiestation/code/game/gamemodes/gangs/dominator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@
icon_state = "dominator-broken"

/obj/machinery/dominator/examine(mob/user)
..()
. = ..()
if(!(stat & BROKEN))
if(gang && gang.domination_time != NOT_DOMINATING)
if(gang.domination_time > world.time)
to_chat(user, "<span class='notice'>Hostile Takeover in progress. Estimated [gang.domination_time_remaining()] seconds remain.</span>")
. += "<span class='notice'>Hostile Takeover in progress. Estimated [gang.domination_time_remaining()] seconds remain.</span>"
else
to_chat(user, "<span class='notice'>Hostile Takeover of [station_name()] successful. Have a great day.</span>")
. += "<span class='notice'>Hostile Takeover of [station_name()] successful. Have a great day.</span>"
else
to_chat(user, "<span class='notice'>System on standby.</span>")
to_chat(user, "<span class='danger'>System Integrity: [round((obj_integrity/max_integrity)*100,1)]%</span>")
. += "<span class='notice'>System on standby.</span>"
. += "<span class='danger'>System Integrity: [round((obj_integrity/max_integrity)*100,1)]%</span>"

/obj/machinery/dominator/process()
..()
Expand Down
7 changes: 0 additions & 7 deletions hippiestation/code/game/machinery/cloning.dm

This file was deleted.

6 changes: 0 additions & 6 deletions hippiestation/code/game/machinery/dna_scanner.dm

This file was deleted.

4 changes: 2 additions & 2 deletions hippiestation/code/game/machinery/reagent_sheet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
end_volume = initial(end_volume) * MB.rating

/obj/machinery/reagent_sheet/examine(mob/user)
..()
. = ..()
if(in_range(user, src) || isobserver(user))
to_chat(user, "<span class='notice'>The status display reads: Outputting <b>[end_volume/20]</b> ingot(s) after <b>[work_time*0.1]</b> seconds of processing.<span>")
. += "<span class='notice'>The status display reads: Outputting <b>[end_volume/20]</b> ingot(s) after <b>[work_time*0.1]</b> seconds of processing.</span>"

/obj/machinery/reagent_sheet/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/reagent_containers/food/snacks/solid_reagent) && !panel_open)
Expand Down
6 changes: 3 additions & 3 deletions hippiestation/code/game/machinery/sprinkler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
plane = FLOOR_PLANE

/obj/machinery/sprinkler/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It has <b>[uses]</b> uses of foam remaining.</span>")
. = ..()
. += "<span class='notice'>It has <b>[uses]</b> uses of foam remaining.</span>"
if(in_range(user, src) || isobserver(user))
to_chat(user, "<span class='notice'>A closer look reveals the temperature threshold has been set to <b>[temp_range]C.</b><span>")
. += "<span class='notice'>A closer look reveals the temperature threshold has been set to <b>[temp_range]C.</b></span>"

/obj/machinery/sprinkler/temperature_expose(datum/gas_mixture/air, temperature, volume)
if(temperature > T0C + temp_range)
Expand Down
6 changes: 3 additions & 3 deletions hippiestation/code/game/objects/items/holotool/holotool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
var/current_color = "#48D1CC" //mediumturquoise

/obj/item/holotool/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It is currently set to [current_tool ? current_tool.name : "'off'"] mode.</span>")
to_chat(user, "<span class='notice'>Ctrl+Click it to open the radial menu!</span>")
. = ..()
. += "<span class='notice'>It is currently set to [current_tool ? current_tool.name : "'off'"] mode.</span>"
. += "<span class='notice'>Ctrl+Click it to open the radial menu!</span>"

/obj/item/holotool/ui_action_click(mob/user, datum/action/action)
if(istype(action, /datum/action/item_action/change_tool))
Expand Down
4 changes: 2 additions & 2 deletions hippiestation/code/game/objects/items/melee/hfblade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
))

/obj/item/storage/belt/hfblade/examine(mob/user)
..()
. = ..()
if(length(contents))
to_chat(user, "<span class='notice'>Alt-click it to quickly draw the blade.</span>")
. += "<span class='notice'>Alt-click it to quickly draw the blade.</span>"

/obj/item/storage/belt/hfblade/AltClick(mob/user)
if(!iscarbon(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/obj/item/pinpointer/infiltrator/examine(mob/user)
. = ..()
to_chat(user, "<span class='notice'>It is tracking [mode == MODE_CUTTER ? "the syndicate cutter" : "an objective target"].</span>")
. += "<span class='notice'>It is tracking [mode == MODE_CUTTER ? "the syndicate cutter" : "an objective target"].</span>"

/obj/item/pinpointer/infiltrator/scan_for_target()
target = current_target
Expand Down
8 changes: 4 additions & 4 deletions hippiestation/code/modules/clothing/shoes/magboots.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
cell.use(10)

/obj/item/clothing/shoes/magboots/antigrav/examine(mob/user)
..()
. = ..()
if(cell)
to_chat(user, "<span class='notice'>Cell charge:[cell.percent()]%.</span>")
. += "<span class='notice'>Cell charge: [cell.percent()]%.</span>"
else
to_chat(user, "<span class='warning'>No cell detected.</span>")
. += "<span class='warning'>No cell detected.</span>"

/obj/item/clothing/shoes/magboots/antigrav/equipped(mob/user, slot)
..()
Expand Down Expand Up @@ -75,4 +75,4 @@
//user.update_gravity(user.has_gravity())
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
A.UpdateButtonIcon()
8 changes: 4 additions & 4 deletions hippiestation/code/modules/crafts/shield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
var/max_damage = 60 //Amount of max damage the trayshield can withstand

/obj/item/shield/trayshield/examine(mob/user)
..()
. = ..()
var/a = max(0, max_damage - damage_received)
if(a <= max_damage/4) //20
to_chat(user, "It's falling apart.")
. += "It's falling apart."
else if(a <= max_damage/2) //40
to_chat(user, "It's badly damaged.")
. += "It's badly damaged."
else if(a < max_damage)
to_chat(user, "It's slightly damaged.")
. += "It's slightly damaged."

/obj/item/shield/trayshield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 4, attack_type = MELEE_ATTACK)
if(..())
Expand Down
7 changes: 4 additions & 3 deletions hippiestation/code/modules/events/holiday/vday.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
resistance_flags = FLAMMABLE
w_class = WEIGHT_CLASS_TINY

/obj/item/valentine/New()
..()
/obj/item/valentine/Initialize()
. = ..()
message = pick("Roses are red / Violets are good / One day while Andy...",
"My love for you is like the singularity. It cannot be contained.",
"Will you be my lusty xenomorph maid?",
Expand Down Expand Up @@ -148,6 +148,7 @@
name = "valentine - To: [recipient] From: [sender]"

/obj/item/valentine/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
if( !(ishuman(user) || isobserver(user) || issilicon(user)) )
user << browse("<HTML><HEAD>[UTF8HEADER]<TITLE>[name]</TITLE></HEAD><BODY>[stars(message)]</BODY></HTML>", "window=[name]")
Expand All @@ -156,7 +157,7 @@
user << browse("<HTML><HEAD>[UTF8HEADER]<TITLE>[name]</TITLE></HEAD><BODY>[message]</BODY></HTML>", "window=[name]")
onclose(user, "[name]")
else
to_chat(user, "<span class='notice'>It is too far away.</span>")
. += "<span class='notice'>It is too far away.</span>"

/obj/item/valentine/attack_self(mob/user)
user.examinate(src)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
/obj/item/electronic_assembly/examine(mob/user)
. = ..()
if(can_anchor)
to_chat(user, "<span class='notice'>The anchoring bolts [anchored ? "are" : "can be"] <b>wrenched</b> in place and the maintenance panel [opened ? "can be" : "is"] <b>screwed</b> in place.</span>")
. += "<span class='notice'>The anchoring bolts [anchored ? "are" : "can be"] <b>wrenched</b> in place and the maintenance panel [opened ? "can be" : "is"] <b>screwed</b> in place.</span>"
else
to_chat(user, "<span class='notice'>The maintenance panel [opened ? "can be" : "is"] <b>screwed</b> in place.</span>")
. += "<span class='notice'>The maintenance panel [opened ? "can be" : "is"] <b>screwed</b> in place.</span>"

if((isobserver(user) && ckeys_allowed_to_scan[user.ckey]) || IsAdminGhost(user))
to_chat(user, "You can <a href='?src=[REF(src)];ghostscan=1'>scan</a> this circuit.")
. += "You can <a href='?src=[REF(src)];ghostscan=1'>scan</a> this circuit."

for(var/obj/item/integrated_circuit/I in assembly_components)
I.external_examine(user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
. = ..()

/obj/item/integrated_circuit/memory/examine(mob/user)
..()
. = ..()
var/i
for(i = 1, i <= outputs.len, i++)
var/datum/integrated_io/O = outputs[i]
Expand All @@ -30,7 +30,7 @@
data = "[d]"
else if(!isnull(O.data))
data = O.data
to_chat(user, "\The [src] has [data] saved to address [i].")
. += "\The [src] has [data] saved to address [i]."

/obj/item/integrated_circuit/memory/do_work()
for(var/i = 1 to inputs.len)
Expand Down
4 changes: 2 additions & 2 deletions hippiestation/code/modules/mining/machine_redemption.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
sheet_per_ore = sheet_per_ore_temp

/obj/machinery/mineral/ore_redemption/examine(mob/user)
..()
. = ..()
if(in_range(user, src) || isobserver(user))
to_chat(user, "<span class='notice'>The status display reads: Smelting <b>[sheet_per_ore]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.<span>")
. += "<span class='notice'>The status display reads: Smelting <b>[sheet_per_ore]</b> sheet(s) per piece of ore.<br>Reward point generation at <b>[point_upgrade*100]%</b>.<br>Ore pickup speed at <b>[ore_pickup_rate]</b>.</span>"

/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
var/datum/component/material_container/mat_container = materials.mat_container
Expand Down
26 changes: 9 additions & 17 deletions hippiestation/code/modules/paperwork/photography.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
continue
if(C.invisibility)
continue
var/datum/photo_disguise/D = new()
var/datum/photo_disguise/D = new
D.name = C.name
D.examine_override = C.examine(null) // Don't actually print anything please
D.examine_override = C.examine(user) // Don't actually print anything please
D.special_appearance = C.appearance
picture.potential_disguises[C.name] = D
..()
Expand All @@ -48,51 +48,43 @@
var/datum/picture/P = photo.picture
if (LAZYLEN(P.potential_disguises) > 0)
var/chosen = input("Select a target to disguise as", "Pick target") as null|anything in P.potential_disguises

if (chosen)
var/datum/photo_disguise/D = P.potential_disguises[chosen]

if (D)
to_chat(user, "<span class='notice'>You gently place the cut-out of [chosen] onto the box, careful to make sure it looks genuine.</span>")
disguise = D
qdel(W)

if (!opened)
icon = null
appearance = D.special_appearance
else
. = ..()

/obj/structure/closet/cardboard/examine(mob/user)
// If you're examining it from far enough away it looks like a regular person
if (get_dist(src, user) > 1 && disguise && !opened)
to_chat(user, disguise.examine_override)
return

. = ..()

if (get_dist(src, user) <= 1 && disguise && !opened)
to_chat(user, "<span class='warning'>Upon close inspection it looks like a shoddy impersonation of [disguise]!</span>")
to_chat(user, "<span class='notice'>Alt-click to remove the impersonation</span>")
// If you're examining it from far enough away it looks like a regular person
if(disguise && !opened)
if(in_range(src, user))
. += "<span class='warning'>Upon close inspection it looks like a shoddy impersonation of [disguise]!</span>"
. += "<span class='notice'>Alt-click to remove the impersonation</span>"
else
. = disguise.examine_override

/obj/structure/closet/cardboard/AltClick(mob/user)
if (disguise)
visible_message("<span class='warning'>[user] rips the cut-out of [disguise] from the [src]!<span>")
playsound(loc, 'sound/items/poster_ripped.ogg', 100, 1)
disguise = null

if (!opened)
appearance = initial(appearance)
else
. = ..()

/obj/structure/closet/cardboard/close(mob/living/user)
. = ..()

if (disguise)
appearance = disguise.special_appearance

/obj/structure/closet/cardboard/open(mob/living/user)
appearance = initial(appearance)

. = ..()
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
return

/obj/item/gun/ballistic/crossbow/examine(mob/user)
..()
. = ..()
var/bowstring = "The bow string is "
if (charge > 2)
bowstring = bowstring + "drawn back fully"
Expand All @@ -109,10 +109,10 @@
bowstring = bowstring + "drawn back a little"
else
bowstring = bowstring + "not drawn"
to_chat(user, "[bowstring][charge > 2 ? "!" : "."]")
. += "[bowstring][charge > 2 ? "!" : "."]"

if (chambered?.BB)
to_chat(user, "A [chambered.BB] is loaded.")
. += "A [chambered.BB] is loaded."

/obj/item/gun/ballistic/crossbow/update_icon()
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@
/obj/item/gun/ballistic/automatic/magrifle_e/examine(mob/user)
. = ..()
if(cell)
to_chat(user, "<span class='notice'>[src]'s cell is [round(cell.charge / cell.maxcharge, 0.1) * 100]% full.</span>")
. += "<span class='notice'>[src]'s cell is [round(cell.charge / cell.maxcharge, 0.1) * 100]% full.</span>"
else
to_chat(user, "<span class='notice'>[src] doesn't seem to have a cell!</span>")
. += "<span class='notice'>[src] doesn't seem to have a cell!</span>"

/obj/item/gun/ballistic/automatic/magrifle_e/can_shoot()
if(QDELETED(cell))
Expand Down Expand Up @@ -168,9 +168,9 @@
/obj/item/gun/ballistic/automatic/pistol/mag_e/examine(mob/user)
. = ..()
if(cell)
to_chat(user, "<span class='notice'>[src]'s cell is [round(cell.charge / cell.maxcharge, 0.1) * 100]% full.</span>")
. += "<span class='notice'>[src]'s cell is [round(cell.charge / cell.maxcharge, 0.1) * 100]% full.</span>"
else
to_chat(user, "<span class='notice'>[src] doesn't seem to have a cell!</span>")
. += "<span class='notice'>[src] doesn't seem to have a cell!</span>"

/obj/item/gun/ballistic/automatic/pistol/mag_e/can_shoot()
if(QDELETED(cell))
Expand Down
6 changes: 3 additions & 3 deletions hippiestation/code/modules/projectiles/guns/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@
trigger_guard = TRIGGER_GUARD_ALLOW_ALL

/obj/item/gun/energy/watcherprojector/examine(mob/user)
..()
. = ..()
if(cell)
to_chat(user, "<span class='notice'>[src]'s diamond core is [round(cell.percent())]% energized.</span>")
. +="<span class='notice'>[src]'s diamond core is [round(cell.percent())]% energized.</span>"

/obj/item/gun/energy/watcherprojector/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/stack/sheet/mineral/plasma))
Expand Down Expand Up @@ -546,4 +546,4 @@
process_fire(target, user, TRUE, params)
if(chambered && chambered.BB)
var/obj/item/bodypart/BP = target.get_bodypart(BODY_ZONE_HEAD)
BP.dismember() //FUN EXECUTION/SUICIDE!
BP.dismember() //FUN EXECUTION/SUICIDE!
4 changes: 2 additions & 2 deletions hippiestation/code/modules/telescience/telesci_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
return ..()

/obj/machinery/computer/telescience/examine(mob/user)
..()
to_chat(user, "There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots.")
. = ..()
. += "<span class='notice'>There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots.</span>"

/obj/machinery/computer/telescience/Initialize(mapload)
. = ..()
Expand Down

0 comments on commit 2c50611

Please sign in to comment.